!function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=4)}([function(e,n){e.exports=require("electron")},function(e,n){e.exports=require("path")},function(e,n){e.exports=require("fs")},function(e,n){e.exports=require("slash")},function(e,n,t){e.exports=t(5)},function(e,n,t){"use strict";function o(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function c(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}l((o=o.apply(e,n||[])).next())}))}function r(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],o=0}finally{t=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}t.r(n);var i=t(0),a=t(1),c=t.n(a),l=c.a.resolve(__dirname),u=t(3),s=t.n(u),p=t(2),f=t(2);function d(){return o(this,void 0,void 0,(function(){var e;return r(this,(function(n){switch(n.label){case 0:return e=new i.BrowserWindow({show:!1,autoHideMenuBar:!0,webPreferences:{enableRemoteModule:!0,webSecurity:!1,nodeIntegration:!0,allowRunningInsecureContent:!0}}),process.env.WEBPACK_DEV_SERVER_URL?[4,e.loadURL(process.env.WEBPACK_DEV_SERVER_URL)]:[3,2];case 1:return n.sent(),process.env.IS_TEST||e.webContents.openDevTools(),[3,3];case 2:t="app",i.protocol.registerBufferProtocol(t,(function(e,n){var t=new URL(e.url).pathname;t=decodeURI(t),Object(p.readFile)(c.a.join(__dirname,t),(function(e,o){e&&console.error("Failed to read "+t+" on "+"app protocol",e);var r=c.a.extname(t).toLowerCase(),i="";".js"===r?i="text/javascript":".html"===r?i="text/html":".css"===r?i="text/css":".svg"===r||".svgz"===r?i="image/svg+xml":".json"===r?i="application/json":".mp4"===r?i="video/mp4":".webm"===r?i="video/webm":".mp3"===r&&(i="audio/mpeg"),n({mimeType:i,data:o})}))}),(function(e){e&&console.error("Failed to register app protocol",e)})),e.loadURL("app://./index.html"),n.label=3;case 3:try{f.readFile(c.a.resolve(l,"./data.json"),"utf8",(function(n,t){var o=JSON.parse(t);if(""===t||void 0===o||void 0===o.window)e.maximize(),e.show();else{var r=o.window,i=o.width,a=o.height;"max"==r?(e.maximize(),e.show()):"fullscreen"==r?(e.setFullScreen(!0),e.show()):(e.setSize(Number(i),Number(a)),e.show())}}))}catch(e){console.log(e)}return e.webContents.on("new-window",(function(e,n){e.preventDefault();var t=decodeURIComponent(n.replace(/file:\/\/\//g,""));i.shell.openExternal(t).catch((function(e){i.shell.openPath(t).catch((function(e){console.log("open "+n+" error : not fial")}))}))})),[2]}var t}))}))}i.protocol.registerSchemesAsPrivileged([{scheme:"app",privileges:{secure:!0,standard:!0}}]),i.app.on("window-all-closed",(function(){"darwin"!==process.platform&&i.app.quit()})),i.app.on("activate",(function(){0===i.BrowserWindow.getAllWindows().length&&d()})),i.app.on("ready",(function(){return o(void 0,void 0,void 0,(function(){return r(this,(function(e){return d(),i.protocol.interceptFileProtocol("file",(function(e,n){var t=e.url.substr(8).replace(/\?.*/g,"");n(s()(decodeURI(t)))})),[2]}))}))}))}]);