diff --git a/js/main.js b/js/main.js index 374f3650..c479fc1b 100644 --- a/js/main.js +++ b/js/main.js @@ -371,7 +371,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2 {\n constructor() {\n this.editorDetached = false;\n\n this.WebpackModules = (() => {\n const req = webpackJsonp.push([[], {\n __extra_id__: (module, exports, req) => module.exports = req\n }, [[\"__extra_id__\"]]]);\n delete req.m.__extra_id__;\n delete req.c.__extra_id__;\n\n const protect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return null;\n if (!theModule.getToken && !theModule.getEmail && !theModule.showToken) return theModule;\n return new Proxy(theModule, {\n get: function (obj, func) {\n if (func == \"getToken\") return () => \"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa\";\n if (func == \"getEmail\") return () => \"puppet11112@gmail.com\";\n if (func == \"showToken\") return () => true;\n return obj[func];\n }\n });\n };\n\n const find = filter => {\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default);\n if (m && filter(m)) return protect(m);\n }\n } // console.warn(\"Cannot find loaded module in cache\");\n\n\n return null;\n };\n\n const findAll = filter => {\n const modules = [];\n\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default));else if (m && filter(m)) modules.push(protect(m));\n }\n }\n\n return modules;\n };\n\n const findByUniqueProperties = propNames => find(module => propNames.every(prop => module[prop] !== undefined));\n\n const findByPrototypes = protoNames => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));\n\n const findByDisplayName = displayName => find(module => module.displayName === displayName);\n\n return {\n find,\n findAll,\n findByUniqueProperties,\n findByPrototypes,\n findByDisplayName\n };\n })();\n\n this.internal = {\n react: this.WebpackModules.findByUniqueProperties([\"Component\", \"PureComponent\", \"Children\", \"createElement\", \"cloneElement\"]),\n reactDom: this.WebpackModules.findByUniqueProperties([\"findDOMNode\"])\n };\n\n this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith(\"__reactInternalInstance\"))];\n }\n\n initialize() {}\n\n joinBD1() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"0Tmfo5ZbORCRqbAd\");\n }\n\n leaveBD1() {\n this.GuildActions.leaveGuild(\"86004744966914048\");\n }\n\n joinBD2() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n }\n\n leaveBD2() {\n this.GuildActions.leaveGuild(\"280806472928198656\");\n }\n\n get react() {\n return this.internal.react;\n }\n\n get React() {\n return this.internal.react;\n }\n\n get reactDom() {\n return this.internal.reactDom;\n }\n\n get ReactDom() {\n return this.internal.reactDom;\n }\n\n get reactComponent() {\n return this.internal.react.Component;\n }\n\n get ReactComponent() {\n return this.internal.react.Component;\n }\n\n get anchorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"anchorUnderlineOnHover\"]) || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n }\n\n get slateEditorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"slateTextArea\"]);\n }\n\n get messageClasses() {\n return this.WebpackModules.findByUniqueProperties([\"message\", \"containerCozy\"]);\n }\n\n get guildClasses() {\n const guildsWrapper = this.WebpackModules.findByUniqueProperties([\"wrapper\", \"unreadMentionsBar\"]);\n const guilds = this.WebpackModules.findByUniqueProperties([\"guildsError\", \"selected\"]);\n const pill = this.WebpackModules.findByUniqueProperties([\"blobContainer\"]);\n return Object.assign({}, guildsWrapper, guilds, pill);\n }\n\n get MessageContentComponent() {\n return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty(\"disableButtons\"));\n }\n\n get MessageComponent() {\n return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == \"Message\");\n }\n\n get TimeFormatter() {\n return this.WebpackModules.findByUniqueProperties([\"dateFormat\"]);\n }\n\n get TooltipWrapper() {\n return this.WebpackModules.findByDisplayName(\"Tooltip\");\n }\n\n get NativeModule() {\n return this.WebpackModules.findByUniqueProperties([\"setBadge\"]);\n }\n\n get InviteActions() {\n return this.WebpackModules.findByUniqueProperties([\"acceptInvite\"]);\n }\n\n get GuildActions() {\n return this.WebpackModules.findByUniqueProperties([\"leaveGuild\"]);\n }\n\n get Tooltips() {\n return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);\n }\n\n get KeyGenerator() {\n return this.WebpackModules.find(m => m.toString && /\"binary\"/.test(m.toString()));\n }\n\n get LayerStack() {\n return this.WebpackModules.findByUniqueProperties([\"popLayer\"]);\n }\n\n get UserStore() {\n return this.WebpackModules.findByUniqueProperties([\"getCurrentUser\"]);\n }\n\n get ChannelStore() {\n return this.WebpackModules.findByUniqueProperties([\"getChannel\"]);\n }\n\n get ChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"openPrivateChannel\"]);\n }\n\n get PrivateChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"selectPrivateChannel\"]);\n }\n\n openDM(userId) {\n const selfId = this.UserStore.getCurrentUser().id;\n if (selfId == userId) return;\n const privateChannelId = this.ChannelStore.getDMFromUserId(userId);\n if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);\n this.ChannelActions.openPrivateChannel(selfId, userId);\n }\n\n parseSettings(cat) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === cat && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92Mi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy92Mi5qcz84NTdiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgVjIge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICB0aGlzLmVkaXRvckRldGFjaGVkID0gZmFsc2U7XG5cbiAgICB0aGlzLldlYnBhY2tNb2R1bGVzID0gKCgpID0+IHtcbiAgICAgIGNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICAgICAgICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbiAgICAgIH0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG4gICAgICBkZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuICAgICAgZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuICAgICAgY29uc3QgcHJvdGVjdCA9IHRoZU1vZHVsZSA9PiB7XG4gICAgICAgIGlmICh0aGVNb2R1bGUucmVtb3ZlICYmIHRoZU1vZHVsZS5zZXQgJiYgdGhlTW9kdWxlLmNsZWFyICYmIHRoZU1vZHVsZS5nZXQgJiYgIXRoZU1vZHVsZS5zb3J0KSByZXR1cm4gbnVsbDtcbiAgICAgICAgaWYgKCF0aGVNb2R1bGUuZ2V0VG9rZW4gJiYgIXRoZU1vZ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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/v2.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2 {\n constructor() {\n this.editorDetached = false;\n\n this.WebpackModules = (() => {\n const req = webpackJsonp.push([[], {\n __extra_id__: (module, exports, req) => module.exports = req\n }, [[\"__extra_id__\"]]]);\n delete req.m.__extra_id__;\n delete req.c.__extra_id__;\n\n const shouldProtect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return true;\n if (theModule.getToken || theModule.getEmail || theModule.showToken) return true;\n return false;\n };\n\n const protect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return null;\n if (!theModule.getToken && !theModule.getEmail && !theModule.showToken) return theModule;\n const proxy = new Proxy(theModule, {\n get: function (obj, func) {\n if (func == \"getToken\") return () => \"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa\";\n if (func == \"getEmail\") return () => \"puppet11112@gmail.com\";\n if (func == \"showToken\") return () => true;\n if (func == \"__proto__\") return proxy;\n return obj[func];\n }\n });\n return proxy;\n };\n\n const find = filter => {\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default);\n if (m && filter(m)) return protect(m);\n }\n } // console.warn(\"Cannot find loaded module in cache\");\n\n\n return null;\n };\n\n const findAll = filter => {\n const modules = [];\n\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default));else if (m && filter(m)) modules.push(protect(m));\n }\n }\n\n return modules;\n };\n\n const findByUniqueProperties = propNames => find(module => propNames.every(prop => module[prop] !== undefined));\n\n const findByPrototypes = protoNames => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));\n\n const findByDisplayName = displayName => find(module => module.displayName === displayName);\n\n return {\n find,\n findAll,\n findByUniqueProperties,\n findByPrototypes,\n findByDisplayName\n };\n })();\n\n this.internal = {\n react: this.WebpackModules.findByUniqueProperties([\"Component\", \"PureComponent\", \"Children\", \"createElement\", \"cloneElement\"]),\n reactDom: this.WebpackModules.findByUniqueProperties([\"findDOMNode\"])\n };\n\n this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith(\"__reactInternalInstance\"))];\n }\n\n initialize() {}\n\n joinBD1() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"0Tmfo5ZbORCRqbAd\");\n }\n\n leaveBD1() {\n this.GuildActions.leaveGuild(\"86004744966914048\");\n }\n\n joinBD2() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n }\n\n leaveBD2() {\n this.GuildActions.leaveGuild(\"280806472928198656\");\n }\n\n get react() {\n return this.internal.react;\n }\n\n get React() {\n return this.internal.react;\n }\n\n get reactDom() {\n return this.internal.reactDom;\n }\n\n get ReactDom() {\n return this.internal.reactDom;\n }\n\n get reactComponent() {\n return this.internal.react.Component;\n }\n\n get ReactComponent() {\n return this.internal.react.Component;\n }\n\n get anchorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"anchorUnderlineOnHover\"]) || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n }\n\n get slateEditorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"slateTextArea\"]);\n }\n\n get messageClasses() {\n return this.WebpackModules.findByUniqueProperties([\"message\", \"containerCozy\"]);\n }\n\n get guildClasses() {\n const guildsWrapper = this.WebpackModules.findByUniqueProperties([\"wrapper\", \"unreadMentionsBar\"]);\n const guilds = this.WebpackModules.findByUniqueProperties([\"guildsError\", \"selected\"]);\n const pill = this.WebpackModules.findByUniqueProperties([\"blobContainer\"]);\n return Object.assign({}, guildsWrapper, guilds, pill);\n }\n\n get MessageContentComponent() {\n return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty(\"disableButtons\"));\n }\n\n get MessageComponent() {\n return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == \"Message\");\n }\n\n get TimeFormatter() {\n return this.WebpackModules.findByUniqueProperties([\"dateFormat\"]);\n }\n\n get TooltipWrapper() {\n return this.WebpackModules.findByDisplayName(\"Tooltip\");\n }\n\n get NativeModule() {\n return this.WebpackModules.findByUniqueProperties([\"setBadge\"]);\n }\n\n get InviteActions() {\n return this.WebpackModules.findByUniqueProperties([\"acceptInvite\"]);\n }\n\n get GuildActions() {\n return this.WebpackModules.findByUniqueProperties([\"leaveGuild\"]);\n }\n\n get Tooltips() {\n return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);\n }\n\n get KeyGenerator() {\n return this.WebpackModules.find(m => m.toString && /\"binary\"/.test(m.toString()));\n }\n\n get LayerStack() {\n return this.WebpackModules.findByUniqueProperties([\"popLayer\"]);\n }\n\n get UserStore() {\n return this.WebpackModules.findByUniqueProperties([\"getCurrentUser\"]);\n }\n\n get ChannelStore() {\n return this.WebpackModules.findByUniqueProperties([\"getChannel\"]);\n }\n\n get ChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"openPrivateChannel\"]);\n }\n\n get PrivateChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"selectPrivateChannel\"]);\n }\n\n openDM(userId) {\n const selfId = this.UserStore.getCurrentUser().id;\n if (selfId == userId) return;\n const privateChannelId = this.ChannelStore.getDMFromUserId(userId);\n if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);\n this.ChannelActions.openPrivateChannel(selfId, userId);\n }\n\n parseSettings(cat) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === cat && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92Mi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy92Mi5qcz84NTdiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgVjIge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICB0aGlzLmVkaXRvckRldGFjaGVkID0gZmFsc2U7XG5cbiAgICB0aGlzLldlYnBhY2tNb2R1bGVzID0gKCgpID0+IHtcbiAgICAgIGNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICAgICAgICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbiAgICAgIH0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG4gICAgICBkZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuICAgICAgZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuICAgICAgY29uc3Qgc2hvdWxkUHJvdGVjdCA9IHRoZU1vZHVsZSA9PiB7XG4gICAgICAgIGlmICh0aGVNb2R1bGUucmVtb3ZlICYmIHRoZU1vZHVsZS5zZXQgJiYgdGhlTW9kdWxlLmNsZWFyICYmIHRoZU1v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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/v2.js\n"); /***/ }), @@ -419,7 +419,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return CardList; });\n/* harmony import */ var _errorBoundary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errorBoundary */ \"./src/ui/errorBoundary.js\");\n/* harmony import */ var _contentColumn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contentColumn */ \"./src/ui/contentColumn.js\");\n/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _reloadIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _addoncard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addoncard */ \"./src/ui/addoncard.jsx\");\n/* harmony import */ var _scroller__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/dropdown */ \"./src/ui/components/dropdown.jsx\");\n/* harmony import */ var _components_search__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/search */ \"./src/ui/components/search.jsx\");\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modules/contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../modules/pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../modules/themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _modules_webpackModules__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../modules/webpackModules */ \"./src/modules/webpackModules.js\");\n/* harmony import */ var _modules_bdApi__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../modules/bdApi */ \"./src/modules/bdApi.js\");\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Tooltip = _modules_webpackModules__WEBPACK_IMPORTED_MODULE_13__[\"default\"].findByDisplayName(\"Tooltip\");\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_10__[\"default\"].react;\nclass CardList extends _modules_v2__WEBPACK_IMPORTED_MODULE_10__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.state = {\n sort: \"name\",\n ascending: true,\n query: \"\"\n };\n this.isPlugins = this.props.type == \"plugins\";\n this.cookie = this.isPlugins ? _0globals__WEBPACK_IMPORTED_MODULE_8__[\"pluginCookie\"] : _0globals__WEBPACK_IMPORTED_MODULE_8__[\"themeCookie\"];\n this.manager = this.isPlugins ? _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"] : _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n this.sort = this.sort.bind(this);\n this.reverse = this.reverse.bind(this);\n this.search = this.search.bind(this);\n }\n\n openFolder() {\n __webpack_require__(/*! electron */ \"electron\").shell.openItem(this.isPlugins ? _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].pluginsFolder : _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].themesFolder);\n }\n\n edit(name) {\n console.log(name);\n this.manager.edit(name);\n }\n\n async delete(name) {\n const shouldDelete = await this.confirmDelete(name);\n if (!shouldDelete) return;\n this.manager.delete(name);\n }\n\n confirmDelete(name) {\n return new Promise(resolve => {\n _modules_bdApi__WEBPACK_IMPORTED_MODULE_14__[\"default\"].showConfirmationModal(\"Are You Sure?\", `Are you sure you want to delete ${name}?`, {\n danger: true,\n confirmText: \"Delete\",\n onConfirm: () => {\n resolve(true);\n },\n onCancel: () => {\n resolve(false);\n }\n });\n });\n }\n\n get sortOptions() {\n return [{\n label: \"Name\",\n value: \"name\"\n }, {\n label: \"Author\",\n value: \"author\"\n }, {\n label: \"Version\",\n value: \"version\"\n }, {\n label: \"Recently Added\",\n value: \"added\"\n }, {\n label: \"Last Modified\",\n value: \"modified\"\n }, {\n label: \"File Size\",\n value: \"size\"\n }];\n }\n\n get directions() {\n return [{\n label: \"Ascending\",\n value: true\n }, {\n label: \"Descending\",\n value: false\n }];\n }\n\n reverse(value) {\n this.setState({\n ascending: value\n });\n }\n\n sort(value) {\n this.setState({\n sort: value\n });\n }\n\n search(event) {\n this.setState({\n query: event.target.value.toLocaleLowerCase()\n });\n }\n\n getProps(addon) {\n return {\n key: this.getName(addon),\n enabled: this.cookie[this.getName(addon)],\n toggle: this.manager.toggle.bind(this.manager),\n //edit: this.edit.bind(this),\n remove: this.delete.bind(this),\n addon: addon\n };\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n getAddons() {\n const sortedAddons = this.props.list.sort((a, b) => {\n const cap = this.state.sort.charAt(0).toUpperCase() + this.state.sort.slice(1);\n const first = a.plugin ? this.getString(a.plugin[`get${cap}`]()) : a[this.state.sort];\n const second = b.plugin ? this.getString(b.plugin[`get${cap}`]()) : b[this.state.sort];\n if (typeof first == \"string\") return first.toLocaleLowerCase().localeCompare(second.toLocaleLowerCase());\n if (first > second) return 1;\n if (second > first) return -1;\n return 0;\n });\n if (!this.state.ascending) sortedAddons.reverse();\n const rendered = [];\n\n for (let a = 0; a < sortedAddons.length; a++) {\n const addon = sortedAddons[a];\n\n if (this.state.query) {\n let matches = null;\n const name = this.getName(addon);\n const author = this.getAuthor(addon);\n const description = this.getDescription(addon);\n const version = this.getVersion(addon);\n if (name) matches = name.toLocaleLowerCase().includes(this.state.query);\n if (author) matches = matches || author.toLocaleLowerCase().includes(this.state.query);\n if (description) matches = matches || description.toLocaleLowerCase().includes(this.state.query);\n if (version) matches = matches || version.toLocaleLowerCase().includes(this.state.query);\n if (!matches) continue;\n }\n\n const props = this.getProps(addon);\n rendered.push(React.createElement(_errorBoundary__WEBPACK_IMPORTED_MODULE_0__[\"default\"], null, React.createElement(_addoncard__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _extends({}, props, {\n reload: !_0globals__WEBPACK_IMPORTED_MODULE_8__[\"settingsCookie\"][\"fork-ps-5\"] && this.manager.reload.bind(this.manager)\n }))));\n }\n\n return rendered;\n }\n\n getName(addon) {\n return this.getString(addon.plugin ? addon.plugin.getName() : addon.name);\n }\n\n getAuthor(addon) {\n return this.getString(addon.plugin ? addon.plugin.getAuthor() : addon.author);\n }\n\n getDescription(addon) {\n return this.getString(addon.plugin ? addon.plugin.getDescription() : addon.description);\n }\n\n getVersion(addon) {\n return this.getString(addon.plugin ? addon.plugin.getVersion() : addon.version);\n }\n\n render() {\n const refreshIcon = React.createElement(Tooltip, {\n color: \"black\",\n position: \"top\",\n text: \"Reload List\"\n }, props => React.createElement(_reloadIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _extends({}, props, {\n className: \"bd-icon bd-reload bd-reload-header\",\n size: \"18px\",\n onClick: async () => {\n if (this.isPlugins) _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"].updatePluginList();else _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__[\"default\"].updateThemeList();\n this.forceUpdate();\n }\n })));\n const addonCards = this.getAddons();\n return React.createElement(_scroller__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, React.createElement(_contentColumn__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n title: `${this.props.type.toUpperCase()}—${addonCards.length}`\n }, React.createElement(\"button\", {\n key: \"folder-button\",\n className: \"bd-button bd-pfbtn\",\n onClick: this.openFolder.bind(this)\n }, \"Open \", this.isPlugins ? \"Plugin\" : \"Theme\", \" Folder\"), !_0globals__WEBPACK_IMPORTED_MODULE_8__[\"settingsCookie\"][\"fork-ps-5\"] && refreshIcon, React.createElement(\"div\", {\n className: \"bd-controls bd-addon-controls\"\n }, React.createElement(_components_search__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n onChange: this.search,\n placeholder: `Search ${this.props.type}...`\n }), React.createElement(\"div\", {\n className: \"bd-addon-dropdowns\"\n }, React.createElement(\"div\", {\n className: \"bd-select-wrapper\"\n }, React.createElement(\"label\", {\n className: \"bd-label\"\n }, \"Sort by:\"), React.createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n options: this.sortOptions,\n onChange: this.sort,\n style: \"transparent\"\n })), React.createElement(\"div\", {\n className: \"bd-select-wrapper\"\n }, React.createElement(\"label\", {\n className: \"bd-label\"\n }, \"Order:\"), React.createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n options: this.directions,\n onChange: this.reverse,\n style: \"transparent\"\n })))), React.createElement(\"div\", {\n className: \"bda-slist bd-addon-list\"\n }, addonCards)), React.createElement(_tools__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYWRkb25saXN0LmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYWRkb25saXN0LmpzeD80OGQxIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIF9leHRlbmRzKCkgeyBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKHRhcmdldCkgeyBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykgeyB2YXIgc291cmNlID0gYXJndW1lbnRzW2ldOyBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7IGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGw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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/addonlist.jsx\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return CardList; });\n/* harmony import */ var _errorBoundary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errorBoundary */ \"./src/ui/errorBoundary.js\");\n/* harmony import */ var _contentColumn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contentColumn */ \"./src/ui/contentColumn.js\");\n/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _reloadIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _addoncard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addoncard */ \"./src/ui/addoncard.jsx\");\n/* harmony import */ var _scroller__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/dropdown */ \"./src/ui/components/dropdown.jsx\");\n/* harmony import */ var _components_search__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/search */ \"./src/ui/components/search.jsx\");\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modules/contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../modules/pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../modules/themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _modules_webpackModules__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../modules/webpackModules */ \"./src/modules/webpackModules.js\");\n/* harmony import */ var _modules_bdApi__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../modules/bdApi */ \"./src/modules/bdApi.js\");\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Tooltip = _modules_webpackModules__WEBPACK_IMPORTED_MODULE_13__[\"default\"].findByDisplayName(\"Tooltip\");\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_10__[\"default\"].react;\nclass CardList extends _modules_v2__WEBPACK_IMPORTED_MODULE_10__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.state = {\n sort: \"name\",\n ascending: true,\n query: \"\"\n };\n this.isPlugins = this.props.type == \"plugins\";\n this.cookie = this.isPlugins ? _0globals__WEBPACK_IMPORTED_MODULE_8__[\"pluginCookie\"] : _0globals__WEBPACK_IMPORTED_MODULE_8__[\"themeCookie\"];\n this.manager = this.isPlugins ? _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"] : _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n this.sort = this.sort.bind(this);\n this.reverse = this.reverse.bind(this);\n this.search = this.search.bind(this);\n }\n\n openFolder() {\n __webpack_require__(/*! electron */ \"electron\").shell.openItem(this.isPlugins ? _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].pluginsFolder : _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].themesFolder);\n }\n\n edit(name) {\n console.log(name);\n this.manager.edit(name);\n }\n\n async delete(name) {\n const shouldDelete = await this.confirmDelete(name);\n if (!shouldDelete) return;\n this.manager.delete(name);\n }\n\n confirmDelete(name) {\n return new Promise(resolve => {\n _modules_bdApi__WEBPACK_IMPORTED_MODULE_14__[\"default\"].showConfirmationModal(\"Are You Sure?\", `Are you sure you want to delete ${name}?`, {\n danger: true,\n confirmText: \"Delete\",\n onConfirm: () => {\n resolve(true);\n },\n onCancel: () => {\n resolve(false);\n }\n });\n });\n }\n\n get sortOptions() {\n return [{\n label: \"Name\",\n value: \"name\"\n }, {\n label: \"Author\",\n value: \"author\"\n }, {\n label: \"Version\",\n value: \"version\"\n }, {\n label: \"Recently Added\",\n value: \"added\"\n }, {\n label: \"Last Modified\",\n value: \"modified\"\n }, {\n label: \"File Size\",\n value: \"size\"\n }];\n }\n\n get directions() {\n return [{\n label: \"Ascending\",\n value: true\n }, {\n label: \"Descending\",\n value: false\n }];\n }\n\n reverse(value) {\n this.setState({\n ascending: value\n });\n }\n\n sort(value) {\n this.setState({\n sort: value\n });\n }\n\n search(event) {\n this.setState({\n query: event.target.value.toLocaleLowerCase()\n });\n }\n\n getProps(addon) {\n return {\n key: this.getName(addon),\n enabled: this.cookie[this.getName(addon)],\n toggle: this.manager.toggle.bind(this.manager),\n //edit: this.edit.bind(this),\n remove: this.delete.bind(this),\n addon: addon\n };\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n getAddons() {\n const sortedAddons = this.props.list.sort((a, b) => {\n const cap = this.state.sort.charAt(0).toUpperCase() + this.state.sort.slice(1);\n const first = a.plugin && a.plugin[`get${cap}`] ? this.getString(a.plugin[`get${cap}`]()) : a[this.state.sort];\n const second = b.plugin && b.plugin[`get${cap}`] ? this.getString(b.plugin[`get${cap}`]()) : b[this.state.sort];\n if (typeof first == \"string\") return first.toLocaleLowerCase().localeCompare(second.toLocaleLowerCase());\n if (first > second) return 1;\n if (second > first) return -1;\n return 0;\n });\n if (!this.state.ascending) sortedAddons.reverse();\n const rendered = [];\n\n for (let a = 0; a < sortedAddons.length; a++) {\n const addon = sortedAddons[a];\n\n if (this.state.query) {\n let matches = null;\n const name = this.getName(addon);\n const author = this.getAuthor(addon);\n const description = this.getDescription(addon);\n const version = this.getVersion(addon);\n if (name) matches = name.toLocaleLowerCase().includes(this.state.query);\n if (author) matches = matches || author.toLocaleLowerCase().includes(this.state.query);\n if (description) matches = matches || description.toLocaleLowerCase().includes(this.state.query);\n if (version) matches = matches || version.toLocaleLowerCase().includes(this.state.query);\n if (!matches) continue;\n }\n\n const props = this.getProps(addon);\n rendered.push(React.createElement(_errorBoundary__WEBPACK_IMPORTED_MODULE_0__[\"default\"], null, React.createElement(_addoncard__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _extends({}, props, {\n reload: !_0globals__WEBPACK_IMPORTED_MODULE_8__[\"settingsCookie\"][\"fork-ps-5\"] && this.manager.reload.bind(this.manager)\n }))));\n }\n\n return rendered;\n }\n\n getName(addon) {\n return this.getString(addon.plugin ? addon.plugin.getName() : addon.name);\n }\n\n getAuthor(addon) {\n return this.getString(addon.plugin ? addon.plugin.getAuthor() : addon.author);\n }\n\n getDescription(addon) {\n return this.getString(addon.plugin ? addon.plugin.getDescription() : addon.description);\n }\n\n getVersion(addon) {\n return this.getString(addon.plugin ? addon.plugin.getVersion() : addon.version);\n }\n\n render() {\n const refreshIcon = React.createElement(Tooltip, {\n color: \"black\",\n position: \"top\",\n text: \"Reload List\"\n }, props => React.createElement(_reloadIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _extends({}, props, {\n className: \"bd-icon bd-reload bd-reload-header\",\n size: \"18px\",\n onClick: async () => {\n if (this.isPlugins) _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"].updatePluginList();else _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__[\"default\"].updateThemeList();\n this.forceUpdate();\n }\n })));\n const addonCards = this.getAddons();\n return React.createElement(_scroller__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, React.createElement(_contentColumn__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n title: `${this.props.type.toUpperCase()}—${addonCards.length}`\n }, React.createElement(\"button\", {\n key: \"folder-button\",\n className: \"bd-button bd-pfbtn\",\n onClick: this.openFolder.bind(this)\n }, \"Open \", this.isPlugins ? \"Plugin\" : \"Theme\", \" Folder\"), !_0globals__WEBPACK_IMPORTED_MODULE_8__[\"settingsCookie\"][\"fork-ps-5\"] && refreshIcon, React.createElement(\"div\", {\n className: \"bd-controls bd-addon-controls\"\n }, React.createElement(_components_search__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n onChange: this.search,\n placeholder: `Search ${this.props.type}...`\n }), React.createElement(\"div\", {\n className: \"bd-addon-dropdowns\"\n }, React.createElement(\"div\", {\n className: \"bd-select-wrapper\"\n }, React.createElement(\"label\", {\n className: \"bd-label\"\n }, \"Sort by:\"), React.createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n options: this.sortOptions,\n onChange: this.sort,\n style: \"transparent\"\n })), React.createElement(\"div\", {\n className: \"bd-select-wrapper\"\n }, React.createElement(\"label\", {\n className: \"bd-label\"\n }, \"Order:\"), React.createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n options: this.directions,\n onChange: this.reverse,\n style: \"transparent\"\n })))), React.createElement(\"div\", {\n className: \"bda-slist bd-addon-list\"\n }, addonCards)), React.createElement(_tools__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYWRkb25saXN0LmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYWRkb25saXN0LmpzeD80OGQxIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIF9leHRlbmRzKCkgeyBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKHRhcmdldCkgeyBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykgeyB2YXIgc291cmNlID0gYXJndW1lbnRzW2ldOyBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7IGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc291cmNlLCBrZXkpKSB7IHRhcmdldFtrZXldID0gc291cmNlW2tleV07IH0gfSB9IHJldHVybiB0YXJnZXQ7IH07IHJldHVybiBfZXh0ZW5kcy5hcHBseSh0aGlzLCBhcmd1bWVudHMpOyB9XG5cbmltcG9ydCBFcnJvckJvdW5kYXJ5IGZyb20gXCIuL2Vycm9yQm91bmRhcnlcIjtcbmltcG9ydCBDb250ZW50Q29sdW1uIGZyb20gXCIuL2NvbnRlbnRDb2x1bW5cIjtcbmltcG9ydCBUb29scyBmcm9tIFwiLi90b29sc1wiO1xuaW1wb3J0IFJlbG9hZEljb24gZnJvbSBcIi4vcmVsb2FkSWNvblwiO1xuaW1wb3J0IEFkZG9uQ2FyZCBmcm9tIFwiLi9hZGRvbmNhcmRcIjtcbmltcG9ydCBTY3JvbGxlciBmcm9tIFwiLi9zY3JvbGxlclwiO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/main.min.js @@ -1 +1 @@ -var Core=function(e){var t={};function n(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(s,o,function(t){return e[t]}.bind(null,o));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("request")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("module")},function(e,t,n){"use strict";n.r(t);var s={};n.r(s),n.d(s,"minimumDiscordVersion",(function(){return o})),n.d(s,"currentDiscordVersion",(function(){return r})),n.d(s,"minSupportedVersion",(function(){return i})),n.d(s,"bbdVersion",(function(){return a})),n.d(s,"bbdChangelog",(function(){return l})),n.d(s,"settings",(function(){return c})),n.d(s,"defaultCookie",(function(){return d})),n.d(s,"settingsCookie",(function(){return u})),n.d(s,"bdpluginErrors",(function(){return h})),n.d(s,"bdthemeErrors",(function(){return p})),n.d(s,"bdConfig",(function(){return m})),n.d(s,"bemotes",(function(){return g})),n.d(s,"emotesFfz",(function(){return f})),n.d(s,"emotesBTTV",(function(){return b})),n.d(s,"emotesBTTV2",(function(){return v})),n.d(s,"emotesTwitch",(function(){return y})),n.d(s,"subEmotesTwitch",(function(){return C})),n.d(s,"bdEmotes",(function(){return E})),n.d(s,"bdEmoteSettingIDs",(function(){return w})),n.d(s,"bdthemes",(function(){return k})),n.d(s,"bdplugins",(function(){return S})),n.d(s,"pluginCookie",(function(){return x})),n.d(s,"themeCookie",(function(){return D}));const o="0.0.306",r=window.DiscordNative&&window.DiscordNative.remoteApp&&window.DiscordNative.remoteApp.getVersion&&window.DiscordNative.remoteApp.getVersion()||"0.0.306",i="0.3.0",a="0.3.2",l={description:"More big things.",changes:[{title:"What's New?",items:["**jQuery** is no longer used internally in BBD. This should speed things up and hopefully close some memory leaks.","**VoiceMode** was redone to act more like it used to."]},{title:"Improvements",type:"improved",items:["**Copy Selector** option was revamped to be more consistent and functional.","**Emote Menu** has gone through some serious changes to be more efficient and less buggy.","Some speed improvements when entering the plugins and themes tabs."]}]},c={"Custom css live update":{id:"bda-css-0",info:"",implemented:!0,hidden:!0,cat:"core"},"Custom css auto udpate":{id:"bda-css-1",info:"",implemented:!0,hidden:!0,cat:"core"},"BetterDiscord Blue":{id:"bda-gs-b",info:"Replace Discord blue with BD Blue",implemented:!1,hidden:!1,cat:"core"},"Public Servers":{id:"bda-gs-1",info:"Display public servers button",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Minimal Mode":{id:"bda-gs-2",info:"Hide elements and reduce the size of elements.",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Voice Mode":{id:"bda-gs-4",info:"Only show voice chat",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Hide Channels":{id:"bda-gs-3",info:"Hide channels in minimal mode",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Dark Mode":{id:"bda-gs-5",info:"Make certain elements dark by default(wip)",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Voice Disconnect":{id:"bda-dc-0",info:"Disconnect from voice server when closing Discord",implemented:!0,hidden:!1,cat:"core",category:"modules"},"24 Hour Timestamps":{id:"bda-gs-6",info:"Replace 12hr timestamps with proper ones",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Colored Text":{id:"bda-gs-7",info:"Make text color the same as role color",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Normalize Classes":{id:"fork-ps-4",info:"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Content Error Modal":{id:"fork-ps-1",info:"Shows a modal with plugin/theme errors",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Show Toasts":{id:"fork-ps-2",info:"Shows a small notification for important information",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Scroll To Settings":{id:"fork-ps-3",info:"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Automatic Loading":{id:"fork-ps-5",info:"Automatically loads, reloads, and unloads plugins and themes",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Developer Mode":{id:"bda-gs-8",info:"Developer Mode",implemented:!0,hidden:!1,cat:"core",category:"developer settings"},"Copy Selector":{id:"fork-dm-1",info:'Adds a "Copy Selector" option to context menus when developer mode is active',implemented:!0,hidden:!1,cat:"core",category:"developer settings"},"React DevTools":{id:"reactDevTools",info:"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.",implemented:!0,hidden:!0,cat:"core",category:"developer settings"},"Enable Transparency":{id:"fork-wp-1",info:"Enables the main window to be see-through (requires restart)",implemented:!0,hidden:!1,cat:"core",category:"window preferences"},"Window Frame":{id:"fork-wp-2",info:"Adds the native os window frame to the main window",implemented:!1,hidden:!0,cat:"core",category:"window preferences"},"Download Emotes":{id:"fork-es-3",info:"Download emotes when the cache is expired",implemented:!0,hidden:!1,cat:"emote"},"Twitch Emotes":{id:"bda-es-7",info:"Show Twitch emotes",implemented:!0,hidden:!1,cat:"emote"},"FrankerFaceZ Emotes":{id:"bda-es-1",info:"Show FrankerFaceZ Emotes",implemented:!0,hidden:!1,cat:"emote"},"BetterTTV Emotes":{id:"bda-es-2",info:"Show BetterTTV Emotes",implemented:!0,hidden:!1,cat:"emote"},"Emote Menu":{id:"bda-es-0",info:"Show Twitch/Favourite emotes in emote menu",implemented:!0,hidden:!1,cat:"emote"},"Emoji Menu":{id:"bda-es-9",info:"Show Discord emoji menu",implemented:!0,hidden:!1,cat:"emote"},"Emote Auto Capitalization":{id:"bda-es-4",info:"Autocapitalize emote commands",implemented:!1,hidden:!1,cat:"emote"},"Show Names":{id:"bda-es-6",info:"Show emote names on hover",implemented:!0,hidden:!1,cat:"emote"},"Show emote modifiers":{id:"bda-es-8",info:"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)",implemented:!0,hidden:!1,cat:"emote"},"Animate On Hover":{id:"fork-es-2",info:"Only animate the emote modifiers on hover",implemented:!0,hidden:!1,cat:"emote"}},d={"bda-gs-1":!0,"bda-gs-2":!1,"bda-gs-3":!1,"bda-gs-4":!1,"bda-gs-5":!0,"bda-gs-6":!1,"bda-gs-7":!1,"bda-gs-8":!1,"bda-es-0":!0,"bda-es-1":!0,"bda-es-2":!0,"bda-es-4":!1,"bda-es-6":!0,"bda-es-7":!0,"bda-gs-b":!1,"bda-es-8":!0,"bda-dc-0":!1,"bda-css-0":!1,"bda-css-1":!1,"bda-es-9":!0,"fork-dm-1":!1,"fork-ps-1":!0,"fork-ps-2":!0,"fork-ps-3":!0,"fork-ps-4":!0,"fork-ps-5":!0,"fork-es-2":!1,"fork-es-3":!0,"fork-wp-1":!1,"fork-wp-2":!1,"fork-beta":!0,reactDevTools:!1},u={},h=[],p=[],m={},g=[],f={},b={},v={},y={},C={},E={TwitchGlobal:{},TwitchSubscriber:{},BTTV:{},FrankerFaceZ:{},BTTV2:{}},w={TwitchGlobal:"bda-es-7",TwitchSubscriber:"bda-es-7",BTTV:"bda-es-2",FrankerFaceZ:"bda-es-1",BTTV2:"bda-es-2"},k={},S={},x={},D={},N=webpackJsonp.push([[],{__extra_id__:(e,t,n)=>e.exports=n},[["__extra_id__"]]]);delete N.m.__extra_id__,delete N.c.__extra_id__;const T=e=>{for(const t in N.c)if(N.c.hasOwnProperty(t)){const n=N.c[t].exports;if(n&&n.__esModule&&n.default&&e(n.default))return n.default;if(n&&e(n))return n}return null};var P=T,L=e=>{const t=[];for(const n in N.c)if(N.c.hasOwnProperty(n)){const s=N.c[n].exports;s&&s.__esModule&&s.default&&e(s.default)?t.push(s.default):s&&e(s)&&t.push(s)}return t},M=(...e)=>T(t=>e.every(e=>void 0!==t[e])),B=e=>T(t=>t.displayName===e),F=new class{constructor(){this.editorDetached=!1,this.WebpackModules=(()=>{const e=webpackJsonp.push([[],{__extra_id__:(e,t,n)=>e.exports=n},[["__extra_id__"]]]);delete e.m.__extra_id__,delete e.c.__extra_id__;const t=e=>e.remove&&e.set&&e.clear&&e.get&&!e.sort?null:e.getToken||e.getEmail||e.showToken?new Proxy(e,{get:function(e,t){return"getToken"==t?()=>"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa":"getEmail"==t?()=>"puppet11112@gmail.com":"showToken"==t?()=>!0:e[t]}}):e,n=n=>{for(const s in e.c)if(e.c.hasOwnProperty(s)){const o=e.c[s].exports;if(o&&o.__esModule&&o.default&&n(o.default))return t(o.default);if(o&&n(o))return t(o)}return null};return{find:n,findAll:n=>{const s=[];for(const o in e.c)if(e.c.hasOwnProperty(o)){const r=e.c[o].exports;r&&r.__esModule&&r.default&&n(r.default)?s.push(t(r.default)):r&&n(r)&&s.push(t(r))}return s},findByUniqueProperties:e=>n(t=>e.every(e=>void 0!==t[e])),findByPrototypes:e=>n(t=>t.prototype&&e.every(e=>void 0!==t.prototype[e])),findByDisplayName:e=>n(t=>t.displayName===e)}})(),this.internal={react:this.WebpackModules.findByUniqueProperties(["Component","PureComponent","Children","createElement","cloneElement"]),reactDom:this.WebpackModules.findByUniqueProperties(["findDOMNode"])},this.getInternalInstance=e=>e[Object.keys(e).find(e=>e.startsWith("__reactInternalInstance"))]}initialize(){}joinBD1(){this.InviteActions.acceptInviteAndTransitionToInviteChannel("0Tmfo5ZbORCRqbAd")}leaveBD1(){this.GuildActions.leaveGuild("86004744966914048")}joinBD2(){this.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j")}leaveBD2(){this.GuildActions.leaveGuild("280806472928198656")}get react(){return this.internal.react}get React(){return this.internal.react}get reactDom(){return this.internal.reactDom}get ReactDom(){return this.internal.reactDom}get reactComponent(){return this.internal.react.Component}get ReactComponent(){return this.internal.react.Component}get anchorClasses(){return this.WebpackModules.findByUniqueProperties(["anchorUnderlineOnHover"])||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"}}get slateEditorClasses(){return this.WebpackModules.findByUniqueProperties(["slateTextArea"])}get messageClasses(){return this.WebpackModules.findByUniqueProperties(["message","containerCozy"])}get guildClasses(){const e=this.WebpackModules.findByUniqueProperties(["wrapper","unreadMentionsBar"]),t=this.WebpackModules.findByUniqueProperties(["guildsError","selected"]),n=this.WebpackModules.findByUniqueProperties(["blobContainer"]);return Object.assign({},e,t,n)}get MessageContentComponent(){return this.WebpackModules.find(e=>e.defaultProps&&e.defaultProps.hasOwnProperty("disableButtons"))}get MessageComponent(){return this.WebpackModules.find(e=>e.default&&e.default.displayName&&"Message"==e.default.displayName)}get TimeFormatter(){return this.WebpackModules.findByUniqueProperties(["dateFormat"])}get TooltipWrapper(){return this.WebpackModules.findByDisplayName("Tooltip")}get NativeModule(){return this.WebpackModules.findByUniqueProperties(["setBadge"])}get InviteActions(){return this.WebpackModules.findByUniqueProperties(["acceptInvite"])}get GuildActions(){return this.WebpackModules.findByUniqueProperties(["leaveGuild"])}get Tooltips(){return this.WebpackModules.find(e=>e.hide&&e.show&&!e.search&&!e.submit&&!e.search&&!e.activateRagingDemon&&!e.dismiss)}get KeyGenerator(){return this.WebpackModules.find(e=>e.toString&&/"binary"/.test(e.toString()))}get LayerStack(){return this.WebpackModules.findByUniqueProperties(["popLayer"])}get UserStore(){return this.WebpackModules.findByUniqueProperties(["getCurrentUser"])}get ChannelStore(){return this.WebpackModules.findByUniqueProperties(["getChannel"])}get ChannelActions(){return this.WebpackModules.findByUniqueProperties(["openPrivateChannel"])}get PrivateChannelActions(){return this.WebpackModules.findByUniqueProperties(["selectPrivateChannel"])}openDM(e){const t=this.UserStore.getCurrentUser().id;if(t==e)return;const n=this.ChannelStore.getDMFromUserId(e);if(n)return this.PrivateChannelActions.selectPrivateChannel(n);this.ChannelActions.openPrivateChannel(t,e)}parseSettings(e){return Object.keys(c).reduce((t,n)=>{const s=c[n];return s.cat===e&&s.implemented&&!s.hidden&&(s.text=n,t.push(s)),t},[])}};class A{static escapeID(e){return e.replace(/^[^a-z]+|[^\w-]+/gi,"-")}static addStyle(e,t){document.head.append(A.createElement(``))}static removeStyle(e){const t=document.getElementById(e);t&&t.remove()}static addScript(e,t){return new Promise(n=>{const s=document.createElement("script");s.id=e,s.src=t,s.type="text/javascript",s.onload=n,document.head.append(s)})}static removeScript(e){e=this.escapeID(e);const t=document.getElementById(e);t&&t.remove()}static animate({timing:e=(e=>e),update:t,duration:n}){const s=performance.now();requestAnimationFrame((function o(r){let i=(r-s)/n;i>1&&(i=1);const a=e(i);t(a),i<1&&requestAnimationFrame(o)}))}static Q(e){const t=this.parseHTML(e);return(t instanceof NodeList?Array.from(t).some(e=>1===e.nodeType):1===t.nodeType)?t:this.query(e)}static query(e,t){return t||(t=document),t.querySelector(e)}static queryAll(e,t){return t||(t=document),t.querySelectorAll(e)}static parseHTML(e,t=!1){const n=document.createElement("template");n.innerHTML=e;const s=n.content.cloneNode(!0);return t?s:s.childNodes.length>1?s.childNodes:s.childNodes[0]}static createElement(e,t=!1){return this.parseHTML(e,t)}static escapeHTML(e){const t=document.createTextNode(""),n=document.createElement("span");return n.append(t),t.nodeValue=e,n.innerHTML}static addClass(e,...t){t=t.flat().filter(e=>e);for(let e=0;ee),e.classList.add(...t),e}static removeClass(e,...t){for(let e=0;ee),e.classList.remove(...t),e}static toggleClass(e,t,n){return t=t.toString().split(" ").filter(e=>e),void 0!==n?t.forEach(t=>e.classList.toggle(t,n)):t.forEach(t=>e.classList.toggle(t)),e}static hasClass(e,t){return t.toString().split(" ").filter(e=>e).every(t=>e.classList.contains(t))}static replaceClass(e,t,n){return e.classList.replace(t,n),e}static appendTo(e,t){return"string"==typeof t&&(t=this.query(t)),t?(t.append(e),e):null}static prependTo(e,t){return"string"==typeof t&&(t=this.query(t)),t?(t.prepend(e),e):null}static insertAfter(e,t){return t.parentNode.insertBefore(e,t.nextSibling),e}static after(e,t){return e.parentNode.insertBefore(t,e.nextSibling),e}static next(e,t=""){return t?e.querySelector("+ "+t):e.nextElementSibling}static nextAll(e){return e.querySelectorAll("~ *")}static nextUntil(e,t){const n=[];for(;e.nextElementSibling&&!e.nextElementSibling.matches(t);)n.push(e=e.nextElementSibling);return n}static previous(e,t=""){const n=e.previousElementSibling;return t?n&&n.matches(t)?n:null:n}static previousAll(e){const t=[];for(;e.previousElementSibling;)t.push(e=e.previousElementSibling);return t}static previousUntil(e,t){const n=[];for(;e.previousElementSibling&&!e.previousElementSibling.matches(t);)n.push(e=e.previousElementSibling);return n}static indexInParent(e){const t=e.parentNode.childNodes;let n=0;for(let s=0;s "+t)}static findChildren(e,t){return e.querySelectorAll(":scope > "+t)}static parents(e,t=""){const n=[];if(t)for(;e.parentElement&&e.parentElement.closest(t);)n.push(e=e.parentElement.closest(t));else for(;e.parentElement;)n.push(e=e.parentElement);return n}static parentsUntil(e,t){const n=[];for(;e.parentElement&&!e.parentElement.matches(t);)n.push(e=e.parentElement);return n}static siblings(e,t="*"){return Array.from(e.parentElement.children).filter(n=>n!=e&&n.matches(t))}static css(e,t,n){return void 0===n?global.getComputedStyle(e)[t]:(e.style[t]=n,e)}static width(e,t){return void 0===t?parseInt(getComputedStyle(e).width):(e.style.width=t,e)}static height(e,t){return void 0===t?parseInt(getComputedStyle(e).height):(e.style.height=t,e)}static text(e,t){return void 0===t?e.textContent:e.textContent=t}static innerWidth(e){return e.clientWidth}static innerHeight(e){return e.clientHeight}static outerWidth(e){return e.offsetWidth}static outerHeight(e){return e.offsetHeight}static offset(e){return e.getBoundingClientRect()}static get listeners(){return this._listeners||(this._listeners={})}static on(e,t,n,s){const[o,r]=t.split("."),i=n&&s;s||(s=n);const a=i?function(e){e.target.matches(n)&&s(e)}:s;e.addEventListener(o,a);const l=()=>{e.removeEventListener(o,a)};if(r){this.listeners[r]||(this.listeners[r]=[]);const t=()=>{l(),this.listeners[r].splice(this.listeners[r].findIndex(t=>t.event==o&&t.element==e),1)};return this.listeners[r].push({event:o,element:e,cancel:t}),t}return l}static once(e,t,n,s){const[o,r]=t.split("."),i=n&&s;s||(s=n);const a=i?function(t){t.target.matches(n)&&(s(t),e.removeEventListener(o,a))}:function(t){s(t),e.removeEventListener(o,a)};e.addEventListener(o,a);const l=()=>{e.removeEventListener(o,a)};if(r){this.listeners[r]||(this.listeners[r]=[]);const t=()=>{l(),this.listeners[r].splice(this.listeners[r].findIndex(t=>t.event==o&&t.element==e),1)};return this.listeners[r].push({event:o,element:e,cancel:t}),t}return l}static __offAll(e,t){const[n,s]=e.split(".");let o=e=>e.event==n,r=e=>e;t&&(o=e=>e.event==n&&e.element==t,r=e=>e.element==t);const i=this.listeners[s]||[],a=n?i.filter(o):i.filter(r);for(let e=0;e{this.observer.unsubscribe(s),t()};return this.observer.subscribe(s,t=>{const s=Array.from(n?t.addedNodes:t.removedNodes),o=s.indexOf(e)>-1,r=s.some(t=>t.contains(e));return o||r}),e}static onMount(e,t){return this.onMountChange(e,t)}static onUnmount(e,t){return this.onMountChange(e,t,!1)}static onAdded(e,t){return this.onMount(e,t)}static onRemoved(e,t){return this.onUnmount(e,t,!1)}static wrap(e){const t=this.parseHTML('
');for(let n=0;n{try{return e(...n)}catch(e){this.err("SuppressedError","Error occurred in "+t,e)}}}static monkeyPatch(e,t,n){const{before:s,after:o,instead:r,once:i=!1,silent:a=!1,force:l=!1}=n,c=n.displayName||e.displayName||e[t].displayName||e.name||e.constructor.displayName||e.constructor.name;if(a||console.log("patch",t,"of",c),!e[t]){if(!l)return console.error(t,"does not exist for",c);e[t]=function(){}}const d=e[t],u=()=>{a||console.log("unpatch",t,"of",c),e[t]=d};return e[t]=function(){const n={thisObject:this,methodArguments:arguments,cancelPatch:u,originalMethod:d,callOriginalMethod:()=>n.returnValue=n.originalMethod.apply(n.thisObject,n.methodArguments)};if(r){const s=j.suppressErrors(r,"`instead` callback of "+e[t].displayName)(n);void 0!==s&&(n.returnValue=s)}else s&&j.suppressErrors(s,"`before` callback of "+e[t].displayName)(n),n.callOriginalMethod(),o&&j.suppressErrors(o,"`after` callback of "+e[t].displayName)(n);return i&&u(),n.returnValue},Object.assign(e[t],d),e[t].__monkeyPatched=!0,e[t].displayName=c,e[t].__originalMethod||(e[t].__originalMethod=d,e[t].toString=function(){return d.toString()}),u}static onRemoved(e,t){const n=new MutationObserver(s=>{for(let o=0;o-1,l=i.some(t=>t.contains(e));(a||l)&&(n.disconnect(),t())}});n.observe(document.body,{subtree:!0,childList:!0})}static getNestedProp(e,t){return t.split(/\s?\.\s?/).reduce((function(e,t){return e&&e[t]}),e)}static showToast(e,t={}){if(!document.querySelector(".bd-toasts")){const e=document.querySelector(".sidebar-2K8pFh + div")||null,t=e?e.querySelector(".membersWrap-2h-GB4"):null,n=e?e.querySelector("form"):null,s=e?e.getBoundingClientRect().left:310,o=t?t.getBoundingClientRect().left:0,r=o?o-e.getBoundingClientRect().left:j.screenWidth-s-240,i=n?n.offsetHeight:80,a=document.createElement("div");a.classList.add("bd-toasts"),a.style.setProperty("left",s+"px"),a.style.setProperty("width",r+"px"),a.style.setProperty("bottom",i+"px"),document.querySelector("#app-mount").appendChild(a)}const{type:n="",icon:s=!0,timeout:o=3e3}=t,r=document.createElement("div");r.classList.add("bd-toast"),n&&r.classList.add("toast-"+n),n&&s&&r.classList.add("icon"),r.innerText=e,document.querySelector(".bd-toasts").appendChild(r),setTimeout(()=>{r.classList.add("closing"),setTimeout(()=>{r.remove(),document.querySelectorAll(".bd-toasts .bd-toast").length||document.querySelector(".bd-toasts").remove()},300)},o)}static alert(e,t){const n=A.createElement(`
\n
\n \n
`);n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n)}static showContentErrors({plugins:e=[],themes:t=[]}){if(!e||!t)return;if(!e.length&&!t.length)return;const n=A.createElement('
\n
\n \n
');function s(e){const t=A.createElement('
');for(const n of e){const e=A.createElement(`
\n
${n.name?n.name:n.file}
\n
${n.message}
\n \n
`);t.append(e),n.error&&e.querySelectorAll("a").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),j.err("ContentManager",`Error details for ${n.name?n.name:n.file}.`,n.error)}))}return t}const o=[s(e),s(t)];n.querySelectorAll(".tab-bar-item").forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=n.querySelector(".tab-bar-item.selected");t&&A.removeClass(t,"selected"),A.addClass(e.target,"selected");const s=n.querySelector(".scroller");s.innerHTML="",s.append(o[A.index(e.target)])})),n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").on("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n),e.length?n.querySelector(".tab-bar-item").click():n.querySelectorAll(".tab-bar-item")[1].click()}static showChangelogModal(e={}){const t=M("push","update","pop","popWithKey"),n=M("fixed","improved"),s=M("Sizes","Weights"),o=M("Child"),r=M("Tags","default"),i=P(e=>e.defaultProps&&0==e.defaultProps.selectable),l=M("defaultRules","parse");if(!(i&&t&&n&&s&&o&&r&&l))return;const{image:c="https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",description:d="",changes:u=[],title:h="BandagedBD",subtitle:p=`v${a}`,footer:m}=e,g=F.React.createElement,f=[g("img",{src:c})];d&&f.push(g("p",null,l.parse(d)));for(let e=0;eg("li",null,l.parse(e))));f.push(r)}const b=function(){return g(o.Child,{grow:1,shrink:1},g(r.default,{tag:r.Tags.H4},h),g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY,className:n.date},p))},v=()=>{const e=P(e=>"Anchor"==e.displayName),n=M("anchorUnderlineOnHover")||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"},r=e=>{e.preventDefault(),e.stopPropagation(),t.pop(),F.joinBD2()},i=e?g(e,{onClick:r},"Join our Discord Server."):g("a",{className:`${n.anchor} ${n.anchorUnderlineOnHover}`,onClick:r},"Join our Discord Server."),a=g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY},"Need support? ",i);return g(o.Child,{grow:1,shrink:1},m||a)};t.push((function(e){return g(i,Object.assign({className:n.container,selectable:!0,onScroll:e=>e,onClose:e=>e,renderHeader:b,renderFooter:v,children:f},e))}))}}j.showToast=j.suppressErrors(j.showToast,"Could not show toast.");const O=n(4);var $=new class extends O{dispatch(e,...t){this.emit(e,...t)}off(e,t){this.removeListener(e,t)}};class I{get folder(){return Y.pluginsFolder}}I.prototype.loadPlugins=function(){this.loadPluginData(),h.splice(0,0,...Y.loadPlugins());const e=Object.keys(S);for(let t=0;tt.filename==e).plugin;try{n.load&&"function"==typeof n.load&&n.load()}catch(e){u["fork-ps-1"]&&j.showContentErrors({plugins:[e]})}j.log("ContentManager",`${n.getName()} v${n.getVersion()} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.getName()} v${n.getVersion()} was loaded.`,{type:"success"}),$.dispatch("plugin-loaded",n.getName())},I.prototype.unloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const n=t.plugin.getName();x[n]&&this.disablePlugin(n,!0);const s=Y.unloadContent(S[n].filename,"plugin");if(delete S[n],s)return u["fork-ps-1"]&&j.showContentErrors({plugins:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("plugin-unloaded",n)},I.prototype.delete=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;this.unloadPlugin(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},I.prototype.reloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return this.loadPlugin(e);const n=t.plugin.getName(),s=x[n];s&&this.stopPlugin(n,!0);const o=Y.reloadContent(S[n].filename,"plugin");if(o)return u["fork-ps-1"]&&j.showContentErrors({plugins:[o]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,o);S[n].plugin.load&&"function"==typeof S[n].plugin.load&&S[n].plugin.load(),s&&this.startPlugin(n,!0),j.log("ContentManager",`${n} v${S[n].plugin.getVersion()} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${S[n].plugin.getVersion()} was reloaded.`,{type:"success"}),$.dispatch("plugin-reloaded",n)},I.prototype.reload=function(e){return this.reloadPlugin(e)},I.prototype.edit=function(e){console.log("Edit "+e);const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const s=n(1).resolve(Y.pluginsFolder,t.filename);console.log("Edit "+s),n(2).shell.openItem(`${s}`)},I.prototype.updatePluginList=function(){const e=Y.loadNewContent("plugin");for(const t of e.added)this.loadPlugin(t);for(const t of e.removed)this.unloadPlugin(t)},I.prototype.loadPluginData=function(){const e=ee.getSettingGroup("plugins");e&&Object.assign(x,e)},I.prototype.savePluginData=function(){ee.setSettingGroup("plugins",x)},I.prototype.newMessage=function(){const e=Object.keys(S);for(let t=0;tt.filename==e);j.log("ContentManager",`${n.name} v${n.version} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.name} v${n.version} was loaded.`,{type:"success"}),$.dispatch("theme-loaded",n.name)},q.prototype.unloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const n=t.name;D[n]&&this.disableTheme(n,!0);const s=Y.unloadContent(k[n].filename,"theme");if(delete k[n],s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("theme-unloaded",n)},q.prototype.delete=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;this.unloadTheme(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},q.prototype.reloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return this.loadTheme(e);const n=t.name,s=Y.reloadContent(k[n].filename,"theme");if(D[n]&&(this.disableTheme(n,!0),this.enableTheme(n,!0)),s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,s);j.log("ContentManager",`${n} v${k[n].version} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${k[n].version} was reloaded.`,{type:"success"}),$.dispatch("theme-reloaded",n)},q.prototype.reload=function(e){return this.reloadTheme(e)},q.prototype.edit=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const s=n(1).resolve(Y.themesFolder,t.filename);n(2).shell.openItem(`${s}`)},q.prototype.updateThemeList=function(){const e=Y.loadNewContent("theme");for(const t of e.added)this.loadTheme(t);for(const t of e.removed)this.unloadTheme(t)},q.prototype.loadThemeData=function(){const e=ee.getSettingGroup("themes");e&&Object.assign(D,e)},q.prototype.saveThemeData=function(){ee.setSettingGroup("themes",D)};var _=new q;const W=n(1),H=n(0),G=n(5).Module;G.globalPaths.push(W.resolve(n(2).remote.app.getAppPath(),"node_modules"));class z extends Error{constructor(e){super(e),this.name="MetaError"}}const V=G._extensions[".js"],U=G._extensions[".css"]?G._extensions[".css"]:()=>null,J=/[^\S\r\n]*?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,Q=/^\\@/;var Y=new class{constructor(){this.timeCache={},this.watchers={},G._extensions[".js"]=this.getContentRequire("plugin"),G._extensions[".css"]=this.getContentRequire("theme")}get pluginsFolder(){return this._pluginsFolder||(this._pluginsFolder=H.realpathSync(W.resolve(m.dataPath+"plugins/")))}get themesFolder(){return this._themesFolder||(this._themesFolder=H.realpathSync(W.resolve(m.dataPath+"themes/")))}watchContent(e){if(this.watchers[e])return;const t="plugin"===e,n=t?this.pluginsFolder:this.themesFolder,s=t?".plugin.js":".theme.css";this.watchers[e]=H.watch(n,{persistent:!1},async(e,o)=>{if(!e||!o||!o.endsWith(s))return;await new Promise(e=>setTimeout(e,50));try{H.statSync(W.resolve(n,o))}catch(e){if("ENOENT"!==e.code)return;return delete this.timeCache[o],t?R.unloadPlugin(o):_.unloadTheme(o)}if(!H.statSync(W.resolve(n,o)).isFile())return;const r=H.statSync(W.resolve(n,o));r&&r.mtime&&r.mtime.getTime()&&"number"==typeof r.mtime.getTime()&&this.timeCache[o]!=r.mtime.getTime()&&(this.timeCache[o]=r.mtime.getTime(),"rename"==e&&(t?R.loadPlugin(o):_.loadTheme(o)),"change"==e&&(t?R.reloadPlugin(o):_.reloadTheme(o)))})}unwatchContent(e){this.watchers[e]&&(this.watchers[e].close(),delete this.watchers[e])}extractMeta(e){const t=e.split("\n")[0];if(t.includes("//META"))return this.parseOldMeta(e);if(t.includes("/**"))return this.parseNewMeta(e);throw new z("META was not found.")}parseOldMeta(e){const t=e.split("\n")[0],n=t.substring(t.lastIndexOf("//META")+6,t.lastIndexOf("*//"));if(t.indexOf("META")<0)throw new z("META was not found.");const s=j.testJSON(n);if(!s)throw new z("META could not be parsed.");if(!s.name)throw new z("META missing name data.");return s.format="json",s}parseNewMeta(e){const t=e.split("/**",2)[1].split("*/",1)[0],n={};let s="",o="";for(const e of t.split(J))if(0!==e.length)if("@"===e.charAt(0)&&" "!==e.charAt(1)){n[s]=o;const t=e.indexOf(" ");s=e.substr(1,t-1),o=e.substr(t+1)}else o+=" "+e.replace("\\n","\n").replace(Q,"@");return n[s]=o.trim(),delete n[""],n.format="jsdoc",n}getContentRequire(e){const t="plugin"===e,n=this,s=t?V:U;return function(e,o){const r=t?n.pluginsFolder:n.themesFolder,i=W.resolve(r,W.basename(o));if(!H.existsSync(i)||o!==H.realpathSync(i))return Reflect.apply(s,this,arguments);let a=H.readFileSync(o,"utf8");a=j.stripBOM(a);const l=H.statSync(o),c=n.extractMeta(a);if(c.filename=W.basename(o),c.added=l.atimeMs,c.modified=l.mtimeMs,c.size=l.size,t||(c.css=a,"json"==c.format&&(c.css=c.css.split("\n").slice(1).join("\n")),a=`module.exports = ${JSON.stringify(c)};`),t){e._compile(a,e.filename),!j.isEmpty(e.exports)?(c.type=e.exports,e.exports=c,a=""):a+=`\nmodule.exports = ${JSON.stringify(c)};\nmodule.exports.type = ${c.exports||c.name};`}e._compile(a,o)}}makePlaceholderPlugin(e){return{plugin:{start:()=>{},getName:()=>e.name||e.filename,getAuthor:()=>"???",getDescription:()=>e.message?e.message:"This plugin was unable to be loaded. Check the author's page for updates.",getVersion:()=>"???"},name:e.name||e.filename,filename:e.filename,source:e.source?e.source:"",website:e.website?e.website:""}}loadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t,s=n?this.pluginsFolder:this.themesFolder;try{require(W.resolve(s,e))}catch(t){return{name:e,file:e,message:"Could not be compiled.",error:{message:t.message,stack:t.stack}}}const o=require(W.resolve(s,e));if(o.id=j.escapeID(o.name),n){if(!o.type)return;try{o.plugin=new o.type,delete S[o.plugin.getName()],S[o.plugin.getName()]=o}catch(t){return{name:e,file:e,message:"Could not be constructed.",error:{message:t.message,stack:t.stack}}}}else delete k[o.name],k[o.name]=o}unloadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{delete require.cache[require.resolve(W.resolve(n,e))]}catch(t){return{name:e,file:e,message:"Could not be unloaded.",error:{message:t.message,stack:t.stack}}}}isLoaded(e,t){const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{require.cache[require.resolve(W.resolve(n,e))]}catch(e){return!1}return!0}reloadContent(e,t){const n=this.unloadContent(e,t);return n||this.loadContent(e,t)}loadNewContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=H.readdirSync(s),r=Object.values(t?S:k),i=r.filter(e=>!o.includes(e.filename)).map(e=>t?e.plugin.getName():e.name);return{added:o.filter(e=>!r.find(t=>t.filename==e)&&e.endsWith(n)&&H.statSync(W.resolve(s,e)).isFile()),removed:i}}loadAllContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=[],r=H.readdirSync(s);for(const t of r){if(!H.statSync(W.resolve(s,t)).isFile()||!t.endsWith(n))continue;const r=this.loadContent(t,e);r&&o.push(r)}return o}loadPlugins(){return this.loadAllContent("plugin")}loadThemes(){return this.loadAllContent("theme")}};const Z=n(0),K=n(1),X=DiscordNative.globals.releaseChannel;var ee=new class{constructor(){this.data={settings:{stable:{},canary:{},ptb:{}}},this.pluginData={}}initialize(){try{Z.existsSync(this.BDFile)||Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4));const e=require(this.BDFile);if(e.hasOwnProperty("settings")&&(this.data=e),!Z.existsSync(this.settingsFile))return;let t=require(this.settingsFile);Z.unlinkSync(this.settingsFile),t=t.hasOwnProperty("settings")?Object.assign({stable:{},canary:{},ptb:{}},{[X]:t}):Object.assign({stable:{},canary:{},ptb:{}},t),this.setBDData("settings",t)}catch(e){console.error(e),j.alert("Corrupt Storage","The bd storage has somehow become corrupt. You may either try to salvage the file or delete it then reload.")}}get BDFile(){return this._BDFile||(this._BDFile=K.resolve(m.dataPath,"bdstorage.json"))}get settingsFile(){return this._settingsFile||(this._settingsFile=K.resolve(m.dataPath,"bdsettings.json"))}getPluginFile(e){return K.resolve(Y.pluginsFolder,e+".config.json")}getSettingGroup(e){return this.data.settings[X][e]||null}setSettingGroup(e,t){this.data.settings[X][e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getBDData(e){return this.data[e]||""}setBDData(e,t){this.data[e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getPluginData(e,t){return void 0!==this.pluginData[e]?this.pluginData[e][t]||void 0:Z.existsSync(this.getPluginFile(e))?(this.pluginData[e]=JSON.parse(Z.readFileSync(this.getPluginFile(e))),this.pluginData[e][t]||void 0):void 0}setPluginData(e,t,n){void 0!==n&&(void 0===this.pluginData[e]&&(this.pluginData[e]={}),this.pluginData[e][t]=n,Z.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4)))}deletePluginData(e,t){void 0===this.pluginData[e]&&(this.pluginData[e]={}),delete this.pluginData[e][t],Z.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4))}};function te(){this.switchHandler=this.switchHandler.bind(this),this.favContext=this.favContext.bind(this)}const ne=function(e){const t=e.target.getAttribute("title"),n=document.querySelector(`.${F.slateEditorClasses.slateTextArea.split(" ")[0]}`);if(n){const e=F.getInternalInstance(n),s=j.getNestedProp(e,"memoizedProps.children.props.editor.insertText");s&&s(` ${t} `)}else{const e=j.getTextArea();j.insertText(e," "==e.value.slice(-1)?e.value+t:e.value+" "+t)}},se=function(e,t,{click:n=ne,contextmenu:s}={}){const o=A.createElement(`
${e}
`);return n&&o.addEventListener("click",n),s&&o.addEventListener("contextmenu",s),o};te.prototype.init=function(){this.initialized=!0,this.favoriteEmotes={};const e=ee.getBDData("bdfavemotes");""!==e&&null!==e&&(this.favoriteEmotes=JSON.parse(atob(e))),this.qmeHeader=A.createElement('
'),this.twitchButton=A.createElement(''),this.favoriteButton=A.createElement(''),this.emojiButton=A.createElement('\n
\n
\n \n `);n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n)}static showContentErrors({plugins:e=[],themes:t=[]}){if(!e||!t)return;if(!e.length&&!t.length)return;const n=A.createElement('
\n
\n \n
');function s(e){const t=A.createElement('
');for(const n of e){const e=A.createElement(`
\n
${n.name?n.name:n.file}
\n
${n.message}
\n \n
`);t.append(e),n.error&&e.querySelectorAll("a").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),j.err("ContentManager",`Error details for ${n.name?n.name:n.file}.`,n.error)}))}return t}const o=[s(e),s(t)];n.querySelectorAll(".tab-bar-item").forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=n.querySelector(".tab-bar-item.selected");t&&A.removeClass(t,"selected"),A.addClass(e.target,"selected");const s=n.querySelector(".scroller");s.innerHTML="",s.append(o[A.index(e.target)])})),n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").on("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n),e.length?n.querySelector(".tab-bar-item").click():n.querySelectorAll(".tab-bar-item")[1].click()}static showChangelogModal(e={}){const t=M("push","update","pop","popWithKey"),n=M("fixed","improved"),s=M("Sizes","Weights"),o=M("Child"),r=M("Tags","default"),i=P(e=>e.defaultProps&&0==e.defaultProps.selectable),l=M("defaultRules","parse");if(!(i&&t&&n&&s&&o&&r&&l))return;const{image:c="https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",description:d="",changes:u=[],title:h="BandagedBD",subtitle:p=`v${a}`,footer:m}=e,g=F.React.createElement,f=[g("img",{src:c})];d&&f.push(g("p",null,l.parse(d)));for(let e=0;eg("li",null,l.parse(e))));f.push(r)}const b=function(){return g(o.Child,{grow:1,shrink:1},g(r.default,{tag:r.Tags.H4},h),g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY,className:n.date},p))},v=()=>{const e=P(e=>"Anchor"==e.displayName),n=M("anchorUnderlineOnHover")||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"},r=e=>{e.preventDefault(),e.stopPropagation(),t.pop(),F.joinBD2()},i=e?g(e,{onClick:r},"Join our Discord Server."):g("a",{className:`${n.anchor} ${n.anchorUnderlineOnHover}`,onClick:r},"Join our Discord Server."),a=g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY},"Need support? ",i);return g(o.Child,{grow:1,shrink:1},m||a)};t.push((function(e){return g(i,Object.assign({className:n.container,selectable:!0,onScroll:e=>e,onClose:e=>e,renderHeader:b,renderFooter:v,children:f},e))}))}}j.showToast=j.suppressErrors(j.showToast,"Could not show toast.");const O=n(4);var $=new class extends O{dispatch(e,...t){this.emit(e,...t)}off(e,t){this.removeListener(e,t)}};class I{get folder(){return Y.pluginsFolder}}I.prototype.loadPlugins=function(){this.loadPluginData(),h.splice(0,0,...Y.loadPlugins());const e=Object.keys(S);for(let t=0;tt.filename==e).plugin;try{n.load&&"function"==typeof n.load&&n.load()}catch(e){u["fork-ps-1"]&&j.showContentErrors({plugins:[e]})}j.log("ContentManager",`${n.getName()} v${n.getVersion()} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.getName()} v${n.getVersion()} was loaded.`,{type:"success"}),$.dispatch("plugin-loaded",n.getName())},I.prototype.unloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const n=t.plugin.getName();x[n]&&this.disablePlugin(n,!0);const s=Y.unloadContent(S[n].filename,"plugin");if(delete S[n],s)return u["fork-ps-1"]&&j.showContentErrors({plugins:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("plugin-unloaded",n)},I.prototype.delete=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;this.unloadPlugin(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},I.prototype.reloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return this.loadPlugin(e);const n=t.plugin.getName(),s=x[n];s&&this.stopPlugin(n,!0);const o=Y.reloadContent(S[n].filename,"plugin");if(o)return u["fork-ps-1"]&&j.showContentErrors({plugins:[o]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,o);S[n].plugin.load&&"function"==typeof S[n].plugin.load&&S[n].plugin.load(),s&&this.startPlugin(n,!0),j.log("ContentManager",`${n} v${S[n].plugin.getVersion()} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${S[n].plugin.getVersion()} was reloaded.`,{type:"success"}),$.dispatch("plugin-reloaded",n)},I.prototype.reload=function(e){return this.reloadPlugin(e)},I.prototype.edit=function(e){console.log("Edit "+e);const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const s=n(1).resolve(Y.pluginsFolder,t.filename);console.log("Edit "+s),n(2).shell.openItem(`${s}`)},I.prototype.updatePluginList=function(){const e=Y.loadNewContent("plugin");for(const t of e.added)this.loadPlugin(t);for(const t of e.removed)this.unloadPlugin(t)},I.prototype.loadPluginData=function(){const e=ee.getSettingGroup("plugins");e&&Object.assign(x,e)},I.prototype.savePluginData=function(){ee.setSettingGroup("plugins",x)},I.prototype.newMessage=function(){const e=Object.keys(S);for(let t=0;tt.filename==e);j.log("ContentManager",`${n.name} v${n.version} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.name} v${n.version} was loaded.`,{type:"success"}),$.dispatch("theme-loaded",n.name)},q.prototype.unloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const n=t.name;D[n]&&this.disableTheme(n,!0);const s=Y.unloadContent(k[n].filename,"theme");if(delete k[n],s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("theme-unloaded",n)},q.prototype.delete=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;this.unloadTheme(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},q.prototype.reloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return this.loadTheme(e);const n=t.name,s=Y.reloadContent(k[n].filename,"theme");if(D[n]&&(this.disableTheme(n,!0),this.enableTheme(n,!0)),s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,s);j.log("ContentManager",`${n} v${k[n].version} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${k[n].version} was reloaded.`,{type:"success"}),$.dispatch("theme-reloaded",n)},q.prototype.reload=function(e){return this.reloadTheme(e)},q.prototype.edit=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const s=n(1).resolve(Y.themesFolder,t.filename);n(2).shell.openItem(`${s}`)},q.prototype.updateThemeList=function(){const e=Y.loadNewContent("theme");for(const t of e.added)this.loadTheme(t);for(const t of e.removed)this.unloadTheme(t)},q.prototype.loadThemeData=function(){const e=ee.getSettingGroup("themes");e&&Object.assign(D,e)},q.prototype.saveThemeData=function(){ee.setSettingGroup("themes",D)};var _=new q;const W=n(1),H=n(0),G=n(5).Module;G.globalPaths.push(W.resolve(n(2).remote.app.getAppPath(),"node_modules"));class z extends Error{constructor(e){super(e),this.name="MetaError"}}const V=G._extensions[".js"],U=G._extensions[".css"]?G._extensions[".css"]:()=>null,J=/[^\S\r\n]*?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,Q=/^\\@/;var Y=new class{constructor(){this.timeCache={},this.watchers={},G._extensions[".js"]=this.getContentRequire("plugin"),G._extensions[".css"]=this.getContentRequire("theme")}get pluginsFolder(){return this._pluginsFolder||(this._pluginsFolder=H.realpathSync(W.resolve(m.dataPath+"plugins/")))}get themesFolder(){return this._themesFolder||(this._themesFolder=H.realpathSync(W.resolve(m.dataPath+"themes/")))}watchContent(e){if(this.watchers[e])return;const t="plugin"===e,n=t?this.pluginsFolder:this.themesFolder,s=t?".plugin.js":".theme.css";this.watchers[e]=H.watch(n,{persistent:!1},async(e,o)=>{if(!e||!o||!o.endsWith(s))return;await new Promise(e=>setTimeout(e,50));try{H.statSync(W.resolve(n,o))}catch(e){if("ENOENT"!==e.code)return;return delete this.timeCache[o],t?R.unloadPlugin(o):_.unloadTheme(o)}if(!H.statSync(W.resolve(n,o)).isFile())return;const r=H.statSync(W.resolve(n,o));r&&r.mtime&&r.mtime.getTime()&&"number"==typeof r.mtime.getTime()&&this.timeCache[o]!=r.mtime.getTime()&&(this.timeCache[o]=r.mtime.getTime(),"rename"==e&&(t?R.loadPlugin(o):_.loadTheme(o)),"change"==e&&(t?R.reloadPlugin(o):_.reloadTheme(o)))})}unwatchContent(e){this.watchers[e]&&(this.watchers[e].close(),delete this.watchers[e])}extractMeta(e){const t=e.split("\n")[0];if(t.includes("//META"))return this.parseOldMeta(e);if(t.includes("/**"))return this.parseNewMeta(e);throw new z("META was not found.")}parseOldMeta(e){const t=e.split("\n")[0],n=t.substring(t.lastIndexOf("//META")+6,t.lastIndexOf("*//"));if(t.indexOf("META")<0)throw new z("META was not found.");const s=j.testJSON(n);if(!s)throw new z("META could not be parsed.");if(!s.name)throw new z("META missing name data.");return s.format="json",s}parseNewMeta(e){const t=e.split("/**",2)[1].split("*/",1)[0],n={};let s="",o="";for(const e of t.split(J))if(0!==e.length)if("@"===e.charAt(0)&&" "!==e.charAt(1)){n[s]=o;const t=e.indexOf(" ");s=e.substr(1,t-1),o=e.substr(t+1)}else o+=" "+e.replace("\\n","\n").replace(Q,"@");return n[s]=o.trim(),delete n[""],n.format="jsdoc",n}getContentRequire(e){const t="plugin"===e,n=this,s=t?V:U;return function(e,o){const r=t?n.pluginsFolder:n.themesFolder,i=W.resolve(r,W.basename(o));if(!H.existsSync(i)||o!==H.realpathSync(i))return Reflect.apply(s,this,arguments);let a=H.readFileSync(o,"utf8");a=j.stripBOM(a);const l=H.statSync(o),c=n.extractMeta(a);if(c.filename=W.basename(o),c.added=l.atimeMs,c.modified=l.mtimeMs,c.size=l.size,t||(c.css=a,"json"==c.format&&(c.css=c.css.split("\n").slice(1).join("\n")),a=`module.exports = ${JSON.stringify(c)};`),t){e._compile(a,e.filename),!j.isEmpty(e.exports)?(c.type=e.exports,e.exports=c,a=""):a+=`\nmodule.exports = ${JSON.stringify(c)};\nmodule.exports.type = ${c.exports||c.name};`}e._compile(a,o)}}makePlaceholderPlugin(e){return{plugin:{start:()=>{},getName:()=>e.name||e.filename,getAuthor:()=>"???",getDescription:()=>e.message?e.message:"This plugin was unable to be loaded. Check the author's page for updates.",getVersion:()=>"???"},name:e.name||e.filename,filename:e.filename,source:e.source?e.source:"",website:e.website?e.website:""}}loadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t,s=n?this.pluginsFolder:this.themesFolder;try{require(W.resolve(s,e))}catch(t){return{name:e,file:e,message:"Could not be compiled.",error:{message:t.message,stack:t.stack}}}const o=require(W.resolve(s,e));if(o.id=j.escapeID(o.name),n){if(!o.type)return;try{o.plugin=new o.type,delete S[o.plugin.getName()],S[o.plugin.getName()]=o}catch(t){return{name:e,file:e,message:"Could not be constructed.",error:{message:t.message,stack:t.stack}}}}else delete k[o.name],k[o.name]=o}unloadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{delete require.cache[require.resolve(W.resolve(n,e))]}catch(t){return{name:e,file:e,message:"Could not be unloaded.",error:{message:t.message,stack:t.stack}}}}isLoaded(e,t){const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{require.cache[require.resolve(W.resolve(n,e))]}catch(e){return!1}return!0}reloadContent(e,t){const n=this.unloadContent(e,t);return n||this.loadContent(e,t)}loadNewContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=H.readdirSync(s),r=Object.values(t?S:k),i=r.filter(e=>!o.includes(e.filename)).map(e=>t?e.plugin.getName():e.name);return{added:o.filter(e=>!r.find(t=>t.filename==e)&&e.endsWith(n)&&H.statSync(W.resolve(s,e)).isFile()),removed:i}}loadAllContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=[],r=H.readdirSync(s);for(const t of r){if(!H.statSync(W.resolve(s,t)).isFile()||!t.endsWith(n))continue;const r=this.loadContent(t,e);r&&o.push(r)}return o}loadPlugins(){return this.loadAllContent("plugin")}loadThemes(){return this.loadAllContent("theme")}};const Z=n(0),K=n(1),X=DiscordNative.globals.releaseChannel;var ee=new class{constructor(){this.data={settings:{stable:{},canary:{},ptb:{}}},this.pluginData={}}initialize(){try{Z.existsSync(this.BDFile)||Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4));const e=require(this.BDFile);if(e.hasOwnProperty("settings")&&(this.data=e),!Z.existsSync(this.settingsFile))return;let t=require(this.settingsFile);Z.unlinkSync(this.settingsFile),t=t.hasOwnProperty("settings")?Object.assign({stable:{},canary:{},ptb:{}},{[X]:t}):Object.assign({stable:{},canary:{},ptb:{}},t),this.setBDData("settings",t)}catch(e){console.error(e),j.alert("Corrupt Storage","The bd storage has somehow become corrupt. You may either try to salvage the file or delete it then reload.")}}get BDFile(){return this._BDFile||(this._BDFile=K.resolve(m.dataPath,"bdstorage.json"))}get settingsFile(){return this._settingsFile||(this._settingsFile=K.resolve(m.dataPath,"bdsettings.json"))}getPluginFile(e){return K.resolve(Y.pluginsFolder,e+".config.json")}getSettingGroup(e){return this.data.settings[X][e]||null}setSettingGroup(e,t){this.data.settings[X][e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getBDData(e){return this.data[e]||""}setBDData(e,t){this.data[e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getPluginData(e,t){return void 0!==this.pluginData[e]?this.pluginData[e][t]||void 0:Z.existsSync(this.getPluginFile(e))?(this.pluginData[e]=JSON.parse(Z.readFileSync(this.getPluginFile(e))),this.pluginData[e][t]||void 0):void 0}setPluginData(e,t,n){void 0!==n&&(void 0===this.pluginData[e]&&(this.pluginData[e]={}),this.pluginData[e][t]=n,Z.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4)))}deletePluginData(e,t){void 0===this.pluginData[e]&&(this.pluginData[e]={}),delete this.pluginData[e][t],Z.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4))}};function te(){this.switchHandler=this.switchHandler.bind(this),this.favContext=this.favContext.bind(this)}const ne=function(e){const t=e.target.getAttribute("title"),n=document.querySelector(`.${F.slateEditorClasses.slateTextArea.split(" ")[0]}`);if(n){const e=F.getInternalInstance(n),s=j.getNestedProp(e,"memoizedProps.children.props.editor.insertText");s&&s(` ${t} `)}else{const e=j.getTextArea();j.insertText(e," "==e.value.slice(-1)?e.value+t:e.value+" "+t)}},se=function(e,t,{click:n=ne,contextmenu:s}={}){const o=A.createElement(`
${e}
`);return n&&o.addEventListener("click",n),s&&o.addEventListener("contextmenu",s),o};te.prototype.init=function(){this.initialized=!0,this.favoriteEmotes={};const e=ee.getBDData("bdfavemotes");""!==e&&null!==e&&(this.favoriteEmotes=JSON.parse(atob(e))),this.qmeHeader=A.createElement('
'),this.twitchButton=A.createElement(''),this.favoriteButton=A.createElement(''),this.emojiButton=A.createElement('