(()=>{var e={247:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});const n=requireModule("node:fs"),o=r(465).Z,i=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 i=await fetch(`https://raw.githubusercontent.com/TBHGodPro/SolarStatsPlugins/main/Plugins%20(Compressed)/${e}`);if(!i||"404: Not Found"==i)return;const s=i.split('version:"')[i.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 ${s}, PLEASE RESTART SOLAR STATS`),n.writeFile(`${t}/${e}`,i,{},(()=>{}))}),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(),i=null!==n.getTypeName()&&null!==o;if(r.has(o)||(r.add(o),t.unshift(n)),i)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 i=t[n]={exports:{}};return e[n](i,i.exports,r),i.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{Command:e}=toolbox,t=new e("reset",[],["pr"]);var n=null;function o(e){var t=Math.floor(e/6e4).toString();e-=6e4*t;var r=Math.floor(e/1e3).toString();return e=(e-1e3*r).toString(),1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),2==e.length&&(e="0"+e),1==e.length&&(e="00"+e),`§a${t}§f:§a${r}§f.§a${e}`}t.onTriggered=()=>{player.executeCommand("/parkour reset"),n=null},registerCommand(t),player.proxy.on("incoming",((e,t)=>{if("chat"==t.name&&0==e.position){var{message:r}=e;r=JSON.parse(r),r.extra??=[],((r=[r.text,...r.extra.map((e=>e.text))].join("")).includes("Parkour challenge started!")||r.includes("Reset your timer to 00:00!"))&&(n=Date.now()),(r.includes("cancelled")||r.includes("failed")||r.includes("completed")||r.includes("record"))&&(n=null)}})),setInterval((()=>{if(n){var e=Date.now()-n;player.client?.write("chat",{message:JSON.stringify({text:o(e)}),position:2})}}),50),registerPlugin({name:"Parkour Timer",description:"Live Timer For Parkour | `/pr` `/reset`",version:"1.2.0",author:"TBHGodPro"})})()})();