(()=>{var e={247:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});const n=requireModule("node:fs"),o=r(465).Z,s=async()=>{var e=o();e=e.split("/")[e.split("/").length-1];var t=__dirname.split("/");t.pop(),t.pop(),t=t.join("/")+"/plugins";let r=n.readFileSync(`${t}/${e}`,"utf8");r=r.split('version:"')[r.split('version:"').length-1].split('",')[0];const s=await fetch(`https://raw.githubusercontent.com/TBHGodPro/SolarStatsPlugins/main/Plugins%20(Compressed)/${e}`);if(!s||"404: Not Found"==s)return;const a=s.split('version:"')[s.split('version:"').length-1].split('",')[0];(function(e,t){if(e==t)return!1;const r=e.split(".").map((e=>parseInt(e))),n=t.split(".").map((e=>parseInt(e)));var o=0;for(const e of r){if(r[o]{Logger.info(`UPDATING PLUGIN FROM ${r} TO ${a}, PLEASE RESTART SOLAR STATS`),n.writeFile(`${t}/${e}`,s,{},(()=>{}))}),500)}},465:(e,t,r)=>{"use strict";function n({depth:e=0}={}){const t=function({depth:e=0}={}){const t=[],r=new Set;for(const n of function(){const e=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const t=(new Error).stack.slice(1);return Error.prepareStackTrace=e,t}()){const o=n.getFileName(),s=null!==n.getTypeName()&&null!==o;if(r.has(o)||(r.add(o),t.unshift(n)),s)return t[e]}}({depth:e});return t&&t.getFileName()}r.d(t,{Z:()=>n})}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{r(247).Z();const{getEventListeners:e}=requireModule("node:events"),{PlayerModule:t,Item:n,getConfigSync:o,getConfig:s}=toolbox,a=new n(4);a.displayName="§rGame Stats",a.lore=["","§7Shows Your Opponent's Game Stats","§7In Duels Once They Join","","§7Current: §"+(o().modules.gameStats?"aEnabled":"cDisabled")];const i=new t("LC Staff Mods (X-RAY)","Enable Staff Mods For Lunar Client",a,"gameStats");var l=null,p=[];async function u(e,t){if(await new Promise((e=>setTimeout(e,750))),!i.enabled||t==player.client.username||!l||p.includes(e))return;const r=await fetch(`https://api.hypixel.net/player?key=${encodeURIComponent((await s()).apiKey)}&uuid=${encodeURIComponent(e)}`);if(!r.player||p.includes(e))return;const n=r.player.stats.Duels,o={bridge_duel:"bridge_duel_bridge",bridge_doubles:"bridge_doubles_bridge"},a=n["current_winstreak_mode_"+l]??"§r§4UNKOWN",u=n["best_winstreak_mode_"+l]??"§r§4UNKOWN",c=n[l+"_wins"]??1,d=n[l+"_losses"]??1,f=Math.round(c/d*100)/100,m=n[(o[l]??l)+"_kills"]??1,y=n[(o[l]??l)+"_deaths"]??1,g=Math.round(m/y*100)/100,S=n[l+"_rounds_played"]??"§r§4UNKOWN";p.includes(e)||(p.push(e),player.sendMessage(`§r§7------§c§lSolar Stats§r§7§l - §f§l${r.player.displayname}§r§7------\n§eWS §6§l${a} §r§f| §eBWS §6§l${u} §r§f| §eWLR §6§l${f} §r§f| §eKDR §6§l${g} §r§f| §ePLAYED §6§l${S}\n§r§7---------------------------------`))}function c(){l=null,player.listener.removeListener("player_join",u),p=[]}i.handle("LocationUpdate",(async t=>{t.mode?.startsWith("DUELS")&&i.enabled?function(t){l=t.mode?.substring(6)?.toLowerCase(),e(player.listener,"player_join").forEach((e=>{e.toString()==u.toString()&&player.listener.removeListener("player_join",e)})),player.listener.on("player_join",u),p=[]}(t):c()})),player.proxy.on("incoming",((e,t)=>{if("chat"==t.name){var{message:r}=e;r=JSON.parse(r),r.extra??=[],(r=[r.text,...r.extra.map((e=>e.text))].join("")).includes("Reward Summary")&&c()}})),registerPlayerModule(i),registerPlugin({name:"Game Stats",description:"Shows Your Opponent's Game Stats In Duels Once They Join | `/ss`",version:"1.0.1",author:"TBHGodPro"})})()})();