import{u as o,a8 as s}from"./index-BrhME0Dw.js";const n=o(),i=s("app",{state:()=>({targetFirmwareVersion:null,availableFirmwareInfos:[],gameData:{}}),getters:{gameDataInited(a){return Object.keys(a.gameData).length!==0}},actions:{updateAvailableFirmwareInfos(){this.targetFirmwareVersion=null,window.eel.get_available_firmware_infos()(a=>{if(a.code===0){const e=a.data;this.availableFirmwareInfos=e,this.targetFirmwareVersion=e[0].version}else n.showConsoleDialog(),n.appendConsoleMessage("固件信息加载异常.")})},async loadGameData(){if(this.gameDataInited&&!("unknown"in this.gameData))return this.gameData;const a=await window.eel.get_game_data()(),e=a.code===0?a.data:{unknown:"unknown"};return this.gameData=e,e}}}),t=i();function l(a){window.eel.open_url_in_default_browser(a)()}async function g(){if(t.gameDataInited&&!("unknown"in t.gameData))return t.gameData;const a=await window.eel.get_game_data()(),e=a.code===0?a.data:{unknown:"unknown"};return t.gameData=e,e}export{g as l,l as o,i as u};
