function ProgressDialog(a){"use strict";var b=this;if(!(b instanceof ProgressDialog))return new ProgressDialog;"string"!=typeof a&&(a+="");var c=0,d=new BrowserWindow({width:360,height:120,"always-on-top":!0,resizable:!1});d.setMenuBarVisibility(!1),d.loadUrl("file://"+path.resolve(__dirname,"progress.html"));var e=function(){var a=["sending: "].concat(arguments);console.log.apply(console,a)},f=e;d.webContents.on("did-finish-load",function(){f=function(){var a=d.webContents;a.send.apply(a,arguments)},f("set-title",a),f("set-progress",c)}),d.on("closed",function(){f=e}),Object.defineProperty(b,"progress",{enumerable:!1,configurable:!1,get:function(){return c},set:function(a){a=Math.max(0,a),a=Math.min(100,a),c=a,f("set-progress",c)}}),Object.defineProperty(b,"title",{enumerable:!1,configurable:!1,get:function(){return a},set:function(b){"string"!=typeof b&&(b+=""),a=b,f("set-title",a)}});var g=!1;Object.defineProperty(b,"close",{enumerable:!1,writable:!1,configurable:!1,value:function(a){g=!!a,d.close(),g=!1}}),d.on("close",function(a){var c;if(g)c=!0;else{var d=Dialog.showMessageBox({title:"取消",message:"确定要取消吗？",buttons:["是","否"]});0===d&&(c=!0,b.emit("cancel"))}c||a.preventDefault()})}var BrowserWindow=require("browser-window"),util=require("util"),path=require("path"),EventEmitter=require("events").EventEmitter,Dialog=require("dialog");util.inherits(ProgressDialog,EventEmitter),module.exports=ProgressDialog;