const UUID=Editor.require("packages://hot-update-tools/node_modules/uuid/v4"),{JSONStorage:JSONStorage}=Editor.require("packages://hot-update-tools/node_modules/node-localstorage"),UA=Editor.require("packages://hot-update-tools/node_modules/universal-analytics"),{app:app}=require("electron").remote,Package=Editor.require("packages://hot-update-tools/package.json");module.exports={nodeStorage:null,user:null,init(){this.nodeStorage=new JSONStorage(app.getPath("userData"));const e=this.nodeStorage.getItem("userId")||UUID();this.nodeStorage.setItem("userId",e),this.user=UA("UA-134924925-1",e)},event(e){this.user&&this.user.event({ec:`${Package.name} : V${Package.version}`,ea:e||"",el:"",ev:0}).send()},eventOpen(){this.event("open")},eventDoc(){this.event(`${Package.name}-doc`)},eventQQ(){this.event(`${Package.name}-qq`)},eventCustom(e){this.event(e)}};