drill.init(async()=>{try{const{remote:e}=require("electron"),{Menu:l}=e;let o=e.getCurrentWindow(),r=[{label:"文件",submenu:[{label:"备份到",accelerator:"CommandOrControl+Shift+S",click(){$("#btnBackupTo").ele.click()}},{type:"separator"},{label:"导出web",accelerator:"CommandOrControl+Shift+O",click(){$("#btnOutput").ele.click()}}]},{label:"编辑",submenu:[{role:"undo",label:"撤销"},{role:"redo",label:"重做"},{type:"separator"},{role:"cut",label:"剪切"},{role:"copy",label:"复制"},{role:"paste",label:"粘贴"},{role:"selectall",label:"全选"}]},{label:"图层",id:"tuceng",submenu:[]},{label:"视图",id:"shitu",submenu:[]},{role:"window",label:"窗口",submenu:[{role:"minimize",label:"最小化"},{role:"zoom",label:"放大"},{role:"close",label:"关闭"},{type:"separator"},{role:"reload",label:"刷新"},{role:"forcereload",label:"强制刷新"},{role:"toggledevtools",label:"开发者工具"},{type:"separator"},{role:"resetzoom"},{role:"zoomin"},{role:"zoomout"},{type:"separator"},{role:"togglefullscreen"}]}];"darwin"===process.platform&&r.unshift({label:"Page Creator",submenu:[{role:"hide",label:"隐藏"},{role:"hideothers",label:"隐藏其它"},{role:"unhide",label:"取消隐藏"},{type:"separator"},{role:"quit",label:"退出"}]});let[a]=await load("task/shortcut");a.forEach(e=>{if(e.toid){let l=r.find(l=>l.id==e.toid);l.submenu.length&&l.submenu.push({type:"separator"}),l&&e.group.forEach(e=>{if(!e.f)return;let o=e.menusetsc||e.sc;o=o.replace("ckey","CommandOrControl"),l.submenu.push({label:e.label,accelerator:o,click:e.f})})}});let t=async()=>{let e=l.buildFromTemplate(r);l.setApplicationMenu(e)};o.on("focus",e=>{t()}),t()}catch(e){}});