diff --git a/VencordDesktop/settings.json b/VencordDesktop/settings.json
index c99d322..98b754d 100644
--- a/VencordDesktop/settings.json
+++ b/VencordDesktop/settings.json
@@ -6,9 +6,9 @@
"splashColor": "rgb(219, 222, 225)",
"splashBackground": "rgb(0, 7, 32)",
"windowBounds": {
- "x": 2,
+ "x": 962,
"y": 44,
- "width": 1916,
+ "width": 956,
"height": 1034
},
"maximized": true,
diff --git a/VencordDesktop/vencordDist/vencordDesktopMain.js b/VencordDesktop/vencordDist/vencordDesktopMain.js
index a4405b8..13b0abf 100644
--- a/VencordDesktop/vencordDist/vencordDesktopMain.js
+++ b/VencordDesktop/vencordDist/vencordDesktopMain.js
@@ -1,8 +1,8 @@
-// Vencord 81fb7c6
+// Vencord 96126fa
// Standalone: true
// Platform: Universal
// Updater disabled: false
-"use strict";var Yn=Object.create;var Te=Object.defineProperty;var Xn=Object.getOwnPropertyDescriptor;var Jn=Object.getOwnPropertyNames;var Qn=Object.getPrototypeOf,qn=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ye=(e,n)=>{for(var t in n)Te(e,t,{get:n[t],enumerable:!0})},$n=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Jn(n))!qn.call(e,i)&&i!==t&&Te(e,i,{get:()=>n[i],enumerable:!(r=Xn(n,i))||r.enumerable});return e};var et=(e,n,t)=>(t=e!=null?Yn(Qn(e)):{},$n(n||!e||!e.__esModule?Te(t,"default",{value:e,enumerable:!0}):t,e));var u=O(()=>{"use strict"});var te,xe=O(()=>{u();te="81fb7c6"});var B,Ee=O(()=>{u();B="Vendicated/Vencord"});var Xe,Je=O(()=>{"use strict";u();xe();Ee();Xe=`Vencord/${te}${B?` (https://github.com/${B})`:""}`});var le=O(()=>{"use strict";u()});function H(e,n={}){return new Promise((t,r)=>{Qe.default.get(e,n,i=>{let{statusCode:o,statusMessage:a,headers:s}=i;if(o>=400)return void r(`${o}: ${a} - ${e}`);if(o>=300)return void t(H(s.location,n));let c=[];i.on("error",r),i.on("data",f=>c.push(f)),i.once("end",()=>t(Buffer.concat(c)))})})}var Qe,De=O(()=>{"use strict";u();Qe=et(require("https"))});function re(e){return async function(){try{return{ok:!0,value:await e(...arguments)}}catch(n){return{ok:!1,error:n instanceof Error?{...n}:n}}}}var qe,$e=O(()=>{"use strict";u();qe=["vencordDesktopMain.js","vencordDesktopPreload.js","vencordDesktopRenderer.js","vencordDesktopRenderer.css"]});var it={};async function rn(e){return H(nt+e,{headers:{Accept:"application/vnd.github+json","User-Agent":Xe}})}async function tt(){if(!await an())return[];let n=await rn(`/compare/${te}...HEAD`);return JSON.parse(n.toString("utf-8")).commits.map(r=>({hash:r.sha.slice(0,7),author:r.author.login,message:r.commit.message}))}async function an(){let e=await rn("/releases/latest"),n=JSON.parse(e.toString());return n.name.slice(n.name.lastIndexOf(" ")+1)===te?!1:(n.assets.forEach(({name:r,browser_download_url:i})=>{qe.some(o=>r.startsWith(o))&&Re.push([r,i])}),!0)}async function rt(){return await Promise.all(Re.map(async([e,n])=>(0,nn.writeFile)((0,tn.join)(__dirname,e),await H(n)))),Re=[],!0}var ie,nn,tn,nt,Re,on=O(()=>{"use strict";u();Je();le();ie=require("electron"),nn=require("fs/promises"),tn=require("path");xe();Ee();De();$e();nt=`https://api.github.com/repos/${B}`,Re=[];ie.ipcMain.handle("VencordGetRepo",re(()=>`https://github.com/${B}`));ie.ipcMain.handle("VencordGetUpdates",re(tt));ie.ipcMain.handle("VencordUpdate",re(an));ie.ipcMain.handle("VencordBuild",re(rt))});u();var Z=require("electron"),Bn=require("path");u();u();Promise.resolve().then(()=>on());u();le();var ke=require("electron");u();var cn={};u();var sn=require("electron");sn.app.on("browser-window-created",(e,n)=>{n.webContents.on("frame-created",(t,{frame:r})=>{r.once("dom-ready",()=>{if(r.url.startsWith("https://open.spotify.com/embed/")){let i=he().plugins?.FixSpotifyEmbeds;if(!i?.enabled)return;r.executeJavaScript(`
+"use strict";var Yn=Object.create;var Te=Object.defineProperty;var Xn=Object.getOwnPropertyDescriptor;var Jn=Object.getOwnPropertyNames;var Qn=Object.getPrototypeOf,qn=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ye=(e,n)=>{for(var t in n)Te(e,t,{get:n[t],enumerable:!0})},$n=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Jn(n))!qn.call(e,i)&&i!==t&&Te(e,i,{get:()=>n[i],enumerable:!(r=Xn(n,i))||r.enumerable});return e};var et=(e,n,t)=>(t=e!=null?Yn(Qn(e)):{},$n(n||!e||!e.__esModule?Te(t,"default",{value:e,enumerable:!0}):t,e));var u=O(()=>{"use strict"});var te,xe=O(()=>{u();te="96126fa"});var B,Ee=O(()=>{u();B="Vendicated/Vencord"});var Xe,Je=O(()=>{"use strict";u();xe();Ee();Xe=`Vencord/${te}${B?` (https://github.com/${B})`:""}`});var le=O(()=>{"use strict";u()});function H(e,n={}){return new Promise((t,r)=>{Qe.default.get(e,n,i=>{let{statusCode:o,statusMessage:a,headers:s}=i;if(o>=400)return void r(`${o}: ${a} - ${e}`);if(o>=300)return void t(H(s.location,n));let c=[];i.on("error",r),i.on("data",f=>c.push(f)),i.once("end",()=>t(Buffer.concat(c)))})})}var Qe,De=O(()=>{"use strict";u();Qe=et(require("https"))});function re(e){return async function(){try{return{ok:!0,value:await e(...arguments)}}catch(n){return{ok:!1,error:n instanceof Error?{...n}:n}}}}var qe,$e=O(()=>{"use strict";u();qe=["vencordDesktopMain.js","vencordDesktopPreload.js","vencordDesktopRenderer.js","vencordDesktopRenderer.css"]});var it={};async function rn(e){return H(nt+e,{headers:{Accept:"application/vnd.github+json","User-Agent":Xe}})}async function tt(){if(!await an())return[];let n=await rn(`/compare/${te}...HEAD`);return JSON.parse(n.toString("utf-8")).commits.map(r=>({hash:r.sha.slice(0,7),author:r.author.login,message:r.commit.message}))}async function an(){let e=await rn("/releases/latest"),n=JSON.parse(e.toString());return n.name.slice(n.name.lastIndexOf(" ")+1)===te?!1:(n.assets.forEach(({name:r,browser_download_url:i})=>{qe.some(o=>r.startsWith(o))&&Re.push([r,i])}),!0)}async function rt(){return await Promise.all(Re.map(async([e,n])=>(0,nn.writeFile)((0,tn.join)(__dirname,e),await H(n)))),Re=[],!0}var ie,nn,tn,nt,Re,on=O(()=>{"use strict";u();Je();le();ie=require("electron"),nn=require("fs/promises"),tn=require("path");xe();Ee();De();$e();nt=`https://api.github.com/repos/${B}`,Re=[];ie.ipcMain.handle("VencordGetRepo",re(()=>`https://github.com/${B}`));ie.ipcMain.handle("VencordGetUpdates",re(tt));ie.ipcMain.handle("VencordUpdate",re(an));ie.ipcMain.handle("VencordBuild",re(rt))});u();var Z=require("electron"),Bn=require("path");u();u();Promise.resolve().then(()=>on());u();le();var ke=require("electron");u();var cn={};u();var sn=require("electron");sn.app.on("browser-window-created",(e,n)=>{n.webContents.on("frame-created",(t,{frame:r})=>{r.once("dom-ready",()=>{if(r.url.startsWith("https://open.spotify.com/embed/")){let i=he().plugins?.FixSpotifyEmbeds;if(!i?.enabled)return;r.executeJavaScript(`
const original = Audio.prototype.play;
Audio.prototype.play = function() {
this.volume = ${i.volume/100||.1};
diff --git a/VencordDesktop/vencordDist/vencordDesktopMain.js.map b/VencordDesktop/vencordDist/vencordDesktopMain.js.map
index e3e70a3..a7bc570 100644
--- a/VencordDesktop/vencordDist/vencordDesktopMain.js.map
+++ b/VencordDesktop/vencordDist/vencordDesktopMain.js.map
@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../scripts/build/inject/react.mjs", "git-hash:~git-hash", "git-remote:~git-remote", "../src/utils/constants.ts", "../src/utils/IpcEvents.ts", "../src/main/utils/simpleGet.ts", "../src/main/updater/common.ts", "../src/main/updater/http.ts", "../src/main/index.ts", "../src/main/ipcMain.ts", "../src/main/updater/index.ts", "../src/main/ipcPlugins.ts", "import-natives:~pluginNatives", "../src/plugins/fixSpotifyEmbeds.desktop/native.ts", "../src/plugins/openInApp/native.ts", "../src/plugins/voiceMessages/native.ts", "../src/utils/debounce.ts", "../src/utils/Queue.ts", "include-file:~fileContent/monacoWin.html;base64", "../src/main/themes/index.ts", "../src/main/utils/constants.ts", "../src/main/utils/externalLinks.ts", "../src/main/utils/extensions.ts", "../node_modules/.pnpm/fflate@0.7.4/node_modules/fflate/esm/index.mjs", "../src/main/utils/crxToZip.ts"],
- "sourcesContent": ["/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nexport const VencordFragment = /* #__PURE__*/ Symbol.for(\"react.fragment\");\nexport let VencordCreateElement =\n (...args) => (VencordCreateElement = Vencord.Webpack.Common.React.createElement)(...args);\n", "export default \"81fb7c6\"", "export default \"Vendicated/Vencord\"", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport gitHash from \"~git-hash\";\nimport gitRemote from \"~git-remote\";\n\nexport {\n gitHash,\n gitRemote\n};\n\nexport const WEBPACK_CHUNK = \"webpackChunkdiscord_app\";\nexport const REACT_GLOBAL = \"Vencord.Webpack.Common.React\";\nexport const VENCORD_USER_AGENT = `Vencord/${gitHash}${gitRemote ? ` (https://github.com/${gitRemote})` : \"\"}`;\nexport const SUPPORT_CHANNEL_ID = \"1026515880080842772\";\n\nexport interface Dev {\n name: string;\n id: bigint;\n badge?: boolean;\n}\n\n/**\n * If you made a plugin or substantial contribution, add yourself here.\n * This object is used for the plugin author list, as well as to add a contributor badge to your profile.\n * If you wish to stay fully anonymous, feel free to set ID to 0n.\n * If you are fine with attribution but don't want the badge, add badge: false\n */\nexport const Devs = /* #__PURE__*/ Object.freeze({\n Ven: {\n name: \"Vendicated\",\n id: 343383572805058560n\n },\n Arjix: {\n name: \"ArjixWasTaken\",\n id: 674710789138939916n\n },\n Cyn: {\n name: \"Cynosphere\",\n id: 150745989836308480n\n },\n Megu: {\n name: \"Megumin\",\n id: 545581357812678656n\n },\n botato: {\n name: \"botato\",\n id: 440990343899643943n\n },\n obscurity: {\n name: \"obscurity\",\n id: 336678828233588736n,\n },\n rushii: {\n name: \"rushii\",\n id: 295190422244950017n\n },\n Glitch: {\n name: \"Glitchy\",\n id: 269567451199569920n\n },\n Samu: {\n name: \"Samu\",\n id: 702973430449832038n,\n },\n Animal: {\n name: \"Animal\",\n id: 118437263754395652n\n },\n MaiKokain: {\n name: \"Mai\",\n id: 722647978577363026n\n },\n echo: {\n name: \"ECHO\",\n id: 712639419785412668n\n },\n katlyn: {\n name: \"katlyn\",\n id: 250322741406859265n\n },\n nea: {\n name: \"nea\",\n id: 310702108997320705n,\n },\n Nuckyz: {\n name: \"Nuckyz\",\n id: 235834946571337729n\n },\n D3SOX: {\n name: \"D3SOX\",\n id: 201052085641281538n\n },\n Nickyux: {\n name: \"Nickyux\",\n id: 427146305651998721n\n },\n mantikafasi: {\n name: \"mantikafasi\",\n id: 287555395151593473n\n },\n Xinto: {\n name: \"Xinto\",\n id: 423915768191647755n\n },\n JacobTm: {\n name: \"Jacob.Tm\",\n id: 302872992097107991n\n },\n DustyAngel47: {\n name: \"DustyAngel47\",\n id: 714583473804935238n\n },\n BanTheNons: {\n name: \"BanTheNons\",\n id: 460478012794863637n\n },\n BigDuck: {\n name: \"BigDuck\",\n id: 1024588272623681609n\n },\n AverageReactEnjoyer: {\n name: \"Average React Enjoyer\",\n id: 1004904120056029256n\n },\n adryd: {\n name: \"adryd\",\n id: 0n\n },\n Tyman: {\n name: \"Tyman\",\n id: 487443883127472129n\n },\n afn: {\n name: \"afn\",\n id: 420043923822608384n\n },\n KraXen72: {\n name: \"KraXen72\",\n id: 379304073515499530n\n },\n kemo: {\n name: \"kemo\",\n id: 299693897859465228n\n },\n dzshn: {\n name: \"dzshn\",\n id: 310449948011528192n\n },\n Ducko: {\n name: \"Ducko\",\n id: 506482395269169153n\n },\n jewdev: {\n name: \"jewdev\",\n id: 222369866529636353n\n },\n Luna: {\n name: \"Luny\",\n id: 821472922140803112n\n },\n Vap: {\n name: \"Vap0r1ze\",\n id: 454072114492866560n\n },\n KingFish: {\n name: \"King Fish\",\n id: 499400512559382538n\n },\n Commandtechno: {\n name: \"Commandtechno\",\n id: 296776625432035328n,\n },\n TheSun: {\n name: \"ActuallyTheSun\",\n id: 406028027768733696n\n },\n axyie: {\n name: \"'ax\",\n id: 273562710745284628n,\n },\n pointy: {\n name: \"pointy\",\n id: 99914384989519872n\n },\n SammCheese: {\n name: \"Samm-Cheese\",\n id: 372148345894076416n\n },\n zt: {\n name: \"zt\",\n id: 289556910426816513n\n },\n captain: {\n name: \"Captain\",\n id: 347366054806159360n\n },\n nick: {\n name: \"nick\",\n id: 347884694408265729n,\n badge: false\n },\n whqwert: {\n name: \"whqwert\",\n id: 586239091520176128n\n },\n lewisakura: {\n name: \"lewisakura\",\n id: 96269247411400704n\n },\n RuiNtD: {\n name: \"RuiNtD\",\n id: 157917665162297344n\n },\n hunt: {\n name: \"hunt-g\",\n id: 222800179697287168n\n },\n cloudburst: {\n name: \"cloudburst\",\n id: 892128204150685769n\n },\n Aria: {\n name: \"Syncxv\",\n id: 549244932213309442n,\n },\n TheKodeToad: {\n name: \"TheKodeToad\",\n id: 706152404072267788n\n },\n LordElias: {\n name: \"LordElias\",\n id: 319460781567639554n\n },\n juby: {\n name: \"Juby210\",\n id: 324622488644616195n\n },\n Alyxia: {\n name: \"Alyxia Sother\",\n id: 952185386350829688n\n },\n Remty: {\n name: \"Remty\",\n id: 335055032204656642n\n },\n skyevg: {\n name: \"skyevg\",\n id: 1090310844283363348n\n },\n Dziurwa: {\n name: \"Dziurwa\",\n id: 1001086404203389018n\n },\n F53: {\n name: \"F53\",\n id: 280411966126948353n\n },\n AutumnVN: {\n name: \"AutumnVN\",\n id: 393694671383166998n\n },\n pylix: {\n name: \"pylix\",\n id: 492949202121261067n\n },\n Tyler: {\n name: \"\\\\\\\\GGTyler\\\\\\\\\",\n id: 143117463788191746n\n },\n RyanCaoDev: {\n name: \"RyanCaoDev\",\n id: 952235800110694471n,\n },\n Strencher: {\n name: \"Strencher\",\n id: 415849376598982656n\n },\n FieryFlames: {\n name: \"Fiery\",\n id: 890228870559698955n\n },\n KannaDev: {\n name: \"Kanna\",\n id: 317728561106518019n\n },\n carince: {\n name: \"carince\",\n id: 818323528755314698n\n },\n PandaNinjas: {\n name: \"PandaNinjas\",\n id: 455128749071925248n\n },\n CatNoir: {\n name: \"CatNoir\",\n id: 260371016348336128n\n },\n outfoxxed: {\n name: \"outfoxxed\",\n id: 837425748435796060n\n },\n UwUDev: {\n name: \"UwU\",\n id: 691413039156690994n,\n },\n amia: {\n name: \"amia\",\n id: 142007603549962240n\n },\n phil: {\n name: \"phil\",\n id: 305288513941667851n\n },\n ImLvna: {\n name: \"Luna <3\",\n id: 799319081723232267n\n },\n rad: {\n name: \"rad\",\n id: 610945092504780823n\n },\n AndrewDLO: {\n name: \"Andrew-DLO\",\n id: 434135504792059917n\n },\n HypedDomi: {\n name: \"HypedDomi\",\n id: 354191516979429376n\n },\n Rini: {\n name: \"Rini\",\n id: 1079479184478441643n\n },\n castdrian: {\n name: \"castdrian\",\n id: 224617799434108928n\n },\n Arrow: {\n name: \"arrow\",\n id: 958158495302176778n\n },\n bb010g: {\n name: \"bb010g\",\n id: 72791153467990016n,\n },\n Lumap: {\n name: \"lumap\",\n id: 635383782576357407n\n },\n Dolfies: {\n name: \"Dolfies\",\n id: 852892297661906993n,\n },\n RuukuLada: {\n name: \"RuukuLada\",\n id: 119705748346241027n,\n },\n blahajZip: {\n name: \"blahaj.zip\",\n id: 683954422241427471n,\n },\n archeruwu: {\n name: \"archer_uwu\",\n id: 160068695383736320n\n },\n ProffDea: {\n name: \"ProffDea\",\n id: 609329952180928513n\n },\n ant0n: {\n name: \"ant0n\",\n id: 145224646868860928n\n },\n} satisfies Record);\n\n// iife so #__PURE__ works correctly\nexport const DevsById = /* #__PURE__*/ (() =>\n Object.freeze(Object.fromEntries(\n Object.entries(Devs)\n .filter(d => d[1].id !== 0n)\n .map(([_, v]) => [v.id, v] as const)\n ))\n)() as Record;\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nexport const enum IpcEvents {\n QUICK_CSS_UPDATE = \"VencordQuickCssUpdate\",\n THEME_UPDATE = \"VencordThemeUpdate\",\n GET_QUICK_CSS = \"VencordGetQuickCss\",\n SET_QUICK_CSS = \"VencordSetQuickCss\",\n UPLOAD_THEME = \"VencordUploadTheme\",\n DELETE_THEME = \"VencordDeleteTheme\",\n GET_THEMES_DIR = \"VencordGetThemesDir\",\n GET_THEMES_LIST = \"VencordGetThemesList\",\n GET_THEME_DATA = \"VencordGetThemeData\",\n GET_THEME_SYSTEM_VALUES = \"VencordGetThemeSystemValues\",\n GET_SETTINGS_DIR = \"VencordGetSettingsDir\",\n GET_SETTINGS = \"VencordGetSettings\",\n SET_SETTINGS = \"VencordSetSettings\",\n OPEN_EXTERNAL = \"VencordOpenExternal\",\n OPEN_QUICKCSS = \"VencordOpenQuickCss\",\n GET_UPDATES = \"VencordGetUpdates\",\n GET_REPO = \"VencordGetRepo\",\n UPDATE = \"VencordUpdate\",\n BUILD = \"VencordBuild\",\n OPEN_MONACO_EDITOR = \"VencordOpenMonacoEditor\",\n\n GET_PLUGIN_IPC_METHOD_MAP = \"VencordGetPluginIpcMethodMap\",\n\n OPEN_IN_APP__RESOLVE_REDIRECT = \"VencordOIAResolveRedirect\",\n VOICE_MESSAGES_READ_RECORDING = \"VencordVMReadRecording\",\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport https from \"https\";\n\nexport function get(url: string, options: https.RequestOptions = {}) {\n return new Promise((resolve, reject) => {\n https.get(url, options, res => {\n const { statusCode, statusMessage, headers } = res;\n if (statusCode! >= 400)\n return void reject(`${statusCode}: ${statusMessage} - ${url}`);\n if (statusCode! >= 300)\n return void resolve(get(headers.location!, options));\n\n const chunks = [] as Buffer[];\n res.on(\"error\", reject);\n\n res.on(\"data\", chunk => chunks.push(chunk));\n res.once(\"end\", () => resolve(Buffer.concat(chunks)));\n });\n });\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nexport const VENCORD_FILES = [\n IS_DISCORD_DESKTOP ? \"patcher.js\" : \"vencordDesktopMain.js\",\n IS_DISCORD_DESKTOP ? \"preload.js\" : \"vencordDesktopPreload.js\",\n IS_DISCORD_DESKTOP ? \"renderer.js\" : \"vencordDesktopRenderer.js\",\n IS_DISCORD_DESKTOP ? \"renderer.css\" : \"vencordDesktopRenderer.css\",\n];\n\nexport function serializeErrors(func: (...args: any[]) => any) {\n return async function () {\n try {\n return {\n ok: true,\n value: await func(...arguments)\n };\n } catch (e: any) {\n return {\n ok: false,\n error: e instanceof Error ? {\n // prototypes get lost, so turn error into plain object\n ...e\n } : e\n };\n }\n };\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { VENCORD_USER_AGENT } from \"@utils/constants\";\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { ipcMain } from \"electron\";\nimport { writeFile } from \"fs/promises\";\nimport { join } from \"path\";\n\nimport gitHash from \"~git-hash\";\nimport gitRemote from \"~git-remote\";\n\nimport { get } from \"../utils/simpleGet\";\nimport { serializeErrors, VENCORD_FILES } from \"./common\";\n\nconst API_BASE = `https://api.github.com/repos/${gitRemote}`;\nlet PendingUpdates = [] as [string, string][];\n\nasync function githubGet(endpoint: string) {\n return get(API_BASE + endpoint, {\n headers: {\n Accept: \"application/vnd.github+json\",\n // \"All API requests MUST include a valid User-Agent header.\n // Requests with no User-Agent header will be rejected.\"\n \"User-Agent\": VENCORD_USER_AGENT\n }\n });\n}\n\nasync function calculateGitChanges() {\n const isOutdated = await fetchUpdates();\n if (!isOutdated) return [];\n\n const res = await githubGet(`/compare/${gitHash}...HEAD`);\n\n const data = JSON.parse(res.toString(\"utf-8\"));\n return data.commits.map((c: any) => ({\n // github api only sends the long sha\n hash: c.sha.slice(0, 7),\n author: c.author.login,\n message: c.commit.message\n }));\n}\n\nasync function fetchUpdates() {\n const release = await githubGet(\"/releases/latest\");\n\n const data = JSON.parse(release.toString());\n const hash = data.name.slice(data.name.lastIndexOf(\" \") + 1);\n if (hash === gitHash)\n return false;\n\n data.assets.forEach(({ name, browser_download_url }) => {\n if (VENCORD_FILES.some(s => name.startsWith(s))) {\n PendingUpdates.push([name, browser_download_url]);\n }\n });\n return true;\n}\n\nasync function applyUpdates() {\n await Promise.all(PendingUpdates.map(\n async ([name, data]) => writeFile(\n join(__dirname, name),\n await get(data)\n )\n ));\n PendingUpdates = [];\n return true;\n}\n\nipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${gitRemote}`));\nipcMain.handle(IpcEvents.GET_UPDATES, serializeErrors(calculateGitChanges));\nipcMain.handle(IpcEvents.UPDATE, serializeErrors(fetchUpdates));\nipcMain.handle(IpcEvents.BUILD, serializeErrors(applyUpdates));\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { app, protocol, session } from \"electron\";\nimport { join } from \"path\";\n\nimport { ensureSafePath, getSettings } from \"./ipcMain\";\nimport { IS_VANILLA, THEMES_DIR } from \"./utils/constants\";\nimport { installExt } from \"./utils/extensions\";\n\nif (IS_VESKTOP || !IS_VANILLA) {\n app.whenReady().then(() => {\n // Source Maps! Maybe there's a better way but since the renderer is executed\n // from a string I don't think any other form of sourcemaps would work\n protocol.registerFileProtocol(\"vencord\", ({ url: unsafeUrl }, cb) => {\n let url = unsafeUrl.slice(\"vencord://\".length);\n if (url.endsWith(\"/\")) url = url.slice(0, -1);\n if (url.startsWith(\"/themes/\")) {\n const theme = url.slice(\"/themes/\".length);\n const safeUrl = ensureSafePath(THEMES_DIR, theme);\n if (!safeUrl) {\n cb({ statusCode: 403 });\n return;\n }\n cb(safeUrl.replace(/\\?v=\\d+$/, \"\"));\n return;\n }\n switch (url) {\n case \"renderer.js.map\":\n case \"vencordDesktopRenderer.js.map\":\n case \"preload.js.map\":\n case \"vencordDesktopPreload.js.map\":\n case \"patcher.js.map\":\n case \"vencordDesktopMain.js.map\":\n cb(join(__dirname, url));\n break;\n default:\n cb({ statusCode: 403 });\n }\n });\n\n try {\n if (getSettings().enableReactDevtools)\n installExt(\"fmkadmapgofadopljbjfkapdkoienihi\")\n .then(() => console.info(\"[Vencord] Installed React Developer Tools\"))\n .catch(err => console.error(\"[Vencord] Failed to install React Developer Tools\", err));\n } catch { }\n\n\n const findHeader = (headers: Record, headerName: Lowercase) => {\n return Object.keys(headers).find(h => h.toLowerCase() === headerName);\n };\n\n // Remove CSP\n type PolicyResult = Record;\n\n const parsePolicy = (policy: string): PolicyResult => {\n const result: PolicyResult = {};\n policy.split(\";\").forEach(directive => {\n const [directiveKey, ...directiveValue] = directive.trim().split(/\\s+/g);\n if (directiveKey && !Object.prototype.hasOwnProperty.call(result, directiveKey)) {\n result[directiveKey] = directiveValue;\n }\n });\n\n return result;\n };\n const stringifyPolicy = (policy: PolicyResult): string =>\n Object.entries(policy)\n .filter(([, values]) => values?.length)\n .map(directive => directive.flat().join(\" \"))\n .join(\"; \");\n\n const patchCsp = (headers: Record) => {\n const header = findHeader(headers, \"content-security-policy\");\n\n if (header) {\n const csp = parsePolicy(headers[header][0]);\n\n for (const directive of [\"style-src\", \"connect-src\", \"img-src\", \"font-src\", \"media-src\", \"worker-src\"]) {\n csp[directive] ??= [];\n csp[directive].push(\"*\", \"blob:\", \"data:\", \"vencord:\", \"'unsafe-inline'\");\n }\n\n // TODO: Restrict this to only imported packages with fixed version.\n // Perhaps auto generate with esbuild\n csp[\"script-src\"] ??= [];\n csp[\"script-src\"].push(\"'unsafe-eval'\", \"https://unpkg.com\", \"https://cdnjs.cloudflare.com\");\n headers[header] = [stringifyPolicy(csp)];\n }\n };\n\n session.defaultSession.webRequest.onHeadersReceived(({ responseHeaders, resourceType }, cb) => {\n if (responseHeaders) {\n if (resourceType === \"mainFrame\")\n patchCsp(responseHeaders);\n\n // Fix hosts that don't properly set the css content type, such as\n // raw.githubusercontent.com\n if (resourceType === \"stylesheet\") {\n const header = findHeader(responseHeaders, \"content-type\");\n if (header)\n responseHeaders[header] = [\"text/css\"];\n }\n }\n\n cb({ cancel: false, responseHeaders });\n });\n\n // assign a noop to onHeadersReceived to prevent other mods from adding their own incompatible ones.\n // For instance, OpenAsar adds their own that doesn't fix content-type for stylesheets which makes it\n // impossible to load css from github raw despite our fix above\n session.defaultSession.webRequest.onHeadersReceived = () => { };\n });\n}\n\nif (IS_DISCORD_DESKTOP) {\n require(\"./patcher\");\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport \"./updater\";\nimport \"./ipcPlugins\";\n\nimport { debounce } from \"@utils/debounce\";\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { Queue } from \"@utils/Queue\";\nimport { BrowserWindow, ipcMain, shell, systemPreferences } from \"electron\";\nimport { mkdirSync, readFileSync, watch } from \"fs\";\nimport { open, readdir, readFile, writeFile } from \"fs/promises\";\nimport { join, normalize } from \"path\";\n\nimport monacoHtml from \"~fileContent/monacoWin.html;base64\";\n\nimport { getThemeInfo, stripBOM, UserThemeHeader } from \"./themes\";\nimport { ALLOWED_PROTOCOLS, QUICKCSS_PATH, SETTINGS_DIR, SETTINGS_FILE, THEMES_DIR } from \"./utils/constants\";\nimport { makeLinksOpenExternally } from \"./utils/externalLinks\";\n\nmkdirSync(SETTINGS_DIR, { recursive: true });\nmkdirSync(THEMES_DIR, { recursive: true });\n\nexport function ensureSafePath(basePath: string, path: string) {\n const normalizedBasePath = normalize(basePath);\n const newPath = join(basePath, path);\n const normalizedPath = normalize(newPath);\n return normalizedPath.startsWith(normalizedBasePath) ? normalizedPath : null;\n}\n\nfunction readCss() {\n return readFile(QUICKCSS_PATH, \"utf-8\").catch(() => \"\");\n}\n\nasync function listThemes(): Promise {\n const files = await readdir(THEMES_DIR).catch(() => []);\n\n const themeInfo: UserThemeHeader[] = [];\n\n for (const fileName of files) {\n if (!fileName.endsWith(\".css\")) continue;\n\n const data = await getThemeData(fileName).then(stripBOM).catch(() => null);\n if (data == null) continue;\n\n themeInfo.push(getThemeInfo(data, fileName));\n }\n\n return themeInfo;\n}\n\nfunction getThemeData(fileName: string) {\n fileName = fileName.replace(/\\?v=\\d+$/, \"\");\n const safePath = ensureSafePath(THEMES_DIR, fileName);\n if (!safePath) return Promise.reject(`Unsafe path ${fileName}`);\n return readFile(safePath, \"utf-8\");\n}\n\nexport function readSettings() {\n try {\n return readFileSync(SETTINGS_FILE, \"utf-8\");\n } catch {\n return \"{}\";\n }\n}\n\nexport function getSettings(): typeof import(\"@api/Settings\").Settings {\n try {\n return JSON.parse(readSettings());\n } catch {\n return {} as any;\n }\n}\n\nipcMain.handle(IpcEvents.OPEN_QUICKCSS, () => shell.openPath(QUICKCSS_PATH));\n\nipcMain.handle(IpcEvents.OPEN_EXTERNAL, (_, url) => {\n try {\n var { protocol } = new URL(url);\n } catch {\n throw \"Malformed URL\";\n }\n if (!ALLOWED_PROTOCOLS.includes(protocol))\n throw \"Disallowed protocol.\";\n\n shell.openExternal(url);\n});\n\nconst cssWriteQueue = new Queue();\nconst settingsWriteQueue = new Queue();\n\nipcMain.handle(IpcEvents.GET_QUICK_CSS, () => readCss());\nipcMain.handle(IpcEvents.SET_QUICK_CSS, (_, css) =>\n cssWriteQueue.push(() => writeFile(QUICKCSS_PATH, css))\n);\n\nipcMain.handle(IpcEvents.GET_THEMES_DIR, () => THEMES_DIR);\nipcMain.handle(IpcEvents.GET_THEMES_LIST, () => listThemes());\nipcMain.handle(IpcEvents.GET_THEME_DATA, (_, fileName) => getThemeData(fileName));\nipcMain.handle(IpcEvents.GET_THEME_SYSTEM_VALUES, () => ({\n // win & mac only\n \"os-accent-color\": `#${systemPreferences.getAccentColor?.() || \"\"}`\n}));\n\nipcMain.handle(IpcEvents.GET_SETTINGS_DIR, () => SETTINGS_DIR);\nipcMain.on(IpcEvents.GET_SETTINGS, e => e.returnValue = readSettings());\n\nipcMain.handle(IpcEvents.SET_SETTINGS, (_, s) => {\n settingsWriteQueue.push(() => writeFile(SETTINGS_FILE, s));\n});\n\n\nexport function initIpc(mainWindow: BrowserWindow) {\n open(QUICKCSS_PATH, \"a+\").then(fd => {\n fd.close();\n watch(QUICKCSS_PATH, { persistent: false }, debounce(async () => {\n mainWindow.webContents.postMessage(IpcEvents.QUICK_CSS_UPDATE, await readCss());\n }, 50));\n });\n\n watch(THEMES_DIR, { persistent: false }, debounce(() => {\n mainWindow.webContents.postMessage(IpcEvents.THEME_UPDATE, void 0);\n }));\n}\n\nipcMain.handle(IpcEvents.OPEN_MONACO_EDITOR, async () => {\n const win = new BrowserWindow({\n title: \"Vencord QuickCSS Editor\",\n autoHideMenuBar: true,\n darkTheme: true,\n webPreferences: {\n preload: join(__dirname, IS_DISCORD_DESKTOP ? \"preload.js\" : \"vencordDesktopPreload.js\"),\n contextIsolation: true,\n nodeIntegration: false,\n sandbox: false\n }\n });\n\n makeLinksOpenExternally(win);\n\n await win.loadURL(`data:text/html;base64,${monacoHtml}`);\n});\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nif (!IS_UPDATER_DISABLED)\n import(IS_STANDALONE ? \"./http\" : \"./git\");\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { ipcMain } from \"electron\";\n\nimport PluginNatives from \"~pluginNatives\";\n\nconst PluginIpcMappings = {} as Record>;\nexport type PluginIpcMappings = typeof PluginIpcMappings;\n\nfor (const [plugin, methods] of Object.entries(PluginNatives)) {\n const entries = Object.entries(methods);\n if (!entries.length) continue;\n\n const mappings = PluginIpcMappings[plugin] = {};\n\n for (const [methodName, method] of entries) {\n const key = `VencordPluginNative_${plugin}_${methodName}`;\n ipcMain.handle(key, method);\n mappings[methodName] = key;\n }\n}\n\nipcMain.on(IpcEvents.GET_PLUGIN_IPC_METHOD_MAP, e => {\n e.returnValue = PluginIpcMappings;\n});\n", "import * as p0 from \"./plugins/fixSpotifyEmbeds.desktop/native\";\nimport * as p1 from \"./plugins/openInApp/native\";\nimport * as p2 from \"./plugins/voiceMessages/native\";\nexport default {\n\"FixSpotifyEmbeds\":p0,\n\"OpenInApp\":p1,\n\"VoiceMessages\":p2,\n};", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { app } from \"electron\";\nimport { getSettings } from \"main/ipcMain\";\n\napp.on(\"browser-window-created\", (_, win) => {\n win.webContents.on(\"frame-created\", (_, { frame }) => {\n frame.once(\"dom-ready\", () => {\n if (frame.url.startsWith(\"https://open.spotify.com/embed/\")) {\n const settings = getSettings().plugins?.FixSpotifyEmbeds;\n if (!settings?.enabled) return;\n\n frame.executeJavaScript(`\n const original = Audio.prototype.play;\n Audio.prototype.play = function() {\n this.volume = ${(settings.volume / 100) || 0.1};\n return original.apply(this, arguments);\n }\n `);\n }\n });\n });\n});\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { IpcMainInvokeEvent } from \"electron\";\nimport { request } from \"https\";\n\n// These links don't support CORS, so this has to be native\nconst validRedirectUrls = /^https:\\/\\/(spotify\\.link|s\\.team)\\/.+$/;\n\nfunction getRedirect(url: string) {\n return new Promise((resolve, reject) => {\n const req = request(new URL(url), { method: \"HEAD\" }, res => {\n resolve(\n res.headers.location\n ? getRedirect(res.headers.location)\n : url\n );\n });\n req.on(\"error\", reject);\n req.end();\n });\n}\n\nexport async function resolveRedirect(_: IpcMainInvokeEvent, url: string) {\n if (!validRedirectUrls.test(url)) return url;\n\n return getRedirect(url);\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { app } from \"electron\";\nimport { readFile } from \"fs/promises\";\nimport { basename, normalize } from \"path\";\n\nexport async function readRecording(_, filePath: string) {\n filePath = normalize(filePath);\n const filename = basename(filePath);\n const discordBaseDirWithTrailingSlash = normalize(app.getPath(\"userData\") + \"/\");\n console.log(filename, discordBaseDirWithTrailingSlash, filePath);\n if (filename !== \"recording.ogg\" || !filePath.startsWith(discordBaseDirWithTrailingSlash)) return null;\n\n try {\n const buf = await readFile(filePath);\n return new Uint8Array(buf.buffer);\n } catch {\n return null;\n }\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n/**\n * Returns a new function that will call the wrapped function\n * after the specified delay. If the function is called again\n * within the delay, the timer will be reset.\n * @param func The function to wrap\n * @param delay The delay in milliseconds\n */\nexport function debounce(func: T, delay = 300): T {\n let timeout: NodeJS.Timeout;\n return function (...args: any[]) {\n clearTimeout(timeout);\n timeout = setTimeout(() => { func(...args); }, delay);\n } as any;\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { Promisable } from \"type-fest\";\n\n/**\n * A queue that can be used to run tasks consecutively.\n * Highly recommended for things like fetching data from Discord\n */\nexport class Queue {\n /**\n * @param maxSize The maximum amount of functions that can be queued at once.\n * If the queue is full, the oldest function will be removed.\n */\n constructor(public readonly maxSize = Infinity) { }\n\n private queue = [] as Array<() => Promisable>;\n\n private promise?: Promise;\n\n private next() {\n const func = this.queue.shift();\n if (func)\n this.promise = Promise.resolve()\n .then(func)\n .finally(() => this.next());\n else\n this.promise = undefined;\n }\n\n private run() {\n if (!this.promise)\n this.next();\n }\n\n /**\n * Append a task at the end of the queue. This task will be executed after all other tasks\n * If the queue exceeds the specified maxSize, the first task in queue will be removed.\n * @param func Task\n */\n push(func: () => Promisable) {\n if (this.size >= this.maxSize)\n this.queue.shift();\n\n this.queue.push(func);\n this.run();\n }\n\n /**\n * Prepend a task at the beginning of the queue. This task will be executed next\n * If the queue exceeds the specified maxSize, the last task in queue will be removed.\n * @param func Task\n */\n unshift(func: () => Promisable) {\n if (this.size >= this.maxSize)\n this.queue.pop();\n\n this.queue.unshift(func);\n this.run();\n }\n\n /**\n * The amount of tasks in the queue\n */\n get size() {\n return this.queue.length;\n }\n}\n", "export default \"PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KICAgIDxoZWFkPgogICAgICAgIDxtZXRhIGNoYXJzZXQ9InV0Zi04IiAvPgogICAgICAgIDx0aXRsZT5WZW5jb3JkIFF1aWNrQ1NTIEVkaXRvcjwvdGl0bGU+CiAgICAgICAgPGxpbmsKICAgICAgICAgICAgcmVsPSJzdHlsZXNoZWV0IgogICAgICAgICAgICBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9tb25hY28tZWRpdG9yLzAuNDAuMC9taW4vdnMvZWRpdG9yL2VkaXRvci5tYWluLm1pbi5jc3MiCiAgICAgICAgICAgIGludGVncml0eT0ic2hhNTEyLU1Pb1EwMmg4MGhrbGNjZkxyWEZZa0N6RytXVmpPUmZsT3A5WnA4ZGx0aWFSUCszNUxZbk80TEtPa2xSNjRvTUdmR2dKRExPOFdKcGtNMW81Z1pYWVpRPT0iCiAgICAgICAgICAgIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiCiAgICAgICAgICAgIHJlZmVycmVycG9saWN5PSJuby1yZWZlcnJlciIKICAgICAgICAvPgogICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgaHRtbCwKICAgICAgICAgICAgYm9keSwKICAgICAgICAgICAgI2NvbnRhaW5lciB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgfQogICAgICAgIDwvc3R5bGU+CiAgICA8L2hlYWQ+CgogICAgPGJvZHk+CiAgICAgICAgPGRpdiBpZD0iY29udGFpbmVyIj48L2Rpdj4KICAgICAgICA8c2NyaXB0CiAgICAgICAgICAgIHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvbW9uYWNvLWVkaXRvci8wLjQwLjAvbWluL3ZzL2xvYWRlci5taW4uanMiCiAgICAgICAgICAgIGludGVncml0eT0ic2hhNTEyLVF6TXBYZUNQY2lBSFA0d2JZbFYyUFlnclFjYUVrRFFVanprUFU0eG5qeVZTRDlUMzYvdWRhbXh0TkJxYjRxSzQvYk1RTVBaOGF5ckJlOWhyR2RCRmpRPT0iCiAgICAgICAgICAgIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiCiAgICAgICAgICAgIHJlZmVycmVycG9saWN5PSJuby1yZWZlcnJlciIKICAgICAgICA+PC9zY3JpcHQ+CgogICAgICAgIDxzY3JpcHQ+CiAgICAgICAgICAgIHJlcXVpcmUuY29uZmlnKHsKICAgICAgICAgICAgICAgIHBhdGhzOiB7CiAgICAgICAgICAgICAgICAgICAgdnM6ICJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9tb25hY28tZWRpdG9yLzAuNDAuMC9taW4vdnMiLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICByZXF1aXJlKFsidnMvZWRpdG9yL2VkaXRvci5tYWluIl0sICgpID0+IHsKICAgICAgICAgICAgICAgIGdldEN1cnJlbnRDc3MoKS50aGVuKChjc3MpID0+IHsKICAgICAgICAgICAgICAgICAgICB2YXIgZWRpdG9yID0gbW9uYWNvLmVkaXRvci5jcmVhdGUoCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJjb250YWluZXIiKSwKICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGNzcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlOiAiY3NzIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lOiBnZXRUaGVtZSgpLAogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgICAgICBlZGl0b3Iub25EaWRDaGFuZ2VNb2RlbENvbnRlbnQoKCkgPT4KICAgICAgICAgICAgICAgICAgICAgICAgc2V0Q3NzKGVkaXRvci5nZXRWYWx1ZSgpKQogICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoInJlc2l6ZSIsICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWFrZSBtb25hY28gcmUtbGF5b3V0CiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5sYXlvdXQoKTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICA8L3NjcmlwdD4KICAgIDwvYm9keT4KPC9odG1sPgo=\"", "/* eslint-disable simple-header/header */\n\n/*!\n * BetterDiscord addon meta parser\n * Copyright 2023 BetterDiscord contributors\n * Copyright 2023 Vendicated and Vencord contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst splitRegex = /[^\\S\\r\\n]*?\\r?(?:\\r\\n|\\n)[^\\S\\r\\n]*?\\*[^\\S\\r\\n]?/;\nconst escapedAtRegex = /^\\\\@/;\n\nexport interface UserThemeHeader {\n fileName: string;\n name: string;\n author: string;\n description: string;\n version?: string;\n license?: string;\n source?: string;\n website?: string;\n invite?: string;\n}\n\nfunction makeHeader(fileName: string, opts: Partial = {}): UserThemeHeader {\n return {\n fileName,\n name: opts.name ?? fileName.replace(/\\.css$/i, \"\"),\n author: opts.author ?? \"Unknown Author\",\n description: opts.description ?? \"A Discord Theme.\",\n version: opts.version,\n license: opts.license,\n source: opts.source,\n website: opts.website,\n invite: opts.invite\n };\n}\n\nexport function stripBOM(fileContent: string) {\n if (fileContent.charCodeAt(0) === 0xFEFF) {\n fileContent = fileContent.slice(1);\n }\n return fileContent;\n}\n\nexport function getThemeInfo(css: string, fileName: string): UserThemeHeader {\n if (!css) return makeHeader(fileName);\n\n const block = css.split(\"/**\", 2)?.[1]?.split(\"*/\", 1)?.[0];\n if (!block) return makeHeader(fileName);\n\n const header: Partial = {};\n let field = \"\";\n let accum = \"\";\n for (const line of block.split(splitRegex)) {\n if (line.length === 0) continue;\n if (line.charAt(0) === \"@\" && line.charAt(1) !== \" \") {\n header[field] = accum.trim();\n const l = line.indexOf(\" \");\n field = line.substring(1, l);\n accum = line.substring(l + 1);\n }\n else {\n accum += \" \" + line.replace(\"\\\\n\", \"\\n\").replace(escapedAtRegex, \"@\");\n }\n }\n header[field] = accum.trim();\n delete header[\"\"];\n return makeHeader(fileName, header);\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { app } from \"electron\";\nimport { join } from \"path\";\n\nexport const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (\n process.env.DISCORD_USER_DATA_DIR\n ? join(process.env.DISCORD_USER_DATA_DIR, \"..\", \"VencordData\")\n : join(app.getPath(\"userData\"), \"..\", \"Vencord\")\n);\nexport const SETTINGS_DIR = join(DATA_DIR, \"settings\");\nexport const THEMES_DIR = join(DATA_DIR, \"themes\");\nexport const QUICKCSS_PATH = join(SETTINGS_DIR, \"quickCss.css\");\nexport const SETTINGS_FILE = join(SETTINGS_DIR, \"settings.json\");\nexport const ALLOWED_PROTOCOLS = [\n \"https:\",\n \"http:\",\n \"steam:\",\n \"spotify:\",\n \"com.epicgames.launcher:\",\n];\n\nexport const IS_VANILLA = /* @__PURE__ */ process.argv.includes(\"--vanilla\");\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { type BrowserWindow, shell } from \"electron\";\n\nexport function makeLinksOpenExternally(win: BrowserWindow) {\n win.webContents.setWindowOpenHandler(({ url }) => {\n switch (url) {\n case \"about:blank\":\n case \"https://discord.com/popout\":\n case \"https://ptb.discord.com/popout\":\n case \"https://canary.discord.com/popout\":\n return { action: \"allow\" };\n }\n\n try {\n var { protocol } = new URL(url);\n } catch {\n return { action: \"deny\" };\n }\n\n switch (protocol) {\n case \"http:\":\n case \"https:\":\n case \"mailto:\":\n case \"steam:\":\n case \"spotify:\":\n shell.openExternal(url);\n }\n\n return { action: \"deny\" };\n });\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { session } from \"electron\";\nimport { unzip } from \"fflate\";\nimport { constants as fsConstants } from \"fs\";\nimport { access, mkdir, rm, writeFile } from \"fs/promises\";\nimport { join } from \"path\";\n\nimport { DATA_DIR } from \"./constants\";\nimport { crxToZip } from \"./crxToZip\";\nimport { get } from \"./simpleGet\";\n\nconst extensionCacheDir = join(DATA_DIR, \"ExtensionCache\");\n\nasync function extract(data: Buffer, outDir: string) {\n await mkdir(outDir, { recursive: true });\n return new Promise((resolve, reject) => {\n unzip(data, (err, files) => {\n if (err) return void reject(err);\n Promise.all(Object.keys(files).map(async f => {\n // Signature stuff\n // 'Cannot load extension with file or directory name\n // _metadata. Filenames starting with \"_\" are reserved for use by the system.';\n if (f.startsWith(\"_metadata/\")) return;\n\n if (f.endsWith(\"/\")) return void mkdir(join(outDir, f), { recursive: true });\n\n const pathElements = f.split(\"/\");\n const name = pathElements.pop()!;\n const directories = pathElements.join(\"/\");\n const dir = join(outDir, directories);\n\n if (directories) {\n await mkdir(dir, { recursive: true });\n }\n\n await writeFile(join(dir, name), files[f]);\n }))\n .then(() => resolve())\n .catch(err => {\n rm(outDir, { recursive: true, force: true });\n reject(err);\n });\n });\n });\n}\n\nexport async function installExt(id: string) {\n const extDir = join(extensionCacheDir, `${id}`);\n\n try {\n await access(extDir, fsConstants.F_OK);\n } catch (err) {\n const url = id === \"fmkadmapgofadopljbjfkapdkoienihi\"\n // React Devtools v4.25\n // v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843\n // Unfortunately, Google does not serve old versions, so this is the only way\n ? \"https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip\"\n : `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=32`;\n const buf = await get(url, {\n headers: {\n \"User-Agent\": \"Vencord (https://github.com/Vendicated/Vencord)\"\n }\n });\n await extract(crxToZip(buf), extDir).catch(console.error);\n }\n\n session.defaultSession.loadExtension(extDir);\n}\n", "import { createRequire } from 'module';\nvar require = createRequire('/');\n// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\n// Mediocre shim\nvar Worker;\nvar workerAdd = \";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global\";\ntry {\n Worker = require('worker_threads').Worker;\n}\ncatch (e) {\n}\nvar wk = Worker ? function (c, _, msg, transfer, cb) {\n var done = false;\n var w = new Worker(c + workerAdd, { eval: true })\n .on('error', function (e) { return cb(e, null); })\n .on('message', function (m) { return cb(null, m); })\n .on('exit', function (c) {\n if (c && !done)\n cb(new Error('exited with code ' + c), null);\n });\n w.postMessage(msg, transfer);\n w.terminate = function () {\n done = true;\n return Worker.prototype.terminate.call(w);\n };\n return w;\n} : function (_, __, ___, ____, cb) {\n setImmediate(function () { return cb(new Error('async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)'), null); });\n var NOP = function () { };\n return {\n terminate: NOP,\n postMessage: NOP\n };\n};\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([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, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([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, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != -1) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u, -1);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = lft = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n", "/* eslint-disable simple-header/header */\n\n/*!\n * crxToZip\n * Copyright (c) 2013 Rob Wu \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n */\n\nexport function crxToZip(buf: Buffer) {\n function calcLength(a: number, b: number, c: number, d: number) {\n let length = 0;\n\n length += a << 0;\n length += b << 8;\n length += c << 16;\n length += d << 24 >>> 0;\n return length;\n }\n\n // 50 4b 03 04\n // This is actually a zip file\n if (buf[0] === 80 && buf[1] === 75 && buf[2] === 3 && buf[3] === 4) {\n return buf;\n }\n\n // 43 72 32 34 (Cr24)\n if (buf[0] !== 67 || buf[1] !== 114 || buf[2] !== 50 || buf[3] !== 52) {\n throw new Error(\"Invalid header: Does not start with Cr24\");\n }\n\n // 02 00 00 00\n // or\n // 03 00 00 00\n const isV3 = buf[4] === 3;\n const isV2 = buf[4] === 2;\n\n if ((!isV2 && !isV3) || buf[5] || buf[6] || buf[7]) {\n throw new Error(\"Unexpected crx format version number.\");\n }\n\n if (isV2) {\n const publicKeyLength = calcLength(buf[8], buf[9], buf[10], buf[11]);\n const signatureLength = calcLength(buf[12], buf[13], buf[14], buf[15]);\n\n // 16 = Magic number (4), CRX format version (4), lengths (2x4)\n const zipStartOffset = 16 + publicKeyLength + signatureLength;\n\n return buf.subarray(zipStartOffset, buf.length);\n }\n // v3 format has header size and then header\n const headerSize = calcLength(buf[8], buf[9], buf[10], buf[11]);\n const zipStartOffset = 12 + headerSize;\n\n return buf.subarray(zipStartOffset, buf.length);\n}\n"],
+ "sourcesContent": ["/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nexport const VencordFragment = /* #__PURE__*/ Symbol.for(\"react.fragment\");\nexport let VencordCreateElement =\n (...args) => (VencordCreateElement = Vencord.Webpack.Common.React.createElement)(...args);\n", "export default \"96126fa\"", "export default \"Vendicated/Vencord\"", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport gitHash from \"~git-hash\";\nimport gitRemote from \"~git-remote\";\n\nexport {\n gitHash,\n gitRemote\n};\n\nexport const WEBPACK_CHUNK = \"webpackChunkdiscord_app\";\nexport const REACT_GLOBAL = \"Vencord.Webpack.Common.React\";\nexport const VENCORD_USER_AGENT = `Vencord/${gitHash}${gitRemote ? ` (https://github.com/${gitRemote})` : \"\"}`;\nexport const SUPPORT_CHANNEL_ID = \"1026515880080842772\";\n\nexport interface Dev {\n name: string;\n id: bigint;\n badge?: boolean;\n}\n\n/**\n * If you made a plugin or substantial contribution, add yourself here.\n * This object is used for the plugin author list, as well as to add a contributor badge to your profile.\n * If you wish to stay fully anonymous, feel free to set ID to 0n.\n * If you are fine with attribution but don't want the badge, add badge: false\n */\nexport const Devs = /* #__PURE__*/ Object.freeze({\n Ven: {\n name: \"Vendicated\",\n id: 343383572805058560n\n },\n Arjix: {\n name: \"ArjixWasTaken\",\n id: 674710789138939916n\n },\n Cyn: {\n name: \"Cynosphere\",\n id: 150745989836308480n\n },\n Megu: {\n name: \"Megumin\",\n id: 545581357812678656n\n },\n botato: {\n name: \"botato\",\n id: 440990343899643943n\n },\n obscurity: {\n name: \"obscurity\",\n id: 336678828233588736n,\n },\n rushii: {\n name: \"rushii\",\n id: 295190422244950017n\n },\n Glitch: {\n name: \"Glitchy\",\n id: 269567451199569920n\n },\n Samu: {\n name: \"Samu\",\n id: 702973430449832038n,\n },\n Animal: {\n name: \"Animal\",\n id: 118437263754395652n\n },\n MaiKokain: {\n name: \"Mai\",\n id: 722647978577363026n\n },\n echo: {\n name: \"ECHO\",\n id: 712639419785412668n\n },\n katlyn: {\n name: \"katlyn\",\n id: 250322741406859265n\n },\n nea: {\n name: \"nea\",\n id: 310702108997320705n,\n },\n Nuckyz: {\n name: \"Nuckyz\",\n id: 235834946571337729n\n },\n D3SOX: {\n name: \"D3SOX\",\n id: 201052085641281538n\n },\n Nickyux: {\n name: \"Nickyux\",\n id: 427146305651998721n\n },\n mantikafasi: {\n name: \"mantikafasi\",\n id: 287555395151593473n\n },\n Xinto: {\n name: \"Xinto\",\n id: 423915768191647755n\n },\n JacobTm: {\n name: \"Jacob.Tm\",\n id: 302872992097107991n\n },\n DustyAngel47: {\n name: \"DustyAngel47\",\n id: 714583473804935238n\n },\n BanTheNons: {\n name: \"BanTheNons\",\n id: 460478012794863637n\n },\n BigDuck: {\n name: \"BigDuck\",\n id: 1024588272623681609n\n },\n AverageReactEnjoyer: {\n name: \"Average React Enjoyer\",\n id: 1004904120056029256n\n },\n adryd: {\n name: \"adryd\",\n id: 0n\n },\n Tyman: {\n name: \"Tyman\",\n id: 487443883127472129n\n },\n afn: {\n name: \"afn\",\n id: 420043923822608384n\n },\n KraXen72: {\n name: \"KraXen72\",\n id: 379304073515499530n\n },\n kemo: {\n name: \"kemo\",\n id: 299693897859465228n\n },\n dzshn: {\n name: \"dzshn\",\n id: 310449948011528192n\n },\n Ducko: {\n name: \"Ducko\",\n id: 506482395269169153n\n },\n jewdev: {\n name: \"jewdev\",\n id: 222369866529636353n\n },\n Luna: {\n name: \"Luny\",\n id: 821472922140803112n\n },\n Vap: {\n name: \"Vap0r1ze\",\n id: 454072114492866560n\n },\n KingFish: {\n name: \"King Fish\",\n id: 499400512559382538n\n },\n Commandtechno: {\n name: \"Commandtechno\",\n id: 296776625432035328n,\n },\n TheSun: {\n name: \"ActuallyTheSun\",\n id: 406028027768733696n\n },\n axyie: {\n name: \"'ax\",\n id: 273562710745284628n,\n },\n pointy: {\n name: \"pointy\",\n id: 99914384989519872n\n },\n SammCheese: {\n name: \"Samm-Cheese\",\n id: 372148345894076416n\n },\n zt: {\n name: \"zt\",\n id: 289556910426816513n\n },\n captain: {\n name: \"Captain\",\n id: 347366054806159360n\n },\n nick: {\n name: \"nick\",\n id: 347884694408265729n,\n badge: false\n },\n whqwert: {\n name: \"whqwert\",\n id: 586239091520176128n\n },\n lewisakura: {\n name: \"lewisakura\",\n id: 96269247411400704n\n },\n RuiNtD: {\n name: \"RuiNtD\",\n id: 157917665162297344n\n },\n hunt: {\n name: \"hunt-g\",\n id: 222800179697287168n\n },\n cloudburst: {\n name: \"cloudburst\",\n id: 892128204150685769n\n },\n Aria: {\n name: \"Syncxv\",\n id: 549244932213309442n,\n },\n TheKodeToad: {\n name: \"TheKodeToad\",\n id: 706152404072267788n\n },\n LordElias: {\n name: \"LordElias\",\n id: 319460781567639554n\n },\n juby: {\n name: \"Juby210\",\n id: 324622488644616195n\n },\n Alyxia: {\n name: \"Alyxia Sother\",\n id: 952185386350829688n\n },\n Remty: {\n name: \"Remty\",\n id: 335055032204656642n\n },\n skyevg: {\n name: \"skyevg\",\n id: 1090310844283363348n\n },\n Dziurwa: {\n name: \"Dziurwa\",\n id: 1001086404203389018n\n },\n AutumnVN: {\n name: \"AutumnVN\",\n id: 393694671383166998n\n },\n pylix: {\n name: \"pylix\",\n id: 492949202121261067n\n },\n Tyler: {\n name: \"\\\\\\\\GGTyler\\\\\\\\\",\n id: 143117463788191746n\n },\n RyanCaoDev: {\n name: \"RyanCaoDev\",\n id: 952235800110694471n,\n },\n Strencher: {\n name: \"Strencher\",\n id: 415849376598982656n\n },\n FieryFlames: {\n name: \"Fiery\",\n id: 890228870559698955n\n },\n KannaDev: {\n name: \"Kanna\",\n id: 317728561106518019n\n },\n carince: {\n name: \"carince\",\n id: 818323528755314698n\n },\n PandaNinjas: {\n name: \"PandaNinjas\",\n id: 455128749071925248n\n },\n CatNoir: {\n name: \"CatNoir\",\n id: 260371016348336128n\n },\n outfoxxed: {\n name: \"outfoxxed\",\n id: 837425748435796060n\n },\n UwUDev: {\n name: \"UwU\",\n id: 691413039156690994n,\n },\n amia: {\n name: \"amia\",\n id: 142007603549962240n\n },\n phil: {\n name: \"phil\",\n id: 305288513941667851n\n },\n ImLvna: {\n name: \"Luna <3\",\n id: 799319081723232267n\n },\n rad: {\n name: \"rad\",\n id: 610945092504780823n\n },\n AndrewDLO: {\n name: \"Andrew-DLO\",\n id: 434135504792059917n\n },\n HypedDomi: {\n name: \"HypedDomi\",\n id: 354191516979429376n\n },\n Rini: {\n name: \"Rini\",\n id: 1079479184478441643n\n },\n castdrian: {\n name: \"castdrian\",\n id: 224617799434108928n\n },\n Arrow: {\n name: \"arrow\",\n id: 958158495302176778n\n },\n bb010g: {\n name: \"bb010g\",\n id: 72791153467990016n,\n },\n Lumap: {\n name: \"lumap\",\n id: 635383782576357407n\n },\n Dolfies: {\n name: \"Dolfies\",\n id: 852892297661906993n,\n },\n RuukuLada: {\n name: \"RuukuLada\",\n id: 119705748346241027n,\n },\n blahajZip: {\n name: \"blahaj.zip\",\n id: 683954422241427471n,\n },\n archeruwu: {\n name: \"archer_uwu\",\n id: 160068695383736320n\n },\n ProffDea: {\n name: \"ProffDea\",\n id: 609329952180928513n\n },\n ant0n: {\n name: \"ant0n\",\n id: 145224646868860928n\n },\n} satisfies Record);\n\n// iife so #__PURE__ works correctly\nexport const DevsById = /* #__PURE__*/ (() =>\n Object.freeze(Object.fromEntries(\n Object.entries(Devs)\n .filter(d => d[1].id !== 0n)\n .map(([_, v]) => [v.id, v] as const)\n ))\n)() as Record;\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nexport const enum IpcEvents {\n QUICK_CSS_UPDATE = \"VencordQuickCssUpdate\",\n THEME_UPDATE = \"VencordThemeUpdate\",\n GET_QUICK_CSS = \"VencordGetQuickCss\",\n SET_QUICK_CSS = \"VencordSetQuickCss\",\n UPLOAD_THEME = \"VencordUploadTheme\",\n DELETE_THEME = \"VencordDeleteTheme\",\n GET_THEMES_DIR = \"VencordGetThemesDir\",\n GET_THEMES_LIST = \"VencordGetThemesList\",\n GET_THEME_DATA = \"VencordGetThemeData\",\n GET_THEME_SYSTEM_VALUES = \"VencordGetThemeSystemValues\",\n GET_SETTINGS_DIR = \"VencordGetSettingsDir\",\n GET_SETTINGS = \"VencordGetSettings\",\n SET_SETTINGS = \"VencordSetSettings\",\n OPEN_EXTERNAL = \"VencordOpenExternal\",\n OPEN_QUICKCSS = \"VencordOpenQuickCss\",\n GET_UPDATES = \"VencordGetUpdates\",\n GET_REPO = \"VencordGetRepo\",\n UPDATE = \"VencordUpdate\",\n BUILD = \"VencordBuild\",\n OPEN_MONACO_EDITOR = \"VencordOpenMonacoEditor\",\n\n GET_PLUGIN_IPC_METHOD_MAP = \"VencordGetPluginIpcMethodMap\",\n\n OPEN_IN_APP__RESOLVE_REDIRECT = \"VencordOIAResolveRedirect\",\n VOICE_MESSAGES_READ_RECORDING = \"VencordVMReadRecording\",\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport https from \"https\";\n\nexport function get(url: string, options: https.RequestOptions = {}) {\n return new Promise((resolve, reject) => {\n https.get(url, options, res => {\n const { statusCode, statusMessage, headers } = res;\n if (statusCode! >= 400)\n return void reject(`${statusCode}: ${statusMessage} - ${url}`);\n if (statusCode! >= 300)\n return void resolve(get(headers.location!, options));\n\n const chunks = [] as Buffer[];\n res.on(\"error\", reject);\n\n res.on(\"data\", chunk => chunks.push(chunk));\n res.once(\"end\", () => resolve(Buffer.concat(chunks)));\n });\n });\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nexport const VENCORD_FILES = [\n IS_DISCORD_DESKTOP ? \"patcher.js\" : \"vencordDesktopMain.js\",\n IS_DISCORD_DESKTOP ? \"preload.js\" : \"vencordDesktopPreload.js\",\n IS_DISCORD_DESKTOP ? \"renderer.js\" : \"vencordDesktopRenderer.js\",\n IS_DISCORD_DESKTOP ? \"renderer.css\" : \"vencordDesktopRenderer.css\",\n];\n\nexport function serializeErrors(func: (...args: any[]) => any) {\n return async function () {\n try {\n return {\n ok: true,\n value: await func(...arguments)\n };\n } catch (e: any) {\n return {\n ok: false,\n error: e instanceof Error ? {\n // prototypes get lost, so turn error into plain object\n ...e\n } : e\n };\n }\n };\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { VENCORD_USER_AGENT } from \"@utils/constants\";\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { ipcMain } from \"electron\";\nimport { writeFile } from \"fs/promises\";\nimport { join } from \"path\";\n\nimport gitHash from \"~git-hash\";\nimport gitRemote from \"~git-remote\";\n\nimport { get } from \"../utils/simpleGet\";\nimport { serializeErrors, VENCORD_FILES } from \"./common\";\n\nconst API_BASE = `https://api.github.com/repos/${gitRemote}`;\nlet PendingUpdates = [] as [string, string][];\n\nasync function githubGet(endpoint: string) {\n return get(API_BASE + endpoint, {\n headers: {\n Accept: \"application/vnd.github+json\",\n // \"All API requests MUST include a valid User-Agent header.\n // Requests with no User-Agent header will be rejected.\"\n \"User-Agent\": VENCORD_USER_AGENT\n }\n });\n}\n\nasync function calculateGitChanges() {\n const isOutdated = await fetchUpdates();\n if (!isOutdated) return [];\n\n const res = await githubGet(`/compare/${gitHash}...HEAD`);\n\n const data = JSON.parse(res.toString(\"utf-8\"));\n return data.commits.map((c: any) => ({\n // github api only sends the long sha\n hash: c.sha.slice(0, 7),\n author: c.author.login,\n message: c.commit.message\n }));\n}\n\nasync function fetchUpdates() {\n const release = await githubGet(\"/releases/latest\");\n\n const data = JSON.parse(release.toString());\n const hash = data.name.slice(data.name.lastIndexOf(\" \") + 1);\n if (hash === gitHash)\n return false;\n\n data.assets.forEach(({ name, browser_download_url }) => {\n if (VENCORD_FILES.some(s => name.startsWith(s))) {\n PendingUpdates.push([name, browser_download_url]);\n }\n });\n return true;\n}\n\nasync function applyUpdates() {\n await Promise.all(PendingUpdates.map(\n async ([name, data]) => writeFile(\n join(__dirname, name),\n await get(data)\n )\n ));\n PendingUpdates = [];\n return true;\n}\n\nipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${gitRemote}`));\nipcMain.handle(IpcEvents.GET_UPDATES, serializeErrors(calculateGitChanges));\nipcMain.handle(IpcEvents.UPDATE, serializeErrors(fetchUpdates));\nipcMain.handle(IpcEvents.BUILD, serializeErrors(applyUpdates));\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { app, protocol, session } from \"electron\";\nimport { join } from \"path\";\n\nimport { ensureSafePath, getSettings } from \"./ipcMain\";\nimport { IS_VANILLA, THEMES_DIR } from \"./utils/constants\";\nimport { installExt } from \"./utils/extensions\";\n\nif (IS_VESKTOP || !IS_VANILLA) {\n app.whenReady().then(() => {\n // Source Maps! Maybe there's a better way but since the renderer is executed\n // from a string I don't think any other form of sourcemaps would work\n protocol.registerFileProtocol(\"vencord\", ({ url: unsafeUrl }, cb) => {\n let url = unsafeUrl.slice(\"vencord://\".length);\n if (url.endsWith(\"/\")) url = url.slice(0, -1);\n if (url.startsWith(\"/themes/\")) {\n const theme = url.slice(\"/themes/\".length);\n const safeUrl = ensureSafePath(THEMES_DIR, theme);\n if (!safeUrl) {\n cb({ statusCode: 403 });\n return;\n }\n cb(safeUrl.replace(/\\?v=\\d+$/, \"\"));\n return;\n }\n switch (url) {\n case \"renderer.js.map\":\n case \"vencordDesktopRenderer.js.map\":\n case \"preload.js.map\":\n case \"vencordDesktopPreload.js.map\":\n case \"patcher.js.map\":\n case \"vencordDesktopMain.js.map\":\n cb(join(__dirname, url));\n break;\n default:\n cb({ statusCode: 403 });\n }\n });\n\n try {\n if (getSettings().enableReactDevtools)\n installExt(\"fmkadmapgofadopljbjfkapdkoienihi\")\n .then(() => console.info(\"[Vencord] Installed React Developer Tools\"))\n .catch(err => console.error(\"[Vencord] Failed to install React Developer Tools\", err));\n } catch { }\n\n\n const findHeader = (headers: Record, headerName: Lowercase) => {\n return Object.keys(headers).find(h => h.toLowerCase() === headerName);\n };\n\n // Remove CSP\n type PolicyResult = Record;\n\n const parsePolicy = (policy: string): PolicyResult => {\n const result: PolicyResult = {};\n policy.split(\";\").forEach(directive => {\n const [directiveKey, ...directiveValue] = directive.trim().split(/\\s+/g);\n if (directiveKey && !Object.prototype.hasOwnProperty.call(result, directiveKey)) {\n result[directiveKey] = directiveValue;\n }\n });\n\n return result;\n };\n const stringifyPolicy = (policy: PolicyResult): string =>\n Object.entries(policy)\n .filter(([, values]) => values?.length)\n .map(directive => directive.flat().join(\" \"))\n .join(\"; \");\n\n const patchCsp = (headers: Record) => {\n const header = findHeader(headers, \"content-security-policy\");\n\n if (header) {\n const csp = parsePolicy(headers[header][0]);\n\n for (const directive of [\"style-src\", \"connect-src\", \"img-src\", \"font-src\", \"media-src\", \"worker-src\"]) {\n csp[directive] ??= [];\n csp[directive].push(\"*\", \"blob:\", \"data:\", \"vencord:\", \"'unsafe-inline'\");\n }\n\n // TODO: Restrict this to only imported packages with fixed version.\n // Perhaps auto generate with esbuild\n csp[\"script-src\"] ??= [];\n csp[\"script-src\"].push(\"'unsafe-eval'\", \"https://unpkg.com\", \"https://cdnjs.cloudflare.com\");\n headers[header] = [stringifyPolicy(csp)];\n }\n };\n\n session.defaultSession.webRequest.onHeadersReceived(({ responseHeaders, resourceType }, cb) => {\n if (responseHeaders) {\n if (resourceType === \"mainFrame\")\n patchCsp(responseHeaders);\n\n // Fix hosts that don't properly set the css content type, such as\n // raw.githubusercontent.com\n if (resourceType === \"stylesheet\") {\n const header = findHeader(responseHeaders, \"content-type\");\n if (header)\n responseHeaders[header] = [\"text/css\"];\n }\n }\n\n cb({ cancel: false, responseHeaders });\n });\n\n // assign a noop to onHeadersReceived to prevent other mods from adding their own incompatible ones.\n // For instance, OpenAsar adds their own that doesn't fix content-type for stylesheets which makes it\n // impossible to load css from github raw despite our fix above\n session.defaultSession.webRequest.onHeadersReceived = () => { };\n });\n}\n\nif (IS_DISCORD_DESKTOP) {\n require(\"./patcher\");\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport \"./updater\";\nimport \"./ipcPlugins\";\n\nimport { debounce } from \"@utils/debounce\";\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { Queue } from \"@utils/Queue\";\nimport { BrowserWindow, ipcMain, shell, systemPreferences } from \"electron\";\nimport { mkdirSync, readFileSync, watch } from \"fs\";\nimport { open, readdir, readFile, writeFile } from \"fs/promises\";\nimport { join, normalize } from \"path\";\n\nimport monacoHtml from \"~fileContent/monacoWin.html;base64\";\n\nimport { getThemeInfo, stripBOM, UserThemeHeader } from \"./themes\";\nimport { ALLOWED_PROTOCOLS, QUICKCSS_PATH, SETTINGS_DIR, SETTINGS_FILE, THEMES_DIR } from \"./utils/constants\";\nimport { makeLinksOpenExternally } from \"./utils/externalLinks\";\n\nmkdirSync(SETTINGS_DIR, { recursive: true });\nmkdirSync(THEMES_DIR, { recursive: true });\n\nexport function ensureSafePath(basePath: string, path: string) {\n const normalizedBasePath = normalize(basePath);\n const newPath = join(basePath, path);\n const normalizedPath = normalize(newPath);\n return normalizedPath.startsWith(normalizedBasePath) ? normalizedPath : null;\n}\n\nfunction readCss() {\n return readFile(QUICKCSS_PATH, \"utf-8\").catch(() => \"\");\n}\n\nasync function listThemes(): Promise {\n const files = await readdir(THEMES_DIR).catch(() => []);\n\n const themeInfo: UserThemeHeader[] = [];\n\n for (const fileName of files) {\n if (!fileName.endsWith(\".css\")) continue;\n\n const data = await getThemeData(fileName).then(stripBOM).catch(() => null);\n if (data == null) continue;\n\n themeInfo.push(getThemeInfo(data, fileName));\n }\n\n return themeInfo;\n}\n\nfunction getThemeData(fileName: string) {\n fileName = fileName.replace(/\\?v=\\d+$/, \"\");\n const safePath = ensureSafePath(THEMES_DIR, fileName);\n if (!safePath) return Promise.reject(`Unsafe path ${fileName}`);\n return readFile(safePath, \"utf-8\");\n}\n\nexport function readSettings() {\n try {\n return readFileSync(SETTINGS_FILE, \"utf-8\");\n } catch {\n return \"{}\";\n }\n}\n\nexport function getSettings(): typeof import(\"@api/Settings\").Settings {\n try {\n return JSON.parse(readSettings());\n } catch {\n return {} as any;\n }\n}\n\nipcMain.handle(IpcEvents.OPEN_QUICKCSS, () => shell.openPath(QUICKCSS_PATH));\n\nipcMain.handle(IpcEvents.OPEN_EXTERNAL, (_, url) => {\n try {\n var { protocol } = new URL(url);\n } catch {\n throw \"Malformed URL\";\n }\n if (!ALLOWED_PROTOCOLS.includes(protocol))\n throw \"Disallowed protocol.\";\n\n shell.openExternal(url);\n});\n\nconst cssWriteQueue = new Queue();\nconst settingsWriteQueue = new Queue();\n\nipcMain.handle(IpcEvents.GET_QUICK_CSS, () => readCss());\nipcMain.handle(IpcEvents.SET_QUICK_CSS, (_, css) =>\n cssWriteQueue.push(() => writeFile(QUICKCSS_PATH, css))\n);\n\nipcMain.handle(IpcEvents.GET_THEMES_DIR, () => THEMES_DIR);\nipcMain.handle(IpcEvents.GET_THEMES_LIST, () => listThemes());\nipcMain.handle(IpcEvents.GET_THEME_DATA, (_, fileName) => getThemeData(fileName));\nipcMain.handle(IpcEvents.GET_THEME_SYSTEM_VALUES, () => ({\n // win & mac only\n \"os-accent-color\": `#${systemPreferences.getAccentColor?.() || \"\"}`\n}));\n\nipcMain.handle(IpcEvents.GET_SETTINGS_DIR, () => SETTINGS_DIR);\nipcMain.on(IpcEvents.GET_SETTINGS, e => e.returnValue = readSettings());\n\nipcMain.handle(IpcEvents.SET_SETTINGS, (_, s) => {\n settingsWriteQueue.push(() => writeFile(SETTINGS_FILE, s));\n});\n\n\nexport function initIpc(mainWindow: BrowserWindow) {\n open(QUICKCSS_PATH, \"a+\").then(fd => {\n fd.close();\n watch(QUICKCSS_PATH, { persistent: false }, debounce(async () => {\n mainWindow.webContents.postMessage(IpcEvents.QUICK_CSS_UPDATE, await readCss());\n }, 50));\n });\n\n watch(THEMES_DIR, { persistent: false }, debounce(() => {\n mainWindow.webContents.postMessage(IpcEvents.THEME_UPDATE, void 0);\n }));\n}\n\nipcMain.handle(IpcEvents.OPEN_MONACO_EDITOR, async () => {\n const win = new BrowserWindow({\n title: \"Vencord QuickCSS Editor\",\n autoHideMenuBar: true,\n darkTheme: true,\n webPreferences: {\n preload: join(__dirname, IS_DISCORD_DESKTOP ? \"preload.js\" : \"vencordDesktopPreload.js\"),\n contextIsolation: true,\n nodeIntegration: false,\n sandbox: false\n }\n });\n\n makeLinksOpenExternally(win);\n\n await win.loadURL(`data:text/html;base64,${monacoHtml}`);\n});\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nif (!IS_UPDATER_DISABLED)\n import(IS_STANDALONE ? \"./http\" : \"./git\");\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { ipcMain } from \"electron\";\n\nimport PluginNatives from \"~pluginNatives\";\n\nconst PluginIpcMappings = {} as Record>;\nexport type PluginIpcMappings = typeof PluginIpcMappings;\n\nfor (const [plugin, methods] of Object.entries(PluginNatives)) {\n const entries = Object.entries(methods);\n if (!entries.length) continue;\n\n const mappings = PluginIpcMappings[plugin] = {};\n\n for (const [methodName, method] of entries) {\n const key = `VencordPluginNative_${plugin}_${methodName}`;\n ipcMain.handle(key, method);\n mappings[methodName] = key;\n }\n}\n\nipcMain.on(IpcEvents.GET_PLUGIN_IPC_METHOD_MAP, e => {\n e.returnValue = PluginIpcMappings;\n});\n", "import * as p0 from \"./plugins/fixSpotifyEmbeds.desktop/native\";\nimport * as p1 from \"./plugins/openInApp/native\";\nimport * as p2 from \"./plugins/voiceMessages/native\";\nexport default {\n\"FixSpotifyEmbeds\":p0,\n\"OpenInApp\":p1,\n\"VoiceMessages\":p2,\n};", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { app } from \"electron\";\nimport { getSettings } from \"main/ipcMain\";\n\napp.on(\"browser-window-created\", (_, win) => {\n win.webContents.on(\"frame-created\", (_, { frame }) => {\n frame.once(\"dom-ready\", () => {\n if (frame.url.startsWith(\"https://open.spotify.com/embed/\")) {\n const settings = getSettings().plugins?.FixSpotifyEmbeds;\n if (!settings?.enabled) return;\n\n frame.executeJavaScript(`\n const original = Audio.prototype.play;\n Audio.prototype.play = function() {\n this.volume = ${(settings.volume / 100) || 0.1};\n return original.apply(this, arguments);\n }\n `);\n }\n });\n });\n});\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { IpcMainInvokeEvent } from \"electron\";\nimport { request } from \"https\";\n\n// These links don't support CORS, so this has to be native\nconst validRedirectUrls = /^https:\\/\\/(spotify\\.link|s\\.team)\\/.+$/;\n\nfunction getRedirect(url: string) {\n return new Promise((resolve, reject) => {\n const req = request(new URL(url), { method: \"HEAD\" }, res => {\n resolve(\n res.headers.location\n ? getRedirect(res.headers.location)\n : url\n );\n });\n req.on(\"error\", reject);\n req.end();\n });\n}\n\nexport async function resolveRedirect(_: IpcMainInvokeEvent, url: string) {\n if (!validRedirectUrls.test(url)) return url;\n\n return getRedirect(url);\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { app } from \"electron\";\nimport { readFile } from \"fs/promises\";\nimport { basename, normalize } from \"path\";\n\nexport async function readRecording(_, filePath: string) {\n filePath = normalize(filePath);\n const filename = basename(filePath);\n const discordBaseDirWithTrailingSlash = normalize(app.getPath(\"userData\") + \"/\");\n console.log(filename, discordBaseDirWithTrailingSlash, filePath);\n if (filename !== \"recording.ogg\" || !filePath.startsWith(discordBaseDirWithTrailingSlash)) return null;\n\n try {\n const buf = await readFile(filePath);\n return new Uint8Array(buf.buffer);\n } catch {\n return null;\n }\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n/**\n * Returns a new function that will call the wrapped function\n * after the specified delay. If the function is called again\n * within the delay, the timer will be reset.\n * @param func The function to wrap\n * @param delay The delay in milliseconds\n */\nexport function debounce(func: T, delay = 300): T {\n let timeout: NodeJS.Timeout;\n return function (...args: any[]) {\n clearTimeout(timeout);\n timeout = setTimeout(() => { func(...args); }, delay);\n } as any;\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { Promisable } from \"type-fest\";\n\n/**\n * A queue that can be used to run tasks consecutively.\n * Highly recommended for things like fetching data from Discord\n */\nexport class Queue {\n /**\n * @param maxSize The maximum amount of functions that can be queued at once.\n * If the queue is full, the oldest function will be removed.\n */\n constructor(public readonly maxSize = Infinity) { }\n\n private queue = [] as Array<() => Promisable>;\n\n private promise?: Promise;\n\n private next() {\n const func = this.queue.shift();\n if (func)\n this.promise = Promise.resolve()\n .then(func)\n .finally(() => this.next());\n else\n this.promise = undefined;\n }\n\n private run() {\n if (!this.promise)\n this.next();\n }\n\n /**\n * Append a task at the end of the queue. This task will be executed after all other tasks\n * If the queue exceeds the specified maxSize, the first task in queue will be removed.\n * @param func Task\n */\n push(func: () => Promisable) {\n if (this.size >= this.maxSize)\n this.queue.shift();\n\n this.queue.push(func);\n this.run();\n }\n\n /**\n * Prepend a task at the beginning of the queue. This task will be executed next\n * If the queue exceeds the specified maxSize, the last task in queue will be removed.\n * @param func Task\n */\n unshift(func: () => Promisable) {\n if (this.size >= this.maxSize)\n this.queue.pop();\n\n this.queue.unshift(func);\n this.run();\n }\n\n /**\n * The amount of tasks in the queue\n */\n get size() {\n return this.queue.length;\n }\n}\n", "export default \"PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KICAgIDxoZWFkPgogICAgICAgIDxtZXRhIGNoYXJzZXQ9InV0Zi04IiAvPgogICAgICAgIDx0aXRsZT5WZW5jb3JkIFF1aWNrQ1NTIEVkaXRvcjwvdGl0bGU+CiAgICAgICAgPGxpbmsKICAgICAgICAgICAgcmVsPSJzdHlsZXNoZWV0IgogICAgICAgICAgICBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9tb25hY28tZWRpdG9yLzAuNDAuMC9taW4vdnMvZWRpdG9yL2VkaXRvci5tYWluLm1pbi5jc3MiCiAgICAgICAgICAgIGludGVncml0eT0ic2hhNTEyLU1Pb1EwMmg4MGhrbGNjZkxyWEZZa0N6RytXVmpPUmZsT3A5WnA4ZGx0aWFSUCszNUxZbk80TEtPa2xSNjRvTUdmR2dKRExPOFdKcGtNMW81Z1pYWVpRPT0iCiAgICAgICAgICAgIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiCiAgICAgICAgICAgIHJlZmVycmVycG9saWN5PSJuby1yZWZlcnJlciIKICAgICAgICAvPgogICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgaHRtbCwKICAgICAgICAgICAgYm9keSwKICAgICAgICAgICAgI2NvbnRhaW5lciB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgfQogICAgICAgIDwvc3R5bGU+CiAgICA8L2hlYWQ+CgogICAgPGJvZHk+CiAgICAgICAgPGRpdiBpZD0iY29udGFpbmVyIj48L2Rpdj4KICAgICAgICA8c2NyaXB0CiAgICAgICAgICAgIHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvbW9uYWNvLWVkaXRvci8wLjQwLjAvbWluL3ZzL2xvYWRlci5taW4uanMiCiAgICAgICAgICAgIGludGVncml0eT0ic2hhNTEyLVF6TXBYZUNQY2lBSFA0d2JZbFYyUFlnclFjYUVrRFFVanprUFU0eG5qeVZTRDlUMzYvdWRhbXh0TkJxYjRxSzQvYk1RTVBaOGF5ckJlOWhyR2RCRmpRPT0iCiAgICAgICAgICAgIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiCiAgICAgICAgICAgIHJlZmVycmVycG9saWN5PSJuby1yZWZlcnJlciIKICAgICAgICA+PC9zY3JpcHQ+CgogICAgICAgIDxzY3JpcHQ+CiAgICAgICAgICAgIHJlcXVpcmUuY29uZmlnKHsKICAgICAgICAgICAgICAgIHBhdGhzOiB7CiAgICAgICAgICAgICAgICAgICAgdnM6ICJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9tb25hY28tZWRpdG9yLzAuNDAuMC9taW4vdnMiLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICByZXF1aXJlKFsidnMvZWRpdG9yL2VkaXRvci5tYWluIl0sICgpID0+IHsKICAgICAgICAgICAgICAgIGdldEN1cnJlbnRDc3MoKS50aGVuKChjc3MpID0+IHsKICAgICAgICAgICAgICAgICAgICB2YXIgZWRpdG9yID0gbW9uYWNvLmVkaXRvci5jcmVhdGUoCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJjb250YWluZXIiKSwKICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGNzcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlOiAiY3NzIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lOiBnZXRUaGVtZSgpLAogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgICAgICBlZGl0b3Iub25EaWRDaGFuZ2VNb2RlbENvbnRlbnQoKCkgPT4KICAgICAgICAgICAgICAgICAgICAgICAgc2V0Q3NzKGVkaXRvci5nZXRWYWx1ZSgpKQogICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoInJlc2l6ZSIsICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWFrZSBtb25hY28gcmUtbGF5b3V0CiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5sYXlvdXQoKTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICA8L3NjcmlwdD4KICAgIDwvYm9keT4KPC9odG1sPgo=\"", "/* eslint-disable simple-header/header */\n\n/*!\n * BetterDiscord addon meta parser\n * Copyright 2023 BetterDiscord contributors\n * Copyright 2023 Vendicated and Vencord contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst splitRegex = /[^\\S\\r\\n]*?\\r?(?:\\r\\n|\\n)[^\\S\\r\\n]*?\\*[^\\S\\r\\n]?/;\nconst escapedAtRegex = /^\\\\@/;\n\nexport interface UserThemeHeader {\n fileName: string;\n name: string;\n author: string;\n description: string;\n version?: string;\n license?: string;\n source?: string;\n website?: string;\n invite?: string;\n}\n\nfunction makeHeader(fileName: string, opts: Partial = {}): UserThemeHeader {\n return {\n fileName,\n name: opts.name ?? fileName.replace(/\\.css$/i, \"\"),\n author: opts.author ?? \"Unknown Author\",\n description: opts.description ?? \"A Discord Theme.\",\n version: opts.version,\n license: opts.license,\n source: opts.source,\n website: opts.website,\n invite: opts.invite\n };\n}\n\nexport function stripBOM(fileContent: string) {\n if (fileContent.charCodeAt(0) === 0xFEFF) {\n fileContent = fileContent.slice(1);\n }\n return fileContent;\n}\n\nexport function getThemeInfo(css: string, fileName: string): UserThemeHeader {\n if (!css) return makeHeader(fileName);\n\n const block = css.split(\"/**\", 2)?.[1]?.split(\"*/\", 1)?.[0];\n if (!block) return makeHeader(fileName);\n\n const header: Partial = {};\n let field = \"\";\n let accum = \"\";\n for (const line of block.split(splitRegex)) {\n if (line.length === 0) continue;\n if (line.charAt(0) === \"@\" && line.charAt(1) !== \" \") {\n header[field] = accum.trim();\n const l = line.indexOf(\" \");\n field = line.substring(1, l);\n accum = line.substring(l + 1);\n }\n else {\n accum += \" \" + line.replace(\"\\\\n\", \"\\n\").replace(escapedAtRegex, \"@\");\n }\n }\n header[field] = accum.trim();\n delete header[\"\"];\n return makeHeader(fileName, header);\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { app } from \"electron\";\nimport { join } from \"path\";\n\nexport const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (\n process.env.DISCORD_USER_DATA_DIR\n ? join(process.env.DISCORD_USER_DATA_DIR, \"..\", \"VencordData\")\n : join(app.getPath(\"userData\"), \"..\", \"Vencord\")\n);\nexport const SETTINGS_DIR = join(DATA_DIR, \"settings\");\nexport const THEMES_DIR = join(DATA_DIR, \"themes\");\nexport const QUICKCSS_PATH = join(SETTINGS_DIR, \"quickCss.css\");\nexport const SETTINGS_FILE = join(SETTINGS_DIR, \"settings.json\");\nexport const ALLOWED_PROTOCOLS = [\n \"https:\",\n \"http:\",\n \"steam:\",\n \"spotify:\",\n \"com.epicgames.launcher:\",\n];\n\nexport const IS_VANILLA = /* @__PURE__ */ process.argv.includes(\"--vanilla\");\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { type BrowserWindow, shell } from \"electron\";\n\nexport function makeLinksOpenExternally(win: BrowserWindow) {\n win.webContents.setWindowOpenHandler(({ url }) => {\n switch (url) {\n case \"about:blank\":\n case \"https://discord.com/popout\":\n case \"https://ptb.discord.com/popout\":\n case \"https://canary.discord.com/popout\":\n return { action: \"allow\" };\n }\n\n try {\n var { protocol } = new URL(url);\n } catch {\n return { action: \"deny\" };\n }\n\n switch (protocol) {\n case \"http:\":\n case \"https:\":\n case \"mailto:\":\n case \"steam:\":\n case \"spotify:\":\n shell.openExternal(url);\n }\n\n return { action: \"deny\" };\n });\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { session } from \"electron\";\nimport { unzip } from \"fflate\";\nimport { constants as fsConstants } from \"fs\";\nimport { access, mkdir, rm, writeFile } from \"fs/promises\";\nimport { join } from \"path\";\n\nimport { DATA_DIR } from \"./constants\";\nimport { crxToZip } from \"./crxToZip\";\nimport { get } from \"./simpleGet\";\n\nconst extensionCacheDir = join(DATA_DIR, \"ExtensionCache\");\n\nasync function extract(data: Buffer, outDir: string) {\n await mkdir(outDir, { recursive: true });\n return new Promise((resolve, reject) => {\n unzip(data, (err, files) => {\n if (err) return void reject(err);\n Promise.all(Object.keys(files).map(async f => {\n // Signature stuff\n // 'Cannot load extension with file or directory name\n // _metadata. Filenames starting with \"_\" are reserved for use by the system.';\n if (f.startsWith(\"_metadata/\")) return;\n\n if (f.endsWith(\"/\")) return void mkdir(join(outDir, f), { recursive: true });\n\n const pathElements = f.split(\"/\");\n const name = pathElements.pop()!;\n const directories = pathElements.join(\"/\");\n const dir = join(outDir, directories);\n\n if (directories) {\n await mkdir(dir, { recursive: true });\n }\n\n await writeFile(join(dir, name), files[f]);\n }))\n .then(() => resolve())\n .catch(err => {\n rm(outDir, { recursive: true, force: true });\n reject(err);\n });\n });\n });\n}\n\nexport async function installExt(id: string) {\n const extDir = join(extensionCacheDir, `${id}`);\n\n try {\n await access(extDir, fsConstants.F_OK);\n } catch (err) {\n const url = id === \"fmkadmapgofadopljbjfkapdkoienihi\"\n // React Devtools v4.25\n // v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843\n // Unfortunately, Google does not serve old versions, so this is the only way\n ? \"https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip\"\n : `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=32`;\n const buf = await get(url, {\n headers: {\n \"User-Agent\": \"Vencord (https://github.com/Vendicated/Vencord)\"\n }\n });\n await extract(crxToZip(buf), extDir).catch(console.error);\n }\n\n session.defaultSession.loadExtension(extDir);\n}\n", "import { createRequire } from 'module';\nvar require = createRequire('/');\n// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\n// Mediocre shim\nvar Worker;\nvar workerAdd = \";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global\";\ntry {\n Worker = require('worker_threads').Worker;\n}\ncatch (e) {\n}\nvar wk = Worker ? function (c, _, msg, transfer, cb) {\n var done = false;\n var w = new Worker(c + workerAdd, { eval: true })\n .on('error', function (e) { return cb(e, null); })\n .on('message', function (m) { return cb(null, m); })\n .on('exit', function (c) {\n if (c && !done)\n cb(new Error('exited with code ' + c), null);\n });\n w.postMessage(msg, transfer);\n w.terminate = function () {\n done = true;\n return Worker.prototype.terminate.call(w);\n };\n return w;\n} : function (_, __, ___, ____, cb) {\n setImmediate(function () { return cb(new Error('async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)'), null); });\n var NOP = function () { };\n return {\n terminate: NOP,\n postMessage: NOP\n };\n};\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([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, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([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, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != -1) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u, -1);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = lft = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n", "/* eslint-disable simple-header/header */\n\n/*!\n * crxToZip\n * Copyright (c) 2013 Rob Wu \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n */\n\nexport function crxToZip(buf: Buffer) {\n function calcLength(a: number, b: number, c: number, d: number) {\n let length = 0;\n\n length += a << 0;\n length += b << 8;\n length += c << 16;\n length += d << 24 >>> 0;\n return length;\n }\n\n // 50 4b 03 04\n // This is actually a zip file\n if (buf[0] === 80 && buf[1] === 75 && buf[2] === 3 && buf[3] === 4) {\n return buf;\n }\n\n // 43 72 32 34 (Cr24)\n if (buf[0] !== 67 || buf[1] !== 114 || buf[2] !== 50 || buf[3] !== 52) {\n throw new Error(\"Invalid header: Does not start with Cr24\");\n }\n\n // 02 00 00 00\n // or\n // 03 00 00 00\n const isV3 = buf[4] === 3;\n const isV2 = buf[4] === 2;\n\n if ((!isV2 && !isV3) || buf[5] || buf[6] || buf[7]) {\n throw new Error(\"Unexpected crx format version number.\");\n }\n\n if (isV2) {\n const publicKeyLength = calcLength(buf[8], buf[9], buf[10], buf[11]);\n const signatureLength = calcLength(buf[12], buf[13], buf[14], buf[15]);\n\n // 16 = Magic number (4), CRX format version (4), lengths (2x4)\n const zipStartOffset = 16 + publicKeyLength + signatureLength;\n\n return buf.subarray(zipStartOffset, buf.length);\n }\n // v3 format has header size and then header\n const headerSize = calcLength(buf[8], buf[9], buf[10], buf[11]);\n const zipStartOffset = 12 + headerSize;\n\n return buf.subarray(zipStartOffset, buf.length);\n}\n"],
"mappings": "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",
"names": ["init_react", "__esmMin", "git_hash_default", "init_git_hash", "__esmMin", "init_react", "git_remote_default", "init_git_remote", "__esmMin", "init_react", "VENCORD_USER_AGENT", "init_constants", "__esmMin", "init_react", "init_git_hash", "init_git_remote", "git_hash_default", "git_remote_default", "init_IpcEvents", "__esmMin", "init_react", "get", "url", "options", "resolve", "reject", "https", "res", "statusCode", "statusMessage", "headers", "chunks", "chunk", "import_https", "init_simpleGet", "__esmMin", "init_react", "serializeErrors", "func", "e", "VENCORD_FILES", "init_common", "__esmMin", "init_react", "http_exports", "githubGet", "endpoint", "get", "API_BASE", "VENCORD_USER_AGENT", "calculateGitChanges", "fetchUpdates", "res", "git_hash_default", "c", "release", "data", "name", "browser_download_url", "VENCORD_FILES", "s", "PendingUpdates", "applyUpdates", "import_electron", "import_promises", "import_path", "init_http", "__esmMin", "init_react", "init_constants", "init_IpcEvents", "init_git_hash", "init_git_remote", "init_simpleGet", "init_common", "git_remote_default", "serializeErrors", "init_react", "import_electron", "import_path", "init_react", "init_react", "init_react", "init_IpcEvents", "import_electron", "init_react", "native_exports", "init_react", "import_electron", "_", "win", "frame", "settings", "getSettings", "native_exports", "__export", "resolveRedirect", "init_react", "import_https", "validRedirectUrls", "getRedirect", "url", "resolve", "reject", "req", "res", "_", "native_exports", "__export", "readRecording", "init_react", "import_electron", "import_promises", "import_path", "_", "filePath", "filename", "discordBaseDirWithTrailingSlash", "buf", "pluginNatives_default", "native_exports", "PluginIpcMappings", "plugin", "methods", "pluginNatives_default", "entries", "mappings", "methodName", "method", "key", "init_react", "init_IpcEvents", "init_react", "Queue", "maxSize", "func", "import_electron", "import_fs", "import_promises", "import_path", "init_react", "monacoWin_default", "init_react", "splitRegex", "escapedAtRegex", "makeHeader", "fileName", "opts", "stripBOM", "fileContent", "getThemeInfo", "css", "block", "header", "field", "accum", "line", "l", "init_react", "import_electron", "import_path", "DATA_DIR", "SETTINGS_DIR", "THEMES_DIR", "QUICKCSS_PATH", "SETTINGS_FILE", "ALLOWED_PROTOCOLS", "init_react", "import_electron", "makeLinksOpenExternally", "win", "url", "protocol", "SETTINGS_DIR", "THEMES_DIR", "ensureSafePath", "basePath", "path", "normalizedBasePath", "newPath", "normalizedPath", "readCss", "QUICKCSS_PATH", "listThemes", "files", "themeInfo", "fileName", "data", "getThemeData", "stripBOM", "getThemeInfo", "safePath", "readSettings", "SETTINGS_FILE", "getSettings", "_", "url", "protocol", "ALLOWED_PROTOCOLS", "cssWriteQueue", "Queue", "settingsWriteQueue", "css", "s", "win", "makeLinksOpenExternally", "monacoWin_default", "init_react", "import_electron", "init_react", "import_module", "require", "Worker", "workerAdd", "wk", "c", "_", "msg", "transfer", "cb", "done", "w", "e", "m", "__", "___", "____", "NOP", "u8", "u16", "u32", "fleb", "fdeb", "clim", "freb", "eb", "start", "b", "i", "r", "j", "_a", "fl", "revfl", "_b", "fd", "revfd", "rev", "x", "hMap", "cd", "mb", "s", "l", "le", "co", "rvb", "sv", "r_1", "v", "flt", "fdt", "flrm", "hMap", "flt", "fdrm", "hMap", "fdt", "max", "a", "m", "i", "bits", "d", "p", "o", "bits16", "shft", "slc", "v", "s", "e", "n", "u16", "u32", "u8", "ec", "err", "ind", "msg", "nt", "e", "inflt", "dat", "buf", "st", "sl", "u8", "noBuf", "noSt", "cbuf", "l", "bl", "nbuf", "final", "pos", "bt", "lm", "dm", "lbt", "dbt", "tbts", "bits", "type", "flrm", "fdrm", "hLit", "hcLen", "tl", "ldt", "clt", "i", "clim", "clb", "max", "clbmsk", "clm", "hMap", "r", "s", "c", "n", "lt", "dt", "shft", "t", "lms", "dms", "lpos", "bits16", "sym", "add", "b", "fleb", "fl", "d", "dsym", "fd", "fdeb", "end", "slc", "et", "u8", "mrg", "a", "b", "o", "k", "wcln", "fn", "fnStr", "td", "dt", "st", "ks", "i", "v", "st_1", "spInd", "t", "ch", "cbfs", "tl", "wrkr", "fns", "init", "id", "cb", "_a", "td_1", "m", "wk", "bInflt", "u8", "u16", "u32", "fleb", "fdeb", "clim", "fl", "fd", "flrm", "fdrm", "rev", "ec", "hMap", "max", "bits", "bits16", "shft", "slc", "err", "inflt", "inflateSync", "pbf", "gu8", "pbf", "msg", "gu8", "o", "u8", "cbify", "dat", "opts", "fns", "init", "id", "cb", "w", "wrkr", "err", "b2", "d", "b", "b4", "b8", "inflate", "data", "opts", "cb", "err", "cbify", "bInflt", "ev", "pbf", "inflateSync", "gu8", "out", "inflt", "td", "tds", "et", "dutf8", "d", "r", "i", "c", "eb", "slc", "strFromU8", "dat", "latin1", "r", "i", "td", "_a", "dutf8", "out", "ext", "err", "slzh", "d", "b", "b2", "zh", "z", "fnl", "fn", "strFromU8", "es", "bs", "b4", "_a", "z64e", "sc", "su", "off", "b8", "mt", "fn", "unzip", "data", "opts", "cb", "err", "term", "tAll", "i", "files", "cbd", "a", "b", "e", "b4", "lft", "b2", "c", "o", "z", "ze", "fltr", "_loop_3", "_a", "zh", "c_1", "sc", "su", "no", "off", "slzh", "cbl", "d", "slc", "infl", "inflateSync", "u8", "inflate", "import_fs", "import_promises", "import_path", "init_react", "crxToZip", "buf", "calcLength", "b", "d", "length", "isV3", "isV2", "publicKeyLength", "signatureLength", "zipStartOffset", "init_simpleGet", "extensionCacheDir", "DATA_DIR", "extract", "data", "outDir", "resolve", "reject", "unzip", "err", "files", "f", "pathElements", "name", "directories", "dir", "installExt", "id", "extDir", "fsConstants", "url", "buf", "get", "crxToZip", "unsafeUrl", "cb", "url", "theme", "safeUrl", "ensureSafePath", "THEMES_DIR", "getSettings", "installExt", "err", "findHeader", "headers", "headerName", "h", "parsePolicy", "policy", "result", "directive", "directiveKey", "directiveValue", "stringifyPolicy", "values", "patchCsp", "header", "csp", "responseHeaders", "resourceType"]
}
diff --git a/VencordDesktop/vencordDist/vencordDesktopPreload.js b/VencordDesktop/vencordDist/vencordDesktopPreload.js
index 209cd84..efefed1 100644
--- a/VencordDesktop/vencordDist/vencordDesktopPreload.js
+++ b/VencordDesktop/vencordDist/vencordDesktopPreload.js
@@ -1,4 +1,4 @@
-// Vencord 81fb7c6
+// Vencord 96126fa
// Standalone: true
// Platform: Universal
// Updater disabled: false
diff --git a/VencordDesktop/vencordDist/vencordDesktopRenderer.css b/VencordDesktop/vencordDist/vencordDesktopRenderer.css
index 65278c9..8b33517 100644
--- a/VencordDesktop/vencordDist/vencordDesktopRenderer.css
+++ b/VencordDesktop/vencordDist/vencordDesktopRenderer.css
@@ -1 +1 @@
-.vc-error-card{padding:2em;background-color:#e7828430;border:1px solid #e78284;border-radius:5px;color:var(--text-normal, white)}.vc-notification-root{all:unset;display:flex;flex-direction:column;color:var(--text-normal);background-color:var(--background-secondary-alt);border-radius:6px;overflow:hidden;cursor:pointer;width:100%}.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root){position:absolute;z-index:2147483647;right:1rem;width:25vw;min-height:10vh}.vc-notification{display:flex;flex-direction:row;padding:1.25rem;gap:1.25rem}.vc-notification-content{width:100%}.vc-notification-header{display:flex;justify-content:space-between}.vc-notification-title{color:var(--header-primary);font-size:1rem;font-weight:600;line-height:1.25rem;text-transform:uppercase}.vc-notification-close-btn{all:unset;cursor:pointer;color:var(--interactive-normal);opacity:.5;transition:opacity .2s ease-in-out,color .2s ease-in-out}.vc-notification-close-btn:hover{color:var(--interactive-hover);opacity:1}.vc-notification-icon{height:4rem;width:4rem;border-radius:6px}.vc-notification-progressbar{height:.25rem;border-radius:5px;margin-top:auto}.vc-notification-p{margin:.5rem 0 0;line-height:140%}.vc-notification-img{width:100%}.vc-notification-log-empty{height:218px;background:url(/assets/b36de980b174d7b798c89f35c116e5c6.svg) center no-repeat;margin-bottom:40px}.vc-notification-log-container{display:flex;flex-direction:column;padding:1em;overflow:hidden}.vc-notification-log-wrapper{transition:.2s ease;transition-property:height,opacity}.vc-notification-log-wrapper:not(:last-child){margin-bottom:1em}.vc-notification-log-removing{height:0!important;opacity:0;margin-bottom:1em}.vc-notification-log-body{display:flex;flex-direction:column}.vc-notification-log-timestamp{margin-left:auto;font-size:.8em;font-weight:lighter}.vc-notification-log-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-settings-tab-bar{margin-top:20px;margin-bottom:10px;border-bottom:2px solid var(--background-modifier-accent)}.vc-settings-tab-bar-item{margin-right:32px;padding-bottom:16px;margin-bottom:-2px}.vc-settings-quick-actions-card{padding:1em;display:flex;gap:1em;align-items:center;justify-content:space-evenly;flex-grow:1;flex-flow:row wrap;margin-bottom:1em}.vc-settings-donate{display:flex;flex-direction:row}.vc-settings-card{padding:1em;margin-bottom:1em}.vc-backup-restore-card{background-color:var(--info-warning-background);border-color:var(--info-warning-foreground);color:var(--info-warning-text)}.vc-settings-theme-links{display:inline-block!important;color:var(--text-normal)!important;padding:.5em;border:1px solid var(--background-modifier-accent);max-height:unset}.vc-cloud-settings-sync-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1em}.vc-cloud-erase-data-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-text-selectable,.vc-text-selectable :where([class*="text" i],[class*="title" i]){user-select:text;cursor:initial}.vc-settings-theme-grid{display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-settings-theme-card{display:flex;flex-direction:column;background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;padding:1em;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity}.vc-settings-theme-card-text{text-overflow:ellipsis;height:1.2em;margin-bottom:2px;white-space:nowrap;overflow:hidden}.vc-settings-theme-author:before{content:"by "}.vc-plugins-grid{margin-top:16px;display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-plugins-info-button{height:24px;width:24px;padding:0;background:transparent;margin-right:8px}.vc-plugins-settings-button:hover{color:var(--interactive-hover)}.vc-plugins-filter-controls{display:grid;height:40px;gap:10px;grid-template-columns:1fr 150px}.vc-plugins-badge{padding:0 6px;font-family:var(--font-display);font-weight:500;border-radius:8px;height:16px;font-size:12px;line-height:16px;color:var(--white-500);text-align:center}.vc-plugins-dep-name{margin:0 auto}.vc-plugins-info-card{padding:1em;height:8em;display:flex;flex-direction:column}.vc-plugins-info-card div{line-height:32px}.vc-plugins-restart-card{padding:1em;background:var(--info-warning-background);border:1px solid var(--info-warning-foreground);color:var(--info-warning-text)}.vc-plugins-restart-card button{margin-top:.5em}.vc-plugins-info-button svg:not(:hover,:focus){color:var(--text-muted)}.vc-open-external-icon{transform:rotate(45deg)}.vc-owner-crown-icon{color:var(--text-warning)}.vc-author-modal-root{padding:1em}.vc-author-modal-header{display:flex;align-items:center;margin-bottom:1em}.vc-author-modal-name{text-transform:none;flex-grow:0;background:var(--background-tertiary);border-radius:0 9999px 9999px 0;padding:6px .8em 6px .5em;font-size:20px;height:20px;position:relative;text-wrap:nowrap}.vc-author-modal-name:before{content:"";display:block;position:absolute;height:100%;width:16px;background:var(--background-tertiary);z-index:-1;left:-16px;top:0}.vc-author-modal-avatar{height:32px;width:32px;border-radius:50%}.vc-author-modal-links{margin-left:auto;display:flex;gap:.2em}.vc-author-modal-links img{height:32px;width:32px;border-radius:50%;border:4px solid var(--background-tertiary);box-sizing:border-box}.vc-author-modal-plugins{display:grid;gap:.5em}.vc-addon-card{background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;display:block;height:100%;padding:12px;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity;box-sizing:border-box}.vc-addon-card-disabled{opacity:.6}.vc-addon-card:hover{background-color:var(--background-tertiary);transform:translateY(-1px);box-shadow:var(--elevation-high)}.vc-addon-header{margin-top:auto;display:flex;width:100%;justify-content:flex-end;align-items:center;gap:8px;margin-bottom:.5em}.vc-addon-note{height:36px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;box-orient:vertical}.vc-addon-name-author{width:100%}.vc-addon-name{display:flex;width:100%;align-items:center;flex-grow:1;gap:8px}.vc-addon-author{font-size:.8em}.vc-addon-author:before{content:"by "}.vc-switch-slider{transition:.1s transform ease-in-out}.client-theme-settings{display:flex;flex-direction:column}.client-theme-container{display:flex;flex-direction:row;justify-content:space-between}.client-theme-settings-labels{display:flex;flex-direction:column;justify-content:flex-start}.client-theme-container>[class^=colorSwatch]>[class^=swatch]{border:thin solid var(--background-modifier-accent)!important}.client-theme-warning{color:var(--text-danger)}.vc-dearrow-toggle-off svg{filter:grayscale(1)}.vc-dearrow-toggle-on,.vc-dearrow-toggle-off{all:unset;display:inline;cursor:pointer;position:absolute;top:.75rem;right:.75rem}.messagelogger-deleted [class^=buttons]{display:none}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]){filter:grayscale(1)!important;transition:.15s filter ease-in-out}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]):hover,.messagelogger-deleted{filter:grayscale(0)!important}.theme-dark .messagelogger-edited{filter:brightness(80%)}.theme-light .messagelogger-edited{opacity:.5}.vc-permviewer-userperms-title-container{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-bottom:6px}.vc-permviewer-userperms-btns-container{display:flex;align-items:center}.vc-permviewer-userperms-sortorder-btn{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px}.vc-permviewer-userperms-permdetails-btn,.vc-permviewer-userperms-toggleperms-btn{all:unset;cursor:pointer;display:flex;align-items:center}.vc-permviewer-perms-title{flex-grow:1}.vc-permviewer-perms-no-perms{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.vc-permviewer-perms-container{display:grid;grid-template-columns:1fr 2fr;grid-template-areas:"list permissions";padding:16px 0}.vc-permviewer-perms-list{grid-area:list;display:flex;flex-direction:column;gap:2px;border-right:2px solid var(--background-modifier-active)}.vc-permviewer-perms-list-item-btn{all:unset;cursor:pointer}.vc-permviewer-perms-list-item{display:flex;align-items:center;padding:8px 5px;cursor:pointer;width:230px;border-radius:5px}.vc-permviewer-perms-list-item:hover{background-color:var(--background-modifier-hover)}.vc-permviewer-perms-list-item-active{background-color:var(--background-modifier-selected)}.vc-permviewer-perms-list-item>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.vc-permviewer-perms-role-circle{border-radius:50%;width:12px;height:12px;margin-left:3px;margin-right:11px;flex-shrink:0}.vc-permviewer-perms-user-img{border-radius:50%;width:20px;height:20px;margin-right:6px}.vc-permviewer-perms-perms{grid-area:permissions;display:flex;flex-direction:column;margin-left:5px}.vc-permviewer-perms-perms-item{position:relative;display:flex;align-items:center;padding:10px;border-bottom:2px solid var(--background-modifier-active)}.vc-permviewer-perms-perms-item:last-child{border:0}.vc-permviewer-perms-perms-item-icon{border:1px solid var(--background-modifier-selected);width:24px;height:24px;margin-right:5px}.vc-permviewer-perms-perms-item .vc-info-icon{color:var(--interactive-muted);cursor:pointer;position:absolute;right:0;scale:.9;transition:color ease-in .1s}.vc-permviewer-perms-perms-item .vc-info-icon:hover{color:var(--interactive-active)}.vc-expandableheader-center-flex{display:flex;justify-items:center;align-items:center}.vc-expandableheader-btn{all:unset;cursor:pointer;width:24px;height:24px}.vc-pip-button{color:var(--interactive-normal)}.vc-pip-button:hover{background-color:var(--background-modifier-hover);color:var(--interactive-hover)}.vc-pronoundb-compact{display:none}[class*=compact] .vc-pronoundb-compact{display:inline-block;margin-left:-2px;margin-right:.25rem}.vc-st-modal-content input{background-color:var(--input-background);color:var(--text-normal);width:95%;padding:8px 8px 8px 12px;margin:1em 0;outline:none;border:1px solid var(--input-background);border-radius:4px;font-weight:500;font-style:inherit;font-size:100%}.vc-st-format-label,.vc-st-format-label span{background-color:transparent}.vc-st-modal-content [class|=select]{margin-bottom:1em}.vc-st-modal-content [class|=select] span{background-color:var(--input-background)}.vc-st-modal-header{justify-content:space-between;align-content:center}.vc-st-modal-header h1{margin:0}.vc-st-modal-header button{padding:0}.vc-st-preview-text{margin-bottom:1em}.vc-st-button{padding:0 6px}.vc-st-button svg{transform:scale(1.1) translateY(1px)}.vc-gp-root{height:100%;user-select:text}.vc-gp-banner{width:100%;cursor:pointer}.vc-gp-header{display:flex;flex-direction:row;align-items:center;gap:.5em;margin:.5em}.vc-gp-header img{width:48px;height:48px;cursor:pointer}.vc-gp-name-and-description{display:flex;flex-direction:column;gap:.2em}.vc-gp-name{margin:0}.vc-gp-tab-bar{border-bottom:2px solid var(--background-modifier-accent);margin:20px 12px 0;display:flex;gap:40px;align-items:stretch;flex-direction:row}.vc-gp-tab{border-bottom:2px solid transparent;color:var(--interactive-normal);cursor:pointer;height:39px;line-height:14px}.vc-gp-tab-content{margin:1em}.vc-gp-tab:where(.vc-gp-selected,:hover,:focus){border-bottom-color:var(--interactive-active)}.vc-gp-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1em}.vc-gp-server-info-pair{color:var(--text-normal)}.vc-gp-server-info-pair [class^=timestamp]{margin-left:0}.vc-gp-owner{display:flex;align-items:center;gap:.2em}.vc-gp-owner img{height:20px;border-radius:50%;cursor:pointer}.vc-gp-scroller{width:100%;max-height:500px}.vc-gp-scroller [class^=listRow]{margin:1px 0}.vc-gp-scroller [class^=listRow]:hover{background-color:var(--background-modifier-hover)}.shiki-container{border:4px;background-color:var(--background-secondary)}.shiki-root{border-radius:4px}.shiki-root code{display:block;overflow-x:auto;padding:.5em;position:relative;font-size:.875rem;line-height:1.125rem;text-indent:0;white-space:pre-wrap;background:transparent;border:none}.shiki-devicon{margin-right:8px;user-select:none}.shiki-plain code{padding-top:8px}.shiki-btns{font-size:1em;position:absolute;right:0;bottom:0;opacity:0}.shiki-root:hover .shiki-btns{opacity:1}.shiki-btn{border-radius:4px 4px 0 0;padding:4px 8px;user-select:none}.shiki-btn~.shiki-btn{margin-left:4px}.shiki-btn:last-child{border-radius:4px 0}.shiki-spinner-container{align-items:center;background-color:#0009;display:flex;position:absolute;justify-content:center;inset:0}.shiki-preview{margin-bottom:2em}.shiki-lang{padding:0 5px;margin-bottom:6px;font-weight:700;text-transform:capitalize;display:flex;align-items:center}.shiki-table{border-collapse:collapse;width:100%}.shiki-table tr{height:19px;width:100%}.shiki-root td:first-child{border-right:1px solid transparent;padding-left:5px;padding-right:8px;user-select:none}.shiki-root td:last-child{padding-left:8px;word-break:break-word;width:100%}.vc-user-connection{all:unset;display:inline-block;cursor:pointer}.vc-sc-tooltip{display:inline-flex;gap:.25em;align-items:center}.shc-lock-screen-outer-container{overflow:hidden scroll;flex:1 1 auto;height:100%;width:100%}.shc-lock-screen-container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:100%}.shc-lock-screen-container>*{margin:5px}.shc-lock-screen-logo{width:180px;height:180px}.shc-lock-screen-heading-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-heading-container>*{margin:inherit}.shc-lock-screen-heading-nsfw-icon{color:var(--text-normal)}.shc-lock-screen-topic-container{color:var(--text-normal);background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container{background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container>*{margin:inherit}.shc-lock-screen-tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}.shc-evenodd-fill-current-color{fill-rule:evenodd;fill:currentcolor}.shc-hidden-channel-icon{margin-left:6px;z-index:0;cursor:not-allowed}.shc-lock-screen-default-emoji-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-default-emoji-container>[class^=emojiContainer]{background:var(--bg-overlay-3, var(--background-secondary));border-radius:8px;padding:5px 6px;margin-left:5px}.shc-lock-screen-allowed-users-and-roles-container{display:flex;flex-direction:column;align-items:center;background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-allowed-users-and-roles-container-title{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn{all:unset;margin-left:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn{all:unset;margin-right:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container>[class^=members]{margin-left:10px;flex-wrap:wrap;justify-content:center}.vc-smyn-suffix{color:var(--text-muted)}.vc-smyn-suffix:before{content:"("}.vc-smyn-suffix:after{content:")"}#vc-spotify-player{padding:.375rem .5rem;border-bottom:1px solid var(--background-modifier-accent);--vc-spotify-green: #1db954}.theme-light #vc-spotify-player{background:var(--bg-overlay-3, var(--background-secondary-alt))}.theme-dark #vc-spotify-player{background:var(--bg-overlay-1, var(--background-secondary-alt))}.vc-spotify-button{background:none;color:var(--interactive-normal);padding:0;width:32px;height:32px;border-radius:100%;display:flex;justify-content:center;align-items:center}.vc-spotify-button:hover{color:var(--interactive-hover);background-color:var(--background-modifier-selected)}.vc-spotify-button svg{height:24px;width:24px}[class*=vc-spotify-shuffle]>svg,[class*=vc-spotify-repeat]>svg{width:22px;height:22px}.vc-spotify-button svg path{width:100%;height:100%}.vc-spotify-shuffle-on,.vc-spotify-repeat-context,.vc-spotify-repeat-track,.vc-spotify-shuffle-on:hover,.vc-spotify-repeat-context:hover,.vc-spotify-repeat-track:hover{color:var(--vc-spotify-green)}.vc-spotify-tooltip-text{overflow:hidden;white-space:nowrap;padding-right:.2em;max-width:100%;margin:unset}.vc-spotify-repeat-1{font-size:70%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vc-spotify-button-row{justify-content:center}#vc-spotify-info-wrapper{display:flex;flex-direction:row;align-items:center;height:3em;gap:.5em}#vc-spotify-info-wrapper img{height:90%;object-fit:contain}#vc-spotify-album-expanded-wrapper img{width:100%;object-fit:contain}#vc-spotify-titles{display:flex;flex-direction:column;padding:.2rem;justify-content:center;align-items:flex-start;align-content:flex-start;overflow:hidden}#vc-spotify-song-title{color:var(--header-primary);font-size:14px;font-weight:600}.vc-spotify-ellipoverflow{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.vc-spotify-artist,.vc-spotify-album{font-size:12px;text-decoration:none;color:var(--header-secondary)}.vc-spotify-comma{color:var(--header-secondary)}.vc-spotify-artist[role=link]:hover,#vc-spotify-album-title[role=link]:hover,#vc-spotify-song-title[role=link]:hover{text-decoration:underline;cursor:pointer}#vc-spotify-album-image{border-radius:3px;transition:filter .2s}#vc-spotify-album-image:hover{filter:brightness(1.2);cursor:pointer}#vc-spotify-progress-bar{position:relative;color:var(--text-normal);width:100%;margin:.5em 0 5px}#vc-spotify-progress-bar>[class^=slider]{flex-grow:1;width:100%;padding:0!important}#vc-spotify-progress-bar>[class^=slider] [class^=bar-]{height:4px!important}#vc-spotify-progress-bar>[class^=slider] [class^=grabber]{height:10px!important;width:10px!important;background-color:var(--interactive-normal);border-color:var(--interactive-normal);color:var(--interactive-normal)}#vc-spotify-progress-text{margin:0}.vc-spotify-progress-time{font-size:12px;top:10px;position:absolute}.vc-spotify-time-left{left:0}.vc-spotify-time-right{right:0}.vc-spotify-fallback{padding:.5em;color:var(--text-normal)}.vc-trans-modal-content{padding:1em}.vc-trans-modal-header{justify-content:space-between;align-content:center}.vc-trans-modal-header h1{margin:0}.vc-trans-accessory{color:var(--text-muted);margin-top:.5em;font-style:italic;font-weight:400}.vc-trans-accessory svg{margin-right:.25em}.vc-trans-dismiss{all:unset;cursor:pointer;color:var(--text-link)}.vc-trans-dismiss:is(:hover,:focus){text-decoration:underline}.vc-trans-auto-translate{color:var(--green-360)}.vc-uvs-button>div{white-space:normal!important}.vc-uvs-button{width:100%;margin:auto;height:unset}.vc-uvs-header{color:var(--header-primary);margin-bottom:6px}.vc-uvs-modal-margin{margin:0 12px}.vc-uvs-modal-margin div{margin-bottom:0!important}.vc-uvs-popout-margin-self>[class^=section]{padding-top:0;padding-bottom:12px}.vc-toolbox-btn,.vc-toolbox-btn>svg{-webkit-app-region:no-drag}.vc-toolbox-btn>svg{color:var(--interactive-normal)}.vc-toolbox-btn[class*=selected]>svg{color:var(--interactive-active)}.vc-toolbox-btn:hover>svg{color:var(--interactive-hover)}.vc-vmsg-modal{padding:1em}.vc-vmsg-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5em;margin-bottom:1em}.vc-vmsg-modal audio{width:100%}.vc-vmsg-preview{color:var(--text-normal);border-radius:24px;background-color:var(--background-secondary);position:relative;display:flex;align-items:center;padding:0 16px;height:48px}.vc-vmsg-preview-indicator{background:var(--button-secondary-background);width:16px;height:16px;border-radius:50%;transition:background .2s ease-in-out}.vc-vmsg-preview-recording .vc-vmsg-preview-indicator{background:var(--status-danger)}.vc-vmsg-preview-time{opacity:.8;margin:0 .5em;font-size:80%;font-family:var(--font-code)}.vc-vmsg-preview-label{opacity:.5;letter-spacing:.125em;font-weight:600;flex:1;text-align:center}
+.vc-error-card{padding:2em;background-color:#e7828430;border:1px solid #e78284;border-radius:5px;color:var(--text-normal, white)}.vc-notification-root{all:unset;display:flex;flex-direction:column;color:var(--text-normal);background-color:var(--background-secondary-alt);border-radius:6px;overflow:hidden;cursor:pointer;width:100%}.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root){position:absolute;z-index:2147483647;right:1rem;width:25vw;min-height:10vh}.vc-notification{display:flex;flex-direction:row;padding:1.25rem;gap:1.25rem}.vc-notification-content{width:100%}.vc-notification-header{display:flex;justify-content:space-between}.vc-notification-title{color:var(--header-primary);font-size:1rem;font-weight:600;line-height:1.25rem;text-transform:uppercase}.vc-notification-close-btn{all:unset;cursor:pointer;color:var(--interactive-normal);opacity:.5;transition:opacity .2s ease-in-out,color .2s ease-in-out}.vc-notification-close-btn:hover{color:var(--interactive-hover);opacity:1}.vc-notification-icon{height:4rem;width:4rem;border-radius:6px}.vc-notification-progressbar{height:.25rem;border-radius:5px;margin-top:auto}.vc-notification-p{margin:.5rem 0 0;line-height:140%}.vc-notification-img{width:100%}.vc-notification-log-empty{height:218px;background:url(/assets/b36de980b174d7b798c89f35c116e5c6.svg) center no-repeat;margin-bottom:40px}.vc-notification-log-container{display:flex;flex-direction:column;padding:1em;overflow:hidden}.vc-notification-log-wrapper{transition:.2s ease;transition-property:height,opacity}.vc-notification-log-wrapper:not(:last-child){margin-bottom:1em}.vc-notification-log-removing{height:0!important;opacity:0;margin-bottom:1em}.vc-notification-log-body{display:flex;flex-direction:column}.vc-notification-log-timestamp{margin-left:auto;font-size:.8em;font-weight:lighter}.vc-notification-log-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-settings-tab-bar{margin-top:20px;margin-bottom:10px;border-bottom:2px solid var(--background-modifier-accent)}.vc-settings-tab-bar-item{margin-right:32px;padding-bottom:16px;margin-bottom:-2px}.vc-settings-quick-actions-card{padding:1em;display:flex;gap:1em;align-items:center;justify-content:space-evenly;flex-grow:1;flex-flow:row wrap;margin-bottom:1em}.vc-settings-donate{display:flex;flex-direction:row}.vc-settings-card{padding:1em;margin-bottom:1em}.vc-backup-restore-card{background-color:var(--info-warning-background);border-color:var(--info-warning-foreground);color:var(--info-warning-text)}.vc-settings-theme-links{display:inline-block!important;color:var(--text-normal)!important;padding:.5em;border:1px solid var(--background-modifier-accent);max-height:unset}.vc-cloud-settings-sync-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1em}.vc-cloud-erase-data-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-text-selectable,.vc-text-selectable :where([class*="text" i],[class*="title" i]){user-select:text;cursor:initial}.vc-settings-theme-grid{display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-settings-theme-card{display:flex;flex-direction:column;background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;padding:1em;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity}.vc-settings-theme-card-text{text-overflow:ellipsis;height:1.2em;margin-bottom:2px;white-space:nowrap;overflow:hidden}.vc-settings-theme-author:before{content:"by "}.vc-plugins-grid{margin-top:16px;display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-plugins-info-button{height:24px;width:24px;padding:0;background:transparent;margin-right:8px}.vc-plugins-settings-button:hover{color:var(--interactive-hover)}.vc-plugins-filter-controls{display:grid;height:40px;gap:10px;grid-template-columns:1fr 150px}.vc-plugins-badge{padding:0 6px;font-family:var(--font-display);font-weight:500;border-radius:8px;height:16px;font-size:12px;line-height:16px;color:var(--white-500);text-align:center}.vc-plugins-dep-name{margin:0 auto}.vc-plugins-info-card{padding:1em;height:8em;display:flex;flex-direction:column}.vc-plugins-info-card div{line-height:32px}.vc-plugins-restart-card{padding:1em;background:var(--info-warning-background);border:1px solid var(--info-warning-foreground);color:var(--info-warning-text)}.vc-plugins-restart-card button{margin-top:.5em}.vc-plugins-info-button svg:not(:hover,:focus){color:var(--text-muted)}.vc-open-external-icon{transform:rotate(45deg)}.vc-owner-crown-icon{color:var(--text-warning)}.vc-author-modal-root{padding:1em}.vc-author-modal-header{display:flex;align-items:center;margin-bottom:1em}.vc-author-modal-name{text-transform:none;flex-grow:0;background:var(--background-tertiary);border-radius:0 9999px 9999px 0;padding:6px .8em 6px .5em;font-size:20px;height:20px;position:relative;text-wrap:nowrap}.vc-author-modal-name:before{content:"";display:block;position:absolute;height:100%;width:16px;background:var(--background-tertiary);z-index:-1;left:-16px;top:0}.vc-author-modal-avatar{height:32px;width:32px;border-radius:50%}.vc-author-modal-links{margin-left:auto;display:flex;gap:.2em}.vc-author-modal-links img{height:32px;width:32px;border-radius:50%;border:4px solid var(--background-tertiary);box-sizing:border-box}.vc-author-modal-plugins{display:grid;gap:.5em}.vc-addon-card{background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;display:block;height:100%;padding:12px;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity;box-sizing:border-box}.vc-addon-card-disabled{opacity:.6}.vc-addon-card:hover{background-color:var(--background-tertiary);transform:translateY(-1px);box-shadow:var(--elevation-high)}.vc-addon-header{margin-top:auto;display:flex;width:100%;justify-content:flex-end;align-items:center;gap:8px;margin-bottom:.5em}.vc-addon-note{height:36px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;box-orient:vertical}.vc-addon-name-author{width:100%}.vc-addon-name{display:flex;width:100%;align-items:center;flex-grow:1;gap:8px}.vc-addon-author{font-size:.8em}.vc-addon-author:before{content:"by "}.vc-switch-slider{transition:.1s transform ease-in-out}.vc-dearrow-toggle-off svg{filter:grayscale(1)}.vc-dearrow-toggle-on,.vc-dearrow-toggle-off{all:unset;display:inline;cursor:pointer;position:absolute;top:.75rem;right:.75rem}.messagelogger-deleted [class^=buttons]{display:none}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]){filter:grayscale(1)!important;transition:.15s filter ease-in-out}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]):hover,.messagelogger-deleted{filter:grayscale(0)!important}.theme-dark .messagelogger-edited{filter:brightness(80%)}.theme-light .messagelogger-edited{opacity:.5}.vc-permviewer-userperms-title-container{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-bottom:6px}.vc-permviewer-userperms-btns-container{display:flex;align-items:center}.vc-permviewer-userperms-sortorder-btn{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px}.vc-permviewer-userperms-permdetails-btn,.vc-permviewer-userperms-toggleperms-btn{all:unset;cursor:pointer;display:flex;align-items:center}.vc-permviewer-perms-title{flex-grow:1}.vc-permviewer-perms-no-perms{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.vc-permviewer-perms-container{display:grid;grid-template-columns:1fr 2fr;grid-template-areas:"list permissions";padding:16px 0}.vc-permviewer-perms-list{grid-area:list;display:flex;flex-direction:column;gap:2px;border-right:2px solid var(--background-modifier-active)}.vc-permviewer-perms-list-item-btn{all:unset;cursor:pointer}.vc-permviewer-perms-list-item{display:flex;align-items:center;padding:8px 5px;cursor:pointer;width:230px;border-radius:5px}.vc-permviewer-perms-list-item:hover{background-color:var(--background-modifier-hover)}.vc-permviewer-perms-list-item-active{background-color:var(--background-modifier-selected)}.vc-permviewer-perms-list-item>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.vc-permviewer-perms-role-circle{border-radius:50%;width:12px;height:12px;margin-left:3px;margin-right:11px;flex-shrink:0}.vc-permviewer-perms-user-img{border-radius:50%;width:20px;height:20px;margin-right:6px}.vc-permviewer-perms-perms{grid-area:permissions;display:flex;flex-direction:column;margin-left:5px}.vc-permviewer-perms-perms-item{position:relative;display:flex;align-items:center;padding:10px;border-bottom:2px solid var(--background-modifier-active)}.vc-permviewer-perms-perms-item:last-child{border:0}.vc-permviewer-perms-perms-item-icon{border:1px solid var(--background-modifier-selected);width:24px;height:24px;margin-right:5px}.vc-permviewer-perms-perms-item .vc-info-icon{color:var(--interactive-muted);cursor:pointer;position:absolute;right:0;scale:.9;transition:color ease-in .1s}.vc-permviewer-perms-perms-item .vc-info-icon:hover{color:var(--interactive-active)}.vc-expandableheader-center-flex{display:flex;justify-items:center;align-items:center}.vc-expandableheader-btn{all:unset;cursor:pointer;width:24px;height:24px}.vc-pip-button{color:var(--interactive-normal)}.vc-pip-button:hover{background-color:var(--background-modifier-hover);color:var(--interactive-hover)}.vc-pronoundb-compact{display:none}[class*=compact] .vc-pronoundb-compact{display:inline-block;margin-left:-2px;margin-right:.25rem}.vc-st-modal-content input{background-color:var(--input-background);color:var(--text-normal);width:95%;padding:8px 8px 8px 12px;margin:1em 0;outline:none;border:1px solid var(--input-background);border-radius:4px;font-weight:500;font-style:inherit;font-size:100%}.vc-st-format-label,.vc-st-format-label span{background-color:transparent}.vc-st-modal-content [class|=select]{margin-bottom:1em}.vc-st-modal-content [class|=select] span{background-color:var(--input-background)}.vc-st-modal-header{justify-content:space-between;align-content:center}.vc-st-modal-header h1{margin:0}.vc-st-modal-header button{padding:0}.vc-st-preview-text{margin-bottom:1em}.vc-st-button{padding:0 6px}.vc-st-button svg{transform:scale(1.1) translateY(1px)}.vc-gp-root{height:100%;user-select:text}.vc-gp-banner{width:100%;cursor:pointer}.vc-gp-header{display:flex;flex-direction:row;align-items:center;gap:.5em;margin:.5em}.vc-gp-header img{width:48px;height:48px;cursor:pointer}.vc-gp-name-and-description{display:flex;flex-direction:column;gap:.2em}.vc-gp-name{margin:0}.vc-gp-tab-bar{border-bottom:2px solid var(--background-modifier-accent);margin:20px 12px 0;display:flex;gap:40px;align-items:stretch;flex-direction:row}.vc-gp-tab{border-bottom:2px solid transparent;color:var(--interactive-normal);cursor:pointer;height:39px;line-height:14px}.vc-gp-tab-content{margin:1em}.vc-gp-tab:where(.vc-gp-selected,:hover,:focus){border-bottom-color:var(--interactive-active)}.vc-gp-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1em}.vc-gp-server-info-pair{color:var(--text-normal)}.vc-gp-server-info-pair [class^=timestamp]{margin-left:0}.vc-gp-owner{display:flex;align-items:center;gap:.2em}.vc-gp-owner img{height:20px;border-radius:50%;cursor:pointer}.vc-gp-scroller{width:100%;max-height:500px}.vc-gp-scroller [class^=listRow]{margin:1px 0}.vc-gp-scroller [class^=listRow]:hover{background-color:var(--background-modifier-hover)}.shiki-container{border:4px;background-color:var(--background-secondary)}.shiki-root{border-radius:4px}.shiki-root code{display:block;overflow-x:auto;padding:.5em;position:relative;font-size:.875rem;line-height:1.125rem;text-indent:0;white-space:pre-wrap;background:transparent;border:none}.shiki-devicon{margin-right:8px;user-select:none}.shiki-plain code{padding-top:8px}.shiki-btns{font-size:1em;position:absolute;right:0;bottom:0;opacity:0}.shiki-root:hover .shiki-btns{opacity:1}.shiki-btn{border-radius:4px 4px 0 0;padding:4px 8px;user-select:none}.shiki-btn~.shiki-btn{margin-left:4px}.shiki-btn:last-child{border-radius:4px 0}.shiki-spinner-container{align-items:center;background-color:#0009;display:flex;position:absolute;justify-content:center;inset:0}.shiki-preview{margin-bottom:2em}.shiki-lang{padding:0 5px;margin-bottom:6px;font-weight:700;text-transform:capitalize;display:flex;align-items:center}.shiki-table{border-collapse:collapse;width:100%}.shiki-table tr{height:19px;width:100%}.shiki-root td:first-child{border-right:1px solid transparent;padding-left:5px;padding-right:8px;user-select:none}.shiki-root td:last-child{padding-left:8px;word-break:break-word;width:100%}.vc-user-connection{all:unset;display:inline-block;cursor:pointer}.vc-sc-tooltip{display:inline-flex;gap:.25em;align-items:center}.shc-lock-screen-outer-container{overflow:hidden scroll;flex:1 1 auto;height:100%;width:100%}.shc-lock-screen-container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:100%}.shc-lock-screen-container>*{margin:5px}.shc-lock-screen-logo{width:180px;height:180px}.shc-lock-screen-heading-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-heading-container>*{margin:inherit}.shc-lock-screen-heading-nsfw-icon{color:var(--text-normal)}.shc-lock-screen-topic-container{color:var(--text-normal);background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container{background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container>*{margin:inherit}.shc-lock-screen-tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}.shc-evenodd-fill-current-color{fill-rule:evenodd;fill:currentcolor}.shc-hidden-channel-icon{margin-left:6px;z-index:0;cursor:not-allowed}.shc-lock-screen-default-emoji-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-default-emoji-container>[class^=emojiContainer]{background:var(--bg-overlay-3, var(--background-secondary));border-radius:8px;padding:5px 6px;margin-left:5px}.shc-lock-screen-allowed-users-and-roles-container{display:flex;flex-direction:column;align-items:center;background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-allowed-users-and-roles-container-title{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn{all:unset;margin-left:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn{all:unset;margin-right:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container>[class^=members]{margin-left:10px;flex-wrap:wrap;justify-content:center}.vc-smyn-suffix{color:var(--text-muted)}.vc-smyn-suffix:before{content:"("}.vc-smyn-suffix:after{content:")"}#vc-spotify-player{padding:.375rem .5rem;border-bottom:1px solid var(--background-modifier-accent);--vc-spotify-green: #1db954}.theme-light #vc-spotify-player{background:var(--bg-overlay-3, var(--background-secondary-alt))}.theme-dark #vc-spotify-player{background:var(--bg-overlay-1, var(--background-secondary-alt))}.vc-spotify-button{background:none;color:var(--interactive-normal);padding:0;width:32px;height:32px;border-radius:100%;display:flex;justify-content:center;align-items:center}.vc-spotify-button:hover{color:var(--interactive-hover);background-color:var(--background-modifier-selected)}.vc-spotify-button svg{height:24px;width:24px}[class*=vc-spotify-shuffle]>svg,[class*=vc-spotify-repeat]>svg{width:22px;height:22px}.vc-spotify-button svg path{width:100%;height:100%}.vc-spotify-shuffle-on,.vc-spotify-repeat-context,.vc-spotify-repeat-track,.vc-spotify-shuffle-on:hover,.vc-spotify-repeat-context:hover,.vc-spotify-repeat-track:hover{color:var(--vc-spotify-green)}.vc-spotify-tooltip-text{overflow:hidden;white-space:nowrap;padding-right:.2em;max-width:100%;margin:unset}.vc-spotify-repeat-1{font-size:70%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vc-spotify-button-row{justify-content:center}#vc-spotify-info-wrapper{display:flex;flex-direction:row;align-items:center;height:3em;gap:.5em}#vc-spotify-info-wrapper img{height:90%;object-fit:contain}#vc-spotify-album-expanded-wrapper img{width:100%;object-fit:contain}#vc-spotify-titles{display:flex;flex-direction:column;padding:.2rem;justify-content:center;align-items:flex-start;align-content:flex-start;overflow:hidden}#vc-spotify-song-title{color:var(--header-primary);font-size:14px;font-weight:600}.vc-spotify-ellipoverflow{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.vc-spotify-artist,.vc-spotify-album{font-size:12px;text-decoration:none;color:var(--header-secondary)}.vc-spotify-comma{color:var(--header-secondary)}.vc-spotify-artist[role=link]:hover,#vc-spotify-album-title[role=link]:hover,#vc-spotify-song-title[role=link]:hover{text-decoration:underline;cursor:pointer}#vc-spotify-album-image{border-radius:3px;transition:filter .2s}#vc-spotify-album-image:hover{filter:brightness(1.2);cursor:pointer}#vc-spotify-progress-bar{position:relative;color:var(--text-normal);width:100%;margin:.5em 0 5px}#vc-spotify-progress-bar>[class^=slider]{flex-grow:1;width:100%;padding:0!important}#vc-spotify-progress-bar>[class^=slider] [class^=bar-]{height:4px!important}#vc-spotify-progress-bar>[class^=slider] [class^=grabber]{height:10px!important;width:10px!important;background-color:var(--interactive-normal);border-color:var(--interactive-normal);color:var(--interactive-normal)}#vc-spotify-progress-text{margin:0}.vc-spotify-progress-time{font-size:12px;top:10px;position:absolute}.vc-spotify-time-left{left:0}.vc-spotify-time-right{right:0}.vc-spotify-fallback{padding:.5em;color:var(--text-normal)}.vc-trans-modal-content{padding:1em}.vc-trans-modal-header{justify-content:space-between;align-content:center}.vc-trans-modal-header h1{margin:0}.vc-trans-accessory{color:var(--text-muted);margin-top:.5em;font-style:italic;font-weight:400}.vc-trans-accessory svg{margin-right:.25em}.vc-trans-dismiss{all:unset;cursor:pointer;color:var(--text-link)}.vc-trans-dismiss:is(:hover,:focus){text-decoration:underline}.vc-trans-auto-translate{color:var(--green-360)}.vc-uvs-button>div{white-space:normal!important}.vc-uvs-button{width:100%;margin:auto;height:unset}.vc-uvs-header{color:var(--header-primary);margin-bottom:6px}.vc-uvs-modal-margin{margin:0 12px}.vc-uvs-modal-margin div{margin-bottom:0!important}.vc-uvs-popout-margin-self>[class^=section]{padding-top:0;padding-bottom:12px}.vc-toolbox-btn,.vc-toolbox-btn>svg{-webkit-app-region:no-drag}.vc-toolbox-btn>svg{color:var(--interactive-normal)}.vc-toolbox-btn[class*=selected]>svg{color:var(--interactive-active)}.vc-toolbox-btn:hover>svg{color:var(--interactive-hover)}.vc-vmsg-modal{padding:1em}.vc-vmsg-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5em;margin-bottom:1em}.vc-vmsg-modal audio{width:100%}.vc-vmsg-preview{color:var(--text-normal);border-radius:24px;background-color:var(--background-secondary);position:relative;display:flex;align-items:center;padding:0 16px;height:48px}.vc-vmsg-preview-indicator{background:var(--button-secondary-background);width:16px;height:16px;border-radius:50%;transition:background .2s ease-in-out}.vc-vmsg-preview-recording .vc-vmsg-preview-indicator{background:var(--status-danger)}.vc-vmsg-preview-time{opacity:.8;margin:0 .5em;font-size:80%;font-family:var(--font-code)}.vc-vmsg-preview-label{opacity:.5;letter-spacing:.125em;font-weight:600;flex:1;text-align:center}
diff --git a/VencordDesktop/vencordDist/vencordDesktopRenderer.css.map b/VencordDesktop/vencordDist/vencordDesktopRenderer.css.map
index a918db5..c3c47df 100644
--- a/VencordDesktop/vencordDist/vencordDesktopRenderer.css.map
+++ b/VencordDesktop/vencordDist/vencordDesktopRenderer.css.map
@@ -1,7 +1,7 @@
{
"version": 3,
- "sources": ["../src/components/ErrorCard.css", "../src/api/Notifications/styles.css", "../src/components/VencordSettings/settingsStyles.css", "../src/components/VencordSettings/themesStyles.css", "../src/components/PluginSettings/styles.css", "../src/components/iconStyles.css", "../src/components/PluginSettings/contributorModal.css", "../src/components/VencordSettings/addonCard.css", "../src/components/Switch.css", "../src/plugins/clientTheme/clientTheme.css", "../src/plugins/dearrow/styles.css", "../src/plugins/messageLogger/messageLogger.css", "../src/plugins/permissionsViewer/styles.css", "../src/components/ExpandableHeader.css", "../src/plugins/pictureInPicture/styles.css", "../src/plugins/pronoundb/styles.css", "../src/plugins/sendTimestamps/styles.css", "../src/plugins/serverProfile/styles.css", "../src/plugins/shikiCodeblocks.desktop/shiki.css", "../src/plugins/showConnections/styles.css", "../src/plugins/showHiddenChannels/style.css", "../src/plugins/showMeYourName/styles.css", "../src/plugins/spotifyControls/spotifyStyles.css", "../src/plugins/translate/styles.css", "../src/plugins/userVoiceShow/components/VoiceChannelSection.css", "../src/plugins/vencordToolbox/index.css", "../src/plugins/voiceMessages/styles.css"],
- "sourcesContent": [".vc-error-card {\n padding: 2em;\n background-color: #e7828430;\n border: 1px solid #e78284;\n border-radius: 5px;\n color: var(--text-normal, white);\n}\n", ".vc-notification-root {\n /* clear default button styles */\n all: unset;\n display: flex;\n flex-direction: column;\n color: var(--text-normal);\n background-color: var(--background-secondary-alt);\n border-radius: 6px;\n overflow: hidden;\n cursor: pointer;\n width: 100%;\n}\n\n.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root) {\n position: absolute;\n z-index: 2147483647;\n right: 1rem;\n width: 25vw;\n min-height: 10vh;\n}\n\n.vc-notification {\n display: flex;\n flex-direction: row;\n padding: 1.25rem;\n gap: 1.25rem;\n}\n\n.vc-notification-content {\n width: 100%;\n}\n\n.vc-notification-header {\n display: flex;\n justify-content: space-between;\n}\n\n.vc-notification-title {\n color: var(--header-primary);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.25rem;\n text-transform: uppercase;\n}\n\n.vc-notification-close-btn {\n all: unset;\n cursor: pointer;\n color: var(--interactive-normal);\n opacity: 0.5;\n transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;\n}\n\n.vc-notification-close-btn:hover {\n color: var(--interactive-hover);\n opacity: 1;\n}\n\n.vc-notification-icon {\n height: 4rem;\n width: 4rem;\n border-radius: 6px;\n}\n\n.vc-notification-progressbar {\n height: 0.25rem;\n border-radius: 5px;\n margin-top: auto;\n}\n\n.vc-notification-p {\n margin: 0.5rem 0 0;\n line-height: 140%;\n}\n\n.vc-notification-img {\n width: 100%;\n}\n\n.vc-notification-log-empty {\n height: 218px;\n background: url(\"/assets/b36de980b174d7b798c89f35c116e5c6.svg\") center no-repeat;\n margin-bottom: 40px;\n}\n\n.vc-notification-log-container {\n display: flex;\n flex-direction: column;\n padding: 1em;\n overflow: hidden;\n}\n\n.vc-notification-log-wrapper {\n transition: 200ms ease;\n transition-property: height, opacity;\n}\n\n.vc-notification-log-wrapper:not(:last-child) {\n margin-bottom: 1em;\n}\n\n.vc-notification-log-removing {\n height: 0 !important;\n opacity: 0;\n margin-bottom: 1em;\n}\n\n.vc-notification-log-body {\n display: flex;\n flex-direction: column;\n}\n\n.vc-notification-log-timestamp {\n margin-left: auto;\n font-size: 0.8em;\n font-weight: lighter;\n}\n\n.vc-notification-log-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n", ".vc-settings-tab-bar {\n margin-top: 20px;\n margin-bottom: 10px;\n border-bottom: 2px solid var(--background-modifier-accent);\n}\n\n.vc-settings-tab-bar-item {\n margin-right: 32px;\n padding-bottom: 16px;\n margin-bottom: -2px;\n}\n\n.vc-settings-quick-actions-card {\n padding: 1em;\n display: flex;\n gap: 1em;\n align-items: center;\n justify-content: space-evenly;\n flex-grow: 1;\n flex-flow: row wrap;\n margin-bottom: 1em;\n}\n\n.vc-settings-donate {\n display: flex;\n flex-direction: row;\n}\n\n.vc-settings-card {\n padding: 1em;\n margin-bottom: 1em;\n}\n\n.vc-backup-restore-card {\n background-color: var(--info-warning-background);\n border-color: var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-settings-theme-links {\n /* Needed to fix bad themes that hide certain textarea elements for whatever eldritch reason */\n display: inline-block !important;\n color: var(--text-normal) !important;\n padding: 0.5em;\n border: 1px solid var(--background-modifier-accent);\n max-height: unset;\n}\n\n.vc-cloud-settings-sync-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 1em;\n}\n\n.vc-cloud-erase-data-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n\n.vc-text-selectable,\n.vc-text-selectable :where([class*=\"text\" i], [class*=\"title\" i]) {\n /* make text selectable, silly discord makes the entirety of settings not selectable */\n user-select: text;\n\n /* discord also sets cursor: default which prevents the cursor from showing as text */\n cursor: initial;\n}\n", ".vc-settings-theme-grid {\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-settings-theme-card {\n display: flex;\n flex-direction: column;\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n padding: 1em;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n}\n\n.vc-settings-theme-card-text {\n text-overflow: ellipsis;\n height: 1.2em;\n margin-bottom: 2px;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-settings-theme-author::before {\n content: \"by \";\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n.vc-plugins-grid {\n margin-top: 16px;\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-plugins-info-button {\n height: 24px;\n width: 24px;\n padding: 0;\n background: transparent;\n margin-right: 8px;\n}\n\n.vc-plugins-settings-button:hover {\n color: var(--interactive-hover);\n}\n\n.vc-plugins-filter-controls {\n display: grid;\n height: 40px;\n gap: 10px;\n grid-template-columns: 1fr 150px;\n}\n\n.vc-plugins-badge {\n padding: 0 6px;\n font-family: var(--font-display);\n font-weight: 500;\n border-radius: 8px;\n height: 16px;\n font-size: 12px;\n line-height: 16px;\n color: var(--white-500);\n text-align: center;\n}\n\n.vc-plugins-dep-name {\n margin: 0 auto;\n}\n\n.vc-plugins-info-card {\n padding: 1em;\n height: 8em;\n display: flex;\n flex-direction: column;\n}\n\n.vc-plugins-info-card div {\n line-height: 32px;\n}\n\n.vc-plugins-restart-card {\n padding: 1em;\n background: var(--info-warning-background);\n border: 1px solid var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-plugins-restart-card button {\n margin-top: 0.5em;\n}\n\n.vc-plugins-info-button svg:not(:hover, :focus) {\n color: var(--text-muted);\n}\n", ".vc-open-external-icon {\n transform: rotate(45deg);\n}\n\n.vc-owner-crown-icon {\n color: var(--text-warning);\n}\n", ".vc-author-modal-root {\n padding: 1em;\n}\n\n.vc-author-modal-header {\n display: flex;\n align-items: center;\n margin-bottom: 1em;\n}\n\n.vc-author-modal-name {\n text-transform: none;\n flex-grow: 0;\n background: var(--background-tertiary);\n border-radius: 0 9999px 9999px 0;\n padding: 6px 0.8em 6px 0.5em;\n font-size: 20px;\n height: 20px;\n position: relative;\n text-wrap: nowrap;\n}\n\n.vc-author-modal-name::before {\n content: \"\";\n display: block;\n position: absolute;\n height: 100%;\n width: 16px;\n background: var(--background-tertiary);\n z-index: -1;\n left: -16px;\n top: 0;\n}\n\n.vc-author-modal-avatar {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n}\n\n.vc-author-modal-links {\n margin-left: auto;\n display: flex;\n gap: 0.2em;\n}\n\n.vc-author-modal-links img {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n border: 4px solid var(--background-tertiary);\n box-sizing: border-box\n}\n\n.vc-author-modal-plugins {\n display: grid;\n gap: 0.5em;\n}\n", ".vc-addon-card {\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n display: block;\n height: 100%;\n padding: 12px;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n box-sizing: border-box;\n}\n\n.vc-addon-card-disabled {\n opacity: 0.6;\n}\n\n.vc-addon-card:hover {\n background-color: var(--background-tertiary);\n transform: translateY(-1px);\n box-shadow: var(--elevation-high);\n}\n\n.vc-addon-header {\n margin-top: auto;\n display: flex;\n width: 100%;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n margin-bottom: 0.5em;\n}\n\n.vc-addon-note {\n height: 36px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n /* stylelint-disable-next-line property-no-unknown */\n box-orient: vertical;\n}\n\n.vc-addon-name-author {\n width: 100%;\n}\n\n.vc-addon-name {\n display: flex;\n width: 100%;\n align-items: center;\n flex-grow: 1;\n gap: 8px;\n}\n\n.vc-addon-author {\n font-size: 0.8em;\n}\n\n.vc-addon-author::before {\n content: \"by \";\n}\n", ".vc-switch-slider {\n transition: 100ms transform ease-in-out;\n}\n", ".client-theme-settings {\n display: flex;\n flex-direction: column;\n}\n\n.client-theme-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n.client-theme-settings-labels {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n}\n\n.client-theme-container > [class^=\"colorSwatch\"] > [class^=\"swatch\"] {\n border: thin solid var(--background-modifier-accent) !important;\n}\n\n.client-theme-warning {\n color: var(--text-danger);\n}\n", ".vc-dearrow-toggle-off svg {\n filter: grayscale(1);\n}\n\n.vc-dearrow-toggle-on, .vc-dearrow-toggle-off {\n all: unset;\n display: inline;\n cursor: pointer;\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n}\n", ".messagelogger-deleted [class^=\"buttons\"] {\n display: none;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n) {\n filter: grayscale(1) !important;\n transition: 150ms filter ease-in-out;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n):hover,\n.messagelogger-deleted {\n filter: grayscale(0) !important;\n}\n\n.theme-dark .messagelogger-edited {\n filter: brightness(80%);\n}\n\n.theme-light .messagelogger-edited {\n opacity: 0.5;\n}\n", "/* User Permissions Component */\n\n.vc-permviewer-userperms-title-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n margin-bottom: 6px;\n}\n\n.vc-permviewer-userperms-btns-container {\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-sortorder-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n\n.vc-permviewer-userperms-permdetails-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-toggleperms-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n/* RolesAndUsersPermissions Component */\n\n.vc-permviewer-perms-title {\n flex-grow: 1;\n}\n\n.vc-permviewer-perms-no-perms {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n\n.vc-permviewer-perms-container {\n display: grid;\n grid-template-columns: 1fr 2fr;\n grid-template-areas: \"list permissions\";\n padding: 16px 0;\n}\n\n.vc-permviewer-perms-list {\n grid-area: list;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border-right: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-list-item-btn {\n all: unset;\n cursor: pointer;\n}\n\n.vc-permviewer-perms-list-item {\n display: flex;\n align-items: center;\n padding: 8px 5px;\n cursor: pointer;\n width: 230px;\n border-radius: 5px;\n}\n\n.vc-permviewer-perms-list-item:hover {\n background-color: var(--background-modifier-hover);\n}\n\n.vc-permviewer-perms-list-item-active {\n background-color: var(--background-modifier-selected);\n}\n\n.vc-permviewer-perms-list-item > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-permviewer-perms-role-circle {\n border-radius: 50%;\n width: 12px;\n height: 12px;\n margin-left: 3px;\n margin-right: 11px;\n flex-shrink: 0;\n}\n\n.vc-permviewer-perms-user-img {\n border-radius: 50%;\n width: 20px;\n height: 20px;\n margin-right: 6px;\n}\n\n.vc-permviewer-perms-perms {\n grid-area: permissions;\n display: flex;\n flex-direction: column;\n margin-left: 5px;\n}\n\n.vc-permviewer-perms-perms-item {\n position: relative;\n display: flex;\n align-items: center;\n padding: 10px;\n border-bottom: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-perms-item:last-child {\n border: 0;\n}\n\n.vc-permviewer-perms-perms-item-icon {\n border: 1px solid var(--background-modifier-selected);\n width: 24px;\n height: 24px;\n margin-right: 5px;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon {\n color: var(--interactive-muted);\n cursor: pointer;\n position: absolute;\n right: 0;\n scale: 0.9;\n transition: color ease-in 0.1s;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon:hover {\n color: var(--interactive-active);\n}\n", ".vc-expandableheader-center-flex {\n display: flex;\n justify-items: center;\n align-items: center;\n}\n\n.vc-expandableheader-btn {\n all: unset;\n cursor: pointer;\n width: 24px;\n height: 24px;\n}\n", ".vc-pip-button {\n color: var(--interactive-normal);\n}\n\n.vc-pip-button:hover {\n background-color: var(--background-modifier-hover);\n color: var(--interactive-hover);\n}\n", ".vc-pronoundb-compact {\n display: none;\n}\n\n[class*=\"compact\"] .vc-pronoundb-compact {\n display: inline-block;\n margin-left: -2px;\n margin-right: 0.25rem;\n}\n", ".vc-st-modal-content input {\n background-color: var(--input-background);\n color: var(--text-normal);\n width: 95%;\n padding: 8px 8px 8px 12px;\n margin: 1em 0;\n outline: none;\n border: 1px solid var(--input-background);\n border-radius: 4px;\n font-weight: 500;\n font-style: inherit;\n font-size: 100%;\n}\n\n.vc-st-format-label,\n.vc-st-format-label span {\n background-color: transparent;\n}\n\n.vc-st-modal-content [class|=\"select\"] {\n margin-bottom: 1em;\n}\n\n.vc-st-modal-content [class|=\"select\"] span {\n background-color: var(--input-background);\n}\n\n.vc-st-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-st-modal-header h1 {\n margin: 0;\n}\n\n.vc-st-modal-header button {\n padding: 0;\n}\n\n.vc-st-preview-text {\n margin-bottom: 1em;\n}\n\n.vc-st-button {\n padding: 0 6px;\n}\n\n.vc-st-button svg {\n transform: scale(1.1) translateY(1px);\n}\n", ".vc-gp-root {\n height: 100%;\n user-select: text;\n}\n\n.vc-gp-banner {\n width: 100%;\n cursor: pointer;\n}\n\n.vc-gp-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5em;\n margin: 0.5em;\n}\n\n.vc-gp-header img {\n width: 48px;\n height: 48px;\n cursor: pointer;\n}\n\n.vc-gp-name-and-description {\n display: flex;\n flex-direction: column;\n gap: 0.2em;\n}\n\n.vc-gp-name {\n margin: 0;\n}\n\n.vc-gp-tab-bar {\n border-bottom: 2px solid var(--background-modifier-accent);\n margin: 20px 12px 0;\n display: flex;\n gap: 40px;\n align-items: stretch;\n flex-direction: row;\n}\n\n.vc-gp-tab {\n border-bottom: 2px solid transparent;\n color: var(--interactive-normal);\n cursor: pointer;\n height: 39px;\n line-height: 14px;\n}\n\n.vc-gp-tab-content {\n margin: 1em;\n}\n\n.vc-gp-tab:where(.vc-gp-selected, :hover, :focus) {\n border-bottom-color: var(--interactive-active);\n}\n\n.vc-gp-info {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 1em;\n}\n\n.vc-gp-server-info-pair {\n color: var(--text-normal);\n}\n\n.vc-gp-server-info-pair [class^=\"timestamp\"] {\n margin-left: 0;\n}\n\n.vc-gp-owner {\n display: flex;\n align-items: center;\n gap: 0.2em;\n}\n\n.vc-gp-owner img {\n height: 20px;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.vc-gp-scroller {\n width: 100%;\n max-height: 500px;\n}\n\n.vc-gp-scroller [class^=\"listRow\"] {\n margin: 1px 0;\n}\n\n.vc-gp-scroller [class^=\"listRow\"]:hover {\n background-color: var(--background-modifier-hover);\n}\n", ".shiki-container {\n border: 4px;\n background-color: var(--background-secondary);\n}\n\n.shiki-root {\n border-radius: 4px;\n}\n\n.shiki-root code {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n position: relative;\n font-size: 0.875rem;\n line-height: 1.125rem;\n text-indent: 0;\n white-space: pre-wrap;\n background: transparent;\n border: none;\n}\n\n.shiki-devicon {\n margin-right: 8px;\n user-select: none;\n}\n\n.shiki-plain code {\n padding-top: 8px;\n}\n\n.shiki-btns {\n font-size: 1em;\n position: absolute;\n right: 0;\n bottom: 0;\n opacity: 0;\n}\n\n.shiki-root:hover .shiki-btns {\n opacity: 1;\n}\n\n.shiki-btn {\n border-radius: 4px 4px 0 0;\n padding: 4px 8px;\n user-select: none;\n}\n\n.shiki-btn ~ .shiki-btn {\n margin-left: 4px;\n}\n\n.shiki-btn:last-child {\n border-radius: 4px 0;\n}\n\n.shiki-spinner-container {\n align-items: center;\n background-color: rgb(0 0 0 / 60%);\n display: flex;\n position: absolute;\n justify-content: center;\n inset: 0;\n}\n\n.shiki-preview {\n margin-bottom: 2em;\n}\n\n.shiki-lang {\n padding: 0 5px;\n margin-bottom: 6px;\n font-weight: bold;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n}\n\n.shiki-table {\n border-collapse: collapse;\n width: 100%;\n}\n\n.shiki-table tr {\n height: 19px;\n width: 100%;\n}\n\n.shiki-root td:first-child {\n border-right: 1px solid transparent;\n padding-left: 5px;\n padding-right: 8px;\n user-select: none;\n}\n\n.shiki-root td:last-child {\n padding-left: 8px;\n word-break: break-word;\n width: 100%;\n}\n", ".vc-user-connection {\n all: unset;\n display: inline-block;\n cursor: pointer;\n}\n\n.vc-sc-tooltip {\n display: inline-flex;\n gap: 0.25em;\n align-items: center;\n}\n", ".shc-lock-screen-outer-container {\n overflow: hidden scroll;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n}\n\n.shc-lock-screen-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n min-height: 100%;\n}\n\n.shc-lock-screen-container > * {\n margin: 5px;\n}\n\n.shc-lock-screen-logo {\n width: 180px;\n height: 180px;\n}\n\n.shc-lock-screen-heading-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-heading-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-heading-nsfw-icon {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-topic-container {\n color: var(--text-normal);\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-tags {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.shc-evenodd-fill-current-color {\n fill-rule: evenodd;\n fill: currentcolor;\n}\n\n.shc-hidden-channel-icon {\n margin-left: 6px;\n z-index: 0;\n cursor: not-allowed;\n}\n\n.shc-lock-screen-default-emoji-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-default-emoji-container > [class^=\"emojiContainer\"] {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 8px;\n padding: 5px 6px;\n margin-left: 5px;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn {\n all: unset;\n margin-left: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn {\n all: unset;\n margin-right: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container > [class^=\"members\"] {\n margin-left: 10px;\n flex-wrap: wrap;\n justify-content: center;\n}\n", ".vc-smyn-suffix {\n color: var(--text-muted);\n}\n\n.vc-smyn-suffix::before {\n content: \"(\";\n}\n\n.vc-smyn-suffix::after {\n content: \")\";\n}\n", "#vc-spotify-player {\n padding: 0.375rem 0.5rem;\n border-bottom: 1px solid var(--background-modifier-accent);\n\n --vc-spotify-green: #1db954; /* so custom themes can easily change it */\n}\n\n.theme-light #vc-spotify-player {\n background: var(--bg-overlay-3, var(--background-secondary-alt));\n}\n\n.theme-dark #vc-spotify-player {\n background: var(--bg-overlay-1, var(--background-secondary-alt));\n}\n\n.vc-spotify-button {\n background: none;\n color: var(--interactive-normal);\n padding: 0;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.vc-spotify-button:hover {\n color: var(--interactive-hover);\n background-color: var(--background-modifier-selected);\n}\n\n.vc-spotify-button svg {\n height: 24px;\n width: 24px;\n}\n\n[class*=\"vc-spotify-shuffle\"] > svg,\n[class*=\"vc-spotify-repeat\"] > svg {\n width: 22px;\n height: 22px;\n}\n\n.vc-spotify-button svg path {\n width: 100%;\n height: 100%;\n}\n\n/* .vc-spotify-button:hover {\n filter: brightness(1.3);\n} */\n\n.vc-spotify-shuffle-on,\n.vc-spotify-repeat-context,\n.vc-spotify-repeat-track,\n.vc-spotify-shuffle-on:hover,\n.vc-spotify-repeat-context:hover,\n.vc-spotify-repeat-track:hover {\n color: var(--vc-spotify-green);\n}\n\n.vc-spotify-tooltip-text {\n overflow: hidden;\n white-space: nowrap;\n padding-right: 0.2em;\n max-width: 100%;\n margin: unset;\n}\n\n.vc-spotify-repeat-1 {\n font-size: 70%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.vc-spotify-button-row {\n justify-content: center;\n}\n\n#vc-spotify-info-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 3em;\n gap: 0.5em;\n}\n\n#vc-spotify-info-wrapper img {\n height: 90%;\n object-fit: contain;\n}\n\n#vc-spotify-album-expanded-wrapper img {\n width: 100%;\n object-fit: contain;\n}\n\n#vc-spotify-titles {\n display: flex;\n flex-direction: column;\n padding: 0.2rem;\n justify-content: center;\n align-items: flex-start;\n align-content: flex-start;\n overflow: hidden;\n}\n\n#vc-spotify-song-title {\n color: var(--header-primary);\n font-size: 14px;\n font-weight: 600;\n}\n\n.vc-spotify-ellipoverflow {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n}\n\n.vc-spotify-artist,\n.vc-spotify-album {\n font-size: 12px;\n text-decoration: none;\n color: var(--header-secondary);\n}\n\n.vc-spotify-comma {\n color: var(--header-secondary);\n}\n\n.vc-spotify-artist[role=\"link\"]:hover,\n#vc-spotify-album-title[role=\"link\"]:hover,\n#vc-spotify-song-title[role=\"link\"]:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n\n#vc-spotify-album-image {\n border-radius: 3px;\n transition: filter 0.2s;\n}\n\n#vc-spotify-album-image:hover {\n filter: brightness(1.2);\n cursor: pointer;\n}\n\n#vc-spotify-progress-bar {\n position: relative;\n color: var(--text-normal);\n width: 100%;\n margin: 0.5em 0;\n margin-bottom: 5px;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] {\n flex-grow: 1;\n width: 100%;\n padding: 0 !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"bar-\"] {\n height: 4px !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"grabber\"] {\n /* these importants are necessary, it applies a width and height through inline styles */\n height: 10px !important;\n width: 10px !important;\n background-color: var(--interactive-normal);\n border-color: var(--interactive-normal);\n color: var(--interactive-normal);\n}\n\n#vc-spotify-progress-text {\n margin: 0;\n}\n\n.vc-spotify-progress-time {\n font-size: 12px;\n top: 10px;\n position: absolute;\n}\n\n.vc-spotify-time-left {\n left: 0;\n}\n\n.vc-spotify-time-right {\n right: 0;\n}\n\n.vc-spotify-fallback {\n padding: 0.5em;\n color: var(--text-normal);\n}\n", ".vc-trans-modal-content {\n padding: 1em;\n}\n\n.vc-trans-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-trans-modal-header h1 {\n margin: 0;\n}\n\n.vc-trans-accessory {\n color: var(--text-muted);\n margin-top: 0.5em;\n font-style: italic;\n font-weight: 400;\n}\n\n.vc-trans-accessory svg {\n margin-right: 0.25em;\n}\n\n.vc-trans-dismiss {\n all: unset;\n cursor: pointer;\n color: var(--text-link);\n}\n\n.vc-trans-dismiss:is(:hover, :focus) {\n text-decoration: underline;\n}\n\n.vc-trans-auto-translate {\n color: var(--green-360);\n}\n", ".vc-uvs-button>div {\n white-space: normal !important;\n}\n\n.vc-uvs-button {\n width: 100%;\n margin: auto;\n height: unset;\n}\n\n.vc-uvs-header {\n color: var(--header-primary);\n margin-bottom: 6px;\n}\n\n.vc-uvs-modal-margin {\n margin: 0 12px;\n}\n\n.vc-uvs-modal-margin div {\n margin-bottom: 0 !important;\n}\n\n.vc-uvs-popout-margin-self>[class^=\"section\"] {\n padding-top: 0;\n padding-bottom: 12px;\n}\n", ".vc-toolbox-btn,\n.vc-toolbox-btn>svg {\n -webkit-app-region: no-drag;\n}\n\n.vc-toolbox-btn>svg {\n color: var(--interactive-normal);\n}\n\n.vc-toolbox-btn[class*=\"selected\"]>svg {\n color: var(--interactive-active);\n}\n\n.vc-toolbox-btn:hover>svg {\n color: var(--interactive-hover);\n}\n", ".vc-vmsg-modal {\n padding: 1em;\n}\n\n.vc-vmsg-buttons {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 0.5em;\n margin-bottom: 1em;\n}\n\n.vc-vmsg-modal audio {\n width: 100%;\n}\n\n.vc-vmsg-preview {\n color: var(--text-normal);\n border-radius: 24px;\n background-color: var(--background-secondary);\n position: relative;\n display: flex;\n align-items: center;\n padding: 0 16px;\n height: 48px;\n}\n\n.vc-vmsg-preview-indicator {\n background: var(--button-secondary-background);\n width: 16px;\n height: 16px;\n border-radius: 50%;\n transition: background 0.2s ease-in-out;\n}\n\n.vc-vmsg-preview-recording .vc-vmsg-preview-indicator {\n background: var(--status-danger);\n}\n\n.vc-vmsg-preview-time {\n opacity: 0.8;\n margin: 0 0.5em;\n font-size: 80%;\n\n /* monospace so different digits have same size */\n font-family: var(--font-code);\n}\n\n.vc-vmsg-preview-label {\n opacity: 0.5;\n letter-spacing: 0.125em;\n font-weight: 600;\n flex: 1;\n text-align: center;\n}\n"],
- "mappings": "AAAA,2BAEI,2BACA,yBAHJ,kBAKI,gCCLJ,sBAEI,UACA,aACA,sBACA,yBACA,iDANJ,kBAQI,gBACA,eACA,WAGJ,gFACI,kBACA,mBACA,WACA,WACA,gBAGJ,iBACI,aACA,mBAvBJ,gBAyBI,YAGJ,yBACI,WAGJ,wBACI,aACA,8BAGJ,uBACI,4BACA,eACA,gBACA,oBACA,yBAGJ,2BACI,UACA,eACA,gCACA,WACA,yDAGJ,iCACI,+BACA,UAGJ,sBACI,YACA,WA5DJ,kBAgEA,6BACI,cAjEJ,kBAmEI,gBAGJ,mBAtEA,iBAwEI,iBAGJ,qBACI,WAGJ,2BACI,aACA,8EACA,mBAGJ,+BACI,aACA,sBAvFJ,YAyFI,gBAGJ,6BACI,oBACA,mCAGJ,8CACI,kBAGJ,8BACI,mBACA,UACA,kBAGJ,0BACI,aACA,sBAGJ,+BACI,iBACA,eACA,oBAGJ,gCACI,uBACA,iDCxHJ,qBACI,gBACA,mBACA,0DAGJ,0BACI,kBACA,oBACA,mBAGJ,gCAZA,YAcI,aACA,QACA,mBACA,6BACA,YACA,mBACA,kBAGJ,oBACI,aACA,mBAGJ,kBA5BA,YA8BI,kBAGJ,wBACI,gDACA,4CACA,+BAGJ,yBAEI,+BACA,mCA1CJ,aA4CI,mDACA,iBAGJ,6BACI,aACA,oCACA,aAGJ,gCACI,uBACA,iDAGJ,qFAGI,iBAGA,eCjEJ,wBACI,aACA,cACA,0DAGJ,wBACI,aACA,sBACA,iDACA,gCAVJ,8BAaI,WACA,wBACA,4DAGJ,6BACI,uBACA,aACA,kBACA,mBACA,gBAGJ,iCACI,cCTJ,iBACI,gBACA,aACA,cACA,0DAGJ,wBACI,YACA,WA3BJ,UA6BI,uBACA,iBAGJ,kCACI,+BAGJ,4BACI,aACA,YACA,SACA,gCAGJ,kBA5CA,cA8CI,gCACA,gBA/CJ,kBAiDI,YACA,eACA,iBACA,uBACA,kBAGJ,qBAxDA,cA4DA,sBA5DA,YA8DI,WACA,aACA,sBAGJ,0BACI,iBAGJ,yBAvEA,YAyEI,0CACA,gDACA,+BAGJ,gCACI,gBAGJ,+CACI,wBCnFJ,uBACI,wBAGJ,qBACI,0BCLJ,kCAIA,wBACI,aACA,mBACA,kBAGJ,sBACI,oBACA,YACA,sCAbJ,0DAgBI,eACA,YACA,kBACA,iBAGJ,6BACI,WACA,cACA,kBACA,YACA,WACA,sCACA,WACA,WACA,MAGJ,wBACI,YACA,WApCJ,kBAwCA,uBACI,iBACA,aACA,SAGJ,2BACI,YACA,WAhDJ,kBAkDI,4CACA,sBAGJ,yBACI,aACA,SCxDJ,eACI,iDACA,gCAFJ,kBAII,cACA,YALJ,aAOI,WACA,wBACA,4DACA,sBAGJ,wBACI,WAGJ,qBACI,4CACA,2BACA,iCAGJ,iBACI,gBACA,aACA,WACA,yBACA,mBACA,QACA,mBAGJ,eACI,YACA,gBACA,uBACA,oBACA,qBACA,aACA,4BAEA,oBAGJ,sBACI,WAGJ,eACI,aACA,WACA,mBACA,YACA,QAGJ,iBACI,eAGJ,wBACI,cC9DJ,kBACI,qCCDJ,uBACI,aACA,sBAGJ,wBACI,aACA,mBACA,8BAGJ,8BACI,aACA,sBACA,2BAGJ,6DACI,8DAGJ,sBACI,yBCtBJ,2BACI,oBAGJ,6CACI,UACA,eACA,eACA,kBACA,WACA,aCVJ,wCACI,aAGJ,oIASI,8BACA,mCAGJ,iKAUI,8BAGJ,kCACI,uBAGJ,mCACI,WCjCJ,yCACI,aACA,8BACA,mBACA,gBACA,kBAGJ,wCACI,aACA,mBAGJ,uCACI,UACA,eACA,aACA,mBACA,uBACA,WACA,YAGJ,kFACI,UACA,eACA,aACA,mBAYJ,2BACI,YAGJ,8BACI,WACA,YACA,aACA,mBACA,uBACA,kBAGJ,+BACI,aACA,8BACA,uCAzDJ,eA6DA,0BACI,eACA,aACA,sBACA,QACA,yDAGJ,mCACI,UACA,eAGJ,+BACI,aACA,mBA5EJ,gBA8EI,eACA,YA/EJ,kBAmFA,qCACI,kDAGJ,sCACI,qDAGJ,mCACI,uBACA,mBACA,gBAGJ,iCAjGA,kBAmGI,WACA,YACA,gBACA,kBACA,cAGJ,8BA1GA,kBA4GI,WACA,YACA,iBAGJ,2BACI,sBACA,aACA,sBACA,gBAGJ,gCACI,kBACA,aACA,mBA3HJ,aA6HI,0DAGJ,2CACI,SAGJ,qCACI,qDACA,WACA,YACA,iBAGJ,8CACI,+BACA,eACA,kBACA,QACA,SACA,6BAGJ,oDACI,gCCrJJ,iCACI,aACA,qBACA,mBAGJ,yBACI,UACA,eACA,WACA,YCVJ,eACI,gCAGJ,qBACI,kDACA,+BCNJ,sBACI,aAGJ,uCACI,qBACA,iBACA,oBCPJ,2BACI,yCACA,yBACA,UAHJ,sCAMI,aACA,yCAPJ,kBASI,gBACA,mBACA,eAGJ,6CAEI,6BAGJ,qCACI,kBAGJ,0CACI,yCAGJ,oBACI,8BACA,qBAGJ,uBAhCA,SAoCA,2BApCA,UAwCA,oBACI,kBAGJ,cA5CA,cAgDA,kBACI,qCCjDJ,YACI,YACA,iBAGJ,cACI,WACA,eAGJ,cACI,aACA,mBACA,mBACA,SAdJ,YAkBA,kBACI,WACA,YACA,eAGJ,4BACI,aACA,sBACA,SAGJ,YA9BA,SAkCA,eACI,0DAnCJ,mBAqCI,aACA,SACA,oBACA,mBAGJ,WACI,oCACA,gCACA,eACA,YACA,iBAGJ,mBAnDA,WAuDA,gDACI,8CAGJ,YACI,aACA,8CACA,QAGJ,wBACI,yBAGJ,2CACI,cAGJ,aACI,aACA,mBACA,SAGJ,iBACI,YAhFJ,kBAkFI,eAGJ,gBACI,WACA,iBAGJ,iCA1FA,aA8FA,uCACI,kDC/FJ,iBACI,WACA,6CAGJ,YALA,kBASA,iBACI,cACA,gBAXJ,aAaI,kBACA,kBACA,qBACA,cACA,qBACA,uBACA,YAGJ,eACI,iBACA,iBAGJ,kBACI,gBAGJ,YACI,cACA,kBACA,QACA,SACA,UAGJ,8BACI,UAGJ,WA3CA,0CA8CI,iBAGJ,sBACI,gBAGJ,sBArDA,oBAyDA,yBACI,mBACA,uBACA,aACA,kBACA,uBA9DJ,QAkEA,eACI,kBAGJ,YAtEA,cAwEI,kBACA,gBACA,0BACA,aACA,mBAGJ,aACI,yBACA,WAGJ,gBACI,YACA,WAGJ,2BACI,mCACA,iBACA,kBACA,iBAGJ,0BACI,iBACA,sBACA,WCnGJ,oBACI,UACA,qBACA,eAGJ,eACI,oBACA,UACA,mBCTJ,iCACI,uBACA,cACA,YACA,WAGJ,2BACI,aACA,sBACA,mBACA,uBACA,kBACA,gBAGJ,6BAhBA,WAoBA,sBACI,YACA,aAGJ,mCACI,aACA,mBACA,mBAGJ,qCACI,eAGJ,mCACI,yBAGJ,iCACI,yBACA,4DAzCJ,+BA4CI,eAGJ,gCACI,4DAhDJ,+BAmDI,eAGJ,kCACI,eAGJ,sBACI,aACA,mBACA,uBACA,eACA,QAGJ,gCACI,kBACA,kBAGJ,yBACI,gBACA,UACA,mBAGJ,yCACI,aACA,mBACA,mBAGJ,iEACI,4DApFJ,kCAuFI,gBAGJ,mDACI,aACA,sBACA,mBACA,4DA9FJ,+BAiGI,eAGJ,yDACI,aACA,mBACA,mBAGJ,8DACI,UACA,gBACA,eACA,aACA,mBAGJ,kEACI,yBAGJ,mEACI,UACA,iBACA,eACA,aACA,mBAGJ,uEACI,yBAGJ,oEACI,iBACA,eACA,uBCrIJ,gBACI,wBAGJ,uBACI,YAGJ,sBACI,YCTJ,yCAEI,0DAEA,4BAGJ,gCACI,gEAGJ,+BACI,gEAGJ,mBACI,gBACA,gCAjBJ,UAmBI,WACA,YApBJ,mBAsBI,aACA,uBACA,mBAGJ,yBACI,+BACA,qDAGJ,uBACI,YACA,WAGJ,+DAEI,WACA,YAGJ,4BACI,WACA,YAOJ,wKAMI,8BAGJ,yBACI,gBACA,mBACA,mBACA,eACA,aAGJ,qBACI,cACA,kBACA,QACA,SACA,+BAGJ,uBACI,uBAGJ,yBACI,aACA,mBACA,mBACA,WACA,SAGJ,6BACI,WACA,mBAGJ,uCACI,WACA,mBAGJ,mBACI,aACA,sBArGJ,cAuGI,uBACA,uBACA,yBACA,gBAGJ,uBACI,4BACA,eACA,gBAGJ,0BACI,mBACA,gBACA,WACA,uBAGJ,qCAEI,eACA,qBACA,8BAGJ,kBACI,8BAGJ,qHAGI,0BACA,eAGJ,wBA5IA,kBA8II,sBAGJ,8BACI,uBACA,eAGJ,yBACI,kBACA,yBACA,WAzJJ,kBA8JA,yCACI,YACA,WAhKJ,oBAoKA,uDACI,qBAGJ,0DAEI,sBACA,qBACA,2CACA,uCACA,gCAGJ,0BAjLA,SAqLA,0BACI,eACA,SACA,kBAGJ,sBACI,OAGJ,uBACI,QAGJ,qBAnMA,aAqMI,yBCrMJ,oCAIA,uBACI,8BACA,qBAGJ,0BATA,SAaA,oBACI,wBACA,gBACA,kBACA,gBAGJ,wBACI,mBAGJ,kBACI,UACA,eACA,uBAGJ,oCACI,0BAGJ,yBACI,uBCnCJ,mBACI,6BAGJ,eACI,WALJ,YAOI,aAGJ,eACI,4BACA,kBAGJ,qBAfA,cAmBA,yBACI,0BAGJ,4CACI,cACA,oBCzBJ,oCAEI,2BAGJ,oBACI,gCAGJ,qCACI,gCAGJ,0BACI,+BCdJ,2BAIA,iBACI,aACA,8CACA,SACA,kBAGJ,qBACI,WAGJ,iBACI,yBAhBJ,mBAkBI,6CACA,kBACA,aACA,mBArBJ,eAuBI,YAGJ,2BACI,8CACA,WACA,YA7BJ,kBA+BI,sCAGJ,sDACI,gCAGJ,sBACI,WAvCJ,cAyCI,cAGA,6BAGJ,uBACI,WACA,sBACA,gBACA,OACA",
+ "sources": ["../src/components/ErrorCard.css", "../src/api/Notifications/styles.css", "../src/components/VencordSettings/settingsStyles.css", "../src/components/VencordSettings/themesStyles.css", "../src/components/PluginSettings/styles.css", "../src/components/iconStyles.css", "../src/components/PluginSettings/contributorModal.css", "../src/components/VencordSettings/addonCard.css", "../src/components/Switch.css", "../src/plugins/dearrow/styles.css", "../src/plugins/messageLogger/messageLogger.css", "../src/plugins/permissionsViewer/styles.css", "../src/components/ExpandableHeader.css", "../src/plugins/pictureInPicture/styles.css", "../src/plugins/pronoundb/styles.css", "../src/plugins/sendTimestamps/styles.css", "../src/plugins/serverProfile/styles.css", "../src/plugins/shikiCodeblocks.desktop/shiki.css", "../src/plugins/showConnections/styles.css", "../src/plugins/showHiddenChannels/style.css", "../src/plugins/showMeYourName/styles.css", "../src/plugins/spotifyControls/spotifyStyles.css", "../src/plugins/translate/styles.css", "../src/plugins/userVoiceShow/components/VoiceChannelSection.css", "../src/plugins/vencordToolbox/index.css", "../src/plugins/voiceMessages/styles.css"],
+ "sourcesContent": [".vc-error-card {\n padding: 2em;\n background-color: #e7828430;\n border: 1px solid #e78284;\n border-radius: 5px;\n color: var(--text-normal, white);\n}\n", ".vc-notification-root {\n /* clear default button styles */\n all: unset;\n display: flex;\n flex-direction: column;\n color: var(--text-normal);\n background-color: var(--background-secondary-alt);\n border-radius: 6px;\n overflow: hidden;\n cursor: pointer;\n width: 100%;\n}\n\n.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root) {\n position: absolute;\n z-index: 2147483647;\n right: 1rem;\n width: 25vw;\n min-height: 10vh;\n}\n\n.vc-notification {\n display: flex;\n flex-direction: row;\n padding: 1.25rem;\n gap: 1.25rem;\n}\n\n.vc-notification-content {\n width: 100%;\n}\n\n.vc-notification-header {\n display: flex;\n justify-content: space-between;\n}\n\n.vc-notification-title {\n color: var(--header-primary);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.25rem;\n text-transform: uppercase;\n}\n\n.vc-notification-close-btn {\n all: unset;\n cursor: pointer;\n color: var(--interactive-normal);\n opacity: 0.5;\n transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;\n}\n\n.vc-notification-close-btn:hover {\n color: var(--interactive-hover);\n opacity: 1;\n}\n\n.vc-notification-icon {\n height: 4rem;\n width: 4rem;\n border-radius: 6px;\n}\n\n.vc-notification-progressbar {\n height: 0.25rem;\n border-radius: 5px;\n margin-top: auto;\n}\n\n.vc-notification-p {\n margin: 0.5rem 0 0;\n line-height: 140%;\n}\n\n.vc-notification-img {\n width: 100%;\n}\n\n.vc-notification-log-empty {\n height: 218px;\n background: url(\"/assets/b36de980b174d7b798c89f35c116e5c6.svg\") center no-repeat;\n margin-bottom: 40px;\n}\n\n.vc-notification-log-container {\n display: flex;\n flex-direction: column;\n padding: 1em;\n overflow: hidden;\n}\n\n.vc-notification-log-wrapper {\n transition: 200ms ease;\n transition-property: height, opacity;\n}\n\n.vc-notification-log-wrapper:not(:last-child) {\n margin-bottom: 1em;\n}\n\n.vc-notification-log-removing {\n height: 0 !important;\n opacity: 0;\n margin-bottom: 1em;\n}\n\n.vc-notification-log-body {\n display: flex;\n flex-direction: column;\n}\n\n.vc-notification-log-timestamp {\n margin-left: auto;\n font-size: 0.8em;\n font-weight: lighter;\n}\n\n.vc-notification-log-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n", ".vc-settings-tab-bar {\n margin-top: 20px;\n margin-bottom: 10px;\n border-bottom: 2px solid var(--background-modifier-accent);\n}\n\n.vc-settings-tab-bar-item {\n margin-right: 32px;\n padding-bottom: 16px;\n margin-bottom: -2px;\n}\n\n.vc-settings-quick-actions-card {\n padding: 1em;\n display: flex;\n gap: 1em;\n align-items: center;\n justify-content: space-evenly;\n flex-grow: 1;\n flex-flow: row wrap;\n margin-bottom: 1em;\n}\n\n.vc-settings-donate {\n display: flex;\n flex-direction: row;\n}\n\n.vc-settings-card {\n padding: 1em;\n margin-bottom: 1em;\n}\n\n.vc-backup-restore-card {\n background-color: var(--info-warning-background);\n border-color: var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-settings-theme-links {\n /* Needed to fix bad themes that hide certain textarea elements for whatever eldritch reason */\n display: inline-block !important;\n color: var(--text-normal) !important;\n padding: 0.5em;\n border: 1px solid var(--background-modifier-accent);\n max-height: unset;\n}\n\n.vc-cloud-settings-sync-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 1em;\n}\n\n.vc-cloud-erase-data-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n\n.vc-text-selectable,\n.vc-text-selectable :where([class*=\"text\" i], [class*=\"title\" i]) {\n /* make text selectable, silly discord makes the entirety of settings not selectable */\n user-select: text;\n\n /* discord also sets cursor: default which prevents the cursor from showing as text */\n cursor: initial;\n}\n", ".vc-settings-theme-grid {\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-settings-theme-card {\n display: flex;\n flex-direction: column;\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n padding: 1em;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n}\n\n.vc-settings-theme-card-text {\n text-overflow: ellipsis;\n height: 1.2em;\n margin-bottom: 2px;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-settings-theme-author::before {\n content: \"by \";\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n.vc-plugins-grid {\n margin-top: 16px;\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-plugins-info-button {\n height: 24px;\n width: 24px;\n padding: 0;\n background: transparent;\n margin-right: 8px;\n}\n\n.vc-plugins-settings-button:hover {\n color: var(--interactive-hover);\n}\n\n.vc-plugins-filter-controls {\n display: grid;\n height: 40px;\n gap: 10px;\n grid-template-columns: 1fr 150px;\n}\n\n.vc-plugins-badge {\n padding: 0 6px;\n font-family: var(--font-display);\n font-weight: 500;\n border-radius: 8px;\n height: 16px;\n font-size: 12px;\n line-height: 16px;\n color: var(--white-500);\n text-align: center;\n}\n\n.vc-plugins-dep-name {\n margin: 0 auto;\n}\n\n.vc-plugins-info-card {\n padding: 1em;\n height: 8em;\n display: flex;\n flex-direction: column;\n}\n\n.vc-plugins-info-card div {\n line-height: 32px;\n}\n\n.vc-plugins-restart-card {\n padding: 1em;\n background: var(--info-warning-background);\n border: 1px solid var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-plugins-restart-card button {\n margin-top: 0.5em;\n}\n\n.vc-plugins-info-button svg:not(:hover, :focus) {\n color: var(--text-muted);\n}\n", ".vc-open-external-icon {\n transform: rotate(45deg);\n}\n\n.vc-owner-crown-icon {\n color: var(--text-warning);\n}\n", ".vc-author-modal-root {\n padding: 1em;\n}\n\n.vc-author-modal-header {\n display: flex;\n align-items: center;\n margin-bottom: 1em;\n}\n\n.vc-author-modal-name {\n text-transform: none;\n flex-grow: 0;\n background: var(--background-tertiary);\n border-radius: 0 9999px 9999px 0;\n padding: 6px 0.8em 6px 0.5em;\n font-size: 20px;\n height: 20px;\n position: relative;\n text-wrap: nowrap;\n}\n\n.vc-author-modal-name::before {\n content: \"\";\n display: block;\n position: absolute;\n height: 100%;\n width: 16px;\n background: var(--background-tertiary);\n z-index: -1;\n left: -16px;\n top: 0;\n}\n\n.vc-author-modal-avatar {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n}\n\n.vc-author-modal-links {\n margin-left: auto;\n display: flex;\n gap: 0.2em;\n}\n\n.vc-author-modal-links img {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n border: 4px solid var(--background-tertiary);\n box-sizing: border-box\n}\n\n.vc-author-modal-plugins {\n display: grid;\n gap: 0.5em;\n}\n", ".vc-addon-card {\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n display: block;\n height: 100%;\n padding: 12px;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n box-sizing: border-box;\n}\n\n.vc-addon-card-disabled {\n opacity: 0.6;\n}\n\n.vc-addon-card:hover {\n background-color: var(--background-tertiary);\n transform: translateY(-1px);\n box-shadow: var(--elevation-high);\n}\n\n.vc-addon-header {\n margin-top: auto;\n display: flex;\n width: 100%;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n margin-bottom: 0.5em;\n}\n\n.vc-addon-note {\n height: 36px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n /* stylelint-disable-next-line property-no-unknown */\n box-orient: vertical;\n}\n\n.vc-addon-name-author {\n width: 100%;\n}\n\n.vc-addon-name {\n display: flex;\n width: 100%;\n align-items: center;\n flex-grow: 1;\n gap: 8px;\n}\n\n.vc-addon-author {\n font-size: 0.8em;\n}\n\n.vc-addon-author::before {\n content: \"by \";\n}\n", ".vc-switch-slider {\n transition: 100ms transform ease-in-out;\n}\n", ".vc-dearrow-toggle-off svg {\n filter: grayscale(1);\n}\n\n.vc-dearrow-toggle-on, .vc-dearrow-toggle-off {\n all: unset;\n display: inline;\n cursor: pointer;\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n}\n", ".messagelogger-deleted [class^=\"buttons\"] {\n display: none;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n) {\n filter: grayscale(1) !important;\n transition: 150ms filter ease-in-out;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n):hover,\n.messagelogger-deleted {\n filter: grayscale(0) !important;\n}\n\n.theme-dark .messagelogger-edited {\n filter: brightness(80%);\n}\n\n.theme-light .messagelogger-edited {\n opacity: 0.5;\n}\n", "/* User Permissions Component */\n\n.vc-permviewer-userperms-title-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n margin-bottom: 6px;\n}\n\n.vc-permviewer-userperms-btns-container {\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-sortorder-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n\n.vc-permviewer-userperms-permdetails-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-toggleperms-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n/* RolesAndUsersPermissions Component */\n\n.vc-permviewer-perms-title {\n flex-grow: 1;\n}\n\n.vc-permviewer-perms-no-perms {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n\n.vc-permviewer-perms-container {\n display: grid;\n grid-template-columns: 1fr 2fr;\n grid-template-areas: \"list permissions\";\n padding: 16px 0;\n}\n\n.vc-permviewer-perms-list {\n grid-area: list;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border-right: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-list-item-btn {\n all: unset;\n cursor: pointer;\n}\n\n.vc-permviewer-perms-list-item {\n display: flex;\n align-items: center;\n padding: 8px 5px;\n cursor: pointer;\n width: 230px;\n border-radius: 5px;\n}\n\n.vc-permviewer-perms-list-item:hover {\n background-color: var(--background-modifier-hover);\n}\n\n.vc-permviewer-perms-list-item-active {\n background-color: var(--background-modifier-selected);\n}\n\n.vc-permviewer-perms-list-item > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-permviewer-perms-role-circle {\n border-radius: 50%;\n width: 12px;\n height: 12px;\n margin-left: 3px;\n margin-right: 11px;\n flex-shrink: 0;\n}\n\n.vc-permviewer-perms-user-img {\n border-radius: 50%;\n width: 20px;\n height: 20px;\n margin-right: 6px;\n}\n\n.vc-permviewer-perms-perms {\n grid-area: permissions;\n display: flex;\n flex-direction: column;\n margin-left: 5px;\n}\n\n.vc-permviewer-perms-perms-item {\n position: relative;\n display: flex;\n align-items: center;\n padding: 10px;\n border-bottom: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-perms-item:last-child {\n border: 0;\n}\n\n.vc-permviewer-perms-perms-item-icon {\n border: 1px solid var(--background-modifier-selected);\n width: 24px;\n height: 24px;\n margin-right: 5px;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon {\n color: var(--interactive-muted);\n cursor: pointer;\n position: absolute;\n right: 0;\n scale: 0.9;\n transition: color ease-in 0.1s;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon:hover {\n color: var(--interactive-active);\n}\n", ".vc-expandableheader-center-flex {\n display: flex;\n justify-items: center;\n align-items: center;\n}\n\n.vc-expandableheader-btn {\n all: unset;\n cursor: pointer;\n width: 24px;\n height: 24px;\n}\n", ".vc-pip-button {\n color: var(--interactive-normal);\n}\n\n.vc-pip-button:hover {\n background-color: var(--background-modifier-hover);\n color: var(--interactive-hover);\n}\n", ".vc-pronoundb-compact {\n display: none;\n}\n\n[class*=\"compact\"] .vc-pronoundb-compact {\n display: inline-block;\n margin-left: -2px;\n margin-right: 0.25rem;\n}\n", ".vc-st-modal-content input {\n background-color: var(--input-background);\n color: var(--text-normal);\n width: 95%;\n padding: 8px 8px 8px 12px;\n margin: 1em 0;\n outline: none;\n border: 1px solid var(--input-background);\n border-radius: 4px;\n font-weight: 500;\n font-style: inherit;\n font-size: 100%;\n}\n\n.vc-st-format-label,\n.vc-st-format-label span {\n background-color: transparent;\n}\n\n.vc-st-modal-content [class|=\"select\"] {\n margin-bottom: 1em;\n}\n\n.vc-st-modal-content [class|=\"select\"] span {\n background-color: var(--input-background);\n}\n\n.vc-st-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-st-modal-header h1 {\n margin: 0;\n}\n\n.vc-st-modal-header button {\n padding: 0;\n}\n\n.vc-st-preview-text {\n margin-bottom: 1em;\n}\n\n.vc-st-button {\n padding: 0 6px;\n}\n\n.vc-st-button svg {\n transform: scale(1.1) translateY(1px);\n}\n", ".vc-gp-root {\n height: 100%;\n user-select: text;\n}\n\n.vc-gp-banner {\n width: 100%;\n cursor: pointer;\n}\n\n.vc-gp-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5em;\n margin: 0.5em;\n}\n\n.vc-gp-header img {\n width: 48px;\n height: 48px;\n cursor: pointer;\n}\n\n.vc-gp-name-and-description {\n display: flex;\n flex-direction: column;\n gap: 0.2em;\n}\n\n.vc-gp-name {\n margin: 0;\n}\n\n.vc-gp-tab-bar {\n border-bottom: 2px solid var(--background-modifier-accent);\n margin: 20px 12px 0;\n display: flex;\n gap: 40px;\n align-items: stretch;\n flex-direction: row;\n}\n\n.vc-gp-tab {\n border-bottom: 2px solid transparent;\n color: var(--interactive-normal);\n cursor: pointer;\n height: 39px;\n line-height: 14px;\n}\n\n.vc-gp-tab-content {\n margin: 1em;\n}\n\n.vc-gp-tab:where(.vc-gp-selected, :hover, :focus) {\n border-bottom-color: var(--interactive-active);\n}\n\n.vc-gp-info {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 1em;\n}\n\n.vc-gp-server-info-pair {\n color: var(--text-normal);\n}\n\n.vc-gp-server-info-pair [class^=\"timestamp\"] {\n margin-left: 0;\n}\n\n.vc-gp-owner {\n display: flex;\n align-items: center;\n gap: 0.2em;\n}\n\n.vc-gp-owner img {\n height: 20px;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.vc-gp-scroller {\n width: 100%;\n max-height: 500px;\n}\n\n.vc-gp-scroller [class^=\"listRow\"] {\n margin: 1px 0;\n}\n\n.vc-gp-scroller [class^=\"listRow\"]:hover {\n background-color: var(--background-modifier-hover);\n}\n", ".shiki-container {\n border: 4px;\n background-color: var(--background-secondary);\n}\n\n.shiki-root {\n border-radius: 4px;\n}\n\n.shiki-root code {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n position: relative;\n font-size: 0.875rem;\n line-height: 1.125rem;\n text-indent: 0;\n white-space: pre-wrap;\n background: transparent;\n border: none;\n}\n\n.shiki-devicon {\n margin-right: 8px;\n user-select: none;\n}\n\n.shiki-plain code {\n padding-top: 8px;\n}\n\n.shiki-btns {\n font-size: 1em;\n position: absolute;\n right: 0;\n bottom: 0;\n opacity: 0;\n}\n\n.shiki-root:hover .shiki-btns {\n opacity: 1;\n}\n\n.shiki-btn {\n border-radius: 4px 4px 0 0;\n padding: 4px 8px;\n user-select: none;\n}\n\n.shiki-btn ~ .shiki-btn {\n margin-left: 4px;\n}\n\n.shiki-btn:last-child {\n border-radius: 4px 0;\n}\n\n.shiki-spinner-container {\n align-items: center;\n background-color: rgb(0 0 0 / 60%);\n display: flex;\n position: absolute;\n justify-content: center;\n inset: 0;\n}\n\n.shiki-preview {\n margin-bottom: 2em;\n}\n\n.shiki-lang {\n padding: 0 5px;\n margin-bottom: 6px;\n font-weight: bold;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n}\n\n.shiki-table {\n border-collapse: collapse;\n width: 100%;\n}\n\n.shiki-table tr {\n height: 19px;\n width: 100%;\n}\n\n.shiki-root td:first-child {\n border-right: 1px solid transparent;\n padding-left: 5px;\n padding-right: 8px;\n user-select: none;\n}\n\n.shiki-root td:last-child {\n padding-left: 8px;\n word-break: break-word;\n width: 100%;\n}\n", ".vc-user-connection {\n all: unset;\n display: inline-block;\n cursor: pointer;\n}\n\n.vc-sc-tooltip {\n display: inline-flex;\n gap: 0.25em;\n align-items: center;\n}\n", ".shc-lock-screen-outer-container {\n overflow: hidden scroll;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n}\n\n.shc-lock-screen-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n min-height: 100%;\n}\n\n.shc-lock-screen-container > * {\n margin: 5px;\n}\n\n.shc-lock-screen-logo {\n width: 180px;\n height: 180px;\n}\n\n.shc-lock-screen-heading-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-heading-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-heading-nsfw-icon {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-topic-container {\n color: var(--text-normal);\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-tags {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.shc-evenodd-fill-current-color {\n fill-rule: evenodd;\n fill: currentcolor;\n}\n\n.shc-hidden-channel-icon {\n margin-left: 6px;\n z-index: 0;\n cursor: not-allowed;\n}\n\n.shc-lock-screen-default-emoji-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-default-emoji-container > [class^=\"emojiContainer\"] {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 8px;\n padding: 5px 6px;\n margin-left: 5px;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn {\n all: unset;\n margin-left: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn {\n all: unset;\n margin-right: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container > [class^=\"members\"] {\n margin-left: 10px;\n flex-wrap: wrap;\n justify-content: center;\n}\n", ".vc-smyn-suffix {\n color: var(--text-muted);\n}\n\n.vc-smyn-suffix::before {\n content: \"(\";\n}\n\n.vc-smyn-suffix::after {\n content: \")\";\n}\n", "#vc-spotify-player {\n padding: 0.375rem 0.5rem;\n border-bottom: 1px solid var(--background-modifier-accent);\n\n --vc-spotify-green: #1db954; /* so custom themes can easily change it */\n}\n\n.theme-light #vc-spotify-player {\n background: var(--bg-overlay-3, var(--background-secondary-alt));\n}\n\n.theme-dark #vc-spotify-player {\n background: var(--bg-overlay-1, var(--background-secondary-alt));\n}\n\n.vc-spotify-button {\n background: none;\n color: var(--interactive-normal);\n padding: 0;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.vc-spotify-button:hover {\n color: var(--interactive-hover);\n background-color: var(--background-modifier-selected);\n}\n\n.vc-spotify-button svg {\n height: 24px;\n width: 24px;\n}\n\n[class*=\"vc-spotify-shuffle\"] > svg,\n[class*=\"vc-spotify-repeat\"] > svg {\n width: 22px;\n height: 22px;\n}\n\n.vc-spotify-button svg path {\n width: 100%;\n height: 100%;\n}\n\n/* .vc-spotify-button:hover {\n filter: brightness(1.3);\n} */\n\n.vc-spotify-shuffle-on,\n.vc-spotify-repeat-context,\n.vc-spotify-repeat-track,\n.vc-spotify-shuffle-on:hover,\n.vc-spotify-repeat-context:hover,\n.vc-spotify-repeat-track:hover {\n color: var(--vc-spotify-green);\n}\n\n.vc-spotify-tooltip-text {\n overflow: hidden;\n white-space: nowrap;\n padding-right: 0.2em;\n max-width: 100%;\n margin: unset;\n}\n\n.vc-spotify-repeat-1 {\n font-size: 70%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.vc-spotify-button-row {\n justify-content: center;\n}\n\n#vc-spotify-info-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 3em;\n gap: 0.5em;\n}\n\n#vc-spotify-info-wrapper img {\n height: 90%;\n object-fit: contain;\n}\n\n#vc-spotify-album-expanded-wrapper img {\n width: 100%;\n object-fit: contain;\n}\n\n#vc-spotify-titles {\n display: flex;\n flex-direction: column;\n padding: 0.2rem;\n justify-content: center;\n align-items: flex-start;\n align-content: flex-start;\n overflow: hidden;\n}\n\n#vc-spotify-song-title {\n color: var(--header-primary);\n font-size: 14px;\n font-weight: 600;\n}\n\n.vc-spotify-ellipoverflow {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n}\n\n.vc-spotify-artist,\n.vc-spotify-album {\n font-size: 12px;\n text-decoration: none;\n color: var(--header-secondary);\n}\n\n.vc-spotify-comma {\n color: var(--header-secondary);\n}\n\n.vc-spotify-artist[role=\"link\"]:hover,\n#vc-spotify-album-title[role=\"link\"]:hover,\n#vc-spotify-song-title[role=\"link\"]:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n\n#vc-spotify-album-image {\n border-radius: 3px;\n transition: filter 0.2s;\n}\n\n#vc-spotify-album-image:hover {\n filter: brightness(1.2);\n cursor: pointer;\n}\n\n#vc-spotify-progress-bar {\n position: relative;\n color: var(--text-normal);\n width: 100%;\n margin: 0.5em 0;\n margin-bottom: 5px;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] {\n flex-grow: 1;\n width: 100%;\n padding: 0 !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"bar-\"] {\n height: 4px !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"grabber\"] {\n /* these importants are necessary, it applies a width and height through inline styles */\n height: 10px !important;\n width: 10px !important;\n background-color: var(--interactive-normal);\n border-color: var(--interactive-normal);\n color: var(--interactive-normal);\n}\n\n#vc-spotify-progress-text {\n margin: 0;\n}\n\n.vc-spotify-progress-time {\n font-size: 12px;\n top: 10px;\n position: absolute;\n}\n\n.vc-spotify-time-left {\n left: 0;\n}\n\n.vc-spotify-time-right {\n right: 0;\n}\n\n.vc-spotify-fallback {\n padding: 0.5em;\n color: var(--text-normal);\n}\n", ".vc-trans-modal-content {\n padding: 1em;\n}\n\n.vc-trans-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-trans-modal-header h1 {\n margin: 0;\n}\n\n.vc-trans-accessory {\n color: var(--text-muted);\n margin-top: 0.5em;\n font-style: italic;\n font-weight: 400;\n}\n\n.vc-trans-accessory svg {\n margin-right: 0.25em;\n}\n\n.vc-trans-dismiss {\n all: unset;\n cursor: pointer;\n color: var(--text-link);\n}\n\n.vc-trans-dismiss:is(:hover, :focus) {\n text-decoration: underline;\n}\n\n.vc-trans-auto-translate {\n color: var(--green-360);\n}\n", ".vc-uvs-button>div {\n white-space: normal !important;\n}\n\n.vc-uvs-button {\n width: 100%;\n margin: auto;\n height: unset;\n}\n\n.vc-uvs-header {\n color: var(--header-primary);\n margin-bottom: 6px;\n}\n\n.vc-uvs-modal-margin {\n margin: 0 12px;\n}\n\n.vc-uvs-modal-margin div {\n margin-bottom: 0 !important;\n}\n\n.vc-uvs-popout-margin-self>[class^=\"section\"] {\n padding-top: 0;\n padding-bottom: 12px;\n}\n", ".vc-toolbox-btn,\n.vc-toolbox-btn>svg {\n -webkit-app-region: no-drag;\n}\n\n.vc-toolbox-btn>svg {\n color: var(--interactive-normal);\n}\n\n.vc-toolbox-btn[class*=\"selected\"]>svg {\n color: var(--interactive-active);\n}\n\n.vc-toolbox-btn:hover>svg {\n color: var(--interactive-hover);\n}\n", ".vc-vmsg-modal {\n padding: 1em;\n}\n\n.vc-vmsg-buttons {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 0.5em;\n margin-bottom: 1em;\n}\n\n.vc-vmsg-modal audio {\n width: 100%;\n}\n\n.vc-vmsg-preview {\n color: var(--text-normal);\n border-radius: 24px;\n background-color: var(--background-secondary);\n position: relative;\n display: flex;\n align-items: center;\n padding: 0 16px;\n height: 48px;\n}\n\n.vc-vmsg-preview-indicator {\n background: var(--button-secondary-background);\n width: 16px;\n height: 16px;\n border-radius: 50%;\n transition: background 0.2s ease-in-out;\n}\n\n.vc-vmsg-preview-recording .vc-vmsg-preview-indicator {\n background: var(--status-danger);\n}\n\n.vc-vmsg-preview-time {\n opacity: 0.8;\n margin: 0 0.5em;\n font-size: 80%;\n\n /* monospace so different digits have same size */\n font-family: var(--font-code);\n}\n\n.vc-vmsg-preview-label {\n opacity: 0.5;\n letter-spacing: 0.125em;\n font-weight: 600;\n flex: 1;\n text-align: center;\n}\n"],
+ "mappings": "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",
"names": []
}
diff --git a/VencordDesktop/vencordDist/vencordDesktopRenderer.js b/VencordDesktop/vencordDist/vencordDesktopRenderer.js
index 03df79b..8fea11e 100644
--- a/VencordDesktop/vencordDist/vencordDesktopRenderer.js
+++ b/VencordDesktop/vencordDist/vencordDesktopRenderer.js
@@ -1,74 +1,67 @@
-// Vencord 81fb7c6
+// Vencord 96126fa
// Standalone: true
// Platform: Universal
// Updater disabled: false
-"use strict";var Vencord=(()=>{var j2=Object.create;var zs=Object.defineProperty;var W2=Object.getOwnPropertyDescriptor;var q2=Object.getOwnPropertyNames;var K2=Object.getPrototypeOf,Y2=Object.prototype.hasOwnProperty;var Rr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):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 or=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Be=(e,t)=>{for(var n in t)zs(e,n,{get:t[n],enumerable:!0})},$g=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of q2(t))!Y2.call(e,i)&&i!==n&&zs(e,i,{get:()=>t[i],enumerable:!(r=W2(t,i))||r.enumerable});return e};var js=(e,t,n)=>(n=e!=null?j2(K2(e)):{},$g(t||!e||!e.__esModule?zs(n,"default",{value:e,enumerable:!0}):n,e)),To=e=>$g(zs({},"__esModule",{value:!0}),e);var f,o,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Ze=g(()=>{"use strict";a();ie=class{constructor(t,n="white"){this.name=t;this.color=n}static makeTitle(t,n){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,n]}_log(t,n,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`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)}errorCustomFmt(t,...n){this._log("error","#e78284",n,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var Gg,q,at=g(()=>{"use strict";a();Gg="",q={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;q[`${e}${t}`]=n,Gg+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Gg,id:"vencord-margins"})),{once:!0})});function xo(e,t=5){let n=0,r;return()=>(!r&&t>n++&&(r=e(),!r&&t===n&&console.error("Lazy factory failed:",e)),r)}function yt(e,t=5,n=!1){let r=!0;n||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[wi]:void 0,[Lr](){return!s[wi]&&t>i++&&(s[wi]=e(),!s[wi]&&t===i&&console.error("Lazy factory failed:",e)),s[wi]}});return new Proxy(s,{...Ws,get(l,c,u){return!n&&r?yt(()=>Reflect.get(l[Lr](),c,u),t,!0):Reflect.get(l[Lr](),c,u)}})}var Hg,Ws,Lr,wi,wn=g(()=>{"use strict";a();Hg=["arguments","caller","prototype"],Ws={},Lr=Symbol.for("vencord.lazy.get"),wi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Ws[e]=(t,...n)=>Reflect[e](t[Lr](),...n);Ws.ownKeys=e=>{let t=e[Lr](),n=Reflect.ownKeys(t);for(let r of Hg)n.includes(r)||n.push(r);return n};Ws.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Hg.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[Lr](),t);return n&&Object.defineProperty(e,t,n),n}});function tt(e,t=5){let n=xo(e,t);return r=>{let i=n()??Z2;return o(i,{...r})}}var Z2,ec=g(()=>{"use strict";a();wn();Z2=()=>null});var X2,$n,qs=g(()=>{"use strict";a();Ze();X2=(e,t,n)=>t,$n=X2});function Ys(e){if(Jn!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>Mn=t]),e.pop(),Mn?(Jn=Mn.c,!0):!1}function Mi(e,...t){let n=new Error(`webpack.${e} found no module`);tc.error(n,"Filter:",t)}function un(e){return yt(()=>Ot(e))}function rr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let n in Jn){let r=Jn[n];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function pn(...e){let t=Ot(Ke.byProps(...e),{isIndirect:!0});return t||Mi("findByProps",...e),t}function I(...e){return yt(()=>pn(...e))}function jg(...e){let t=Ot(Ke.byCode(...e),{isIndirect:!0});return t||Mi("findByCode",...e),t}function Pi(...e){return yt(()=>jg(...e))}function Wg(e){let t=Ot(Ke.byStoreName(e),{isIndirect:!0});return t||Mi("findStore",e),t}function Me(e){return yt(()=>Wg(e))}function qg(...e){let t=Ot(Ke.componentByCode(...e),{isIndirect:!0});return t||Mi("findComponentByCode",...e),t}function sc(e){return tt(()=>Ot(e))}function Xe(...e){return tt(()=>qg(...e))}function ac(...e){return tt(()=>pn(...e)?.[e[0]])}function ut(e,t){if(typeof e=="string")e=Ke.byProps(e);else if(Array.isArray(e))e=Ke.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[n,r]=Ot(e,{isIndirect:!0,isWaitFor:!0});if(n)return void t(n,r);zg.set(e,t)}function J2(e){oc.add(e)}function Q2(e){oc.delete(e)}function lc(...e){let t={},n=Mn.m;e:for(let r in n){let i=n[r].original??n[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 Zs(e){let t=Mn.m[e];if(!t)return null;let n=`
+"use strict";var Vencord=(()=>{var _w=Object.create;var Hs=Object.defineProperty;var Bw=Object.getOwnPropertyDescriptor;var Fw=Object.getOwnPropertyNames;var Uw=Object.getPrototypeOf,$w=Object.prototype.hasOwnProperty;var Rr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):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 rr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ue=(e,t)=>{for(var n in t)Hs(e,n,{get:t[n],enumerable:!0})},Ug=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fw(t))!$w.call(e,i)&&i!==n&&Hs(e,i,{get:()=>t[i],enumerable:!(r=Bw(t,i))||r.enumerable});return e};var zs=(e,t,n)=>(n=e!=null?_w(Uw(e)):{},Ug(t||!e||!e.__esModule?Hs(n,"default",{value:e,enumerable:!0}):n,e)),Io=e=>Ug(Hs({},"__esModule",{value:!0}),e);var f,o,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Je=g(()=>{"use strict";a();ie=class{constructor(t,n="white"){this.name=t;this.color=n}static makeTitle(t,n){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,n]}_log(t,n,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`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)}errorCustomFmt(t,...n){this._log("error","#e78284",n,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var $g,Y,ct=g(()=>{"use strict";a();$g="",Y={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;Y[`${e}${t}`]=n,$g+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:$g,id:"vencord-margins"})),{once:!0})});function Ao(e,t=5){let n=0,r;return()=>(!r&&t>n++&&(r=e(),!r&&t===n&&console.error("Lazy factory failed:",e)),r)}function Qe(e,t=5){let n=0,r=Object.assign(function(){},{[Pi]:void 0,[Ws](){return!r[Pi]&&t>n++&&(r[Pi]=e(),!r[Pi]&&t===n&&console.error("Lazy factory failed:",e)),r[Pi]}});return new Proxy(r,js)}var Gg,js,Ws,Pi,Zt=g(()=>{"use strict";a();Gg=["arguments","caller","prototype"],js={},Ws=Symbol.for("vencord.lazy.get"),Pi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])js[e]=(t,...n)=>Reflect[e](t[Ws](),...n);js.ownKeys=e=>{let t=e[Ws](),n=Reflect.ownKeys(t);for(let r of Gg)n.includes(r)||n.push(r);return n};js.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Gg.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[Ws](),t);return n&&Object.defineProperty(e,t,n),n}});var Gw,Pn,qs=g(()=>{"use strict";a();Je();Gw=(e,t,n)=>t,Pn=Gw});function Zs(e){if(In!==void 0)throw"no.";if(e.push([[Symbol("Vencord")],{},t=>mn=t]),e.pop(),!mn)return!1;In=mn.c;for(let t in In){let{exports:n}=In[t];if(!n)continue;let r=Number(t);for(let i of Ys)try{i(n,r)}catch(s){Ii.error("Error in webpack listener",s)}for(let[i,s]of Lr)try{if(i(n))Lr.delete(i),s(n,r);else if(typeof n=="object"){n.default&&i(n.default)&&(Lr.delete(i),s(n.default,r));for(let l in n)l.length<=3&&n[l]&&i(n[l])&&(Lr.delete(i),s(n[l],r))}}catch(l){Ii.error("Error while firing callback for webpack chunk",l)}}return!0}function Xs(e,...t){let n=new Error(`webpack.${e} found no module`);Ii.error(n,"Filter:",t)}function Lt(e){return Qe(()=>st(e))}function Er(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let n in In){let r=In[n];if(!!r?.exports){if(e(r.exports))t.push(r.exports);else if(typeof r.exports!="object")continue;if(r.exports.default&&e(r.exports.default))t.push(r.exports.default);else for(let i in r.exports)if(i.length<=3){let s=r.exports[i];s&&e(s)&&t.push(s)}}}return t}function fn(e,t){return Qe(()=>zg(e,t))}function yt(...e){let t=st(ce.byProps(...e),{isIndirect:!0});return t||Xs("findByProps",...e),t}function A(...e){return Qe(()=>yt(...e))}function Bt(...e){let t=st(ce.byCode(...e),{isIndirect:!0});return t||Xs("findByCode",...e),t}function to(...e){return Qe(()=>Bt(...e))}function jg(e){let t=st(ce.byStoreName(e),{isIndirect:!0});return t||Xs("findStore",e),t}function Ie(e){return Qe(()=>jg(e))}function ut(e,t){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);let[n,r]=st(e,{isIndirect:!0,isWaitFor:!0});if(n)return void t(n,r);Lr.set(e,t)}function Hw(e){Ys.add(e)}function zw(e){Ys.delete(e)}function ic(...e){let t={},n=mn.m;e:for(let r in n){let i=n[r].original??n[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 sc(e){let t=mn.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!!
0,${t.toString()}
//# sourceURL=ExtractedWebpackModule${e}
-`;return(0,eval)(n)}var tc,Ks,nc,Mn,Jn,Ke,zg,oc,Ot,rc,ic,j=g(()=>{"use strict";a();wn();ec();Ze();qs();tc=new ie("Webpack"),nc=new Promise(e=>Ks=e),Ke={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),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},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ke.byCode(...e);return n=>t(n)?!0:n.$$typeof?n.type?t(n.type):n.render?t(n.render):!1:!1}},zg=new Map,oc=new Set;Ot=$n("find",function(t,{isIndirect:n=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Jn){let s=Jn[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,Number(i)]:l}}}return n||Mi("find",t),r?[null,null]:null});rc=$n("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return Ot(t[0]);let r=t,i=0,s=Array(n);e:for(let l in Jn){let c=Jn[l];if(!!c?.exports)for(let u=0;u{"use strict";a();j();Xs=un(e=>e.image&&e.modal&&!e.applicationIcon),vt=I("buttonWrapper","buttonContent")});function Js(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=tt(()=>n);return ut(t,i=>{n=i,Object.assign(r,i)}),r}function At(e,t){ut(Ke.byStoreName(e),t)}var cc=g(()=>{"use strict";a();Qe();j()});var S,wt,R,pt,V,Ve,Qs,re,Pn,Vs,ir,Kt,Ii,Yg,In,Zg,Er,Dr,Or,Ai,_r,Gn,ew,Xg=g(()=>{"use strict";a();j();cc();S={},_r=Js("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),Gn=Js("Timestamp",Ke.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),ew=Js("Flex",["Justify","Align","Wrap"]);ut(["FormItem","Button"],e=>{({useToken:Ai,Card:wt,Button:R,FormSwitch:pt,Tooltip:V,TextInput:Ve,TextArea:Qs,Text:re,Select:Pn,SearchableSelect:Vs,Slider:ir,ButtonLooks:Kt,TabBar:In,Popout:Ii,Dialog:Yg,Paginator:Zg,ScrollerThin:Er,Clickable:Dr,Avatar:Or}=e),S=e})});var G,dn,Jg=g(()=>{"use strict";a();j();G={};ut(["MenuItem","MenuSliderControl"],e=>G=e);dn=I("closeContextMenu","openContextMenu")});var O,J,De,Nt,Yt,Br,ea,sr,Qg=g(()=>{"use strict";a();j();sr=I("createPortal","render");ut("useState",e=>{O=e,{useEffect:De,useState:J,useMemo:Nt,useRef:Yt,useReducer:Br,useCallback:ea}=O})});var uc,Fr,Ni,Vg=g(()=>{"use strict";a();j();uc=I("MessageDisplayCompact"),Fr=I("ShowCurrentGame"),Ni=I("PreloadedUserSettingsActionCreators")});var pc,dc,An,mc,Ce,Ur,ar,Hn,tw,Te,W,nn,Pe,on,Q,ke,nt,Nn,Ci,ki,He,eh=g(()=>{"use strict";a();j();cc();pc=I("connectStores"),dc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(dc||{}),mc=I("openPrivateChannel"),{useStateFromStores:He}=I("useStateFromStores");At("DraftStore",e=>ki=e);At("UserStore",e=>W=e);At("UserProfileStore",e=>nn=e);At("ChannelStore",e=>Q=e);At("SelectedChannelStore",e=>Pe=e);At("SelectedGuildStore",e=>on=e);At("GuildStore",e=>Te=e);At("GuildMemberStore",e=>ke=e);At("RelationshipStore",e=>nt=e);At("PermissionStore",e=>Ce=e);At("PresenceStore",e=>Hn=e);At("ReadStateStore",e=>ar=e);At("GuildChannelStore",e=>Ur=e);At("MessageStore",e=>An=e);At("WindowStore",e=>Ci=e);At("EmojiStore",e=>Nn=e)});var th={};var nh=g(()=>{"use strict";a()});var oh={};var rh=g(()=>{"use strict";a()});var ih={};var sh=g(()=>{"use strict";a()});function fn(e,t=ah.MESSAGE){ee.show({id:ee.genId(),message:e,type:t})}var F,wo,Mt,mn,lr,cr,ot,zn,Fe,rn,ah,nw,ee,Rt,Ri,ur,Zt,pr,Qn,Se,lh=g(()=>{"use strict";a();wn();j();ut(["ComponentDispatch","ComponentDispatcher"],e=>wo=e.ComponentDispatch);Mt=I("getAPIBaseURL","get"),mn=I("parseTwoDigitYear"),lr=I("highlight","registerLanguage"),cr=I("debounce","cloneDeep"),ot=un(e=>e.Messages?.["en-US"]);ut(["fromTimestamp","extractTimestamp"],e=>zn=e);ah={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},nw={TOP:0,BOTTOM:1},ee={Type:ah,Position:nw,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Rt=I("getUser","fetchCurrentUser"),Ri=I("showUploadFileSizeExceededError","promptToUpload"),ur=I("fetchAssetIds","getAssetImage"),Zt=I("SUPPORTS_COPY","copy"),pr=I("transitionTo","replaceWith","transitionToGuild");ut(["dispatch","subscribe"],e=>{F=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ks()};e.subscribe("CONNECTION_OPEN",t)});ut("showToast",e=>{ee.show=e.showToast,ee.pop=e.popToast});ut(["show","close"],e=>rn=e);ut("parseTopic",e=>Fe=e);ut(["open","saveAccountChanges"],e=>Qn=e);Se=yt(()=>Ot(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint").Permissions)});var fc={};Be(fc,{Alerts:()=>rn,ApplicationAssetUtils:()=>ur,Avatar:()=>Or,Button:()=>R,ButtonLooks:()=>Kt,ButtonWrapperClasses:()=>vt,Card:()=>wt,ChannelStore:()=>Q,Clickable:()=>Dr,Clipboard:()=>Zt,ComponentDispatch:()=>wo,ComponentTypes:()=>th,ContextMenuApi:()=>dn,Dialog:()=>Yg,DraftStore:()=>ki,DraftType:()=>dc,EmojiStore:()=>Nn,Flex:()=>ew,Flux:()=>pc,FluxDispatcher:()=>F,Forms:()=>S,GuildChannelStore:()=>Ur,GuildMemberStore:()=>ke,GuildStore:()=>Te,MaskedLink:()=>_r,Menu:()=>G,MenuTypes:()=>oh,MessageStore:()=>An,ModalImageClasses:()=>Xs,NavigationRouter:()=>pr,Paginator:()=>Zg,Parser:()=>Fe,PermissionStore:()=>Ce,PermissionsBits:()=>Se,PoggerModeSettingsStore:()=>tw,Popout:()=>Ii,PresenceStore:()=>Hn,PrivateChannelsStore:()=>mc,React:()=>O,ReactDOM:()=>sr,ReadStateStore:()=>ar,RelationshipStore:()=>nt,RestAPI:()=>Mt,ScrollerThin:()=>Er,SearchableSelect:()=>Vs,Select:()=>Pn,SelectedChannelStore:()=>Pe,SelectedGuildStore:()=>on,SettingsRouter:()=>Qn,Slider:()=>ir,SnowflakeUtils:()=>zn,StatusSettingsStores:()=>Fr,Switch:()=>pt,TabBar:()=>In,Text:()=>re,TextAndImagesSettingsStores:()=>uc,TextArea:()=>Qs,TextInput:()=>Ve,Timestamp:()=>Gn,Toasts:()=>ee,Tooltip:()=>V,UploadHandler:()=>Ri,UserProfileStore:()=>nn,UserSettingsActionCreators:()=>Ni,UserStore:()=>W,UserUtils:()=>Rt,UtilTypes:()=>ih,WindowStore:()=>Ci,hljs:()=>lr,i18n:()=>ot,lodash:()=>cr,moment:()=>mn,showToast:()=>fn,useCallback:()=>ea,useEffect:()=>De,useMemo:()=>Nt,useReducer:()=>Br,useRef:()=>Yt,useState:()=>J,useStateFromStores:()=>He,useToken:()=>Ai});var A=g(()=>{"use strict";a();Kg();Xg();Jg();Qg();Vg();eh();nh();rh();sh();lh()});var sn,$r=g(()=>{a();sn="81fb7c6"});var ta,ch=g(()=>{a();ta="Vendicated/Vencord"});var jn,ow,gc,na,d,Gr,P=g(()=>{"use strict";a();$r();ch();jn="webpackChunkdiscord_app",ow="Vencord.Webpack.Common.React",gc=`Vencord/${sn}${ta?` (https://github.com/${ta})`:""}`,na="1026515880080842772",d=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},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},Strencher:{name:"Strencher",id:415849376598982656n},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},Lumap:{name:"lumap",id:635383782576357407n},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}}),Gr=(()=>Object.freeze(Object.fromEntries(Object.entries(d).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function dr(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},dr(e[n],r)):e[n]??=r}return e}function oe(...e){return e.filter(Boolean).join(" ")}function Mo(e){return new Promise(t=>setTimeout(t,e))}function gn(e,t="Copied to clipboard!"){Zt.SUPPORTS_COPY?Zt.copy(e):t="Your browser does not support copying to clipboard",ee.show({message:t,id:ee.genId(),type:ee.Type.SUCCESS})}function rw(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Li(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function hc(e){try{return new URL(e)}catch{return null}}function oa(e){return e}var yc,iw,Ei,Re=g(()=>{"use strict";a();A();P();yc=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};iw=navigator.userAgent.includes("Mobi"),Ei=e=>Object.hasOwn(Gr,e)});function rt(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=J({value:n.fallbackValue,error:null,pending:!0});return De(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),n.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),n.onError?.(l))}),()=>void(s=!1)},n.deps),[r.value,r.error,r.pending]}function Po(e){let t=Br(n=>n+1,0);return e?t:t[1]}function Di({interval:e=1e3,deps:t=[]}){let[n,r]=J(0),i=Nt(()=>Date.now(),t);return De(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),n}var sw,vc,Qe=g(()=>{"use strict";a();A();Re();ec();sw=()=>null,vc=(e=!1)=>{let t=O.useRef(null),[n,r]=J(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(yc(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)))},n]}});var uh=g(()=>{});function hn(e){return o("div",{...e,className:oe(e.className,"vc-error-card")},e.children)}var Hr=g(()=>{"use strict";a();uh();Re()});var aw,ph,dh,Sc,_,le=g(()=>{"use strict";a();Ze();at();Qe();A();Hr();aw="#e78284",ph=new ie("React ErrorBoundary",aw),dh={},Sc=tt(()=>class extends O.PureComponent{state={error:dh,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let i=n.indexOf(`
-`);i!==-1&&(r=n.slice(0,i),n=n.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.({error:t,errorInfo:n,props:this.props.wrappedProps}),ph.error(`A component threw an Error
-`,t),ph.error("Component Stack",n.componentStack)}render(){if(this.state.error===dh)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(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 o(hn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:q.top8},this.state.stack)))}});Sc.wrap=(e,t)=>n=>o(Sc,{...t,wrappedProps:n},o(e,{...n}));_=Sc});function ra(){return o("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},o("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 bc=g(()=>{"use strict";a()});function Oi(e){return o(R,{...e,look:R.Looks.LINK,color:R.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(ra,null),"Donate")}var Tc=g(()=>{"use strict";a();A();bc()});function ge(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var Lt=g(()=>{"use strict";a()});function _i(e,t){return ia.openModalLazy(e,t)}function je(e,t,n){return ia.openModal(e,t,n)}function Vn(e,t){return ia.closeModal(e,t)}function wc(){return ia.closeAllModals()}var Io,Cn,xc,ze,lt,et,_t,an,ia,dt=g(()=>{"use strict";a();j();Qe();Io=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Io||{}),Cn=I("ModalRoot","ModalCloseButton"),xc=tt(()=>pn("ImageModal").ImageModal),ze=tt(()=>Cn.ModalRoot),lt=tt(()=>Cn.ModalHeader),et=tt(()=>Cn.ModalContent),_t=tt(()=>Cn.ModalFooter),an=tt(()=>Cn.ModalCloseButton),ia=I("openModalLazy")});function y(e){return e}var w=g(()=>{"use strict";a()});async function mh(e=!1){Mc={};let t={};e&&(t.cache="no-cache");let r=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(`
-`);if(r.shift()!=="id,tooltip,image"){new ie("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(Mc[s]??=[]).push({image:c,description:l})}}var lw,cw,Mc,Pc,fh=g(()=>{"use strict";a();aa();Tc();le();Lt();bc();P();Ze();at();Re();dt();w();A();lw="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",cw={description:"Vencord Contributor",image:lw,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Ei(e.id),link:"https://github.com/Vendicated/Vencord"},Mc={};Pc=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[d.Megu,d.Ven,d.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 mh(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(cw),await mh()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Mc[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=je(r=>o(_,{noop:!0,onError:()=>{Vn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(Cn.ModalRoot,{...r},o(Cn.ModalHeader,null,o(ge,{style:{width:"100%",justifyContent:"center"}},o(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(ra,null),"Vencord Donor"))),o(Cn.ModalContent,null,o(ge,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(S.FormText,null,"This Badge is a special perk for Vencord Donors"),o(S.FormText,{className:q.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Cn.ModalFooter,null,o(ge,{style:{width:"100%",justifyContent:"center"}},o(Oi,null))))))}}))}})});var Ic,gh=g(()=>{"use strict";a();P();w();Ic=y({name:"CommandsAPI",authors:[d.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,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Ac,hh=g(()=>{"use strict";a();P();w();Ac=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[d.Nuckyz,d.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var Nc,yh=g(()=>{"use strict";a();P();w();Nc=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[d.TheSun,d.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 Cc,vh=g(()=>{"use strict";a();P();w();Cc=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[d.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var kc,Sh=g(()=>{"use strict";a();P();w();kc=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[d.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var Rc,bh=g(()=>{"use strict";a();P();w();Rc=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[d.Arjix,d.hunt,d.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{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,n,r,i,s,l)=>`${t}async ${n}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,n,r)=>`const vcMsg=${t},vcChan=${n};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var Lc,Th=g(()=>{"use strict";a();P();w();Lc=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[d.KingFish,d.Ven,d.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 n=e.match(/message:(.{1,3}),/)?.[1];if(!n)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${n},${t}),${e}`}}}]})});var Ec,xh=g(()=>{"use strict";a();P();w();Ec=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[d.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 Dc,wh=g(()=>{"use strict";a();P();w();Dc=y({name:"ServerListAPI",authors:[d.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 Oc,Mh=g(()=>{"use strict";a();P();w();Oc=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[d.Cyn,d.Ven,d.Nuckyz,d.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;"}}]})});var Bc={};Be(Bc,{_patchContextMenu:()=>dw,addContextMenuPatch:()=>ce,addGlobalContextMenuPatch:()=>uw,findGroupChildrenByChildId:()=>mt,globalPatches:()=>la,navPatches:()=>Bi,removeContextMenuPatch:()=>de,removeGlobalContextMenuPatch:()=>pw});function ce(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Bi.get(n);r||(r=new Set,Bi.set(n,r)),r.add(t)}}function uw(e){la.add(e)}function de(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Bi.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function pw(e){return la.delete(e)}function mt(e,t,n){for(let r of t){if(r==null)continue;if(Array.isArray(e)&&e.some(s=>r.props?.id===s)||r.props?.id===e)return n??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=mt(e,i,i);if(s!==null)return s}}return null}function dw(e){e.contextMenuApiArguments??=[];let t=Bi.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let n of t)try{let r=n(e.children,...e.contextMenuApiArguments);_c.has(e)||r?.()}catch(r){Ph.error(`Patch for ${e.navId} errored,`,r)}for(let n of la)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);_c.has(e)||r?.()}catch(r){Ph.error("Global patch errored,",r)}_c.add(e)}var Ph,Bi,la,_c,Pt=g(()=>{"use strict";a();Ze();Ph=new ie("ContextMenu"),Bi=new Map,la=new Set;_c=new WeakSet});function yn(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var zr=g(()=>{"use strict";a()});var mr,ca=g(()=>{"use strict";a();({localStorage:mr}=window)});var kn,jr=g(()=>{"use strict";a();kn=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 Ih=g(()=>{});var ua,Fc=g(()=>{"use strict";a();Ih();$();le();Re();A();ua=_.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:p,className:m,dismissOnClick:h}){let{timeout:v,position:T}=ct(["notifications.timeout","notifications.position"]).notifications,M=He([Ci],()=>Ci.isFocused()),[b,x]=J(!1),[N,k]=J(0),B=Nt(()=>Date.now(),[v,b,M]);De(()=>{if(b||!M||v===0||p)return void k(0);let Y=setInterval(()=>{let K=Date.now()-B;K>=v?c():k(K)},10);return()=>clearInterval(Y)},[v,b,M]);let U=N/v;return o("button",{className:oe("vc-notification-root",m),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:Y=>{Y.preventDefault(),Y.stopPropagation(),c()},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},o("div",{className:"vc-notification"},s&&o("img",{className:"vc-notification-icon",src:s,alt:""}),o("div",{className:"vc-notification-content"},o("div",{className:"vc-notification-header"},o("h2",{className:"vc-notification-title"},t),o("button",{className:"vc-notification-close-btn",onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),c()}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},o("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),o("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"})))),o("div",null,r??o("p",{className:"vc-notification-p"},n)))),u&&o("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!p&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-U)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var eo={};Be(eo,{clear:()=>hw,createStore:()=>Ah,del:()=>$c,delMany:()=>gw,entries:()=>Sw,get:()=>It,getMany:()=>fw,keys:()=>yw,promisifyRequest:()=>Bt,set:()=>Xt,setMany:()=>mw,update:()=>fr,values:()=>vw});function Bt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ah(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Bt(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Rn(){return Uc||(Uc=Ah("VencordData","VencordStore")),Uc}function It(e,t=Rn()){return t("readonly",n=>Bt(n.get(e)))}function Xt(e,t,n=Rn()){return n("readwrite",r=>(r.put(t,e),Bt(r.transaction)))}function mw(e,t=Rn()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),Bt(n.transaction)))}function fw(e,t=Rn()){return t("readonly",n=>Promise.all(e.map(r=>Bt(n.get(r)))))}function fr(e,t,n=Rn()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Bt(r.transaction))}catch(l){s(l)}}}))}function $c(e,t=Rn()){return t("readwrite",n=>(n.delete(e),Bt(n.transaction)))}function gw(e,t=Rn()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),Bt(n.transaction)))}function hw(e=Rn()){return e("readwrite",t=>(t.clear(),Bt(t.transaction)))}function Gc(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},Bt(e.transaction)}function yw(e=Rn()){return e("readonly",t=>{if(t.getAllKeys)return Bt(t.getAllKeys());let n=[];return Gc(t,r=>n.push(r.key)).then(()=>n)})}function vw(e=Rn()){return e("readonly",t=>{if(t.getAll)return Bt(t.getAll());let n=[];return Gc(t,r=>n.push(r.value)).then(()=>n)})}function Sw(e=Rn()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Bt(t.getAllKeys()),Bt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>Gc(r,i=>n.push([i.key,i.value])).then(()=>n))})}var Uc,Wn=g(()=>{"use strict";a();});var jc={};Be(jc,{classNameFactory:()=>Ue,classNameToSelector:()=>Ch,compileStyle:()=>zc,disableStyle:()=>Ft,enableStyle:()=>St,isStyleEnabled:()=>Hc,requireStyle:()=>Fi,setStyleClassNames:()=>Tw,styleMap:()=>Nh,toggleStyle:()=>bw});function Fi(e){let t=Nh.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function St(e){let t=Fi(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),zc(t),document.head.appendChild(t.dom),!0)}function Ft(e){let t=Fi(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Nh,bw,Hc,Tw,zc,Ch,Ue,Je=g(()=>{"use strict";a();Nh=window.VencordStyles??=new Map;bw=e=>Hc(e)?Ft(e):St(e),Hc=e=>Fi(e).dom?.isConnected??!1,Tw=(e,t,n=!0)=>{let r=Fi(e);r.classNames=t,n&&Hc(r.name)&&zc(r)},zc=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,n)=>{let r=e.classNames[n];return r?Ch(r):t})},Ch=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Ue=(e="")=>(...t)=>{let n=new Set;for(let r of t)r&&typeof r=="string"?n.add(r):Array.isArray(r)?r.forEach(i=>n.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&n.add(i));return Array.from(n,r=>e+r).join(" ")}});var kh,Rh=g(()=>{a();kh=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"")});async function Eh(e){if(e.noPersist)return;let t=E.notifications.logLimit;t!==0&&(await fr(pa,n=>{let r=n??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:p,...m}=e;return r.unshift({...m,timestamp:Date.now(),id:kh()}),r.length>t&&t!==200&&(r.length=t),r}),Ui.forEach(n=>n()))}async function xw(e){let t=await Lh(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await Xt(pa,t),Ui.forEach(r=>r()))}function ww(){let[e,t]=Br(s=>s+1,0);De(()=>(Ui.add(t),()=>void Ui.delete(t)),[]);let[n,r,i]=rt(Lh,{fallbackValue:[],deps:[e]});return[n,i]}function Mw({data:e}){let[t,n]=J(!1),r=O.useRef(null);return De(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:Wr("wrapper",{removing:t}),ref:r},o(ua,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>xw(e.timestamp),200))},richBody:o("div",{className:Wr("body")},e.body,o(Gn,{timestamp:mn(e.timestamp),className:Wr("timestamp")}))}))}function Pw({log:e,pending:t}){return!e.length&&!t?o("div",{className:Wr("container")},o("div",{className:Wr("empty")}),o(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:Wr("container")},e.map(n=>o(Mw,{data:n,key:n.id})))}function Iw({modalProps:e,close:t}){let[n,r]=ww();return o(ze,{...e,size:"large"},o(lt,null,o(re,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(an,{onClick:t})),o(et,null,o(Pw,{log:n,pending:r})),o(_t,null,o(R,{disabled:n.length===0,onClick:()=>{rn.show({title:"Are you sure?",body:`This will permanently remove ${n.length} notification${n.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await Xt(pa,[]),Ui.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function da(){let e=je(t=>o(Iw,{modalProps:t,close:()=>Vn(e)}))}var pa,Lh,Wr,Ui,ma=g(()=>{"use strict";a();Wn();$();Je();dt();Qe();A();Rh();Fc();pa="notification-log",Lh=async()=>await It(pa)??[],Wr=Ue("vc-notification-log-"),Ui=new Set});function Cw(){if(!Wc){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),Wc=sr.createRoot(e)}return Wc}function kw(e,t){let n=Cw();return new Promise(r=>{n.render(o(ua,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function Rw(){if(typeof Notification>"u")return!1;let{useNative:e}=E.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Dh(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ie(e){if(Eh(e),Rw()&&await Dh()){let{title:t,body:n,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:n,icon:r,image:i});c.onclick=s,c.onclose=l}else Aw.push(()=>kw(e,Nw++))}var Aw,Wc,Nw,Oh=g(()=>{"use strict";a();$();jr();A();Fc();ma();Aw=new kn,Nw=42});var qc={};Be(qc,{requestPermission:()=>Dh,showNotification:()=>Ie});var Ao=g(()=>{"use strict";a();Oh()});function jh(e,t){return Gw(e,t||{},0,0)}function Wh(e,t){return Fw(e,t)}var Ut,Jt,fa,ga,ha,Xc,Uh,$h,Gh,Jc,Hh,Lw,_h,Qc,to,Le,qn,Co,Le,Le,Le,Le,Hi,Le,Ew,Dw,Ow,_w,Kc,Ln,Yc,tu,zh,Bw,No,Fw,no,$i,Zc,Vc,Bh,Gi,eu,Fh,Uw,nu,$w,Gw,Hw,zw,qh=g(()=>{a();Ut=Uint8Array,Jt=Uint16Array,fa=Uint32Array,ga=new Ut([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]),ha=new Ut([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]),Xc=new Ut([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Uh=function(e,t){for(var n=new Jt(31),r=0;r<31;++r)n[r]=t+=1<>>1|(Le&21845)<<1,to=(to&52428)>>>2|(to&13107)<<2,to=(to&61680)>>>4|(to&3855)<<4,Qc[Le]=((to&65280)>>>8|(to&255)<<8)>>>1;qn=function(e,t,n){for(var r=e.length,i=0,s=new Jt(t);i>>u]=p}else for(c=new Jt(r),i=0;i>>15-e[i]);return c},Co=new Ut(288);for(Le=0;Le<144;++Le)Co[Le]=8;for(Le=144;Le<256;++Le)Co[Le]=9;for(Le=256;Le<280;++Le)Co[Le]=7;for(Le=280;Le<288;++Le)Co[Le]=8;Hi=new Ut(32);for(Le=0;Le<32;++Le)Hi[Le]=5;Ew=qn(Co,9,0),Dw=qn(Co,9,1),Ow=qn(Hi,5,0),_w=qn(Hi,5,1),Kc=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},Ln=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Yc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},tu=function(e){return(e+7)/8|0},zh=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e.BYTES_PER_ELEMENT==2?Jt:e.BYTES_PER_ELEMENT==4?fa:Ut)(n-t);return r.set(e.subarray(t,n)),r},Bw=["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"],No=function(e,t,n){var r=new Error(t||Bw[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,No),!n)throw r;return r},Fw=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new Ut(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Ut(r*3));var l=function(Vo){var So=t.length;if(Vo>So){var bo=new Ut(Math.max(So*2,Vo));bo.set(t),t=bo}},c=n.f||0,u=n.p||0,p=n.b||0,m=n.l,h=n.d,v=n.m,T=n.n,M=r*8;do{if(!m){c=Ln(e,u,1);var b=Ln(e,u+1,3);if(u+=3,b)if(b==1)m=Dw,h=_w,v=9,T=5;else if(b==2){var B=Ln(e,u,31)+257,U=Ln(e,u+10,15)+4,Y=B+Ln(e,u+5,31)+1;u+=14;for(var K=new Ut(Y),z=new Ut(19),L=0;L>>4;if(x<16)K[L++]=x;else{var Ae=0,me=0;for(x==16?(me=3+Ln(e,u,3),u+=2,Ae=K[L-1]):x==17?(me=3+Ln(e,u,7),u+=3):x==18&&(me=11+Ln(e,u,127),u+=7);me--;)K[L++]=Ae}}var ye=K.subarray(0,B),xe=K.subarray(B);v=Kc(ye),T=Kc(xe),m=qn(ye,v,1),h=qn(xe,T,1)}else No(1);else{var x=tu(u)+4,N=e[x-4]|e[x-3]<<8,k=x+N;if(k>r){s&&No(0);break}i&&l(p+N),t.set(e.subarray(x,k),p),n.b=p+=N,n.p=u=k*8,n.f=c;continue}if(u>M){s&&No(0);break}}i&&l(p+131072);for(var we=(1<>>4;if(u+=Ae&15,u>M){s&&No(0);break}if(Ae||No(2),gt<256)t[p++]=gt;else if(gt==256){pe=u,m=null;break}else{var Ye=gt-254;if(gt>264){var L=gt-257,Ne=ga[L];Ye=Ln(e,u,(1<>>4;qt||No(3),u+=qt&15;var xe=Lw[Tt];if(Tt>3){var Ne=ha[Tt];xe+=Yc(e,u)&(1<M){s&&No(0);break}i&&l(p+131072);for(var ht=p+Ye;p>>8},$i=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Zc=function(e,t){for(var n=[],r=0;rv&&(v=s[r].s);var T=new Jt(v+1),M=Vc(n[m-1],T,0);if(M>t){var r=0,b=0,x=M-t,N=1<t)b+=N-(1<>>=x;b>0;){var B=s[r].s;T[B]=0&&b;--r){var U=s[r].s;T[U]==t&&(--T[U],++b)}M=t}return[new Ut(T),M]},Vc=function(e,t,n){return e.s==-1?Math.max(Vc(e.l,t,n+1),Vc(e.r,t,n+1)):t[e.s]=n},Bh=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Jt(++t),r=0,i=e[0],s=1,l=function(u){n[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[n.subarray(0,r),t]},Gi=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!ne[Xc[ae-1]];--ae);var Ae=p+5<<3,me=Gi(i,Co)+Gi(s,Hi)+l,ye=Gi(i,v)+Gi(s,b)+l+14+3*ae+Gi(z,ne)+(2*z[16]+3*z[17]+7*z[18]);if(Ae<=me&&Ae<=ye)return eu(t,m,e.subarray(u,u+p));var xe,we,ve,pe;if(no(t,m,1+(ye15&&(no(t,m,qt[L]>>>5&127),m+=qt[L]>>>12)}}else xe=Ew,we=Co,ve=Ow,pe=Hi;for(var L=0;L255){var Tt=r[L]>>>18&31;$i(t,m,xe[Tt+257]),m+=we[Tt+257],Tt>7&&(no(t,m,r[L]>>>23&31),m+=ga[Tt]);var ht=r[L]&31;$i(t,m,ve[ht]),m+=pe[ht],ht>3&&($i(t,m,r[L]>>>5&8191),m+=ha[ht])}else $i(t,m,xe[r[L]]),m+=we[r[L]];return $i(t,m,xe[256]),m+we[256]},Uw=new fa([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nu=new Ut(0),$w=function(e,t,n,r,i,s){var l=e.length,c=new Ut(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),p=0;if(!t||l<8)for(var m=0;m<=l;m+=65535){var h=m+65535;h>=l&&(u[p>>3]=s),p=eu(u,p+1,e.subarray(m,h))}else{for(var v=Uw[t-1],T=v>>>13,M=v&8191,b=(1<7e3||ne>24576)&&xe>423){p=Fh(e,u,0,Y,K,z,X,ne,ae,m-ae,p),ne=L=X=0,ae=m;for(var we=0;we<286;++we)K[we]=0;for(var we=0;we<30;++we)z[we]=0}var ve=2,pe=0,gt=M,Ye=me-ye&32767;if(xe>2&&Ae==U(m-Ye))for(var Ne=Math.min(T,xe)-1,qt=Math.min(32767,m),Tt=Math.min(258,xe);Ye<=qt&&--gt&&me!=ye;){if(e[m+ve]==e[m+ve-Ye]){for(var ht=0;htve){if(ve=ht,pe=Ye,ht>Ne)break;for(var Vo=Math.min(Ye,ht-2),So=0,we=0;weSo&&(So=kt,ye=bo)}}}me=ye,ye=x[me],Ye+=me-ye+32768&32767}if(pe){Y[ne++]=268435456|Jc[ve]<<18|_h[pe];var tr=Jc[ve]&31,C=_h[pe]&31;X+=ga[tr]+ha[C],++K[257+tr],++z[C],be=m+ve,++L}else Y[ne++]=e[m],++K[e[m]]}}p=Fh(e,u,s,Y,K,z,X,ne,ae,m-ae,p),!s&&p&7&&(p=eu(u,p+1,nu))}return zh(c,0,r+tu(p)+i)},Gw=function(e,t,n,r,i){return $w(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,n,r,!i)};Hw=typeof TextDecoder<"u"&&new TextDecoder,zw=0;try{Hw.decode(nu,{stream:!0}),zw=1}catch{}});async function Kh(){let e=await It("Vencord_cloudSecret")??{},t=ou();return e[t]?(await fr("Vencord_cloudSecret",n=>(n??={},n[`${t}:${zi()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${zi()}`]}async function jw(e){await fr("Vencord_cloudSecret",t=>(t??={},t[`${ou()}:${zi()}`]=e,t))}async function ru(){await fr("Vencord_cloudSecret",e=>(e??={},delete e[`${ou()}:${zi()}`],e))}async function Yh(){if(await Kh()!==void 0){E.cloud.authenticated=!0;return}try{let r=await fetch(new URL("/v1/oauth/settings",ko()));var{clientId:e,redirectUri:t}=await r.json()}catch{Ie({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),E.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=pn("OAuth2AuthorizeModal");je(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){E.cloud.authenticated=!1;return}try{let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{secret:l}=await s.json();l?(ya.info("Authorized with secret"),await jw(l),Ie({title:"Cloud Integration",body:"Cloud integrations enabled!"}),E.cloud.authenticated=!0):(Ie({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),E.cloud.authenticated=!1)}catch(s){ya.error("Failed to authorize",s),Ie({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),E.cloud.authenticated=!1}}}))}async function qr(){let e=await Kh();return window.btoa(`${e}:${zi()}`)}var ya,ko,ou,zi,iu=g(()=>{"use strict";a();Wn();Ao();$();j();A();Ze();dt();ya=new ie("Cloud","#39b7e0"),ko=()=>new URL(E.cloud.url),ou=()=>ko().origin,zi=()=>{let e=W.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function ln(){window.VesktopNative.app.relaunch()}function va(e){window.VesktopNative.fileManager.showItemInFolder(e)}var Ro=g(()=>{"use strict";a()});function Sa(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 ba(e){return new Promise(t=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.accept=e,n.onchange=async()=>{t(n.files?.[0]??null)},document.body.appendChild(n),n.click(),setImmediate(()=>document.body.removeChild(n))})}var Ta=g(()=>{"use strict";a()});async function Zh(e){try{var t=JSON.parse(e)}catch(n){throw console.log(e),new Error("Failed to parse JSON: "+String(n))}if("settings"in t&&"quickCss"in t)Object.assign(Kn,t.settings),await VencordNative.settings.set(JSON.stringify(t.settings,null,4)),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Xh({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),n=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:n},null,e?void 0:4)}async function Jh(){let e="vencord-settings-backup.json",t=await Xh(),n=new TextEncoder().encode(t);Sa(new File([n],e,{type:"application/json"}))}async function Vh(e=!0){if(!1){if(t)try{}catch(n){}}else{let t=await ba("application/json");if(!t)return;let n=new FileReader;n.onload=async()=>{try{await Zh(n.result),e&&Ww()}catch(r){new ie("SettingsSync").error(r),e&&qw(r)}},n.readAsText(t)}}async function Kr(e){let t=await Xh({minify:!0});try{let n=await fetch(new URL("/v1/settings",ko()),{method:"PUT",headers:new Headers({Authorization:await qr(),"Content-Type":"application/octet-stream"}),body:jh(new TextEncoder().encode(t))});if(!n.ok){En.error(`Failed to sync up, API returned ${n.status}`),Ie({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${n.status}).`,color:"var(--red-360)"});return}let{written:r}=await n.json();Kn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(Kn,null,4)),En.info("Settings uploaded to cloud successfully"),e&&Ie({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){En.error("Failed to sync up",n),Ie({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function xa(e=!0,t=!1){try{let n=await fetch(new URL("/v1/settings",ko()),{method:"GET",headers:new Headers({Authorization:await qr(),Accept:"application/octet-stream","If-None-Match":E.cloud.settingsSyncVersion.toString()})});if(n.status===404)return En.info("No settings on the cloud"),e&&Ie({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return En.info("Settings up to date"),e&&Ie({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return En.error(`Failed to sync down, API returned ${n.status}`),Ie({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${n.status}).`,color:"var(--red-360)"}),!1;let r=Number(n.headers.get("etag")),i=E.cloud.settingsSyncVersion;if(!t&&r{"use strict";a();Ao();$();A();qh();iu();Ze();Ro();Ta();Qh=(e,t)=>ee.show({type:e,message:t,id:ee.genId()}),Ww=()=>Qh(ee.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),qw=e=>Qh(ee.Type.FAILURE,`Failed to import settings: ${String(e)}`);En=new ie("Cloud:Settings","#39b7e0")});var au={};Be(au,{PlainSettings:()=>Kn,Settings:()=>E,addSettingsListener:()=>Wi,definePluginSettings:()=>D,migratePluginSettings:()=>Yw,useSettings:()=>ct});function su(e,t=e,n=""){return ny[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in Oe)return r[i]=su({enabled:Oe[i].required??Oe[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let l=n.slice(8);if(l in Oe){let c=Oe[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(p=>p.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?su(s,t,`${n}${n&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${n}${n&&"."}${i}`;delete ny[l];for(let c of wa)(!c._paths||c._paths.includes(l))&&c(s,l);return Kn.cloud.settingsSyncVersion=Date.now(),mr.Vencord_settingsDirty=!0,Kw(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function ct(e){let[,t]=O.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return O.useEffect(()=>(wa.add(n),()=>void wa.delete(n)),[]),E}function Wi(e,t){e&&(t._paths??=[]).push(e),wa.add(t)}function Yw(e,...t){let{plugins:n}=Lo;if(!(e in n)){for(let r of t)if(r in n){oy.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(Lo,null,4));break}}}function D(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return E.plugins[n.pluginName]},use:r=>ct(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var oy,ty,Lo,Kw,wa,ny,Kn,E,$=g(()=>{"use strict";a();zr();ca();Ze();Re();ji();w();A();gr();oy=new ie("Settings"),ty={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:!1,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}};try{Lo=JSON.parse(VencordNative.settings.get()),dr(Lo,ty)}catch(e){Lo=dr({},ty),oy.error(`An error occurred while loading the settings. Corrupt settings file?
-`,e)}Kw=yn(async()=>{E.cloud.settingsSync&&E.cloud.authenticated&&(await Kr(),delete mr.Vencord_settingsDirty)},6e4),wa=new Set,ny={};Kn=Lo,E=su(Lo)});var ry=g(()=>{});var iy=g(()=>{});var cu={};Be(cu,{UpdateLogger:()=>hr,changes:()=>Eo,checkForUpdates:()=>Zr,getRepo:()=>lu,isNewer:()=>qi,isOutdated:()=>Do,maybePromptToUpdate:()=>Ki,update:()=>Xr,updateError:()=>Yr});async function Ma(e){let t=await e;if(t.ok)return t.value;throw Yr=t.error,t.error}async function Zr(){return Eo=await Ma(VencordNative.updater.getUpdates()),Eo.some(e=>e.hash===sn)?(qi=!0,Do=!1):Do=Eo.length>0}async function Xr(){if(!Do)return!0;let e=await Ma(VencordNative.updater.update());if(e&&(Do=!1,!await Ma(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Ki(e,t=!1){try{if(await Zr()){let r=confirm(e);if(r&&qi)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Xr(),ln())}}catch(n){hr.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var hr,Do,qi,Yr,Eo,lu,yr=g(()=>{"use strict";a();$r();Ze();Ro();hr=new ie("Updater","white"),Do=!1,qi=!1;lu=()=>Ma(VencordNative.updater.getRepo())});function sy(){Ki("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 ay=g(()=>{"use strict";a();yr()});function uu(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var pu=g(()=>{"use strict";a()});function vn({title:e,children:t}){return o(S.FormSection,null,o(re,{variant:"heading-lg/semibold",tag:"h2",className:q.bottom16},e),t)}function Sn(e,t){return _.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:Zw})}var Zw,Oo=g(()=>{"use strict";a();ry();iy();le();ay();at();pu();A();Zw=uu(sy)});var py={};Be(py,{default:()=>Vw});function Xw(){let[e,,t]=rt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=ct(),r=O.useMemo(()=>Math.random()>.5?cy:uy,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{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"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1,!1];return o(vn,{title:"Vencord Settings"},o(Qw,{image:r}),o(S.FormSection,{title:"Quick Actions"},o(wt,{className:ly("quick-actions-card")},o(O.Fragment,null,o(R,{onClick:ln,size:R.Sizes.SMALL},"Restart Client"),o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),o(R,{onClick:()=>va(e),size:R.Sizes.SMALL,disabled:t},"Open Settings Folder"),o(R,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:R.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(S.FormDivider,null),o(S.FormSection,{className:q.top16,title:"Settings",tag:"h5"},o(S.FormText,{className:q.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(pt,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(Jw,{settings:n.notifications}))}function Jw({settings:e}){return o(f,null,o(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(hn,{style:{padding:"1em"},className:q.bottom8},o(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(S.FormText,{className:q.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notifications"),o("li",null,o("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),o(Pn,{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:oa}),o(S.FormTitle,{tag:"h5",className:q.top16+" "+q.bottom8},"Notification Position"),o(Pn,{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:oa}),o(S.FormTitle,{tag:"h5",className:q.top16+" "+q.bottom8},"Notification Timeout"),o(S.FormText,{className:q.bottom16},"Set to 0s to never automatically time out"),o(ir,{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}),o(S.FormTitle,{tag:"h5",className:q.top16+" "+q.bottom8},"Notification Log Limit"),o(S.FormText,{className:q.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",o("code",null,"0")," to disable Notification log and ",o("code",null,"\u221E")," to never automatically remove old Notifications"),o(ir,{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}),o(R,{onClick:da,disabled:e.logLimit===0},"Open Notification Log"))}function Qw({image:e}){return o(wt,{className:ly("card","donate")},o("div",null,o(S.FormTitle,{tag:"h5"},"Support the Project"),o(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(Oi,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===uy?"pixelated":void 0,marginLeft:"auto",transform:e===cy?"rotate(10deg)":void 0}}))}var ly,cy,uy,Vw,dy=g(()=>{"use strict";a();ma();$();Je();Tc();Hr();at();Re();Ro();Qe();A();Oo();ly=Ue("vc-settings-"),cy="https://cdn.discordapp.com/emojis/1026533090627174460.png",uy="https://media.discordapp.net/stickers/1039992459209490513.png";Vw=Sn(Xw,"Vencord Settings")});var my=g(()=>{});var gu={};Be(gu,{currentNotice:()=>Yi,nextNotice:()=>fy,noticesQueue:()=>mu,popNotice:()=>fu,showNotice:()=>Zi});function fu(){du.dismiss()}function fy(){Yi=mu.shift(),Yi&&du.show(...Yi,"VencordNotice")}function Zi(e,t,n){mu.push(["GENERIC",e,t,n]),Yi||fy()}var du,mu,Yi,Pa=g(()=>{"use strict";a();j();ut(e=>e.show&&e.dismiss&&!e.suppressAll,e=>du=e);mu=[],Yi=null});var gy=g(()=>{});function cn({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:oe(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Jr({height:e=24,width:t=24,className:n}){return o(cn,{height:e,width:t,className:oe(n,"vc-link-icon"),viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("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"}),o("rect",{width:t,height:e})))}function hy(e){return o(cn,{...e,className:oe(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},o("g",{fill:"currentColor"},o("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),o("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 Xi(e){return o(cn,{...e,className:oe(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},o("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 vr(e){return o(cn,{...e,className:oe(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},o("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 Ia(e){return o(cn,{...e,className:oe(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},o("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 yy(e){return o(cn,{"aria-label":ot.Messages.GUILD_OWNER,...e,className:oe(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},o("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 vy(e){return o(cn,{...e,className:oe(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},o("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 Aa(e){return o(cn,{...e,className:oe(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},o("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 Na(e){return o(cn,{...e,className:oe(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},o("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 Sy(e){return o(cn,{...e,className:oe(e.className,"vc-microphone"),viewBox:"0 0 24 24"},o("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"}),o("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 by(e){return o(cn,{...e,className:oe(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},o("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 hu(e){return o(cn,{...e,className:oe(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},o("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 Ty(e){return o(cn,{...e,className:oe(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("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"}))}var $t=g(()=>{"use strict";a();gy();Re();A()});function xy(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function Ji(e,t,n=!1){let r=mn.duration(e,t),i=aM.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} ${xy(p,u===1,n)}`)}return c.length?c:`0 ${xy(t,!1,n)}`}function lM(e,t=n=>n){let{length:n}=e;if(n===0)return"";if(n===1)return t(e[0]);let r="";for(let i=0;i2?r+=", ":n-i>1&&(r+=" and ");return r}function Qi(e,t){let n="```";return`${n}${t||""}
+`;return(0,eval)(n)}var Ii,Ks,oc,mn,In,ce,Lr,Ys,st,rc,Hg,zg,j=g(()=>{"use strict";a();Zt();Je();qs();Ii=new ie("Webpack"),oc=new Promise(e=>Ks=e),ce={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),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},byStoreName:e=>t=>t.constructor?.displayName===e},Lr=new Map,Ys=new Set;st=Pn("find",function(t,{isIndirect:n=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in In){let s=In[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(typeof s.exports=="object"){if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,Number(i)]:l}for(let l in s.exports)if(l.length<=3){let c=s.exports[l];if(c&&t(c))return r?[c,Number(i)]:c}}}}return n||Xs("find",t),r?[null,null]:null});rc=Pn("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return st(t[0]);let r=t,i=0,s=Array(n);e:for(let l in In){let c=In[l];if(!!c?.exports)for(let u=0;u{"use strict";a();j();Js=Lt(e=>e.image&&e.modal&&!e.applicationIcon),vt=A("buttonWrapper","buttonContent")});function Qs(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=me(()=>n);return ut(t,i=>{n=i,Object.assign(r,i)}),r}function At(e,t){ut(ce.byStoreName(e),t)}var ac=g(()=>{"use strict";a();Oe();j()});var S,xt,E,pt,V,et,Vs,oe,An,ea,ir,Xt,Ai,qg,Nn,Kg,Dr,Or,_r,Ni,Br,Hn,Ww,Yg=g(()=>{"use strict";a();j();ac();S={},Br=Qs("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),Hn=Qs("Timestamp",ce.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),Ww=Qs("Flex",["Justify","Align","Wrap"]);ut(["FormItem","Button"],e=>{({useToken:Ni,Card:xt,Button:E,FormSwitch:pt,Tooltip:V,TextInput:et,TextArea:Vs,Text:oe,Select:An,SearchableSelect:ea,Slider:ir,ButtonLooks:Xt,TabBar:Nn,Popout:Ai,Dialog:qg,Paginator:Kg,ScrollerThin:Dr,Clickable:Or,Avatar:_r}=e),S=e})});var U,gn,Zg=g(()=>{"use strict";a();j();U={};ut(["MenuItem","MenuSliderControl"],e=>U=e);gn=fn('type:"CONTEXT_MENU_OPEN"',{open:ce.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:ce.byCode("CONTEXT_MENU_CLOSE")})});var O,J,_e,Nt,Jt,Fr,ta,sr,Xg=g(()=>{"use strict";a();j();sr=A("createPortal","render");ut("useState",e=>{O=e,{useEffect:_e,useState:J,useMemo:Nt,useRef:Jt,useReducer:Fr,useCallback:ta}=O})});var lc,Ur,Ci,Jg=g(()=>{"use strict";a();j();lc=A("MessageDisplayCompact"),Ur=A("ShowCurrentGame"),Ci=A("PreloadedUserSettingsActionCreators")});var cc,uc,Cn,pc,Re,$r,ar,zn,qw,we,W,rn,Ae,sn,Q,Le,nt,kn,ki,Ri,Kw,We,Qg=g(()=>{"use strict";a();Zt();j();ac();cc=A("connectStores"),uc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(uc||{}),pc=A("openPrivateChannel"),Kw=fn('"MaskedLinkStore"',{openUntrustedLink:ce.byCode(".apply(this,arguments)")}),We=Qe(()=>yt("useStateFromStores").useStateFromStores);At("DraftStore",e=>Ri=e);At("UserStore",e=>W=e);At("UserProfileStore",e=>rn=e);At("ChannelStore",e=>Q=e);At("SelectedChannelStore",e=>Ae=e);At("SelectedGuildStore",e=>sn=e);At("GuildStore",e=>we=e);At("GuildMemberStore",e=>Le=e);At("RelationshipStore",e=>nt=e);At("PermissionStore",e=>Re=e);At("PresenceStore",e=>zn=e);At("ReadStateStore",e=>ar=e);At("GuildChannelStore",e=>$r=e);At("MessageStore",e=>Cn=e);At("WindowStore",e=>ki=e);At("EmojiStore",e=>kn=e)});var Vg={};var eh=g(()=>{"use strict";a()});var th={};var nh=g(()=>{"use strict";a()});var oh={};var rh=g(()=>{"use strict";a()});function yn(e,t=ih.MESSAGE){ee.show({id:ee.genId(),message:e,type:t})}var B,Gr,wt,hn,lr,cr,Ct,jn,$e,an,ih,Yw,ee,Et,Li,ur,Qt,pr,no,Te,sh=g(()=>{"use strict";a();Zt();j();ut(["ComponentDispatch","ComponentDispatcher"],e=>Gr=e.ComponentDispatch);wt=A("getAPIBaseURL","get"),hn=A("parseTwoDigitYear"),lr=A("highlight"),cr=A("debounce","cloneDeep"),Ct=Lt(e=>e.Messages?.["en-US"]);ut(["fromTimestamp","extractTimestamp"],e=>jn=e);ih={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},Yw={TOP:0,BOTTOM:1},ee={Type:ih,Position:Yw,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Et=A("getUser","fetchCurrentUser"),Li=A("showUploadFileSizeExceededError","promptToUpload"),ur=A("fetchAssetIds","getAssetImage"),Qt=fn('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:ce.byCode(".copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),pr=fn("transitionToGuild - ",{transitionTo:ce.byCode("transitionTo -"),transitionToGuild:ce.byCode("transitionToGuild -"),goBack:ce.byCode("goBack()"),goForward:ce.byCode("goForward()")});ut(["dispatch","subscribe"],e=>{B=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ks()};e.subscribe("CONNECTION_OPEN",t)});ut("showToast",e=>{ee.show=e.showToast,ee.pop=e.popToast});ut(["show","close"],e=>an=e);ut("parseTopic",e=>$e=e);ut(["open","saveAccountChanges"],e=>no=e);Te=Qe(()=>st(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint").Permissions)});var dc={};Ue(dc,{Alerts:()=>an,ApplicationAssetUtils:()=>ur,Avatar:()=>_r,Button:()=>E,ButtonLooks:()=>Xt,ButtonWrapperClasses:()=>vt,Card:()=>xt,ChannelStore:()=>Q,Clickable:()=>Or,Clipboard:()=>Qt,ComponentDispatch:()=>Gr,ComponentTypes:()=>Vg,ContextMenu:()=>gn,Dialog:()=>qg,DraftStore:()=>Ri,DraftType:()=>uc,EmojiStore:()=>kn,Flex:()=>Ww,Flux:()=>cc,FluxDispatcher:()=>B,Forms:()=>S,GuildChannelStore:()=>$r,GuildMemberStore:()=>Le,GuildStore:()=>we,MaskedLink:()=>Br,MaskedLinkStore:()=>Kw,Menu:()=>U,MenuTypes:()=>th,MessageStore:()=>Cn,ModalImageClasses:()=>Js,NavigationRouter:()=>pr,Paginator:()=>Kg,Parser:()=>$e,PermissionStore:()=>Re,PermissionsBits:()=>Te,PoggerModeSettingsStore:()=>qw,Popout:()=>Ai,PresenceStore:()=>zn,PrivateChannelsStore:()=>pc,React:()=>O,ReactDOM:()=>sr,ReadStateStore:()=>ar,RelationshipStore:()=>nt,RestAPI:()=>wt,ScrollerThin:()=>Dr,SearchableSelect:()=>ea,Select:()=>An,SelectedChannelStore:()=>Ae,SelectedGuildStore:()=>sn,SettingsRouter:()=>no,Slider:()=>ir,SnowflakeUtils:()=>jn,StatusSettingsStores:()=>Ur,Switch:()=>pt,TabBar:()=>Nn,Text:()=>oe,TextAndImagesSettingsStores:()=>lc,TextArea:()=>Vs,TextInput:()=>et,Timestamp:()=>Hn,Toasts:()=>ee,Tooltip:()=>V,UploadHandler:()=>Li,UserProfileStore:()=>rn,UserSettingsActionCreators:()=>Ci,UserStore:()=>W,UserUtils:()=>Et,UtilTypes:()=>oh,WindowStore:()=>ki,hljs:()=>lr,i18n:()=>Ct,lodash:()=>cr,moment:()=>hn,showToast:()=>yn,useCallback:()=>ta,useEffect:()=>_e,useMemo:()=>Nt,useReducer:()=>Fr,useRef:()=>Jt,useState:()=>J,useStateFromStores:()=>We,useToken:()=>Ni});var I=g(()=>{"use strict";a();Wg();Yg();Zg();Xg();Jg();Qg();eh();nh();rh();sh()});var ln,Hr=g(()=>{a();ln="96126fa"});var na,ah=g(()=>{a();na="Vendicated/Vencord"});var Wn,Zw,mc,oa,p,zr,P=g(()=>{"use strict";a();Hr();ah();Wn="webpackChunkdiscord_app",Zw="Vencord.Webpack.Common.React",mc=`Vencord/${ln}${na?` (https://github.com/${na})`:""}`,oa="1026515880080842772",p=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},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},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},Strencher:{name:"Strencher",id:415849376598982656n},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},Lumap:{name:"lumap",id:635383782576357407n},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}}),zr=(()=>Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function dr(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},dr(e[n],r)):e[n]??=r}return e}function re(...e){return e.filter(Boolean).join(" ")}function No(e){return new Promise(t=>setTimeout(t,e))}function vn(e,t="Copied to clipboard!"){Qt.SUPPORTS_COPY?Qt.copy(e):t="Your browser does not support copying to clipboard",ee.show({message:t,id:ee.genId(),type:ee.Type.SUCCESS})}function Xw(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ei(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function fc(e){try{return new URL(e)}catch{return null}}function ra(e){return e}var gc,Jw,Di,Be=g(()=>{"use strict";a();I();P();gc=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};Jw=navigator.userAgent.includes("Mobi"),Di=e=>Object.hasOwn(zr,e)});function ot(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=J({value:n.fallbackValue,error:null,pending:!0});return _e(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),n.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),n.onError?.(l))}),()=>void(s=!1)},n.deps),[r.value,r.error,r.pending]}function qn(e){let t=Fr(n=>n+1,0);return e?t:t[1]}function me(e,t=5){let n=Ao(e,t);return r=>{let i=n()??lh;return o(i,{...r})}}function Oi({interval:e=1e3,deps:t=[]}){let[n,r]=J(0),i=Nt(()=>Date.now(),t);return _e(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),n}var lh,hc,Oe=g(()=>{"use strict";a();I();Zt();Be();lh=()=>null,hc=(e=!1)=>{let t=O.useRef(null),[n,r]=J(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(gc(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)))},n]}});var ch=g(()=>{});function Sn(e){return o("div",{...e,className:re(e.className,"vc-error-card")},e.children)}var jr=g(()=>{"use strict";a();ch();Be()});var Qw,uh,ph,yc,_,le=g(()=>{"use strict";a();Je();ct();Oe();I();jr();Qw="#e78284",uh=new ie("React ErrorBoundary",Qw),ph={},yc=me(()=>class extends O.PureComponent{state={error:ph,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let i=n.indexOf(`
+`);i!==-1&&(r=n.slice(0,i),n=n.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.({error:t,errorInfo:n,props:this.props.wrappedProps}),uh.error(`A component threw an Error
+`,t),uh.error("Component Stack",n.componentStack)}render(){if(this.state.error===ph)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(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 o(Sn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:Y.top8},this.state.stack)))}});yc.wrap=(e,t)=>n=>o(yc,{...t,wrappedProps:n},o(e,{...n}));_=yc});function ia(){return o("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},o("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 vc=g(()=>{"use strict";a()});function _i(e){return o(E,{...e,look:E.Looks.LINK,color:E.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(ia,null),"Donate")}var Sc=g(()=>{"use strict";a();I();vc()});function ye(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var Dt=g(()=>{"use strict";a()});function Bi(e,t){return sa.openModalLazy(e,t)}function Ke(e,t,n){return sa.openModal(e,t,n)}function oo(e,t){return sa.closeModal(e,t)}function Tc(){return sa.closeAllModals()}var Co,Rn,bc,qe,at,tt,Ft,cn,sa,dt=g(()=>{"use strict";a();j();Oe();Co=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Co||{}),Rn=fn(".closeWithCircleBackground",{ModalRoot:ce.byCode(".root"),ModalHeader:ce.byCode(".header"),ModalContent:ce.byCode(".content"),ModalFooter:ce.byCode(".footerSeparator"),ModalCloseButton:ce.byCode(".closeWithCircleBackground")}),bc=me(()=>yt("ImageModal").ImageModal),qe=me(()=>Rn.ModalRoot),at=me(()=>Rn.ModalHeader),tt=me(()=>Rn.ModalContent),Ft=me(()=>Rn.ModalFooter),cn=me(()=>Rn.ModalCloseButton),sa=A("openModalLazy")});function y(e){return e}var M=g(()=>{"use strict";a()});async function dh(e=!1){xc={};let t={};e&&(t.cache="no-cache");let r=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(`
+`);if(r.shift()!=="id,tooltip,image"){new ie("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(xc[s]??=[]).push({image:c,description:l})}}var Vw,e2,xc,wc,mh=g(()=>{"use strict";a();la();Sc();le();Dt();vc();P();Je();ct();Be();dt();M();I();Vw="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",e2={description:"Vencord Contributor",image:Vw,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Di(e.id),link:"https://github.com/Vendicated/Vencord"},xc={};wc=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.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 dh(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(e2),await dh()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return xc[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=Ke(r=>o(_,{noop:!0,onError:()=>{oo(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(Rn.ModalRoot,{...r},o(Rn.ModalHeader,null,o(ye,{style:{width:"100%",justifyContent:"center"}},o(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(ia,null),"Vencord Donor"))),o(Rn.ModalContent,null,o(ye,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(S.FormText,null,"This Badge is a special perk for Vencord Donors"),o(S.FormText,{className:Y.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Rn.ModalFooter,null,o(ye,{style:{width:"100%",justifyContent:"center"}},o(_i,null))))))}}))}})});var Mc,fh=g(()=>{"use strict";a();P();M();Mc=y({name:"CommandsAPI",authors:[p.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,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Pc,gh=g(()=>{"use strict";a();P();M();Pc=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var Ic,hh=g(()=>{"use strict";a();P();M();Ic=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.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 Ac,yh=g(()=>{"use strict";a();P();M();Ac=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var Nc,vh=g(()=>{"use strict";a();P();M();Nc=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var Cc,Sh=g(()=>{"use strict";a();P();M();Cc=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{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,n,r,i,s,l)=>`${t}async ${n}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,n,r)=>`const vcMsg=${t},vcChan=${n};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var kc,bh=g(()=>{"use strict";a();P();M();kc=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish,p.Ven,p.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 n=e.match(/message:(.{1,3}),/)?.[1];if(!n)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${n},${t}),${e}`}}}]})});var Rc,Th=g(()=>{"use strict";a();P();M();Rc=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.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 Lc,xh=g(()=>{"use strict";a();P();M();Lc=y({name:"ServerListAPI",authors:[p.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 Ec,wh=g(()=>{"use strict";a();P();M();Ec=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz,p.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;"}}]})});var Oc={};Ue(Oc,{_patchContextMenu:()=>o2,addContextMenuPatch:()=>ue,addGlobalContextMenuPatch:()=>t2,findGroupChildrenByChildId:()=>mt,globalPatches:()=>ca,navPatches:()=>Fi,removeContextMenuPatch:()=>fe,removeGlobalContextMenuPatch:()=>n2});function ue(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Fi.get(n);r||(r=new Set,Fi.set(n,r)),r.add(t)}}function t2(e){ca.add(e)}function fe(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Fi.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function n2(e){return ca.delete(e)}function mt(e,t,n){for(let r of t){if(r==null)continue;if(Array.isArray(e)&&e.some(s=>r.props?.id===s)||r.props?.id===e)return n??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=mt(e,i,i);if(s!==null)return s}}return null}function o2(e){e.contextMenuApiArguments??=[];let t=Fi.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let n of t)try{let r=n(e.children,...e.contextMenuApiArguments);Dc.has(e)||r?.()}catch(r){Mh.error(`Patch for ${e.navId} errored,`,r)}for(let n of ca)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);Dc.has(e)||r?.()}catch(r){Mh.error("Global patch errored,",r)}Dc.add(e)}var Mh,Fi,ca,Dc,Mt=g(()=>{"use strict";a();Je();Mh=new ie("ContextMenu"),Fi=new Map,ca=new Set;Dc=new WeakSet});function bn(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var Wr=g(()=>{"use strict";a()});var mr,ua=g(()=>{"use strict";a();({localStorage:mr}=window)});var Ln,qr=g(()=>{"use strict";a();Ln=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 Ph=g(()=>{});var pa,_c=g(()=>{"use strict";a();Ph();$();le();Be();I();pa=_.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:d,className:m,dismissOnClick:h}){let{timeout:v,position:T}=lt(["notifications.timeout","notifications.position"]).notifications,w=We([ki],()=>ki.isFocused()),[b,x]=J(!1),[N,k]=J(0),F=Nt(()=>Date.now(),[v,b,w]);_e(()=>{if(b||!w||v===0||d)return void k(0);let K=setInterval(()=>{let q=Date.now()-F;q>=v?c():k(q)},10);return()=>clearInterval(K)},[v,b,w]);let G=N/v;return o("button",{className:re("vc-notification-root",m),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:K=>{K.preventDefault(),K.stopPropagation(),c()},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},o("div",{className:"vc-notification"},s&&o("img",{className:"vc-notification-icon",src:s,alt:""}),o("div",{className:"vc-notification-content"},o("div",{className:"vc-notification-header"},o("h2",{className:"vc-notification-title"},t),o("button",{className:"vc-notification-close-btn",onClick:K=>{K.preventDefault(),K.stopPropagation(),c()}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},o("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),o("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"})))),o("div",null,r??o("p",{className:"vc-notification-p"},n)))),u&&o("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!d&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-G)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var ro={};Ue(ro,{clear:()=>a2,createStore:()=>Ih,del:()=>Fc,delMany:()=>s2,entries:()=>u2,get:()=>Pt,getMany:()=>i2,keys:()=>l2,promisifyRequest:()=>Ut,set:()=>Vt,setMany:()=>r2,update:()=>fr,values:()=>c2});function Ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ih(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Ut(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function En(){return Bc||(Bc=Ih("VencordData","VencordStore")),Bc}function Pt(e,t=En()){return t("readonly",n=>Ut(n.get(e)))}function Vt(e,t,n=En()){return n("readwrite",r=>(r.put(t,e),Ut(r.transaction)))}function r2(e,t=En()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),Ut(n.transaction)))}function i2(e,t=En()){return t("readonly",n=>Promise.all(e.map(r=>Ut(n.get(r)))))}function fr(e,t,n=En()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Ut(r.transaction))}catch(l){s(l)}}}))}function Fc(e,t=En()){return t("readwrite",n=>(n.delete(e),Ut(n.transaction)))}function s2(e,t=En()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),Ut(n.transaction)))}function a2(e=En()){return e("readwrite",t=>(t.clear(),Ut(t.transaction)))}function Uc(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},Ut(e.transaction)}function l2(e=En()){return e("readonly",t=>{if(t.getAllKeys)return Ut(t.getAllKeys());let n=[];return Uc(t,r=>n.push(r.key)).then(()=>n)})}function c2(e=En()){return e("readonly",t=>{if(t.getAll)return Ut(t.getAll());let n=[];return Uc(t,r=>n.push(r.value)).then(()=>n)})}function u2(e=En()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Ut(t.getAllKeys()),Ut(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>Uc(r,i=>n.push([i.key,i.value])).then(()=>n))})}var Bc,Kn=g(()=>{"use strict";a();});var Hc={};Ue(Hc,{classNameFactory:()=>Ge,classNameToSelector:()=>Nh,compileStyle:()=>Gc,disableStyle:()=>$t,enableStyle:()=>St,isStyleEnabled:()=>$c,requireStyle:()=>Ui,setStyleClassNames:()=>d2,styleMap:()=>Ah,toggleStyle:()=>p2});function Ui(e){let t=Ah.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function St(e){let t=Ui(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Gc(t),document.head.appendChild(t.dom),!0)}function $t(e){let t=Ui(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Ah,p2,$c,d2,Gc,Nh,Ge,Ve=g(()=>{"use strict";a();Ah=window.VencordStyles??=new Map;p2=e=>$c(e)?$t(e):St(e),$c=e=>Ui(e).dom?.isConnected??!1,d2=(e,t,n=!0)=>{let r=Ui(e);r.classNames=t,n&&$c(r.name)&&Gc(r)},Gc=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,n)=>{let r=e.classNames[n];return r?Nh(r):t})},Nh=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Ge=(e="")=>(...t)=>{let n=new Set;for(let r of t)r&&typeof r=="string"?n.add(r):Array.isArray(r)?r.forEach(i=>n.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&n.add(i));return Array.from(n,r=>e+r).join(" ")}});var Ch,kh=g(()=>{a();Ch=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"")});async function Lh(e){if(e.noPersist)return;let t=L.notifications.logLimit;t!==0&&(await fr(da,n=>{let r=n??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:d,...m}=e;return r.unshift({...m,timestamp:Date.now(),id:Ch()}),r.length>t&&t!==200&&(r.length=t),r}),$i.forEach(n=>n()))}async function m2(e){let t=await Rh(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await Vt(da,t),$i.forEach(r=>r()))}function f2(){let[e,t]=Fr(s=>s+1,0);_e(()=>($i.add(t),()=>void $i.delete(t)),[]);let[n,r,i]=ot(Rh,{fallbackValue:[],deps:[e]});return[n,i]}function g2({data:e}){let[t,n]=J(!1),r=O.useRef(null);return _e(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:Kr("wrapper",{removing:t}),ref:r},o(pa,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>m2(e.timestamp),200))},richBody:o("div",{className:Kr("body")},e.body,o(Hn,{timestamp:hn(e.timestamp),className:Kr("timestamp")}))}))}function h2({log:e,pending:t}){return!e.length&&!t?o("div",{className:Kr("container")},o("div",{className:Kr("empty")}),o(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:Kr("container")},e.map(n=>o(g2,{data:n,key:n.id})))}function y2({modalProps:e,close:t}){let[n,r]=f2();return o(qe,{...e,size:"large"},o(at,null,o(oe,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(cn,{onClick:t})),o(tt,null,o(h2,{log:n,pending:r})),o(Ft,null,o(E,{disabled:n.length===0,onClick:()=>{an.show({title:"Are you sure?",body:`This will permanently remove ${n.length} notification${n.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await Vt(da,[]),$i.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function ma(){let e=Ke(t=>o(y2,{modalProps:t,close:()=>oo(e)}))}var da,Rh,Kr,$i,fa=g(()=>{"use strict";a();Kn();$();Ve();dt();Oe();I();kh();_c();da="notification-log",Rh=async()=>await Pt(da)??[],Kr=Ge("vc-notification-log-"),$i=new Set});function b2(){if(!zc){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),zc=sr.createRoot(e)}return zc}function T2(e,t){let n=b2();return new Promise(r=>{n.render(o(pa,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function x2(){if(typeof Notification>"u")return!1;let{useNative:e}=L.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Eh(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ne(e){if(Lh(e),x2()&&await Eh()){let{title:t,body:n,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:n,icon:r,image:i});c.onclick=s,c.onclose=l}else v2.push(()=>T2(e,S2++))}var v2,zc,S2,Dh=g(()=>{"use strict";a();$();qr();I();_c();fa();v2=new Ln,S2=42});var jc={};Ue(jc,{requestPermission:()=>Eh,showNotification:()=>Ne});var ko=g(()=>{"use strict";a();Dh()});function zh(e,t){return L2(e,t||{},0,0)}function jh(e,t){return C2(e,t)}var Gt,en,ga,ha,ya,Yc,Fh,Uh,$h,Zc,Gh,w2,Oh,Xc,io,Ee,Yn,Lo,Ee,Ee,Ee,Ee,zi,Ee,M2,P2,I2,A2,Wc,Dn,qc,Vc,Hh,N2,Ro,C2,so,Gi,Kc,Jc,_h,Hi,Qc,Bh,k2,eu,R2,L2,E2,D2,Wh=g(()=>{a();Gt=Uint8Array,en=Uint16Array,ga=Uint32Array,ha=new Gt([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]),ya=new Gt([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]),Yc=new Gt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Fh=function(e,t){for(var n=new en(31),r=0;r<31;++r)n[r]=t+=1<>>1|(Ee&21845)<<1,io=(io&52428)>>>2|(io&13107)<<2,io=(io&61680)>>>4|(io&3855)<<4,Xc[Ee]=((io&65280)>>>8|(io&255)<<8)>>>1;Yn=function(e,t,n){for(var r=e.length,i=0,s=new en(t);i>>u]=d}else for(c=new en(r),i=0;i>>15-e[i]);return c},Lo=new Gt(288);for(Ee=0;Ee<144;++Ee)Lo[Ee]=8;for(Ee=144;Ee<256;++Ee)Lo[Ee]=9;for(Ee=256;Ee<280;++Ee)Lo[Ee]=7;for(Ee=280;Ee<288;++Ee)Lo[Ee]=8;zi=new Gt(32);for(Ee=0;Ee<32;++Ee)zi[Ee]=5;M2=Yn(Lo,9,0),P2=Yn(Lo,9,1),I2=Yn(zi,5,0),A2=Yn(zi,5,1),Wc=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},Dn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},qc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},Vc=function(e){return(e+7)/8|0},Hh=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e.BYTES_PER_ELEMENT==2?en:e.BYTES_PER_ELEMENT==4?ga:Gt)(n-t);return r.set(e.subarray(t,n)),r},N2=["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"],Ro=function(e,t,n){var r=new Error(t||N2[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Ro),!n)throw r;return r},C2=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new Gt(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Gt(r*3));var l=function(er){var Mo=t.length;if(er>Mo){var Po=new Gt(Math.max(Mo*2,er));Po.set(t),t=Po}},c=n.f||0,u=n.p||0,d=n.b||0,m=n.l,h=n.d,v=n.m,T=n.n,w=r*8;do{if(!m){c=Dn(e,u,1);var b=Dn(e,u+1,3);if(u+=3,b)if(b==1)m=P2,h=A2,v=9,T=5;else if(b==2){var F=Dn(e,u,31)+257,G=Dn(e,u+10,15)+4,K=F+Dn(e,u+5,31)+1;u+=14;for(var q=new Gt(K),z=new Gt(19),R=0;R>>4;if(x<16)q[R++]=x;else{var Ce=0,ge=0;for(x==16?(ge=3+Dn(e,u,3),u+=2,Ce=q[R-1]):x==17?(ge=3+Dn(e,u,7),u+=3):x==18&&(ge=11+Dn(e,u,127),u+=7);ge--;)q[R++]=Ce}}var Se=q.subarray(0,F),Me=q.subarray(F);v=Wc(Se),T=Wc(Me),m=Yn(Se,v,1),h=Yn(Me,T,1)}else Ro(1);else{var x=Vc(u)+4,N=e[x-4]|e[x-3]<<8,k=x+N;if(k>r){s&&Ro(0);break}i&&l(d+N),t.set(e.subarray(x,k),d),n.b=d+=N,n.p=u=k*8,n.f=c;continue}if(u>w){s&&Ro(0);break}}i&&l(d+131072);for(var Pe=(1<>>4;if(u+=Ce&15,u>w){s&&Ro(0);break}if(Ce||Ro(2),gt<256)t[d++]=gt;else if(gt==256){de=u,m=null;break}else{var Xe=gt-254;if(gt>264){var R=gt-257,ke=ha[R];Xe=Dn(e,u,(1<>>4;Yt||Ro(3),u+=Yt&15;var Me=w2[bt];if(bt>3){var ke=ya[bt];Me+=qc(e,u)&(1<w){s&&Ro(0);break}i&&l(d+131072);for(var ht=d+Xe;d>>8},Gi=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Kc=function(e,t){for(var n=[],r=0;rv&&(v=s[r].s);var T=new en(v+1),w=Jc(n[m-1],T,0);if(w>t){var r=0,b=0,x=w-t,N=1<t)b+=N-(1<>>=x;b>0;){var F=s[r].s;T[F]=0&&b;--r){var G=s[r].s;T[G]==t&&(--T[G],++b)}w=t}return[new Gt(T),w]},Jc=function(e,t,n){return e.s==-1?Math.max(Jc(e.l,t,n+1),Jc(e.r,t,n+1)):t[e.s]=n},_h=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new en(++t),r=0,i=e[0],s=1,l=function(u){n[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[n.subarray(0,r),t]},Hi=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!ne[Yc[ae-1]];--ae);var Ce=d+5<<3,ge=Hi(i,Lo)+Hi(s,zi)+l,Se=Hi(i,v)+Hi(s,b)+l+14+3*ae+Hi(z,ne)+(2*z[16]+3*z[17]+7*z[18]);if(Ce<=ge&&Ce<=Se)return Qc(t,m,e.subarray(u,u+d));var Me,Pe,be,de;if(so(t,m,1+(Se15&&(so(t,m,Yt[R]>>>5&127),m+=Yt[R]>>>12)}}else Me=M2,Pe=Lo,be=I2,de=zi;for(var R=0;R255){var bt=r[R]>>>18&31;Gi(t,m,Me[bt+257]),m+=Pe[bt+257],bt>7&&(so(t,m,r[R]>>>23&31),m+=ha[bt]);var ht=r[R]&31;Gi(t,m,be[ht]),m+=de[ht],ht>3&&(Gi(t,m,r[R]>>>5&8191),m+=ya[ht])}else Gi(t,m,Me[r[R]]),m+=Pe[r[R]];return Gi(t,m,Me[256]),m+Pe[256]},k2=new ga([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),eu=new Gt(0),R2=function(e,t,n,r,i,s){var l=e.length,c=new Gt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),d=0;if(!t||l<8)for(var m=0;m<=l;m+=65535){var h=m+65535;h>=l&&(u[d>>3]=s),d=Qc(u,d+1,e.subarray(m,h))}else{for(var v=k2[t-1],T=v>>>13,w=v&8191,b=(1<7e3||ne>24576)&&Me>423){d=Bh(e,u,0,K,q,z,X,ne,ae,m-ae,d),ne=R=X=0,ae=m;for(var Pe=0;Pe<286;++Pe)q[Pe]=0;for(var Pe=0;Pe<30;++Pe)z[Pe]=0}var be=2,de=0,gt=w,Xe=ge-Se&32767;if(Me>2&&Ce==G(m-Xe))for(var ke=Math.min(T,Me)-1,Yt=Math.min(32767,m),bt=Math.min(258,Me);Xe<=Yt&&--gt&&ge!=Se;){if(e[m+be]==e[m+be-Xe]){for(var ht=0;htbe){if(be=ht,de=Xe,ht>ke)break;for(var er=Math.min(Xe,ht-2),Mo=0,Pe=0;PeMo&&(Mo=Rt,Se=Po)}}}ge=Se,Se=x[ge],Xe+=ge-Se+32768&32767}if(de){K[ne++]=268435456|Zc[be]<<18|Oh[de];var nr=Zc[be]&31,C=Oh[de]&31;X+=ha[nr]+ya[C],++q[257+nr],++z[C],xe=m+be,++R}else K[ne++]=e[m],++q[e[m]]}}d=Bh(e,u,s,K,q,z,X,ne,ae,m-ae,d),!s&&d&7&&(d=Qc(u,d+1,eu))}return Hh(c,0,r+Vc(d)+i)},L2=function(e,t,n,r,i){return R2(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,n,r,!i)};E2=typeof TextDecoder<"u"&&new TextDecoder,D2=0;try{E2.decode(eu,{stream:!0}),D2=1}catch{}});async function qh(){let e=await Pt("Vencord_cloudSecret")??{},t=tu();return e[t]?(await fr("Vencord_cloudSecret",n=>(n??={},n[`${t}:${ji()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${ji()}`]}async function O2(e){await fr("Vencord_cloudSecret",t=>(t??={},t[`${tu()}:${ji()}`]=e,t))}async function nu(){await fr("Vencord_cloudSecret",e=>(e??={},delete e[`${tu()}:${ji()}`],e))}async function Kh(){if(await qh()!==void 0){L.cloud.authenticated=!0;return}try{let r=await fetch(new URL("/v1/oauth/settings",Eo()));var{clientId:e,redirectUri:t}=await r.json()}catch{Ne({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),L.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=yt("OAuth2AuthorizeModal");Ke(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){L.cloud.authenticated=!1;return}try{let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{secret:l}=await s.json();l?(va.info("Authorized with secret"),await O2(l),Ne({title:"Cloud Integration",body:"Cloud integrations enabled!"}),L.cloud.authenticated=!0):(Ne({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),L.cloud.authenticated=!1)}catch(s){va.error("Failed to authorize",s),Ne({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),L.cloud.authenticated=!1}}}))}async function Yr(){let e=await qh();return window.btoa(`${e}:${ji()}`)}var va,Eo,tu,ji,ou=g(()=>{"use strict";a();Kn();ko();$();j();I();Je();dt();va=new ie("Cloud","#39b7e0"),Eo=()=>new URL(L.cloud.url),tu=()=>Eo().origin,ji=()=>{let e=W.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function un(){window.VesktopNative.app.relaunch()}function Sa(e){window.VesktopNative.fileManager.showItemInFolder(e)}var Do=g(()=>{"use strict";a()});function ba(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 Ta(e){return new Promise(t=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.accept=e,n.onchange=async()=>{t(n.files?.[0]??null)},document.body.appendChild(n),n.click(),setImmediate(()=>document.body.removeChild(n))})}var xa=g(()=>{"use strict";a()});async function Yh(e){try{var t=JSON.parse(e)}catch(n){throw console.log(e),new Error("Failed to parse JSON: "+String(n))}if("settings"in t&&"quickCss"in t)Object.assign(Zn,t.settings),await VencordNative.settings.set(JSON.stringify(t.settings,null,4)),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Zh({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),n=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:n},null,e?void 0:4)}async function Xh(){let e="vencord-settings-backup.json",t=await Zh(),n=new TextEncoder().encode(t);ba(new File([n],e,{type:"application/json"}))}async function Qh(e=!0){if(!1){if(t)try{}catch(n){}}else{let t=await Ta("application/json");if(!t)return;let n=new FileReader;n.onload=async()=>{try{await Yh(n.result),e&&_2()}catch(r){new ie("SettingsSync").error(r),e&&B2(r)}},n.readAsText(t)}}async function Zr(e){let t=await Zh({minify:!0});try{let n=await fetch(new URL("/v1/settings",Eo()),{method:"PUT",headers:new Headers({Authorization:await Yr(),"Content-Type":"application/octet-stream"}),body:zh(new TextEncoder().encode(t))});if(!n.ok){On.error(`Failed to sync up, API returned ${n.status}`),Ne({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${n.status}).`,color:"var(--red-360)"});return}let{written:r}=await n.json();Zn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(Zn,null,4)),On.info("Settings uploaded to cloud successfully"),e&&Ne({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){On.error("Failed to sync up",n),Ne({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function wa(e=!0,t=!1){try{let n=await fetch(new URL("/v1/settings",Eo()),{method:"GET",headers:new Headers({Authorization:await Yr(),Accept:"application/octet-stream","If-None-Match":L.cloud.settingsSyncVersion.toString()})});if(n.status===404)return On.info("No settings on the cloud"),e&&Ne({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return On.info("Settings up to date"),e&&Ne({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return On.error(`Failed to sync down, API returned ${n.status}`),Ne({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${n.status}).`,color:"var(--red-360)"}),!1;let r=Number(n.headers.get("etag")),i=L.cloud.settingsSyncVersion;if(!t&&r{"use strict";a();ko();$();I();Wh();ou();Je();Do();xa();Jh=(e,t)=>ee.show({type:e,message:t,id:ee.genId()}),_2=()=>Jh(ee.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),B2=e=>Jh(ee.Type.FAILURE,`Failed to import settings: ${String(e)}`);On=new ie("Cloud:Settings","#39b7e0")});var iu={};Ue(iu,{PlainSettings:()=>Zn,Settings:()=>L,addSettingsListener:()=>qi,definePluginSettings:()=>D,migratePluginSettings:()=>U2,useSettings:()=>lt});function ru(e,t=e,n=""){return ty[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in He)return r[i]=ru({enabled:He[i].required??He[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let l=n.slice(8);if(l in He){let c=He[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(d=>d.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?ru(s,t,`${n}${n&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${n}${n&&"."}${i}`;delete ty[l];for(let c of Ma)(!c._paths||c._paths.includes(l))&&c(s,l);return Zn.cloud.settingsSyncVersion=Date.now(),mr.Vencord_settingsDirty=!0,F2(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function lt(e){let[,t]=O.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return O.useEffect(()=>(Ma.add(n),()=>void Ma.delete(n)),[]),L}function qi(e,t){e&&(t._paths??=[]).push(e),Ma.add(t)}function U2(e,...t){let{plugins:n}=Oo;if(!(e in n)){for(let r of t)if(r in n){ny.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(Oo,null,4));break}}}function D(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return L.plugins[n.pluginName]},use:r=>lt(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var ny,ey,Oo,F2,Ma,ty,Zn,L,$=g(()=>{"use strict";a();Wr();ua();Je();Be();Wi();M();I();gr();ny=new ie("Settings"),ey={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:!1,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}};try{Oo=JSON.parse(VencordNative.settings.get()),dr(Oo,ey)}catch(e){Oo=dr({},ey),ny.error(`An error occurred while loading the settings. Corrupt settings file?
+`,e)}F2=bn(async()=>{L.cloud.settingsSync&&L.cloud.authenticated&&(await Zr(),delete mr.Vencord_settingsDirty)},6e4),Ma=new Set,ty={};Zn=Oo,L=ru(Oo)});var oy=g(()=>{});var ry=g(()=>{});var au={};Ue(au,{UpdateLogger:()=>hr,changes:()=>_o,checkForUpdates:()=>Jr,getRepo:()=>su,isNewer:()=>Ki,isOutdated:()=>Bo,maybePromptToUpdate:()=>Yi,update:()=>Qr,updateError:()=>Xr});async function Pa(e){let t=await e;if(t.ok)return t.value;throw Xr=t.error,t.error}async function Jr(){return _o=await Pa(VencordNative.updater.getUpdates()),_o.some(e=>e.hash===ln)?(Ki=!0,Bo=!1):Bo=_o.length>0}async function Qr(){if(!Bo)return!0;let e=await Pa(VencordNative.updater.update());if(e&&(Bo=!1,!await Pa(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Yi(e,t=!1){try{if(await Jr()){let r=confirm(e);if(r&&Ki)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Qr(),un())}}catch(n){hr.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var hr,Bo,Ki,Xr,_o,su,yr=g(()=>{"use strict";a();Hr();Je();Do();hr=new ie("Updater","white"),Bo=!1,Ki=!1;su=()=>Pa(VencordNative.updater.getRepo())});function iy(){Yi("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 sy=g(()=>{"use strict";a();yr()});function lu(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var cu=g(()=>{"use strict";a()});function Tn({title:e,children:t}){return o(S.FormSection,null,o(oe,{variant:"heading-lg/semibold",tag:"h2",className:Y.bottom16},e),t)}function xn(e,t){return _.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:$2})}var $2,Fo=g(()=>{"use strict";a();oy();ry();le();sy();ct();cu();I();$2=lu(iy)});var uy={};Ue(uy,{default:()=>j2});function G2(){let[e,,t]=ot(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=lt(),r=O.useMemo(()=>Math.random()>.5?ly:cy,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{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"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1,!1];return o(Tn,{title:"Vencord Settings"},o(z2,{image:r}),o(S.FormSection,{title:"Quick Actions"},o(xt,{className:ay("quick-actions-card")},o(O.Fragment,null,o(E,{onClick:un,size:E.Sizes.SMALL},"Restart Client"),o(E,{onClick:()=>VencordNative.quickCss.openEditor(),size:E.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),o(E,{onClick:()=>Sa(e),size:E.Sizes.SMALL,disabled:t},"Open Settings Folder"),o(E,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:E.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(S.FormDivider,null),o(S.FormSection,{className:Y.top16,title:"Settings",tag:"h5"},o(S.FormText,{className:Y.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(pt,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(H2,{settings:n.notifications}))}function H2({settings:e}){return o(f,null,o(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(Sn,{style:{padding:"1em"},className:Y.bottom8},o(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(S.FormText,{className:Y.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notifications"),o("li",null,o("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),o(An,{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:ra}),o(S.FormTitle,{tag:"h5",className:Y.top16+" "+Y.bottom8},"Notification Position"),o(An,{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:ra}),o(S.FormTitle,{tag:"h5",className:Y.top16+" "+Y.bottom8},"Notification Timeout"),o(S.FormText,{className:Y.bottom16},"Set to 0s to never automatically time out"),o(ir,{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}),o(S.FormTitle,{tag:"h5",className:Y.top16+" "+Y.bottom8},"Notification Log Limit"),o(S.FormText,{className:Y.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",o("code",null,"0")," to disable Notification log and ",o("code",null,"\u221E")," to never automatically remove old Notifications"),o(ir,{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}),o(E,{onClick:ma,disabled:e.logLimit===0},"Open Notification Log"))}function z2({image:e}){return o(xt,{className:ay("card","donate")},o("div",null,o(S.FormTitle,{tag:"h5"},"Support the Project"),o(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(_i,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===cy?"pixelated":void 0,marginLeft:"auto",transform:e===ly?"rotate(10deg)":void 0}}))}var ay,ly,cy,j2,py=g(()=>{"use strict";a();fa();$();Ve();Sc();jr();ct();Be();Do();Oe();I();Fo();ay=Ge("vc-settings-"),ly="https://cdn.discordapp.com/emojis/1026533090627174460.png",cy="https://media.discordapp.net/stickers/1039992459209490513.png";j2=xn(G2,"Vencord Settings")});var dy=g(()=>{});var mu={};Ue(mu,{currentNotice:()=>Zi,nextNotice:()=>my,noticesQueue:()=>pu,popNotice:()=>du,showNotice:()=>Xi});function du(){uu.dismiss()}function my(){Zi=pu.shift(),Zi&&uu.show(...Zi,"VencordNotice")}function Xi(e,t,n){pu.push(["GENERIC",e,t,n]),Zi||my()}var uu,pu,Zi,Ia=g(()=>{"use strict";a();j();ut(e=>e.show&&e.dismiss&&!e.suppressAll,e=>uu=e);pu=[],Zi=null});var fy=g(()=>{});function pn({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:re(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Vr({height:e=24,width:t=24,className:n}){return o(pn,{height:e,width:t,className:re(n,"vc-link-icon"),viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("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"}),o("rect",{width:t,height:e})))}function gy(e){return o(pn,{...e,className:re(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},o("g",{fill:"currentColor"},o("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),o("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 Ji(e){return o(pn,{...e,className:re(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},o("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 vr(e){return o(pn,{...e,className:re(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},o("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 Aa(e){return o(pn,{...e,className:re(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},o("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 hy(e){return o(pn,{"aria-label":Ct.Messages.GUILD_OWNER,...e,className:re(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},o("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 yy(e){return o(pn,{...e,className:re(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},o("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 Na(e){return o(pn,{...e,className:re(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},o("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 Ca(e){return o(pn,{...e,className:re(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},o("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 vy(e){return o(pn,{...e,className:re(e.className,"vc-microphone"),viewBox:"0 0 24 24"},o("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"}),o("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 Sy(e){return o(pn,{...e,className:re(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},o("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 fu(e){return o(pn,{...e,className:re(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},o("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 by(e){return o(pn,{...e,className:re(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("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"}))}var Ht=g(()=>{"use strict";a();fy();Be();I()});function Ty(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function Qi(e,t,n=!1){let r=hn.duration(e,t),i=Q2.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;uu==="days");if(l!==-1){let u=i[l],d=u.amount%7;d===0?i.splice(l,1):u.amount=d}let c="";for(;i.length;){let{amount:u,unit:d}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${Ty(d,u===1,n)}`)}return c.length?c:`0 ${Ty(t,!1,n)}`}function V2(e,t=n=>n){let{length:n}=e;if(n===0)return"";if(n===1)return t(e[0]);let r="";for(let i=0;i2?r+=", ":n-i>1&&(r+=" and ");return r}function Vi(e,t){let n="```";return`${n}${t||""}
${e.replaceAll("```","\\`\\`\\`")}
-${n}`}var yu,eM,tM,vu,nM,oM,rM,iM,sM,oo,aM,ro=g(()=>{"use strict";a();A();yu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),eM=e=>e.toLowerCase().split("_"),tM=e=>e.toLowerCase().split("-"),vu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),nM=e=>e.toLowerCase().split(" "),oM=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),rM=e=>e.join("_").toUpperCase(),iM=e=>e.join("-").toLowerCase(),sM=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),oo=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),aM=["years","months","weeks","days","hours","minutes","seconds"]});function Vi(){return`-${zn.fromTimestamp(Date.now())}`}function ue(e,t){let n=cM.createBotMessage({channelId:e,content:"",embeds:[]});return uM.receiveMessage(e,dr(t,n)),t}function it(e,t,n){return e.find(r=>r.name===t)?.value||n}var cM,uM,Su=g(()=>{"use strict";a();Re();j();A();cM=I("createBotMessage"),uM=I("receiveMessage")});var io,Dn,bu,Ca=g(()=>{"use strict";a();io=(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))(io||{}),Dn=(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))(Dn||{}),bu=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(bu||{})});var wu={};Be(wu,{ApplicationCommandInputType:()=>Dn,ApplicationCommandOptionType:()=>io,ApplicationCommandType:()=>bu,BUILT_IN:()=>_o,OptionalMessageOption:()=>Bo,RequiredMessageOption:()=>es,_handleCommand:()=>dM,_init:()=>pM,commands:()=>Tu,findOption:()=>it,generateId:()=>Vi,prepareOption:()=>xu,registerCommand:()=>Qr,sendBotMessage:()=>ue,unregisterCommand:()=>ts});function xu(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===wy?r[n]=Bo:t===My&&(r[n]=es),t.choices?.forEach(i=>i.displayName||=i.name),xu(r[n])}),e}function mM(e,t){e.options?.forEach(n=>{if(n.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...n,type:1,name:`${e.name} ${n.name}`,id:`${n.name}-${e.id}`,displayName:`${e.name} ${n.name}`,subCommandPath:[{name:n.name,type:n.type,displayName:n.name}],rootCommand:e};Qr(r,t)})}function Qr(e,t){if(!_o){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(_o.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${_o.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,xu(e),e.options?.[0]?.type===1){mM(e,t);return}Tu[e.name]=e,_o.push(e)}function ts(e){let t=_o.findIndex(n=>n.name===e);return t===-1?!1:(_o.splice(t,1),delete Tu[e],!0)}var _o,Tu,wy,My,Bo,es,pM,dM,Qt=g(()=>{"use strict";a();ro();Su();Ca();Su();Ca();Tu={},wy=Symbol("OptionalMessageOption"),My=Symbol("RequiredMessageOption"),Bo=wy,es=My,pM=function(e){try{_o=e,Bo=e.find(t=>t.name==="shrug").options[0],es=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},dM=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);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),ue(n.channel.id,{content:`${s}:
-${Qi(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function Py({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Mu=g(()=>{"use strict";a()});function Iy({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(l??!1),[p,m]=O.useState(null);O.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),i(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(pt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},oo(yu(r))),p&&o(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Ay=g(()=>{"use strict";a();ro();A()});function Ny({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var Cy=g(()=>{"use strict";a()});function Pu({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=O.useState(`${t[r]??e.default??0}`),[p,m]=O.useState(null);O.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(n,v)??!0;m(null),typeof T=="string"?m(T):T||m("Invalid input provided."),e.type===1&&BigInt(v)>=fM?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(Ve,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),p&&o(S.FormText,{style:{color:"var(--text-danger)"}},p))}var fM,ky=g(()=>{"use strict";a();w();A();fM=BigInt(Number.MAX_SAFE_INTEGER)});function Ry({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=O.useState(l??null),[p,m]=O.useState(null);O.useEffect(()=>{i(p!==null)},[p]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),r(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(Pn,{isDisabled:e.disabled?.call(n)??!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&&o(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Ly=g(()=>{"use strict";a();A()});function Fo(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function Ey({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(null);O.useEffect(()=>{s(c!==null)},[c]);function p(m){let h=e.isValid?.call(n,m)??!0;typeof h=="string"?u(h):h?(u(null),i(m)):u("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(ir,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:p,onValueRender:m=>String(m.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Iu=g(()=>{"use strict";a();A()});function Dy({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[l,c]=O.useState(t[r]??e.default??null),[u,p]=O.useState(null);O.useEffect(()=>{s(u!==null)},[u]);function m(h){let v=e.isValid?.call(n,h)??!0;p(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(Ve,{type:"text",value:l,onChange:m,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),u&&o(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Oy=g(()=>{"use strict";a();A()});var ka=g(()=>{"use strict";a();Mu();Ay();Cy();ky();Ly();Iu();Oy()});var _y=g(()=>{});function Vr(){return Q.getChannel(Pe.getChannelId())}function Au(){return Te.getGuild(Vr()?.guild_id)}function yM(e){mc.openPrivateChannel(e)}function Uo(){return Ni.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function so(e){wo.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function vM(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return gM.sendMessage(e,i,n,r)}function On(e,t){return je(n=>o(ze,{...n,className:Xs.modal,size:"dynamic"},o(xc,{className:Xs.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(_r,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function _n(e){if(!await Rt.getUser(e))throw new Error("No such user: "+e);let n=on.getGuildId();hM.openUserProfileModal({userId:e,guildId:n,channelId:Pe.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Nu(e,t){let n=nn.getUserProfile(e);if(n)return n;F.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await Mt.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return F.dispatch({type:"USER_UPDATE",user:r.user}),await F.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&F.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),nn.getUserProfile(e)}function ao(e){return e.discriminator==="0"?e.username:e.tag}var gM,hM,ns,bt=g(()=>{"use strict";a();j();A();dt();gM=I("editMessage","sendMessage"),hM=I("openUserProfileModal","closeUserProfileModal");ns=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(ns||{})});function By(e){je(t=>o(ze,{...t},o(_,null,o(et,{className:ei("root")},o(PM,{user:e})))))}function wM(){let e=Uo()===2?TM:xM;return o("img",{src:e,alt:"GitHub"})}function MM(){let e=Uo()===2?bM:SM;return o("img",{src:e,alt:"Website"})}function PM({user:e}){ct();let t=He([nn],()=>nn.getUserProfile(e.id));De(()=>{!t&&!e.bot&&e.id&&Nu(e.id)},[e.id]);let n=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=Nt(()=>{let s=Object.values(Oe);return(Gr[e.id]?s.filter(c=>c.authors.includes(Gr[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 o(f,null,o("div",{className:ei("header")},o("img",{className:ei("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),o(S.FormTitle,{tag:"h2",className:ei("name")},e.username),o("div",{className:ei("links")},r&&o(_r,{href:"https://"+r},o(MM,null)),n&&o(_r,{href:`https://github.com/${n}`},o(wM,null)))),o("div",{className:ei("plugins")},i.map(s=>o(Ra,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>fn("Restart to apply changes!")}))))}var SM,bM,TM,xM,ei,Fy=g(()=>{"use strict";a();_y();$();Je();le();P();bt();dt();A();gr();Cu();SM="/assets/e1e96d89e192de1997f73730db26e94f.svg",bM="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",TM="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",xM="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",ei=Ue("vc-author-modal-")});function Uy(e){let t=new AM({username:e.username,id:e.id??Vi(),avatar:e.avatar,bot:!0});return F.dispatch({type:"USER_UPDATE",user:t}),t}function Ru({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=O.useState([]),l=ct().plugins[e.name],[c,u]=O.useState({}),[p,m]=O.useState({}),[h,v]=O.useState(null),T=()=>Object.values(p).every(k=>!k),M=Boolean(l&&e.options&&!Li(e.options));O.useEffect(()=>{(async()=>{for(let k of e.authors.slice(0,6)){let B=k.id?await Rt.getUser(`${k.id}`).catch(()=>Uy({username:k.name})):Uy({username:k.name});s(U=>[...U,B])}})()},[]);async function b(){if(!e.options){n();return}if(e.beforeSave){let B=await Promise.resolve(e.beforeSave(c));if(B!==!0){v(B);return}}let k=!1;for(let[B,U]of Object.entries(c)){let Y=e.options[B];l[B]=U,Y?.onChange?.(U),Y?.restartNeeded&&(k=!0)}k&&t(),n()}function x(){if(!M||!e.options)return o(S.FormText,null,"There are no settings for this plugin.");{let k=Object.entries(e.options).map(([B,U])=>{if(U.hidden)return null;function Y(L){u(X=>({...X,[B]:L}))}function K(L){m(X=>({...X,[B]:L}))}let z=NM[U.type];return o(z,{id:B,key:B,option:U,onChange:Y,onError:K,pluginSettings:l,definedSettings:e.settings})});return o(ge,{flexDirection:"column",style:{gap:12,marginBottom:16}},k)}}function N(k,B){let U=e.authors.length-B,Y=e.authors.length-U,K=Y+e.authors.length-B;return o(V,{text:e.authors.slice(Y,K).map(z=>z.name).join(", ")},({onMouseEnter:z,onMouseLeave:L})=>o("div",{className:ku.moreUsers,onMouseEnter:z,onMouseLeave:L},"+",U))}return o(ze,{transitionState:r,size:"medium",className:"vc-text-selectable"},o(lt,{separator:!1},o(re,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(an,{onClick:n})),o(et,null,o(S.FormSection,null,o(S.FormTitle,{tag:"h3"},"About ",e.name),o(S.FormText,null,e.description),o(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(IM,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:N,renderUser:k=>o(Dr,{className:ku.clickableAvatar,onClick:()=>By(k)},o("img",{className:ku.avatar,src:k.getAvatarURL(void 0,80,!0),alt:k.username,title:k.username}))}))),!!e.settingsAboutComponent&&o("div",{className:oe(q.bottom8,"vc-text-selectable")},o(S.FormSection,null,o(_,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(S.FormSection,{className:q.bottom16},o(S.FormTitle,{tag:"h3"},"Settings"),x())),M&&o(_t,null,o(ge,{flexDirection:"column",style:{width:"100%"}},o(ge,{style:{marginLeft:"auto"}},o(R,{onClick:n,size:R.Sizes.SMALL,color:R.Colors.PRIMARY,look:R.Looks.LINK},"Cancel"),o(V,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:k,onMouseLeave:B})=>o(R,{size:R.Sizes.SMALL,color:R.Colors.BRAND,onClick:b,onMouseEnter:k,onMouseLeave:B,disabled:!T()},"Save & Close"))),h&&o(re,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var IM,ku,AM,NM,$y=g(()=>{"use strict";a();Qt();$();le();Lt();wn();at();Re();dt();w();j();A();ka();Fy();IM=Xe("defaultRenderUser","showDefaultAvatarsForNullUsers"),ku=I("moreUsers","emptyUser","avatarContainer","clickableAvatar"),AM=yt(()=>W.getCurrentUser().constructor);NM={[0]:Dy,[1]:Pu,[2]:Pu,[3]:Iy,[4]:Ry,[5]:Ey,[6]:Ny}});var Gy=g(()=>{});var Hy=g(()=>{});function zy({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:oe(La.container,"default-colors",e?La.checked:void 0),style:{backgroundColor:e?Lu:Eu,opacity:n?.3:1}},o("svg",{className:La.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},o("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),o("svg",{viewBox:"0 0 20 20",fill:"none"},e?o(f,null,o("path",{fill:Lu,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:Lu,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(f,null,o("path",{fill:Eu,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:Eu,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:La.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var Lu,Eu,La,jy=g(()=>{"use strict";a();Hy();Re();j();Lu="var(--green-360)",Eu="var(--primary-400)",La=I("slider","input","container")});function Ea({disabled:e,isNew:t,name:n,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:p,onMouseLeave:m}){return o("div",{className:ti("card",{"card-disabled":e}),onMouseEnter:p,onMouseLeave:m},o("div",{className:ti("header")},o("div",{className:ti("name-author")},o(re,{variant:"text-md/bold",className:ti("name")},n,t&&o(Py,{text:"NEW",color:"#ED4245"})),!!s&&o(re,{variant:"text-md/normal",className:ti("author")},s)),r,o(zy,{checked:l,onChange:c,disabled:e})),o(re,{className:ti("note"),variant:"text-sm/normal"},u),i)}var ti,Du=g(()=>{"use strict";a();Gy();Je();Mu();jy();A();ti=Ue("vc-addon-")});var os,Ou=g(()=>{"use strict";a();os=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 Uu={};Be(Uu,{PMLogger:()=>CM,isPluginEnabled:()=>Bu,patches:()=>qy,plugins:()=>kM,startAllPlugins:()=>rs,startDependenciesRecursive:()=>Da,startPlugin:()=>is,stopPlugin:()=>Fu});function Bu(e){return(Oe[e]?.required||Oe[e]?.isDependency||_u[e]?.enabled)??!1}function Da(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!E.plugins[r].enabled){if(Da(Oe[r]),E.plugins[r].enabled=!0,Oe[r].patches){Vt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}is(Oe[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var Vt,CM,kM,qy,_u,Ky,rs,is,Fu,Oa=g(()=>{"use strict";a();Qt();$();Ze();w();A();gr();qs();Vt=new ie("PluginManager","#a6d189"),CM=Vt,kM=Oe,qy=[],_u=E.plugins;Ky=Object.values(Oe);for(let e of Ky)_u[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=Oe[t];if(n)_u[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);Vt.warn(r)}});for(let e of Ky){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,n]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...n,...r}}}if(e.patches&&Bu(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),qy.push(t)}rs=$n("startAllPlugins",function(t){Vt.info(`Starting plugins (stage ${t})`);for(let n in Oe)if(Bu(n)){if((Oe[n].startAt??"WebpackReady")!==t)continue;is(Oe[n])}});is=$n("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(Vt.info("Starting plugin",n),t.started)return Vt.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return Vt.error(`Failed to start ${n}
-`,s),!1}}if(r?.length){Vt.info("Registering commands of plugin",n);for(let s of r)try{Qr(s,n)}catch(l){return Vt.error(`Failed to register command ${s.name}
-`,l),!1}}if(i)for(let s in i)F.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Fu=$n("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(Vt.info("Stopping plugin",n),!t.started)return Vt.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return Vt.error(`Failed to stop ${n}
-`,s),!1}}if(r?.length){Vt.info("Unregistering commands of plugin",n);for(let s of r)try{ts(s.name)}catch(l){return Vt.error(`Failed to unregister command ${s.name}
-`,l),!1}}if(i)for(let s in i)F.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function LM(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function EM({required:e}){return o(wt,{className:Sr("info-card",{"restart-card":e})},e?o(f,null,o(S.FormTitle,{tag:"h5"},"Restart required!"),o(S.FormText,{className:Sr("dep-text")},"Restart now to apply new plugins and their settings"),o(R,{color:R.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(f,null,o(S.FormTitle,{tag:"h5"},"Plugin Management"),o(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ra({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=E.plugins[e.name],c=()=>l.enabled??!1;function u(){_i(async()=>m=>o(Ru,{...m,plugin:e,onRestartNeeded:()=>n(e.name)}))}function p(){let m=c();if(!m){let{restartNeeded:v,failures:T}=Da(e);if(T.length){Yy.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),Zi("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!m,n(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?Fu(e):is(e))){l.enabled=!1;let v=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;Yy.error(v),LM(v);return}l.enabled=!m}return o(Ea,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:o("button",{role:"switch",onClick:()=>u(),className:oe(RM.button,Sr("info-button"))},e.options&&!Li(e.options)?o(by,null):o(Ia,null))})}function $u(){let e=ct(),t=O.useMemo(()=>new os,[]);O.useEffect(()=>()=>void(t.hasChanges&&rn.show({title:"Restart required",body:o(f,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((v,T)=>o(f,null,T>0&&", ",Fe.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=O.useMemo(()=>{let v={};for(let T in Oe){let M=Oe[T].dependencies;if(M)for(let b of M)v[b]??=[],v[b].push(T)}return v},[]),r=O.useMemo(()=>Object.values(Oe).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=O.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&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(b=>b.toLowerCase().includes(M))},[p]=rt(()=>It("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,M={},b=Object.values(r).map(N=>N.name),x=[];for(let{name:N}of r)(M[N]=v?.[N]??T)+60*60*24*2>T&&x.push(N);return Xt("Vencord_existingPlugins",M),cr.isEqual(x,b)?[]:x})),m,h;if(r?.length){m=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||n[v.name]?.some(M=>e.plugins[M].enabled)){let M=v.required?"This plugin is required for Vencord to function.":DM(n[v.name]?.filter(b=>e.plugins[b].enabled));h.push(o(V,{text:M,key:v.name},({onMouseLeave:b,onMouseEnter:x})=>o(Ra,{onMouseLeave:b,onMouseEnter:x,onRestartNeeded:N=>t.handleChange(N),disabled:!0,plugin:v})))}else m.push(o(Ra,{onRestartNeeded:M=>t.handleChange(M),disabled:!1,plugin:v,isNew:p?.includes(v.name),key:v.name}))}}else m=h=o(re,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(vn,{title:"Plugins"},o(EM,{required:t.hasChanges}),o(S.FormTitle,{tag:"h5",className:oe(q.top20,q.bottom8)},"Filters"),o("div",{className:Sr("filter-controls")},o(Ve,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:q.bottom20}),o("div",{className:Zy.inputWrapper},o(Pn,{className:Zy.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}))),o(S.FormTitle,{className:q.top20},"Plugins"),o("div",{className:Sr("grid")},m),o(S.FormDivider,{className:q.top20}),o(S.FormTitle,{tag:"h5",className:oe(q.top20,q.bottom8)},"Required Plugins"),o("div",{className:Sr("grid")},h))}function DM(e){return o(O.Fragment,null,o(S.FormText,null,"This plugin is required by:"),e.map(t=>o(S.FormText,{className:Sr("dep-text")},t)))}var Sr,Yy,Zy,RM,Cu=g(()=>{"use strict";a();my();Wn();Pa();$();Je();$t();$y();Du();Oo();Ou();Ze();at();Re();dt();Qe();j();A();gr();Oa();Sr=Ue("vc-plugins-"),Yy=new ie("PluginSettings","#a6d189"),Zy=I("inputDefault","inputWrapper"),RM=I("button","disabled","enabled")});var Xy={};Be(Xy,{default:()=>OM});var OM,Jy=g(()=>{"use strict";a();Cu();Oo();OM=Sn($u,"Plugins")});function st(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var lo=g(()=>{"use strict";a()});var Qy={};Be(Qy,{default:()=>zM});function UM({link:e}){let[t,n,r]=rt(()=>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...":n?`Error: ${n instanceof Error?n.message:String(n)}`:"Valid!";return o(S.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function $M({themeLinks:e}){return e.length?o(f,null,o(S.FormTitle,{className:q.top20,tag:"h5"},"Validator"),o(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(wt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(UM,{link:t}))))):null}function GM({theme:e,enabled:t,onChange:n,onDelete:r}){return o(Ea,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:n,infoButton:!1,footer:o(ge,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&o(st,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&o(st,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault();let{invite:s}=await _M.resolveInvite(e.invite,"Desktop Modal");if(!s)return fn("Invalid or expired invite");F.dispatch({type:"INVITE_MODAL_OPEN",invite:s,code:e.invite,context:"APP"})}},"Discord Server"))})}function HM(){let e=ct(["themeLinks","enabledThemes"]),t=Yt(null),[n,r]=J(0),[i,s]=J(e.themeLinks.join(`
-`)),[l,c]=J(null),[u,,p]=rt(VencordNative.themes.getThemesDir);De(()=>{m()},[]);async function m(){let x=await VencordNative.themes.getThemesList();c(x)}function h(x,N){if(N){if(e.enabledThemes.includes(x))return;e.enabledThemes=[...e.enabledThemes,x]}else e.enabledThemes=e.enabledThemes.filter(k=>k!==x)}async function v(x){if(x.stopPropagation(),x.preventDefault(),!x.currentTarget?.files?.length)return;let{files:N}=x.currentTarget,k=Array.from(N,B=>{let{name:U}=B;if(!!U.endsWith(".css"))return new Promise((Y,K)=>{let z=new FileReader;z.onload=()=>{VencordNative.themes.uploadTheme(U,z.result).then(Y).catch(K)},z.readAsText(B)})});await Promise.all(k),m()}function T(){return o(f,null,o(wt,{className:"vc-settings-card"},o(S.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},o(st,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(st,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),o(S.FormSection,{title:"Local Themes"},o(wt,{className:"vc-settings-quick-actions-card"},o(f,null,o(R,{onClick:()=>va(u),size:R.Sizes.SMALL,disabled:p},"Open Themes Folder"),o(R,{onClick:m,size:R.Sizes.SMALL},"Load missing Themes"),o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL},"Edit QuickCSS"))),o("div",{className:FM("grid")},l?.map(x=>o(GM,{key:x.fileName,enabled:e.enabledThemes.includes(x.fileName),onChange:N=>h(x.fileName,N),onDelete:async()=>{h(x.fileName,!1),await VencordNative.themes.deleteTheme(x.fileName),m()},theme:x})))))}function M(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(x=>x.trim()).filter(Boolean))]}function b(){return o(f,null,o(wt,{className:"vc-settings-card vc-text-selectable"},o(S.FormTitle,{tag:"h5"},"Paste links to css files here"),o(S.FormText,null,"One link per line"),o(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),o(S.FormSection,{title:"Online Themes",tag:"h5"},o(Qs,{value:i,onChange:s,className:oe(BM.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:M,rows:10}),o($M,{themeLinks:e.themeLinks})))}return o(vn,{title:"Themes"},o(In,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:n,onItemSelect:r},o(In.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),o(In.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),n===0&&T(),n===1&&b())}var _M,JO,BM,FM,zM,Vy=g(()=>{"use strict";a();$();Je();Lt();$t();lo();at();Re();Ro();Qe();j();A();Du();Oo();_M=I("resolveInvite"),JO=un(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),BM=un(e=>typeof e.textarea=="string"),FM=Ue("vc-settings-theme-");zM=Sn(HM,"Themes")});var ov={};Be(ov,{default:()=>KM});function ev(e,t){return async()=>{e(!0);try{await t()}catch(r){if(hr.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 n=`Command \`${s}\` not found.
+${n}`}var gu,W2,q2,hu,K2,Y2,Z2,X2,J2,ao,Q2,lo=g(()=>{"use strict";a();I();gu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),W2=e=>e.toLowerCase().split("_"),q2=e=>e.toLowerCase().split("-"),hu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),K2=e=>e.toLowerCase().split(" "),Y2=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),Z2=e=>e.join("_").toUpperCase(),X2=e=>e.join("-").toLowerCase(),J2=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),ao=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Q2=["years","months","weeks","days","hours","minutes","seconds"]});function es(){return`-${jn.fromTimestamp(Date.now())}`}function pe(e,t){let n=eM.createBotMessage({channelId:e,content:"",embeds:[]});return tM.receiveMessage(e,dr(t,n)),t}function rt(e,t,n){return e.find(r=>r.name===t)?.value||n}var eM,tM,yu=g(()=>{"use strict";a();Be();j();I();eM=A("createBotMessage"),tM=A("receiveMessage")});var co,_n,vu,ka=g(()=>{"use strict";a();co=(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))(co||{}),_n=(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))(_n||{}),vu=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(vu||{})});var Tu={};Ue(Tu,{ApplicationCommandInputType:()=>_n,ApplicationCommandOptionType:()=>co,ApplicationCommandType:()=>vu,BUILT_IN:()=>Uo,OptionalMessageOption:()=>$o,RequiredMessageOption:()=>ts,_handleCommand:()=>oM,_init:()=>nM,commands:()=>Su,findOption:()=>rt,generateId:()=>es,prepareOption:()=>bu,registerCommand:()=>ei,sendBotMessage:()=>pe,unregisterCommand:()=>ns});function bu(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===xy?r[n]=$o:t===wy&&(r[n]=ts),t.choices?.forEach(i=>i.displayName||=i.name),bu(r[n])}),e}function rM(e,t){e.options?.forEach(n=>{if(n.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...n,type:1,name:`${e.name} ${n.name}`,id:`${n.name}-${e.id}`,displayName:`${e.name} ${n.name}`,subCommandPath:[{name:n.name,type:n.type,displayName:n.name}],rootCommand:e};ei(r,t)})}function ei(e,t){if(!Uo){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Uo.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${Uo.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,bu(e),e.options?.[0]?.type===1){rM(e,t);return}Su[e.name]=e,Uo.push(e)}function ns(e){let t=Uo.findIndex(n=>n.name===e);return t===-1?!1:(Uo.splice(t,1),delete Su[e],!0)}var Uo,Su,xy,wy,$o,ts,nM,oM,tn=g(()=>{"use strict";a();lo();yu();ka();yu();ka();Su={},xy=Symbol("OptionalMessageOption"),wy=Symbol("RequiredMessageOption"),$o=xy,ts=wy,nM=function(e){try{Uo=e,$o=e.find(t=>t.name==="shrug").options[0],ts=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},oM=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);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),pe(n.channel.id,{content:`${s}:
+${Vi(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function My({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var xu=g(()=>{"use strict";a()});function Py({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(l??!1),[d,m]=O.useState(null);O.useEffect(()=>{s(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),i(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(pt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},ao(gu(r))),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var Iy=g(()=>{"use strict";a();lo();I()});function Ay({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var Ny=g(()=>{"use strict";a()});function wu({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=O.useState(`${t[r]??e.default??0}`),[d,m]=O.useState(null);O.useEffect(()=>{s(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;m(null),typeof T=="string"?m(T):T||m("Invalid input provided."),e.type===1&&BigInt(v)>=iM?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(et,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var iM,Cy=g(()=>{"use strict";a();M();I();iM=BigInt(Number.MAX_SAFE_INTEGER)});function ky({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=O.useState(l??null),[d,m]=O.useState(null);O.useEffect(()=>{i(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),r(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(An,{isDisabled:e.disabled?.call(n)??!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}),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var Ry=g(()=>{"use strict";a();I()});function Go(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function Ly({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(null);O.useEffect(()=>{s(c!==null)},[c]);function d(m){let h=e.isValid?.call(n,m)??!0;typeof h=="string"?u(h):h?(u(null),i(m)):u("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(ir,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:d,onValueRender:m=>String(m.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Mu=g(()=>{"use strict";a();I()});function Ey({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[l,c]=O.useState(t[r]??e.default??null),[u,d]=O.useState(null);O.useEffect(()=>{s(u!==null)},[u]);function m(h){let v=e.isValid?.call(n,h)??!0;d(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(et,{type:"text",value:l,onChange:m,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),u&&o(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Dy=g(()=>{"use strict";a();I()});var Ra=g(()=>{"use strict";a();xu();Iy();Ny();Cy();Ry();Mu();Dy()});var Oy=g(()=>{});function ti(){return Q.getChannel(Ae.getChannelId())}function Pu(){return we.getGuild(ti()?.guild_id)}function lM(e){pc.openPrivateChannel(e)}function ni(){return Ci.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function uo(e){Gr.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function cM(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return sM.sendMessage(e,i,n,r)}function Bn(e,t){return Ke(n=>o(qe,{...n,className:Js.modal,size:"dynamic"},o(bc,{className:Js.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(Br,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Fn(e){if(!await Et.getUser(e))throw new Error("No such user: "+e);let n=sn.getGuildId();aM.openUserProfileModal({userId:e,guildId:n,channelId:Ae.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Iu(e,t){let n=rn.getUserProfile(e);if(n)return n;B.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await wt.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}),rn.getUserProfile(e)}function po(e){return e.discriminator==="0"?e.username:e.tag}var sM,aM,La,It=g(()=>{"use strict";a();j();I();dt();sM=A("editMessage","sendMessage"),aM=A("openUserProfileModal","closeUserProfileModal");La=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(La||{})});function _y(e){Ke(t=>o(qe,{...t},o(_,null,o(tt,{className:oi("root")},o(hM,{user:e})))))}function fM(){let e=ni()===2?dM:mM;return o("img",{src:e,alt:"GitHub"})}function gM(){let e=ni()===2?pM:uM;return o("img",{src:e,alt:"Website"})}function hM({user:e}){lt();let t=We([rn],()=>rn.getUserProfile(e.id));_e(()=>{!t&&!e.bot&&e.id&&Iu(e.id)},[e.id]);let n=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=Nt(()=>{let s=Object.values(He);return(zr[e.id]?s.filter(c=>c.authors.includes(zr[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 o(f,null,o("div",{className:oi("header")},o("img",{className:oi("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),o(S.FormTitle,{tag:"h2",className:oi("name")},e.username),o("div",{className:oi("links")},r&&o(Br,{href:"https://"+r},o(gM,null)),n&&o(Br,{href:`https://github.com/${n}`},o(fM,null)))),o("div",{className:oi("plugins")},i.map(s=>o(Ea,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>yn("Restart to apply changes!")}))))}var uM,pM,dM,mM,oi,By=g(()=>{"use strict";a();Oy();$();Ve();le();P();It();dt();I();gr();Au();uM="/assets/e1e96d89e192de1997f73730db26e94f.svg",pM="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",dM="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",mM="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",oi=Ge("vc-author-modal-")});function Fy(e){let t=new vM({username:e.username,id:e.id??es(),avatar:e.avatar,bot:!0});return B.dispatch({type:"USER_UPDATE",user:t}),t}function Cu({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=O.useState([]),l=lt().plugins[e.name],[c,u]=O.useState({}),[d,m]=O.useState({}),[h,v]=O.useState(null),T=()=>Object.values(d).every(k=>!k),w=Boolean(l&&e.options&&!Ei(e.options));O.useEffect(()=>{(async()=>{for(let k of e.authors.slice(0,6)){let F=k.id?await Et.getUser(`${k.id}`).catch(()=>Fy({username:k.name})):Fy({username:k.name});s(G=>[...G,F])}})()},[]);async function b(){if(!e.options){n();return}if(e.beforeSave){let F=await Promise.resolve(e.beforeSave(c));if(F!==!0){v(F);return}}let k=!1;for(let[F,G]of Object.entries(c)){let K=e.options[F];l[F]=G,K?.onChange?.(G),K?.restartNeeded&&(k=!0)}k&&t(),n()}function x(){if(!w||!e.options)return o(S.FormText,null,"There are no settings for this plugin.");{let k=Object.entries(e.options).map(([F,G])=>{if(G.hidden)return null;function K(R){u(X=>({...X,[F]:R}))}function q(R){m(X=>({...X,[F]:R}))}let z=SM[G.type];return o(z,{id:F,key:F,option:G,onChange:K,onError:q,pluginSettings:l,definedSettings:e.settings})});return o(ye,{flexDirection:"column",style:{gap:12,marginBottom:16}},k)}}function N(k,F){let G=e.authors.length-F,K=e.authors.length-G,q=K+e.authors.length-F;return o(V,{text:e.authors.slice(K,q).map(z=>z.name).join(", ")},({onMouseEnter:z,onMouseLeave:R})=>o("div",{className:Nu.moreUsers,onMouseEnter:z,onMouseLeave:R},"+",G))}return o(qe,{transitionState:r,size:"medium",className:"vc-text-selectable"},o(at,{separator:!1},o(oe,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(cn,{onClick:n})),o(tt,null,o(S.FormSection,null,o(S.FormTitle,{tag:"h3"},"About ",e.name),o(S.FormText,null,e.description),o(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(yM,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:N,renderUser:k=>o(Or,{className:Nu.clickableAvatar,onClick:()=>_y(k)},o("img",{className:Nu.avatar,src:k.getAvatarURL(void 0,80,!0),alt:k.username,title:k.username}))}))),!!e.settingsAboutComponent&&o("div",{className:re(Y.bottom8,"vc-text-selectable")},o(S.FormSection,null,o(_,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(S.FormSection,{className:Y.bottom16},o(S.FormTitle,{tag:"h3"},"Settings"),x())),w&&o(Ft,null,o(ye,{flexDirection:"column",style:{width:"100%"}},o(ye,{style:{marginLeft:"auto"}},o(E,{onClick:n,size:E.Sizes.SMALL,color:E.Colors.PRIMARY,look:E.Looks.LINK},"Cancel"),o(V,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:k,onMouseLeave:F})=>o(E,{size:E.Sizes.SMALL,color:E.Colors.BRAND,onClick:b,onMouseEnter:k,onMouseLeave:F,disabled:!T()},"Save & Close"))),h&&o(oe,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var yM,Nu,vM,SM,Uy=g(()=>{"use strict";a();tn();$();le();Dt();Zt();ct();Be();dt();Oe();M();j();I();Ra();By();yM=me(()=>Bt("defaultRenderUser","showDefaultAvatarsForNullUsers")),Nu=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),vM=Qe(()=>W.getCurrentUser().constructor);SM={[0]:Ey,[1]:wu,[2]:wu,[3]:Py,[4]:ky,[5]:Ly,[6]:Ay}});var $y=g(()=>{});var Gy=g(()=>{});function Hy({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:re(Da.container,"default-colors",e?Da.checked:void 0),style:{backgroundColor:e?ku:Ru,opacity:n?.3:1}},o("svg",{className:Da.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},o("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),o("svg",{viewBox:"0 0 20 20",fill:"none"},e?o(f,null,o("path",{fill:ku,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:ku,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(f,null,o("path",{fill:Ru,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:Ru,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:Da.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var ku,Ru,Da,zy=g(()=>{"use strict";a();Gy();Be();j();ku="var(--green-360)",Ru="var(--primary-400)",Da=A("slider","input","container")});function Oa({disabled:e,isNew:t,name:n,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:d,onMouseLeave:m}){return o("div",{className:ri("card",{"card-disabled":e}),onMouseEnter:d,onMouseLeave:m},o("div",{className:ri("header")},o("div",{className:ri("name-author")},o(oe,{variant:"text-md/bold",className:ri("name")},n,t&&o(My,{text:"NEW",color:"#ED4245"})),!!s&&o(oe,{variant:"text-md/normal",className:ri("author")},s)),r,o(Hy,{checked:l,onChange:c,disabled:e})),o(oe,{className:ri("note"),variant:"text-sm/normal"},u),i)}var ri,Lu=g(()=>{"use strict";a();$y();Ve();xu();zy();I();ri=Ge("vc-addon-")});var os,Eu=g(()=>{"use strict";a();os=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 Fu={};Ue(Fu,{PMLogger:()=>bM,isPluginEnabled:()=>Ou,patches:()=>jy,plugins:()=>TM,startAllPlugins:()=>_u,startDependenciesRecursive:()=>_a,startPlugin:()=>rs,stopPlugin:()=>Bu});function Ou(e){return(He[e]?.required||He[e]?.isDependency||Du[e]?.enabled)??!1}function _a(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!L.plugins[r].enabled){if(_a(He[r]),L.plugins[r].enabled=!0,He[r].patches){dn.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}rs(He[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var dn,bM,TM,jy,Du,Wy,_u,rs,Bu,Ba=g(()=>{"use strict";a();tn();$();Je();I();gr();qs();dn=new ie("PluginManager","#a6d189"),bM=dn,TM=He,jy=[],Du=L.plugins;Wy=Object.values(He);for(let e of Wy)Du[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=He[t];if(n)Du[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);dn.warn(r)}});for(let e of Wy){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,n]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...n,...r}}}if(e.patches&&Ou(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),jy.push(t)}_u=Pn("startAllPlugins",function(){for(let t in He)Ou(t)&&rs(He[t])});rs=Pn("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(dn.info("Starting plugin",n),t.started)return dn.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return dn.error(`Failed to start ${n}
+`,s),!1}}if(r?.length){dn.info("Registering commands of plugin",n);for(let s of r)try{ei(s,n)}catch(l){return dn.error(`Failed to register command ${s.name}
+`,l),!1}}if(i)for(let s in i)B.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Bu=Pn("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(dn.info("Stopping plugin",n),!t.started)return dn.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return dn.error(`Failed to stop ${n}
+`,s),!1}}if(r?.length){dn.info("Unregistering commands of plugin",n);for(let s of r)try{ns(s.name)}catch(l){return dn.error(`Failed to unregister command ${s.name}
+`,l),!1}}if(i)for(let s in i)B.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function wM(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function MM({required:e}){return o(xt,{className:Sr("info-card",{"restart-card":e})},e?o(f,null,o(S.FormTitle,{tag:"h5"},"Restart required!"),o(S.FormText,{className:Sr("dep-text")},"Restart now to apply new plugins and their settings"),o(E,{color:E.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(f,null,o(S.FormTitle,{tag:"h5"},"Plugin Management"),o(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ea({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=L.plugins[e.name],c=()=>l.enabled??!1;function u(){Bi(async()=>m=>o(Cu,{...m,plugin:e,onRestartNeeded:()=>n(e.name)}))}function d(){let m=c();if(!m){let{restartNeeded:v,failures:T}=_a(e);if(T.length){qy.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),Xi("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!m,n(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?Bu(e):rs(e))){l.enabled=!1;let v=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;qy.error(v),wM(v);return}l.enabled=!m}return o(Oa,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:d,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:o("button",{role:"switch",onClick:()=>u(),className:re(xM.button,Sr("info-button"))},e.options&&!Ei(e.options)?o(Sy,null):o(Aa,null))})}function Uu(){let e=lt(),t=O.useMemo(()=>new os,[]);O.useEffect(()=>()=>void(t.hasChanges&&an.show({title:"Restart required",body:o(f,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((v,T)=>o(f,null,T>0&&", ",$e.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=O.useMemo(()=>{let v={};for(let T in He){let w=He[T].dependencies;if(w)for(let b of w)v[b]??=[],v[b].push(T)}return v},[]),r=O.useMemo(()=>Object.values(He).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=O.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!d?.includes(v.name))return!1;if(!i.value.length)return!0;let w=i.value.toLowerCase();return v.name.toLowerCase().includes(w)||v.description.toLowerCase().includes(w)||v.tags?.some(b=>b.toLowerCase().includes(w))},[d]=ot(()=>Pt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,w={},b=Object.values(r).map(N=>N.name),x=[];for(let{name:N}of r)(w[N]=v?.[N]??T)+60*60*24*2>T&&x.push(N);return Vt("Vencord_existingPlugins",w),cr.isEqual(x,b)?[]:x})),m,h;if(r?.length){m=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||n[v.name]?.some(w=>e.plugins[w].enabled)){let w=v.required?"This plugin is required for Vencord to function.":PM(n[v.name]?.filter(b=>e.plugins[b].enabled));h.push(o(V,{text:w,key:v.name},({onMouseLeave:b,onMouseEnter:x})=>o(Ea,{onMouseLeave:b,onMouseEnter:x,onRestartNeeded:N=>t.handleChange(N),disabled:!0,plugin:v})))}else m.push(o(Ea,{onRestartNeeded:w=>t.handleChange(w),disabled:!1,plugin:v,isNew:d?.includes(v.name),key:v.name}))}}else m=h=o(oe,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(Tn,{title:"Plugins"},o(MM,{required:t.hasChanges}),o(S.FormTitle,{tag:"h5",className:re(Y.top20,Y.bottom8)},"Filters"),o("div",{className:Sr("filter-controls")},o(et,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:Y.bottom20}),o("div",{className:Ky.inputWrapper},o(An,{className:Ky.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}))),o(S.FormTitle,{className:Y.top20},"Plugins"),o("div",{className:Sr("grid")},m),o(S.FormDivider,{className:Y.top20}),o(S.FormTitle,{tag:"h5",className:re(Y.top20,Y.bottom8)},"Required Plugins"),o("div",{className:Sr("grid")},h))}function PM(e){return o(O.Fragment,null,o(S.FormText,null,"This plugin is required by:"),e.map(t=>o(S.FormText,{className:Sr("dep-text")},t)))}var Sr,qy,Ky,xM,Au=g(()=>{"use strict";a();dy();Kn();Ia();$();Ve();Ht();Uy();Lu();Fo();Eu();Je();ct();Be();dt();Oe();j();I();gr();Ba();Sr=Ge("vc-plugins-"),qy=new ie("PluginSettings","#a6d189"),Ky=A("inputDefault","inputWrapper"),xM=A("button","disabled","enabled")});var Yy={};Ue(Yy,{default:()=>IM});var IM,Zy=g(()=>{"use strict";a();Au();Fo();IM=xn(Uu,"Plugins")});function it(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var mo=g(()=>{"use strict";a()});var Xy={};Ue(Xy,{default:()=>DM});function kM({link:e}){let[t,n,r]=ot(()=>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...":n?`Error: ${n instanceof Error?n.message:String(n)}`:"Valid!";return o(S.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function RM({themeLinks:e}){return e.length?o(f,null,o(S.FormTitle,{className:Y.top20,tag:"h5"},"Validator"),o(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(xt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(kM,{link:t}))))):null}function LM({theme:e,enabled:t,onChange:n,onDelete:r}){return o(Oa,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:n,infoButton:!1,footer:o(ye,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&o(it,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&o(it,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault();let{invite:s}=await AM.resolveInvite(e.invite,"Desktop Modal");if(!s)return yn("Invalid or expired invite");B.dispatch({type:"INVITE_MODAL_OPEN",invite:s,code:e.invite,context:"APP"})}},"Discord Server"))})}function EM(){let e=lt(["themeLinks","enabledThemes"]),t=Jt(null),[n,r]=J(0),[i,s]=J(e.themeLinks.join(`
+`)),[l,c]=J(null),[u,,d]=ot(VencordNative.themes.getThemesDir);_e(()=>{m()},[]);async function m(){let x=await VencordNative.themes.getThemesList();c(x)}function h(x,N){if(N){if(e.enabledThemes.includes(x))return;e.enabledThemes=[...e.enabledThemes,x]}else e.enabledThemes=e.enabledThemes.filter(k=>k!==x)}async function v(x){if(x.stopPropagation(),x.preventDefault(),!x.currentTarget?.files?.length)return;let{files:N}=x.currentTarget,k=Array.from(N,F=>{let{name:G}=F;if(!!G.endsWith(".css"))return new Promise((K,q)=>{let z=new FileReader;z.onload=()=>{VencordNative.themes.uploadTheme(G,z.result).then(K).catch(q)},z.readAsText(F)})});await Promise.all(k),m()}function T(){return o(f,null,o(xt,{className:"vc-settings-card"},o(S.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},o(it,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(it,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),o(S.FormSection,{title:"Local Themes"},o(xt,{className:"vc-settings-quick-actions-card"},o(f,null,o(E,{onClick:()=>Sa(u),size:E.Sizes.SMALL,disabled:d},"Open Themes Folder"),o(E,{onClick:m,size:E.Sizes.SMALL},"Load missing Themes"),o(E,{onClick:()=>VencordNative.quickCss.openEditor(),size:E.Sizes.SMALL},"Edit QuickCSS"))),o("div",{className:CM("grid")},l?.map(x=>o(LM,{key:x.fileName,enabled:e.enabledThemes.includes(x.fileName),onChange:N=>h(x.fileName,N),onDelete:async()=>{h(x.fileName,!1),await VencordNative.themes.deleteTheme(x.fileName),m()},theme:x})))))}function w(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(x=>x.trim()).filter(Boolean))]}function b(){return o(f,null,o(xt,{className:"vc-settings-card vc-text-selectable"},o(S.FormTitle,{tag:"h5"},"Paste links to css files here"),o(S.FormText,null,"One link per line"),o(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),o(S.FormSection,{title:"Online Themes",tag:"h5"},o(Vs,{value:i,onChange:s,className:re(NM.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:w,rows:10}),o(RM,{themeLinks:e.themeLinks})))}return o(Tn,{title:"Themes"},o(Nn,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:n,onItemSelect:r},o(Nn.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),o(Nn.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),n===0&&T(),n===1&&b())}var AM,LO,NM,CM,DM,Jy=g(()=>{"use strict";a();$();Ve();Dt();Ht();mo();ct();Be();Do();Oe();j();I();Lu();Fo();AM=A("resolveInvite"),LO=Lt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),NM=Lt(e=>typeof e.textarea=="string"),CM=Ge("vc-settings-theme-");DM=xn(EM,"Themes")});var tv={};Ue(tv,{default:()=>FM});function Qy(e,t){return async()=>{e(!0);try{await t()}catch(r){if(hr.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 n=`Command \`${s}\` not found.
Please install it and try again`;else{var n=`An error occurred while running \`${l}\`:
`;n+=c||`Code \`${i}\`. 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.`;rn.show({title:"Oops!",body:o(hn,null,n.split(`
-`).map(i=>o("div",null,Fe.parse(i))))})}finally{e(!1)}}}function tv({repo:e,hash:t,disabled:n=!1}){return o(st,{href:`${e}/commit/${t}`,disabled:n},t)}function nv({updates:e,repo:t,repoPending:n}){return o(wt,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>o("div",null,o("code",null,o(tv,{repo:t,hash:r,disabled:n})),o("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function jM(e){let[t,n]=O.useState(Eo),[r,i]=O.useState(!1),[s,l]=O.useState(!1),c=(t?.length??0)>0;return o(f,null,!t&&Yr?o(f,null,o(S.FormText,null,"Failed to check updates. Check the console for more info"),o(hn,{style:{padding:"1em"}},o("p",null,Yr.stderr||Yr.stdout||"An unknown error occurred"))):o(S.FormText,{className:q.bottom8},c?`There are ${t.length} Updates`:"Up to Date!"),c&&o(nv,{updates:t,...e}),o(ge,{className:oe(q.bottom8,q.top8)},c&&o(R,{size:R.Sizes.SMALL,disabled:s||r,onClick:ev(l,async()=>{await Xr()&&(n([]),await new Promise(u=>{rn.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){ln(),u()},onCancel:u})}))})},"Update Now"),o(R,{size:R.Sizes.SMALL,disabled:s||r,onClick:ev(i,async()=>{await Zr()?n(Eo):(n([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function WM(e){return o(f,null,o(S.FormText,{className:q.bottom8},"Your local copy has more recent commits. Please stash or reset them."),o(nv,{...e,updates:Eo}))}function qM(){let e=ct(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,n,r]=rt(lu,{fallbackValue:"Loading..."});O.useEffect(()=>{n&&hr.error("Failed to retrieve repo",n)},[n]);let i={repo:t,repoPending:r};return o(vn,{title:"Vencord Updater"},o(S.FormTitle,{tag:"h5"},"Updater Settings"),o(pt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),o(pt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),o(pt,{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"),o(S.FormTitle,{tag:"h5"},"Repo"),o(S.FormText,{className:"vc-text-selectable"},r?t:n?"Failed to retrieve - check console":o(st,{href:t},t.split("/").slice(-2).join("/"))," ","(",o(tv,{hash:sn,repo:t,disabled:r}),")"),o(S.FormDivider,{className:q.top8+" "+q.bottom8}),o(S.FormTitle,{tag:"h5"},"Updates"),qi?o(WM,{...i}):o(jM,{...i}))}var KM,rv=g(()=>{"use strict";a();$();Hr();Lt();lo();at();Re();Ro();Qe();yr();A();$r();Oo();KM=Sn(qM,"Updater")});function _a({value:e,onChange:t,validate:n}){let[r,i]=O.useState(e),[s,l]=O.useState();function c(u){i(u);let p=n(u);p===!0?(l(void 0),t(u)):l(p)}return o(f,null,o(Ve,{type:"text",value:r,onChange:c,error:s}))}var Gu=g(()=>{"use strict";a();A()});var iv={};Be(iv,{default:()=>QM});function YM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function ZM(){let e=await fetch(new URL("/v1/",ko()),{method:"DELETE",headers:new Headers({Authorization:await qr()})});if(!e.ok){ya.error(`Failed to erase data, API returned ${e.status}`),Ie({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}E.cloud.authenticated=!1,await ru(),Ie({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function XM(){let{cloud:e}=ct(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(S.FormSection,{title:"Settings Sync",className:q.top16},o(S.FormText,{variant:"text-md/normal",className:q.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(pt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync=n}},"Settings Sync"),o("div",{className:"vc-cloud-settings-sync-grid"},o(R,{size:R.Sizes.SMALL,disabled:!t,onClick:()=>Kr(!0)},"Sync to Cloud"),o(V,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(R,{onMouseLeave:n,onMouseEnter:r,size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>xa(!0,!0)},"Sync from Cloud")),o(R,{size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>ey()},"Delete Cloud Settings")))}function JM(){let e=ct(["cloud.authenticated","cloud.url"]);return o(vn,{title:"Vencord Cloud"},o(S.FormSection,{title:"Cloud Settings",className:q.top16},o(S.FormText,{variant:"text-md/normal",className:q.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(st,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(st,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(pt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Yh(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(S.FormTitle,{tag:"h5"},"Backend URL"),o(S.FormText,{className:q.bottom8},"Which backend to use when using cloud integrations."),o(_a,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,ru()},validate:YM}),o(R,{className:q.top8,size:R.Sizes.MEDIUM,color:R.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>rn.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:ZM,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(S.FormDivider,{className:q.top16})),o(XM,null))}var QM,sv=g(()=>{"use strict";a();Ao();$();Gu();lo();iu();at();ji();A();Oo();QM=Sn(JM,"Cloud")});var av={};Be(av,{default:()=>eP});function VM(){return o(vn,{title:"Backup & Restore"},o(wt,{className:oe("vc-settings-card","vc-backup-restore-card")},o(ge,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(re,{variant:"text-md/normal",className:q.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."),o(re,{variant:"text-md/normal",className:q.bottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Theme Links"),o("li",null,"\u2014 Plugin Settings"))),o(ge,null,o(R,{onClick:()=>Vh(),size:R.Sizes.SMALL},"Import Settings"),o(R,{onClick:Jh,size:R.Sizes.SMALL},"Export Settings")))}var eP,lv=g(()=>{"use strict";a();Lt();at();Re();ji();A();Oo();eP=Sn(VM,"Backup & Restore")});var ss,Hu=g(()=>{"use strict";a();Pt();$();P();w();A();$r();ss=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[d.Ven,d.Megu],required:!0,start(){ce("user-settings-cog",e=>()=>{e.find(n=>Array.isArray(n)&&n.some(r=>r?.props?.id==="VencordSettings"))?.forEach(n=>{let r=n?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(n.props.action=()=>Qn.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(E.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),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(dy(),To(py)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Jy(),To(Xy)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(Vy(),To(Qy)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(rv(),To(ov)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(sv(),To(iv)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(lv(),To(av)).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:n,chromiumVersion:r,additionalInfo:i}=this;return o(f,null,o(e,{...t},"Vencord ",sn,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var cv,tP,zu,uv=g(()=>{"use strict";a();as();P();Re();ro();w();yr();A();$r();gr();Hu();cv="Vencord-SupportHelper-Dismiss",tP=[na,"1024286218801926184","1033680203433660458"],zu=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>tP.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),n=c=>c.endsWith("API")||Oe[c].required,r=Object.keys(Oe).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(Oe).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.6.3 \u2022 ${sn}${ss.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1700718501616)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Do,OpenAsar:"openasar"in window};return{content:`
+Please try again.`;an.show({title:"Oops!",body:o(Sn,null,n.split(`
+`).map(i=>o("div",null,$e.parse(i))))})}finally{e(!1)}}}function Vy({repo:e,hash:t,disabled:n=!1}){return o(it,{href:`${e}/commit/${t}`,disabled:n},t)}function ev({updates:e,repo:t,repoPending:n}){return o(xt,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>o("div",null,o("code",null,o(Vy,{repo:t,hash:r,disabled:n})),o("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function OM(e){let[t,n]=O.useState(_o),[r,i]=O.useState(!1),[s,l]=O.useState(!1),c=(t?.length??0)>0;return o(f,null,!t&&Xr?o(f,null,o(S.FormText,null,"Failed to check updates. Check the console for more info"),o(Sn,{style:{padding:"1em"}},o("p",null,Xr.stderr||Xr.stdout||"An unknown error occurred"))):o(S.FormText,{className:Y.bottom8},c?`There are ${t.length} Updates`:"Up to Date!"),c&&o(ev,{updates:t,...e}),o(ye,{className:re(Y.bottom8,Y.top8)},c&&o(E,{size:E.Sizes.SMALL,disabled:s||r,onClick:Qy(l,async()=>{await Qr()&&(n([]),await new Promise(u=>{an.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){un(),u()},onCancel:u})}))})},"Update Now"),o(E,{size:E.Sizes.SMALL,disabled:s||r,onClick:Qy(i,async()=>{await Jr()?n(_o):(n([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function _M(e){return o(f,null,o(S.FormText,{className:Y.bottom8},"Your local copy has more recent commits. Please stash or reset them."),o(ev,{...e,updates:_o}))}function BM(){let e=lt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,n,r]=ot(su,{fallbackValue:"Loading..."});O.useEffect(()=>{n&&hr.error("Failed to retrieve repo",n)},[n]);let i={repo:t,repoPending:r};return o(Tn,{title:"Vencord Updater"},o(S.FormTitle,{tag:"h5"},"Updater Settings"),o(pt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),o(pt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),o(pt,{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"),o(S.FormTitle,{tag:"h5"},"Repo"),o(S.FormText,{className:"vc-text-selectable"},r?t:n?"Failed to retrieve - check console":o(it,{href:t},t.split("/").slice(-2).join("/"))," ","(",o(Vy,{hash:ln,repo:t,disabled:r}),")"),o(S.FormDivider,{className:Y.top8+" "+Y.bottom8}),o(S.FormTitle,{tag:"h5"},"Updates"),Ki?o(_M,{...i}):o(OM,{...i}))}var FM,nv=g(()=>{"use strict";a();$();jr();Dt();mo();ct();Be();Do();Oe();yr();I();Hr();Fo();FM=xn(BM,"Updater")});function Fa({value:e,onChange:t,validate:n}){let[r,i]=O.useState(e),[s,l]=O.useState();function c(u){i(u);let d=n(u);d===!0?(l(void 0),t(u)):l(d)}return o(f,null,o(et,{type:"text",value:r,onChange:c,error:s}))}var $u=g(()=>{"use strict";a();I()});var ov={};Ue(ov,{default:()=>zM});function UM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function $M(){let e=await fetch(new URL("/v1/",Eo()),{method:"DELETE",headers:new Headers({Authorization:await Yr()})});if(!e.ok){va.error(`Failed to erase data, API returned ${e.status}`),Ne({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}L.cloud.authenticated=!1,await nu(),Ne({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function GM(){let{cloud:e}=lt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(S.FormSection,{title:"Settings Sync",className:Y.top16},o(S.FormText,{variant:"text-md/normal",className:Y.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(pt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync=n}},"Settings Sync"),o("div",{className:"vc-cloud-settings-sync-grid"},o(E,{size:E.Sizes.SMALL,disabled:!t,onClick:()=>Zr(!0)},"Sync to Cloud"),o(V,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(E,{onMouseLeave:n,onMouseEnter:r,size:E.Sizes.SMALL,color:E.Colors.RED,disabled:!t,onClick:()=>wa(!0,!0)},"Sync from Cloud")),o(E,{size:E.Sizes.SMALL,color:E.Colors.RED,disabled:!t,onClick:()=>Vh()},"Delete Cloud Settings")))}function HM(){let e=lt(["cloud.authenticated","cloud.url"]);return o(Tn,{title:"Vencord Cloud"},o(S.FormSection,{title:"Cloud Settings",className:Y.top16},o(S.FormText,{variant:"text-md/normal",className:Y.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(it,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(it,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(pt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Kh(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(S.FormTitle,{tag:"h5"},"Backend URL"),o(S.FormText,{className:Y.bottom8},"Which backend to use when using cloud integrations."),o(Fa,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,nu()},validate:UM}),o(E,{className:Y.top8,size:E.Sizes.MEDIUM,color:E.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>an.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:$M,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(S.FormDivider,{className:Y.top16})),o(GM,null))}var zM,rv=g(()=>{"use strict";a();ko();$();$u();mo();ou();ct();Wi();I();Fo();zM=xn(HM,"Cloud")});var iv={};Ue(iv,{default:()=>WM});function jM(){return o(Tn,{title:"Backup & Restore"},o(xt,{className:re("vc-settings-card","vc-backup-restore-card")},o(ye,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(oe,{variant:"text-md/normal",className:Y.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."),o(oe,{variant:"text-md/normal",className:Y.bottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Theme Links"),o("li",null,"\u2014 Plugin Settings"))),o(ye,null,o(E,{onClick:()=>Qh(),size:E.Sizes.SMALL},"Import Settings"),o(E,{onClick:Xh,size:E.Sizes.SMALL},"Export Settings")))}var WM,sv=g(()=>{"use strict";a();Dt();ct();Be();Wi();I();Fo();WM=xn(jM,"Backup & Restore")});var is,Gu=g(()=>{"use strict";a();Mt();$();P();M();I();Hr();is=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,start(){ue("user-settings-cog",e=>()=>{e.find(n=>Array.isArray(n)&&n.some(r=>r?.props?.id==="VencordSettings"))?.forEach(n=>{let r=n?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(n.props.action=()=>no.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(L.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),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(py(),Io(uy)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Zy(),Io(Yy)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(Jy(),Io(Xy)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(nv(),Io(tv)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(rv(),Io(ov)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(sv(),Io(iv)).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:n,chromiumVersion:r,additionalInfo:i}=this;return o(f,null,o(e,{...t},"Vencord ",ln,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var av,qM,Hu,lv=g(()=>{"use strict";a();ss();P();Be();lo();M();yr();I();Hr();gr();Gu();av="Vencord-SupportHelper-Dismiss",qM=[oa,"1024286218801926184","1033680203433660458"],Hu=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>qM.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),n=c=>c.endsWith("API")||He[c].required,r=Object.keys(He).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(He).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.6.3 \u2022 ${ln}${is.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1699510576725)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Bo,OpenAsar:"openasar"in window};return{content:`
**Vencord Debug Info**
>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
`)}
Enabled Plugins (${r.length+i.length}):
-${Qi(r.join(", ")+`
+${Vi(r.join(", ")+`
`+i.join(", "))}
-`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===na&&!Ei(W.getCurrentUser().id)&&Do&&sn!==await Gt.get(cv)){let t=()=>Gt.set(cv,sn);rn.show({title:"Hold on!",body:o("div",null,o(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(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 ju,pv=g(()=>{"use strict";a();P();w();ju=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[d.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"}}]})});var Wu,dv=g(()=>{"use strict";a();P();w();Wu=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[d.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var nP,qu,mv=g(()=>{"use strict";a();$();P();w();nP=/\.tar\.\w+$/,qu=y({name:"AnonymiseFileNames",authors:[d.obscurity],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.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>E.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>E.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=nP.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(E.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:E.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=E.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function fv(e,t){return(await ur.fetchAssetIds(e,[t]))[0]}async function rP(e){let t={};return await oP.fetchApplicationsRPC(t,e),t.application}var oP,gv,ni,Ku,hv=g(()=>{"use strict";a();Pa();lo();P();w();j();A();oP=I("fetchApplicationsRPC","getRemoteIconURL");gv={};Ku=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[d.Ducko],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to use arRPC"),o(S.FormText,null,o(st,{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:n}=t,r=n?.assets;if(r?.large_image&&(r.large_image=await fv(n.application_id,r.large_image)),r?.small_image&&(r.small_image=await fv(n.application_id,r.small_image)),n){let i=n.application_id;gv[i]||=await rP(i);let s=gv[i];n.name||=s.name}F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(ni&&ni.close(),ni=new WebSocket("ws://127.0.0.1:1337"),ni.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(ni.readyState===WebSocket.OPEN),1e3))){Zi("Failed to connect to arRPC, is it running?","Retry",()=>{fu(),this.start()});return}ee.show({message:"Connected to arRPC",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})},stop(){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),ni?.close()}})});var Yu,yv=g(()=>{"use strict";a();P();w();Yu=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[d.Xinto,d.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 vv,Sv,iP,bv,Tv=g(()=>{"use strict";a();le();j();A();Zu();vv=Me("ChannelRTCStore"),Sv=I("a","animated","useTransition"),iP=Xe('("guildsnav")'),bv=_.wrap(e=>{let t=He([oi],()=>oi.getExpandedFolders()),n=He([vv],()=>vv.isFullscreenInContext()),r=o(iP,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:n?"none":"flex"};return!s||!ft.store.sidebarAnim?i?o("div",{style:l},r):null:o(Sv.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&o(Sv.animated.div,{style:{...c,...l}},r))},{noop:!0})});function lP(e){return aP.getGuildFolders().find(t=>t.guildIds.includes(e))}function wv(){for(let e of oi.getExpandedFolders())Ju.toggleGuildFolderExpand(e)}var sP,aP,oi,Ju,xv,Xu,ft,Qu,Zu=g(()=>{"use strict";a();$();P();w();j();A();Tv();({GuildsTree:sP}=I("GuildsTree")),aP=Me("SortedGuildStore"),oi=Me("ExpandedGuildFolderStore"),Ju=I("move","toggleGuildFolderExpand"),xv=null,Xu=!1;ft=D({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}}),Qu=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[d.juby,d.AutumnVN,d.Nuckyz],settings:ft,patches:[{find:'("guildsnav")',predicate:()=>ft.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,n)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${n},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:()=>ft.store.sidebar&&ft.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,n)=>`${t}${n}.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:()=>ft.store.sidebar,replacement:[{predicate:()=>ft.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!ft.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!ft.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:()=>ft.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>ft.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>ft.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>ft.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!ft.store.closeAllFolders&&!ft.store.forceOpen)&&xv!==e.guildId){xv=e.guildId;let t=lP(e.guildId);t?.folderId?ft.store.forceOpen&&!oi.isFolderExpanded(t.folderId)&&Ju.toggleGuildFolderExpand(t.folderId):ft.store.closeAllFolders&&wv()}},TOGGLE_GUILD_FOLDER_EXPAND(e){ft.store.closeOthers&&!Xu&&(Xu=!0,F.wait(()=>{let t=oi.getExpandedFolders();if(t.size>1)for(let n of t)n!==e.folderId&&Ju.toggleGuildFolderExpand(n);Xu=!1}))}},getGuildTree(e,t,n){if(!e||n==null)return t;let r=new sP;return r.root.children=t.root.children.filter(i=>n.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>n.has(s.id)||n.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===ot.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(ft.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>o(bv,{...e}),closeFolders:wv})});var Vu,Mv=g(()=>{"use strict";a();P();w();Vu=y({name:"BetterGifAltText",authors:[d.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 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 cP,ep,Pv=g(()=>{"use strict";a();$();P();w();j();cP=I("section","lastSection"),ep=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[d.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:()=>E.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return o("div",{className:cP.lastSection})}})});var tp,Iv=g(()=>{"use strict";a();$();P();w();A();tp=y({name:"BetterRoleDot",authors:[d.Ven,d.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:()=>E.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.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){Zt.copy(e),ee.show({message:"Copied to Clipboard!",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})}})});var np,Av=g(()=>{"use strict";a();P();w();np=y({name:"BetterUploadButton",authors:[d.obscurity,d.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 Nv,Cv,kv=g(()=>{"use strict";a();j();Nv=Me("ApplicationStreamPreviewStore"),Cv=Me("ApplicationStreamingStore")});var uP,Ev,Rv,Lv,op,Dv=g(()=>{"use strict";a();Pt();$t();P();bt();w();A();kv();uP=async({guildId:e,channelId:t,ownerId:n})=>{let r=await Nv.getPreviewURL(e,t,n);!r||On(r)},Ev=(e,{userId:t})=>()=>{let n=Cv.getAnyStreamForUser(t);if(!n)return;let r=o(G.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:vy,action:()=>n&&uP(n),disabled:!n});e.push(o(G.MenuSeparator,null),r)},Rv=(e,{stream:t})=>Ev(e,{userId:t.ownerId}),Lv=(e,{user:t})=>Ev(e,{userId:t.id}),op=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[d.phil],start:()=>{ce("user-context",Lv),ce("stream-context",Rv)},stop:()=>{de("user-context",Lv),de("stream-context",Rv)}})});function Ov(){ls.textContent=`
+`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===oa&&!Di(W.getCurrentUser().id)&&Bo&&ln!==await zt.get(av)){let t=()=>zt.set(av,ln);an.show({title:"Hold on!",body:o("div",null,o(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(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 zu,cv=g(()=>{"use strict";a();P();M();zu=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[p.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"}}]})});var ju,uv=g(()=>{"use strict";a();P();M();ju=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var KM,Wu,pv=g(()=>{"use strict";a();$();P();M();KM=/\.tar\.\w+$/,Wu=y({name:"AnonymiseFileNames",authors:[p.obscurity],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.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>L.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>L.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=KM.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(L.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:L.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=L.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function dv(e,t){return(await ur.fetchAssetIds(e,[t]))[0]}async function ZM(e){let t={};return await YM.fetchApplicationsRPC(t,e),t.application}var YM,mv,ii,qu,fv=g(()=>{"use strict";a();Ia();mo();P();M();j();I();YM=A("fetchApplicationsRPC","getRemoteIconURL");mv={};qu=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to use arRPC"),o(S.FormText,null,o(it,{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:n}=t,r=n?.assets;if(r?.large_image&&(r.large_image=await dv(n.application_id,r.large_image)),r?.small_image&&(r.small_image=await dv(n.application_id,r.small_image)),n){let i=n.application_id;mv[i]||=await ZM(i);let s=mv[i];n.name||=s.name}B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(ii&&ii.close(),ii=new WebSocket("ws://127.0.0.1:1337"),ii.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(ii.readyState===WebSocket.OPEN),1e3))){Xi("Failed to connect to arRPC, is it running?","Retry",()=>{du(),this.start()});return}ee.show({message:"Connected to arRPC",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})},stop(){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),ii?.close()}})});var Ku,gv=g(()=>{"use strict";a();P();M();Ku=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[p.Xinto,p.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 hv,yv,XM,vv,Sv=g(()=>{"use strict";a();le();Oe();j();I();Yu();hv=Ie("ChannelRTCStore"),yv=A("a","animated","useTransition"),XM=me(()=>st(e=>e.type?.toString().includes('("guildsnav")'))),vv=_.wrap(e=>{let t=We([si],()=>si.getExpandedFolders()),n=We([hv],()=>hv.isFullscreenInContext()),r=o(XM,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:n?"none":"flex"};return!s||!ft.store.sidebarAnim?i?o("div",{style:l},r):null:o(yv.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&o(yv.animated.div,{style:{...c,...l}},r))},{noop:!0})});function VM(e){return QM.getGuildFolders().find(t=>t.guildIds.includes(e))}function Tv(){for(let e of si.getExpandedFolders())Xu.toggleGuildFolderExpand(e)}var JM,QM,si,Xu,bv,Zu,ft,Ju,Yu=g(()=>{"use strict";a();$();P();Zt();M();j();I();Sv();JM=Qe(()=>yt("GuildsTree").GuildsTree),QM=Ie("SortedGuildStore"),si=Ie("ExpandedGuildFolderStore"),Xu=A("move","toggleGuildFolderExpand"),bv=null,Zu=!1;ft=D({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}}),Ju=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN,p.Nuckyz],settings:ft,patches:[{find:'("guildsnav")',predicate:()=>ft.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,n)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${n},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:()=>ft.store.sidebar&&ft.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,n)=>`${t}${n}.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:()=>ft.store.sidebar,replacement:[{predicate:()=>ft.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!ft.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!ft.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:()=>ft.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>ft.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>ft.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>ft.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!ft.store.closeAllFolders&&!ft.store.forceOpen)&&bv!==e.guildId){bv=e.guildId;let t=VM(e.guildId);t?.folderId?ft.store.forceOpen&&!si.isFolderExpanded(t.folderId)&&Xu.toggleGuildFolderExpand(t.folderId):ft.store.closeAllFolders&&Tv()}},TOGGLE_GUILD_FOLDER_EXPAND(e){ft.store.closeOthers&&!Zu&&(Zu=!0,B.wait(()=>{let t=si.getExpandedFolders();if(t.size>1)for(let n of t)n!==e.folderId&&Xu.toggleGuildFolderExpand(n);Zu=!1}))}},getGuildTree(e,t,n){if(!e||n==null)return t;let r=new JM;return r.root.children=t.root.children.filter(i=>n.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>n.has(s.id)||n.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===Ct.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(ft.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>o(vv,{...e}),closeFolders:Tv})});var Qu,xv=g(()=>{"use strict";a();P();M();Qu=y({name:"BetterGifAltText",authors:[p.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 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 eP,Vu,wv=g(()=>{"use strict";a();$();P();M();j();eP=A("section","lastSection"),Vu=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.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:()=>L.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return o("div",{className:eP.lastSection})}})});var ep,Mv=g(()=>{"use strict";a();$();P();M();I();ep=y({name:"BetterRoleDot",authors:[p.Ven,p.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:()=>L.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>L.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!L.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>L.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!L.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){Qt.copy(e),ee.show({message:"Copied to Clipboard!",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})}})});var tp,Pv=g(()=>{"use strict";a();P();M();tp=y({name:"BetterUploadButton",authors:[p.obscurity,p.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 Iv,Av,Nv=g(()=>{"use strict";a();j();Iv=Ie("ApplicationStreamPreviewStore"),Av=Ie("ApplicationStreamingStore")});var tP,Rv,Cv,kv,np,Lv=g(()=>{"use strict";a();Mt();Ht();P();It();M();I();Nv();tP=async({guildId:e,channelId:t,ownerId:n})=>{let r=await Iv.getPreviewURL(e,t,n);!r||Bn(r)},Rv=(e,{userId:t})=>()=>{let n=Av.getAnyStreamForUser(t);if(!n)return;let r=o(U.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:yy,action:()=>n&&tP(n),disabled:!n});e.push(o(U.MenuSeparator,null),r)},Cv=(e,{stream:t})=>Rv(e,{userId:t.ownerId}),kv=(e,{user:t})=>Rv(e,{userId:t.id}),np=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],start:()=>{ue("user-context",kv),ue("stream-context",Cv)},stop:()=>{fe("user-context",kv),fe("stream-context",Cv)}})});function Ev(){as.textContent=`
.vc-nsfw-img [class^=imageWrapper] img,
.vc-nsfw-img [class^=wrapperPaused] video {
- filter: blur(${E.plugins.BlurNSFW.blurAmount}px);
+ filter: blur(${L.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 ls,rp,_v=g(()=>{"use strict";a();$();P();w();rp=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[d.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper/g,replace:"$&+(this.props.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:Ov}},start(){ls=document.createElement("style"),ls.id="VcBlurNsfw",document.head.appendChild(ls),Ov()},stop(){ls?.remove()}})});function pP(e){let t=E.plugins.CallTimer.format==="human",n=m=>t?m:m.toString().padStart(2,"0"),r=m=>t?m:"",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+=`${n(l)}${r("h")}${i}`),(c||p||!t)&&(p+=`${n(c)}${r("m")}${i}`),p+=`${n(u)}${r("s")}`,p}var ip,Bv=g(()=>{"use strict";a();$();le();P();Qe();w();ip=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[d.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 o(_,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Di({deps:[e]});return o("p",{style:{margin:0}},"Connected for ",o("span",{style:{fontFamily:"var(--font-code)"}},pP(t)))}})});var dp={};Be(dp,{_handleClick:()=>fP,_handlePreEdit:()=>mP,_handlePreSend:()=>dP,addClickListener:()=>up,addPreEditListener:()=>br,addPreSendListener:()=>Ht,removeClickListener:()=>pp,removePreEditListener:()=>Tr,removePreSendListener:()=>zt});async function dP(e,t,n,r){n.replyOptions=r;for(let i of ap)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){sp.error(`MessageSendHandler: Listener encountered an unknown error
-`,s)}return!1}async function mP(e,t,n){for(let r of lp)try{await r(e,t,n)}catch(i){sp.error(`MessageEditHandler: Listener encountered an unknown error
-`,i)}}function Ht(e){return ap.add(e),e}function br(e){return lp.add(e),e}function zt(e){return ap.delete(e)}function Tr(e){return lp.delete(e)}function fP(e,t,n){e=An.getMessage(t.id,e.id)??e;for(let r of cp)try{r(e,t,n)}catch(i){sp.error(`MessageClickHandler: Listener encountered an unknown error
-`,i)}}function up(e){return cp.add(e),e}function pp(e){return cp.delete(e)}var sp,ap,lp,cp,Yn=g(()=>{"use strict";a();Ze();A();sp=new ie("MessageEvents","#e5c890"),ap=new Set,lp=new Set;cp=new Set});var Fv,Uv=g(()=>{"use strict";a();Fv=["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","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","share_id@reddit.com"]});var $v,gP,mp,Gv=g(()=>{"use strict";a();Yn();P();w();Uv();$v=/[\\^$.*+?()[\]{}|]/g,gP=RegExp($v.source),mp=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[d.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&gP.test(e)?e.replace($v,"\\$&"):e||""},createRules(){let e=Fv;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 i=new RegExp("^(www\\.)?"+this.escapeRegExp(n[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,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,i,s)=>{this.removeParam(n,i,s)})}),this.hostRules.forEach((n,r)=>{!n.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=Ht((e,t)=>this.onSend(t)),this.preEdit=br((e,t,n)=>this.onSend(n))},stop(){zt(this.preSend),Tr(this.preEdit)}})});var Hv=g(()=>{});function jv(e){let t=e.toString(16).padStart(6,"0");cs.store.color=t,Wv(t)}function vP(){let e=TP(cs.store.color)>45,t=Uo()===2;return o("div",{className:"client-theme-settings"},o("div",{className:"client-theme-container"},o("div",{className:"client-theme-settings-labels"},o(S.FormTitle,{tag:"h3"},"Theme Color"),o(S.FormText,null,"Add a color to your Discord client theme")),o(hP,{color:parseInt(cs.store.color,16),onChange:jv,showEyeDropper:!1,suggestedColors:yP})),e||t?o("div",null,o(S.FormDivider,{className:oe(q.top8,q.bottom8)}),o(S.FormText,{className:"client-theme-warning"},"Your theme won't look good:"),e&&o(S.FormText,{className:"client-theme-warning"},"Selected color is very light"),t&&o(S.FormText,{className:"client-theme-warning"},"Light mode isn't supported")):null)}async function SP(){let e=document.querySelectorAll('link[rel="stylesheet"]'),t={};for(let i of e){let s=i.getAttribute("href");if(!s)continue;let c=await(await fetch(s)).text(),u=zv.exec(c);for(;u!==null;){let[,p,m]=u;t[p]=parseFloat(m),u=zv.exec(c)}}let n=Object.entries(t).map(([i,s])=>{let l=s-t["--primary-600-hsl"],c=l>=0?"+":"-";return`${i}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${c} ${Math.abs(l).toFixed(2)}%);`}).join(`
-`),r=document.createElement("style");r.setAttribute("id","clientThemeOffsets"),r.textContent=`:root:root {
- ${n}
- }`,document.head.appendChild(r)}function Wv(e){let{hue:t,saturation:n,lightness:r}=bP(e),i=document.getElementById("clientThemeVars");i||(i=document.createElement("style"),i.setAttribute("id","clientThemeVars"),document.head.appendChild(i)),i.textContent=`:root {
- --theme-h: ${t};
- --theme-s: ${n}%;
- --theme-l: ${r}%;
- }`}function bP(e){let t=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,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=(n-r)/l%6:i===n?c=(r-t)/l+2:c=(t-n)/l+4,c*=60,c<0&&(c+=360)),u*=100,p*=100,{hue:c,saturation:u,lightness:p}}function TP(e){let t=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r);return 100*((i+s)/2)}var hP,yP,cs,fp,zv,qv=g(()=>{"use strict";a();Hv();$();P();bt();at();Re();w();j();A();hP=Xe(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR"),yP=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938"];cs=D({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>o(vP,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>o(R,{onClick:()=>jv(3224376)},"Reset Theme Color")}}),fp=y({name:"ClientTheme",authors:[d.F53,d.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:cs,startAt:"DOMContentLoaded",start(){Wv(cs.store.color),SP()},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),zv=/(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g});var gp,Kv=g(()=>{"use strict";a();P();w();gp=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[d.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"'}}]})});function xr(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Ba(e,t){let n=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",n):(...r)=>e(...r).replaceAll("$self",n)}function hp(e,t){if(e.get){let n=e.get;e.get=function(){return t(n.call(this))}}else e.value&&(e.value=t(e.value));return e}function us(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=hp(n.match,xr),n.replace=hp(n.replace,r=>Ba(r,t)),Object.defineProperties(e,n)}var ps=g(()=>{"use strict";a()});var yp,Yv=g(()=>{"use strict";a();P();Ro();ps();w();j();j();A();yp=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[d.Ven],getShortcuts(){function e(r){let i=new Map;return function(...s){let l=String(s);if(i.has(l))return i.get(l);let c=rr(r(...s)),u=(()=>{switch(c.length){case 0:return null;case 1:return c[0];default:let p=[...new Set(c)];return p.length>1&&console.warn(`Warning: This filter matches ${c.length} modules. Make it more specific!
-`,p),c[0]}})();return u&&l&&i.set(l,u),u}}let t,n=e(r=>r);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:Mn.c,wreq:Mn,wpsearch:lc,wpex:Zs,wpexs:r=>Zs(ic(r)),find:n,findAll:rr,findByProps:e(Ke.byProps),findAllByProps:(...r)=>rr(Ke.byProps(...r)),findByCode:e(Ke.byCode),findAllByCode:r=>rr(Ke.byCode(r)),findComponentByCode:e(Ke.componentByCode),findAllComponentsByCode:(...r)=>rr(Ke.componentByCode(...r)),findExportedComponent:(...r)=>n(...r)[r[0]],findStore:e(Ke.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:ln,canonicalizeMatch:xr,canonicalizeReplace:Ba,canonicalizeReplacement:us,fakeRender:(r,i)=>{let s=t?.deref(),l=s?.closed===!1?s:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(l),l.focus();let c=l.document;c.body.style.margin="1em",l.prepared||(l.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(u=>{let p=u.cloneNode(!0);u.parentElement?.tagName==="HEAD"?c.head.append(p):p.id?.startsWith("vencord-")||p.id?.startsWith("vcd-")?c.documentElement.append(p):c.body.append(p)})),sr.render(O.createElement(r,i),c.body.appendChild(document.createElement("div")))}}},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 Zv,vp,Xv=g(()=>{"use strict";a();Pt();$t();P();w();A();Zv=(e,{user:t})=>()=>{e.push(o(G.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Zt.copy(``),icon:Jr}))},vp=y({name:"CopyUserURLs",authors:[d.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ce("user-context",Zv)},stop(){de("user-context",Zv)}})});var $o,xP,Sp,bp,Fa,Tp,xp,Jv=g(()=>{"use strict";a();Ao();$();P();Ze();dt();w();yr();j();A();$o=new ie("CrashHandler"),xP=I("pushLazy","popAll"),Sp=D({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}}),bp=0,Fa=0,Tp=!1,xp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[d.Nuckyz],enabledByDefault:!0,settings:Sp,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-Fa<=1e3&&!Tp)return!0;if(Tp=!1,++bp>5){try{Ie({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return Fa=Date.now(),!1}setTimeout(()=>bp--,6e4);try{return bp===1&&Ki("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),Sp.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return $o.error("Failed to handle crash",t),!1}finally{Fa=Date.now()}},handlePreventCrash(e){if(Date.now()-Fa>=1e3)try{Ie({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{F.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){$o.debug("Failed to close open context menu.",t)}try{xP?.popAll()}catch(t){$o.debug("Failed to close old modals.",t)}try{wc()}catch(t){$o.debug("Failed to close all open modals.",t)}try{F.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){$o.debug("Failed to close user popout.",t)}try{F.dispatch({type:"LAYER_POP_ALL"})}catch(t){$o.debug("Failed to pop all layers.",t)}if(Sp.store.attemptToNavigateToHome)try{pr.transitionTo("/channels/@me")}catch(t){$o.debug("Failed to navigate to home",t)}try{Tp=!0,e.forceUpdate()}catch(t){$o.debug("Failed to update crash handler component.",t)}}})});function Ua(e){return Boolean(e)}function wp(e){return e!=null}var $a=g(()=>{"use strict";a()});async function Qv(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await ur.fetchAssetIds(wr.store.appID,[e]))[0]}function Ct(){Ga(!0),E.plugins.CustomRPC.enabled&&Ga()}function t1(){return wr.store.type!==1}function IP(e){return!t1()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function Vv(){return wr.store.timestampMode!==3}function e1(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 n1(){let{appID:e,appName:t,details:n,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:m,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:T,buttonTwoText:M,buttonTwoURL:b}=wr.store;if(!t)return;let x={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};switch(i===1&&(x.url=s),wr.store.timestampMode){case 1:x.timestamps={start:Math.floor(Date.now()/1e3)};break;case 2:x.timestamps={start:Math.floor(Date.now()/1e3)-new Date().getHours()*3600-new Date().getMinutes()*60-new Date().getSeconds()};break;case 3:(l||c)&&(x.timestamps={},l&&(x.timestamps.start=l),c&&(x.timestamps.end=c));break;case 0:default:break}v&&(x.buttons=[v,M].filter(Ua),x.metadata={button_urls:[T,b].filter(Ua)}),u&&(x.assets={large_image:await Qv(u),large_text:p||void 0}),m&&(x.assets={...x.assets,small_image:await Qv(m),small_text:h||void 0});for(let N in x){if(N==="type")continue;let k=x[N];(!k||k.length===0)&&delete x[N]}return x}async function Ga(e){let t=await n1();F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var wP,MP,PP,wr,Mp,o1=g(()=>{"use strict";a();$();lo();P();$a();Qe();w();j();A();wP=Xe("onOpenGameProfile"),MP=I("activity","buttonColor"),PP=I("profileColors");wr=D({appID:{type:0,description:"Application ID (required)",onChange:Ct,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:Ct,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:Ct,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:Ct,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ct,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:Ct,disabled:t1,isValid:IP},timestampMode:{type:4,description:"Timestamp mode",onChange:Ct,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 (only for custom timestamp mode)",onChange:Ct,disabled:Vv,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp (only for custom timestamp mode)",onChange:Ct,disabled:Vv,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ct,isValid:e1},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ct,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:Ct,isValid:e1},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ct,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:Ct,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:Ct},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ct,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:Ct}});Mp=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[d.captain,d.AutumnVN],start:Ga,stop:()=>Ga(!0),settings:wr,settingsAboutComponent:()=>{let e=rt(n1);return o(f,null,o(S.FormText,null,"Go to ",o(st,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),o(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),o(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",o(st,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),o(S.FormDivider,null),o("div",{style:{width:"284px"},className:PP.profileColors},e[0]&&o(wP,{activity:e[0],className:MP.activity,channelId:Pe.getChannelId(),guild:Te.getGuild(on.getLastSelectedGuildId()),application:{id:wr.store.appID},user:W.getCurrentUser()})))}})});var r1=g(()=>{});async function NP(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=AP.exec(e.video.url)?.[1];if(!t)return;let n=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!n.ok)return;let{titles:r,thumbnails:i}=await n.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),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 ie("Dearrow").error("Failed to dearrow embed",e)}}function CP({component:e}){let{embed:t}=e.props;return t?.dearrow?o(V,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:n,onMouseLeave:r})=>o("button",{onMouseEnter:n,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()}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},o("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"}),o("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"}),o("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 AP,Pp,i1=g(()=>{"use strict";a();r1();le();P();Ze();w();A();AP=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;Pp=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[d.Ven],embedDidMount:NP,renderButton(e){return o(_,{noop:!0},o(CP,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var Ip,s1=g(()=>{"use strict";a();P();w();Ip=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes.",authors:[d.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,120}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function Ap(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${LP[e.format_type]}`}async function c1(e){let t=kP.getStickerById(e);if(t)return t;let{body:n}=await Mt.get({url:`/stickers/${e}`});return F.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:n}),n}async function EP(e,t){let n=new FormData;n.append("name",t.name),n.append("tags",t.tags),n.append("description",t.description),n.append("file",await u1(Ap(t)));let{body:r}=await Mt.post({url:`/guilds/${e}/stickers`,body:n});F.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:W.getCurrentUser()}})}async function DP(e,t){let n=await u1(Ap(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(n)});return RP.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function OP(e){let t=W.getCurrentUser().id;return Object.values(Te.getGuilds()).filter(n=>{if(!(n.ownerId===t||(Ce.getGuildPermissions({id:n.id})&Se.CREATE_GUILD_EXPRESSIONS)===Se.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=n.getMaxEmojiSlots(),{emojis:l}=Nn.getGuilds()[n.id],c=0;for(let u of l)u.animated===i&&c++;return cn.name.localeCompare(r.name))}async function u1(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function _P(e,t){try{t.t==="Sticker"?await EP(e,t):await DP(e,t),ee.show({message:`Successfully cloned ${t.name} to ${Te.getGuild(e)?.name??"your server"}!`,type:ee.Type.SUCCESS,id:ee.genId()})}catch(n){let r="Something went wrong (check console!)";try{r=JSON.parse(n.text).message}catch{}new ie("EmoteCloner").error("Failed to clone",t.name,"to",e,n),ee.show({message:"Failed to clone: "+r,type:ee.Type.FAILURE,id:ee.genId()})}}function UP({data:e}){let[t,n]=O.useState(!1),[r,i]=O.useState(e.name),[s,l]=O.useReducer(u=>u+1,0),c=O.useMemo(()=>OP(e),[e.id,s]);return o(f,null,o(S.FormTitle,{className:q.top20},"Custom Name"),o(_a,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&FP.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),o("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>o(V,{text:u.name},({onMouseLeave:p,onMouseEnter:m})=>o("div",{onMouseLeave:p,onMouseEnter:m,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()=>{n(!0),_P(u.id,e).finally(()=>{l(),n(!1)})}},u.icon?o("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):o(S.FormText,{style:{fontSize:BP(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function Ha(e,t){return o(G.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>_i(async()=>{let n=await t(),r={t:e,...n},i=Ap(r);return s=>o(ze,{...s},o(lt,null,o("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(S.FormText,null,"Clone ",r.name)),o(et,null,o(UP,{data:r})))})})}function p1(e){return new URL(e).pathname.endsWith(".gif")}var kP,RP,LP,BP,FP,a1,l1,Np,d1=g(()=>{"use strict";a();Pt();Gu();P();Ze();at();dt();w();j();A();kP=Me("StickersStore"),RP=I("fetchEmoji","uploadEmoji","deleteEmoji"),LP=[,"png","png","json","gif"];BP=e=>[20,20,18,18,16,14,12][e.length]??4,FP=/^\w+$/i;a1=(e,t)=>()=>{let{favoriteableId:n,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!n)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${n}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return Ha("Emoji",()=>({id:n,name:u,isAnimated:p1(r??i)}));case"sticker":return t.message.stickerItems.find(m=>m.id===n)?.format_type===3?void 0:Ha("Sticker",()=>c1(n))}})();l&&mt("copy-link",e)?.push(l)},l1=(e,t)=>()=>{let{id:n,name:r,type:i}=t?.target?.dataset??{};if(!!n)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(Ha("Emoji",()=>({id:n,name:r,isAnimated:s&&p1(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(Ha("Sticker",()=>c1(n)))},Np=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[d.Ven,d.Nuckyz],start(){ce("message",a1),ce("expression-picker",l1)},stop(){de("message",a1),de("expression-picker",l1)}})});var Cp,m1,kp,f1=g(()=>{"use strict";a();$();le();Hr();P();at();w();j();A();Cp=I("key","removeBuildOverride"),m1=D({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),kp=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[d.Megu,d.Ven,d.Nickyux,d.BanTheNons,d.Nuckyz],settings:m1,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:()=>m1.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,n)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${n}.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",n=e?"opt":"alt";return o(O.Fragment,null,o(S.FormTitle,{tag:"h3"},"More Information"),o(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:Cp.key},t)," +"," ",o("kbd",{className:Cp.key},n)," +"," ",o("kbd",{className:Cp.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(S.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))},WarningCard:_.wrap(()=>o(hn,{id:"vc-experiments-warning-card",className:q.bottom16},o(S.FormTitle,{tag:"h2"},"Hold on!!"),o(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),o(S.FormText,{className:q.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 Rp,g1=g(()=>{"use strict";a();P();w();Rp=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[d.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var h1=g(()=>{"use strict";a()});var v1=or((D8,y1)=>{"use strict";a();var co=y1.exports;(function e(t,n,r){function i(c,u){if(!n[c]){if(!t[c]){var p=typeof Rr=="function"&&Rr;if(!u&&p)return p(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var m=n[c]={exports:{}};t[c][0].call(m.exports,function(h){var v=t[c][1][h];return i(v||h)},m,m.exports,e,t,n,r)}return n[c].exports}for(var s=typeof Rr=="function"&&Rr,l=0;l"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",N=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function k(){var C=setTimeout;return function(){return C(U,1)}}var B=new Array(1e3);function U(){for(var C=0;C