drill.define(async e=>{e("./setSlide.css");let[t,a,o]=await e("common/app","common/data","util/u-tips -pack");await e("components/p-input -pack");let{code:c}=await e("./setSlide.dcode"),i=$(c),{version:r,buildVersion:l}=t;l&&(r+=`<span style="display:inline-block;margin-left:10px;color:#aaa;font-size:10px;">${l}</span>`),i.que("#version").html=r;let n=i.viewData();await e("./setSlideInit").post(i),n.watch("slideAnime",(e,t)=>{t?$("o-frame").class.remove("no_slide_anime"):$("o-frame").class.add("no_slide_anime")},!0);let s=i.que("#projectNameText");a.project.sync(s,{name:"value"},!0),t.setter.sync(n,["slideAnime"],!0);const u=navigator.userAgent.search("Mac OS")>-1;e("task/shortcut").then(e=>{let[t,a]=e,o=i.que(".shortcut_con");t.forEach(e=>{if(e.group){let t=$(`\n                <div class="shortcut_group">\n                    <div class="shortcut_group_title">${e.name}</div>\n                    <div class="shortcut_group_con" data-menuconid="shitu"></div>\n                </div>\n                `),a=t.que(".shortcut_group_con");a&&e.group.forEach(e=>{let t=e.menusetsc||e.sc;t=t.replace(/\+/g," + "),t=u?(t=t.replace("ckey","command")).replace("Alt","Alt / option"):t.replace("ckey","ctrl"),e.label&&a.push(`\n                    <div class="shortcut_block">\n                        <div class="shortcut_block_name">${e.label}</div>\n                        <div class="shortcut_block_show">${t}</div>\n                    </div>\n                    `)}),o.push(t)}})});try{const t=require("copy-dir");let{remote:c}=require("electron");const{dialog:r}=c,l=require("pfs");i.que("#btnBackupTo").on("click",async e=>{let c=r.showSaveDialog({title:"项目备份",nameFieldLabel:"备份到"});if(c)try{o({text:"备份中..."}),t(n.normalize(a.projectDir),c,e=>{o({text:"备份成功"})})}catch(e){o({text:"备份失败"})}});const n=require("path");i.que("#btnOutput").on("click",async c=>{let s=r.showSaveDialog({title:"项目导出",nameFieldLabel:"导出到"});if(s)try{o({text:"导出中..."});let r=`${process.resourcesPath}/apps/PageCreator/app`;await new Promise((e,a)=>{t(n.normalize(`${r}/runner`),s,t=>{t?a():e()})});let u=i.que("#sourceDirInput").value||"source",p=s+"/"+u;await l.mkdir(n.normalize(p));let d=[];d.push(new Promise((e,o)=>{t(n.normalize(a.projectDir+"/source"),p,t=>{t?o():e()})}));const m=e=>{let t=e.picUrl,o=e["background-image"];t&&(e.picUrl=t.replace(`/${a.sourceServerName}`,u)),o&&(e["background-image"]=o.replace(`/${a.sourceServerName}`,u)),delete e.thumbnail};d.push(new Promise(async(t,a)=>{let o=await e("common/runnerData");Object.values(o.mainPage).forEach(e=>{m(e),Object.values(e).forEach(e=>{m(e)})}),await l.writeFile(n.normalize(s+"/data.js"),`define(${JSON.stringify(o)})`),t()})),await Promise.all(d),o({text:"导出成功"})}catch(c){console.log(c),o({text:"导出失败"})}})}catch(e){i.que("#btnBackupTo").display="none",i.que(".output_con").style.opacity=".4"}let p;return i.que("#coldFingerInput").on("input",e=>{clearTimeout(p),p=setTimeout(()=>{i.que("#coldFingerInput").ele.value},1e3)}),i});