windowmanager
Version:
A framework to manage multiple dockable, HTML windows
2 lines • 101 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("windowmanager",[],e):"object"==typeof exports?exports.windowmanager=e():t.windowmanager=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=r(i);n(68),"undefined"!=typeof global&&global&&(global.windowmanager=o.default),"undefined"!=typeof window&&window&&(window.windowmanager=o.default),e.default=o.default,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(59),a=r(o),u=["window-create","window-close"],s=new i.EventHandler(u);s.version="0.12.2",s.runtime={name:void 0,version:void 0,isBrowser:!1,isElectron:!1,isOpenFin:!1,isDesktop:!1,isMobile:!1,isMain:!1},"undefined"!=typeof navigator&&(s.runtime.isMobile=function(t){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),s.runtime.isDesktop=!s.isMobile),s.geometry=a.default,e.default=s,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){return"window"+d()+(new Date).getTime()}Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),a=r(o),u=n(58),s=r(u),d=function(){for(var t=[],e=0;e<256;e+=1)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]}}();e.default={getUniqueWindowName:i,EventHandler:a.default,SyncCallback:s.default},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._eventListeners={},this._eventPipes=[];var e=!0,n=!1,r=void 0;try{for(var i,o=(0,a.default)(t);!(e=(i=o.next()).done);e=!0){var u=i.value;this._eventListeners[u]=[]}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),a=r(o);i.prototype.on=function(t,e){t=t.toLowerCase().split(" ");var n=!0,r=!1,i=void 0;try{for(var o,u=(0,a.default)(t);!(n=(o=u.next()).done);n=!0){var s=o.value;if(void 0!==this._eventListeners[s]){if(!e||"function"!=typeof e.constructor)throw new Error("on requires argument 'eventListener' of type Function");this._eventListeners[s].indexOf(e)>=0||this._eventListeners[s].push(e)}}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}},i.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}this.on(t,n)},i.prototype.off=function(t,e){t=t.toLowerCase().split(" ");var n=!0,r=!1,i=void 0;try{for(var o,u=(0,a.default)(t);!(n=(o=u.next()).done);n=!0){var s=o.value;if(void 0===this._eventListeners[s])return;if(!e||"function"!=typeof e.constructor)throw new Error("off requires argument 'eventListener' of type Function");var d=this._eventListeners[s].indexOf(e);d>=0&&this._eventListeners[s].splice(d,1)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}},i.prototype.clearEvent=function(t){t=t.toLowerCase();var e=!0,n=!1,r=void 0;try{for(var i,o=(0,a.default)(t);!(e=(i=o.next()).done);e=!0){var u=i.value;if(void 0===this._eventListeners[u])return;this._eventListeners[u]=[]}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}},i.prototype.emit=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(t=t.toLowerCase(),void 0===this._eventListeners[t])return!1;var i=!0,o=!0,u=!1,s=void 0;try{for(var d,f=(0,a.default)(this._eventListeners[t]);!(o=(d=f.next()).done);o=!0){var l=d.value;i=i&&l.apply(this,n)!==!1}}catch(t){u=!0,s=t}finally{try{!o&&f.return&&f.return()}finally{if(u)throw s}}var c=!0,h=!1,v=void 0;try{for(var w,y=(0,a.default)(this._eventPipes);!(c=(w=y.next()).done);c=!0){var p=w.value;i=i&&p.emit.apply(p,arguments)!==!1}}catch(t){h=!0,v=t}finally{try{!c&&y.return&&y.return()}finally{if(h)throw v}}return i},i.prototype.addPipe=function(t){if(!t||!t.emit)throw new Error("addPipe requires argument 'eventHandler' of type EventHandler");this._eventPipes.indexOf(t)>=0||this._eventPipes.push(t)},i.prototype.removePipe=function(t){if(!t||!t.emit)throw new Error("removePipe requires argument 'eventHandler' of type EventHandler");if(!(this._eventPipes.indexOf(t)>=0)){var e=this._eventPipes.indexOf(t);e>=0&&this._eventPipes.splice(e,1)}},e.default=i,t.exports=e.default},function(t,e,n){t.exports={default:n(6),__esModule:!0}},function(t,e,n){n(7),n(53),t.exports=n(55)},function(t,e,n){n(8);for(var r=n(19),i=n(23),o=n(11),a=n(50)("toStringTag"),u=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],s=0;s<5;s++){var d=u[s],f=r[d],l=f&&f.prototype;l&&!l[a]&&i(l,a,d),o[d]=o.Array}},function(t,e,n){"use strict";var r=n(9),i=n(10),o=n(11),a=n(12);t.exports=n(16)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports={}},function(t,e,n){var r=n(13),i=n(15);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(17),i=n(18),o=n(33),a=n(23),u=n(34),s=n(11),d=n(35),f=n(49),l=n(51),c=n(50)("iterator"),h=!([].keys&&"next"in[].keys()),v="@@iterator",w="keys",y="values",p=function(){return this};t.exports=function(t,e,n,_,g,m,x){d(n,e,_);var b,k,S,M=function(t){if(!h&&t in P)return P[t];switch(t){case w:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",z=g==y,B=!1,P=t.prototype,O=P[c]||P[v]||g&&P[g],C=O||M(g),T=g?z?M("entries"):C:void 0,N="Array"==e?P.entries||O:O;if(N&&(S=l(N.call(new t)),S!==Object.prototype&&(f(S,E,!0),r||u(S,c)||a(S,c,p))),z&&O&&O.name!==y&&(B=!0,C=function(){return O.call(this)}),r&&!x||!h&&!B&&P[c]||a(P,c,C),s[e]=C,s[E]=p,g)if(b={values:z?C:M(y),keys:m?C:M(w),entries:T},x)for(k in b)k in P||o(P,k,b[k]);else i(i.P+i.F*(h||B),e,b);return b}},function(t,e){t.exports=!0},function(t,e,n){var r=n(19),i=n(20),o=n(21),a=n(23),u="prototype",s=function(t,e,n){var d,f,l,c=t&s.F,h=t&s.G,v=t&s.S,w=t&s.P,y=t&s.B,p=t&s.W,_=h?i:i[e]||(i[e]={}),g=_[u],m=h?r:v?r[e]:(r[e]||{})[u];h&&(n=e);for(d in n)f=!c&&m&&void 0!==m[d],f&&d in _||(l=f?m[d]:n[d],_[d]=h&&"function"!=typeof m[d]?n[d]:y&&f?o(l,r):p&&m[d]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[u]=t[u],e}(l):w&&"function"==typeof l?o(Function.call,l):l,w&&((_.virtual||(_.virtual={}))[d]=l,t&s.R&&g&&!g[d]&&a(g,d,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(22);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(24),i=n(32);t.exports=n(28)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(25),i=n(27),o=n(31),a=Object.defineProperty;e.f=n(28)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(26);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(28)&&!n(29)(function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(29)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(26),i=n(19).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(26);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=n(23)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";var r=n(36),i=n(32),o=n(49),a={};n(23)(a,n(50)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(25),i=n(37),o=n(47),a=n(44)("IE_PROTO"),u=function(){},s="prototype",d=function(){var t,e=n(30)("iframe"),r=o.length,i="<",a=">";for(e.style.display="none",n(48).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),d=t.F;r--;)delete d[s][o[r]];return d()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[s]=r(t),n=new u,u[s]=null,n[a]=t):n=d(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(24),i=n(25),o=n(38);t.exports=n(28)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),u=a.length,s=0;u>s;)r.f(t,n=a[s++],e[n]);return t}},function(t,e,n){var r=n(39),i=n(47);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(34),i=n(12),o=n(40)(!1),a=n(44)("IE_PROTO");t.exports=function(t,e){var n,u=i(t),s=0,d=[];for(n in u)n!=a&&r(u,n)&&d.push(n);for(;e.length>s;)r(u,n=e[s++])&&(~o(d,n)||d.push(n));return d}},function(t,e,n){var r=n(12),i=n(41),o=n(43);t.exports=function(t){return function(e,n,a){var u,s=r(e),d=i(s.length),f=o(a,d);if(t&&n!=n){for(;d>f;)if(u=s[f++],u!=u)return!0}else for(;d>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(42),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(42),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(45)("keys"),i=n(46);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(19),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){t.exports=n(19).document&&document.documentElement},function(t,e,n){var r=n(24).f,i=n(34),o=n(50)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(45)("wks"),i=n(46),o=n(19).Symbol,a="function"==typeof o,u=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};u.store=r},function(t,e,n){var r=n(34),i=n(52),o=n(44)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(54)(!0);n(16)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(42),i=n(15);t.exports=function(t){return function(e,n){var o,a,u=String(i(e)),s=r(n),d=u.length;return s<0||s>=d?t?"":void 0:(o=u.charCodeAt(s),o<55296||o>56319||s+1===d||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):o:t?u.slice(s,s+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){var r=n(25),i=n(56);t.exports=n(20).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){var r=n(57),i=n(50)("iterator"),o=n(11);t.exports=n(20).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(14),i=n(50)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},function(t,e){"use strict";function n(t){return this instanceof n?(this.callback=t,void(this.count=0)):new n(t)}Object.defineProperty(e,"__esModule",{value:!0}),n.prototype.ref=function(t){var e=this;return this.count+=1,function(){t&&t.apply(void 0,arguments),e._deref()}},n.prototype._deref=function(){this.count-=1,this.count<=0&&this.callback()},e.default=n,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(60),o=r(i),a=n(66),u=r(a),s=n(67),d=r(s);e.default={BoundingBox:u.default,CollisionMesh:d.default,Position:o.default,Size:o.default,Vector:o.default},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(61),o=r(i),a=n(62),u=r(a),s=n(66),d=r(s),f=n(67),l=r(f),c=function(){function t(e,n){(0,o.default)(this,t);var r=e;r&&r.constructor!==Number?(this.left=r.left,this.top=r.top):(this.left=e,this.top=n)}return(0,u.default)(t,[{key:"clone",value:function(){return new t(this)}},{key:"isNaN",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){return isNaN(this.left)||isNaN(this.top)})},{key:"getVector",value:function(){return this}},{key:"getBoundingBox",value:function(){return new d.default(this.left,this.top,this.left,this.top)}},{key:"getCollisionMesh",value:function(){return new l.default(this.getBoundingBox())}},{key:"distanceSquared",value:function(t){var e=t.subtract(this);return e.left*e.left+e.top*e.top}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"set",value:function(t){if(!t)throw new Error("set requires argument 'other'");return t=t.getVector(),this.left=t.left,this.top=t.top,this}},{key:"moveTo",value:function(t,e){return t&&t.constructor===Number&&(this.left=t),e&&e.constructor===Number&&(this.top=e),this}},{key:"moveBy",value:function(t,e){return t&&t.constructor===Number&&(this.left=t),e&&e.constructor===Number&&(this.top=e),this}},{key:"setMin",value:function(t){if(!t)throw new Error("setMin requires argument 'other'");t=t.getVector(),(Math.abs(t.left)<Math.abs(this.left)||isNaN(this.left))&&(this.left=t.left),(Math.abs(t.top)<Math.abs(this.top)||isNaN(this.top))&&(this.top=t.top)}},{key:"setMax",value:function(t){if(!t)throw new Error("setMax requires argument 'other'");t=t.getVector(),(Math.abs(t.left)>Math.abs(this.left)||isNaN(this.left))&&(this.left=t.left),(Math.abs(t.top)>Math.abs(this.top)||isNaN(this.top))&&(this.top=t.top)}},{key:"add",value:function(t){if(!t)throw new Error("add requires argument 'other'");return t=t.getVector(),this.left+=t.left,this.top+=t.top,this}},{key:"subtract",value:function(t){if(!t)throw new Error("subtract requires argument 'other'");return t=t.getVector(),this.left-=t.left,this.top-=t.top,this}}]),t}();e.default=c,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(63),o=r(i);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){t.exports={default:n(64),__esModule:!0}},function(t,e,n){n(65);var r=n(20).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(18);r(r.S+r.F*!n(28),"Object",{defineProperty:n(24).f})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){for(var e=Math.abs(t),n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=!0,a=!1,u=void 0;try{for(var s,d=(0,f.default)(r);!(o=(s=d.next()).done);o=!0){var l=s.value,c=Math.abs(l);c<e&&(t=l,e=c)}}catch(t){a=!0,u=t}finally{try{!o&&d.return&&d.return()}finally{if(a)throw u}}return{min:t,abs:e}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(61),a=r(o),u=n(62),s=r(u),d=n(5),f=r(d),l=n(60),c=r(l),h=n(67),v=r(h),w=function(){function t(e,n,r,i){(0,a.default)(this,t);var o=e;o&&o.constructor!==Number?(o.getBoundingBox&&(o=o.getBoundingBox()),this.left=o.left,this.top=o.top,this.right=o.right,this.bottom=o.bottom):(this.left=e,this.top=n,this.right=r,this.bottom=i)}return(0,s.default)(t,[{key:"clone",value:function(){return new t(this)}},{key:"isNaN",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){return isNaN(this.left)||isNaN(this.top)||isNaN(this.right)||isNaN(this.bottom)})},{key:"getWidth",value:function(){return Math.abs(this.right-this.left)}},{key:"getHeight",value:function(){return Math.abs(this.bottom-this.top)}},{key:"getSize",value:function(){return new c.default(this.getWidth(),this.getHeight())}},{key:"getArea",value:function(){return this.getWidth()*this.getHeight()}},{key:"getPosition",value:function(){return new c.default(this.left,this.top)}},{key:"getBoundingBox",value:function(){return this}},{key:"getCollisionMesh",value:function(){return new v.default(this)}},{key:"getCenterPosition",value:function(){return new c.default(this.left+this.getWidth()/2,this.top+this.getHeight()/2)}},{key:"difference",value:function(e){if(!e)throw new Error("difference requires argument 'other'");return e=e.getBoundingBox(),new t(this.left-e.left,this.top-e.top,this.right-e.right,this.bottom-e.bottom)}},{key:"getCenteredOnPosition",value:function(t){if(!t)throw new Error("getCenteredOnPosition requires argument 'other'");return t=t.getBoundingBox(),t.getCenterPosition().subtract(this.getCenterPosition().subtract(this.getPosition()))}},{key:"getIntersection",value:function(e){if(!e)throw new Error("getIntersection requires argument 'other'");e=e.getBoundingBox();var n=Math.max(this.left,e.left),r=Math.max(this.top,e.top),i=Math.min(this.right,e.right),o=Math.min(this.bottom,e.bottom);return n===i&&r===o?new c.default(n,r):n<=i&&r<=o?new t(n,r,i,o):void 0}},{key:"getDistanceSquaredToPoint",value:function(t){t=t.getVector();var e=t.left<=this.left?this.left:t.left>=this.right?this.right:t.left,n=t.top<=this.top?this.top:t.top>=this.bottom?this.bottom:t.top,r=new c.default(e,n);return r.distanceSquared(t)}},{key:"getDistanceToPoint",value:function(t){return Math.sqrt(this.getDistanceSquaredToPoint(t))}},{key:"set",value:function(t){if(!t)throw new Error("set requires argument 'other'");return t=t.getBoundingBox(),this.left=t.left,this.top=t.top,this.right=t.right,this.bottom=t.bottom,this}},{key:"moveTo",value:function(t,e){return t&&t.constructor===Number&&(this.right=t+(this.right-this.left),this.left=t),e&&e.constructor===Number&&(this.bottom=e+(this.bottom-this.top),this.top=e),this}},{key:"moveBy",value:function(t,e){return t&&t.constructor===Number&&(this.left+=t,this.right+=t),e&&e.constructor===Number&&(this.top+=e,this.bottom+=e),this}},{key:"resizeTo",value:function(t,e,n){var r=this.getSize(),i=new c.default(t||r.left,e||r.top);if(n=n||"top-left","string"==typeof n||n instanceof String){var o=n;n=this.getPosition(),o.indexOf("right")>=0&&(n.left+=r.left),o.indexOf("bottom")>=0&&(n.top+=r.top)}return this.left+=(n.left-this.left)*(r.left-i.left)/r.left,this.right+=(n.left-this.right)*(r.left-i.left)/r.left,this.top+=(n.top-this.top)*(r.top-i.top)/r.top,this.bottom+=(n.top-this.bottom)*(r.top-i.top)/r.top,this}},{key:"isContains",value:function(t){if(!t)throw new Error("isContains requires argument 'other'");return t=t.getBoundingBox(),t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom}},{key:"someContains",value:function(t){if(!t)throw new Error("someContains requires argument 'others'");if(t.constructor!==Array)throw new Error("someContains requires argument 'others' of type Array");for(var e=0;e<t.length;e+=1)if(this.isContains(t[e]))return!0;return!1}},{key:"isTouching",value:function(t){if(!t)throw new Error("isTouching requires argument 'other'");return t=t.getBoundingBox(),this.top<=t.bottom&&this.bottom>=t.top&&(this.left===t.right||this.right===t.left)||this.left<=t.right&&this.right>=t.left&&(this.top===t.bottom||this.bottom===t.top)}},{key:"getEdgeTouching",value:function(t){if(!t)throw new Error("getEdgeTouching requires argument 'others'");t.constructor!==Array&&(t=[t]);for(var e=0;e<t.length;e+=1){var n=t[e].getBoundingBox();if(this.top<=n.bottom&&this.bottom>=n.top){if(this.left===n.right)return"left";if(this.right===n.left)return"right"}if(this.left<=n.right&&this.right>=n.left){if(this.top===n.bottom)return"top";if(this.bottom===n.top)return"bottom"}}}},{key:"getOtherEdgeTouching",value:function(t){if(!t)throw new Error("getOtherEdgeTouching requires argument 'others'");t.constructor!==Array&&(t=[t]);for(var e=0;e<t.length;e+=1){var n=t[e].getBoundingBox();if(this.top<=n.bottom&&this.bottom>=n.top){if(this.left===n.right)return"right";if(this.right===n.left)return"left"}if(this.left<=n.right&&this.right>=n.left){if(this.top===n.bottom)return"bottom";if(this.bottom===n.top)return"top"}}}},{key:"getEdgeClosestOrder",value:function(t){if(!t)throw new Error("getEdgeClosest requires argument 'other'");t=t.getBoundingBox();var e=this.getCenterPosition(),n=[];return n.push({edge:"left",dis:t.getDistanceSquaredToPoint(this.left,e.top)}),n.push({edge:"top",dis:t.getDistanceSquaredToPoint(e.left,this.top)}),n.push({edge:"right",dis:t.getDistanceSquaredToPoint(this.right,e.top)}),n.push({edge:"bottom",dis:t.getDistanceSquaredToPoint(e.left,this.bottom)}),n.sort(function(t,e){return t.dis-e.dis}),n.map(function(t){return t.edge})}},{key:"getEdgeClosest",value:function(t){var e=this.getEdgeClosestOrder(t);return e[0]}},{key:"getSnapDelta",value:function(t,e){if(!t)throw new Error("getSnapDelta requires argument 'other'");t=t.getBoundingBox(),e=e||5;var n=new c.default(NaN,NaN);if(this.top<=t.bottom&&this.bottom>=t.top){var r=i(t.left-this.right,t.right-this.left);if(r.abs<=e){n.left=r.min;var o=i(t.top-this.top,t.bottom-this.bottom);o.abs<=e&&(n.top=o.min)}}else if(this.left<=t.right&&this.right>=t.left){var a=i(t.top-this.bottom,t.bottom-this.top);if(a.abs<=e){n.top=a.min;var u=i(t.left-this.left,t.right-this.right);u.abs<=e&&(n.left=u.min)}}return n}},{key:"someTouching",value:function(t){if(!t)throw new Error("someTouching requires argument 'others'");if(t.constructor!==Array)throw new Error("someTouching requires argument 'others' of type Array");for(var e=0;e<t.length;e+=1)if(this.isTouching(t[e]))return!0;return!1}},{key:"isColliding",value:function(t){if(!t)throw new Error("isColliding requires argument 'other'");return t=t.getBoundingBox(),this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top}},{key:"someColliding",value:function(t){if(!t)throw new Error("someColliding requires argument 'others'");if(t.constructor!==Array)throw new Error("someColliding requires argument 'others' of type Array");for(var e=0;e<t.length;e+=1)if(this.isColliding(t[e]))return!0;return!1}},{key:"getColliding",value:function(t){if(!t)throw new Error("getColliding requires argument 'others'");if(t.constructor!==Array)throw new Error("getColliding requires argument 'others' of type Array");for(var e=0;e<t.length;e+=1)if(this.isColliding(t[e]))return t[e]}}]),t}();e.default=w,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i),a=n(61),u=r(a),s=n(62),d=r(s),f=n(60),l=r(f),c=n(66),h=r(c),v=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,u.default)(this,t),!e)throw new Error("CollisionMesh constructor requires argument 'boxes'");e.constructor!==Array&&(e=[e]),this.boxes=[];var r=!0,i=!1,a=void 0;try{for(var s,d=(0,o.default)(e);!(r=(s=d.next()).done);r=!0){var f=s.value;f.constructor===h.default?this.boxes.push(f):f.constructor===t?this.boxes=this.boxes.concat(f.boxes):this.boxes=this.boxes.concat(f.getCollisionMesh(n).boxes)}}catch(t){i=!0,a=t}finally{try{!r&&d.return&&d.return()}finally{if(i)throw a}}}return(0,d.default)(t,[{key:"clone",value:function(){for(var e=new Array(this.boxes.length),n=0;n<this.boxes.length;n+=1)e[n]=this.boxes[n].clone();return new t(e)}},{key:"getWidth",value:function(){if(0===this.boxes.length)return 0;for(var t=this.boxes[0].left,e=this.boxes[0].right,n=1;n<this.boxes.length;n+=1)t=Math.min(t,this.boxes[n].left),e=Math.max(e,this.boxes[n].right);return e-t}},{key:"getHeight",value:function(){if(0===this.boxes.length)return 0;for(var t=this.boxes[0].top,e=this.boxes[0].bottom,n=1;n<this.boxes.length;n+=1)t=Math.min(t,this.boxes[n].top),e=Math.max(e,this.boxes[n].bottom);return e-t}},{key:"getSize",value:function(){return this.getBoundingBox().getSize()}},{key:"getPosition",value:function(){return this.getBoundingBox().getPosition()}},{key:"getBoundingBox",value:function(){if(0===this.boxes.length)return new h.default(NaN,NaN,NaN,NaN);for(var t=this.boxes[0].clone(),e=1;e<this.boxes.length;e+=1)t.left=Math.min(t.left,this.boxes[e].left),t.top=Math.min(t.top,this.boxes[e].top),t.right=Math.max(t.right,this.boxes[e].right),t.bottom=Math.max(t.bottom,this.boxes[e].bottom);return t}},{key:"getCollisionMesh",value:function(){return this}},{key:"moveTo",value:function(t,e){var n=new l.default(t,e);return this.moveBy(n.subtract(this.getPosition())),this}},{key:"moveBy",value:function(t,e){var n=new l.default(t||0,e||0),r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(this.boxes);!(r=(u=s.next()).done);r=!0){var d=u.value;d.moveBy(n)}}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return this}},{key:"isContains",value:function(e){if(!e)throw new Error("isContains requires argument 'other'");e=e.constructor===Array?new t(e):e.getCollisionMesh();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(e.boxes);!(n=(a=u.next()).done);n=!0){var s=a.value,d=!1,f=!0,l=!1,c=void 0;try{for(var h,v=(0,o.default)(this.boxes);!(f=(h=v.next()).done);f=!0){var w=h.value;d|=w.isContains(s)}}catch(t){l=!0,c=t}finally{try{!f&&v.return&&v.return()}finally{if(l)throw c}}if(!d)return!1}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}return!0}},{key:"someContains",value:function(e){if(!e)throw new Error("someContains requires argument 'other'");e=e.constructor===Array?new t(e):e.getCollisionMesh();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this.boxes);!(n=(a=u.next()).done);n=!0){var s=a.value;if(s.someContains(e.boxes))return!0}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}return!1}},{key:"isTouching",value:function(e){if(!e)throw new Error("isTouching requires argument 'other'");e=e.constructor===Array?new t(e):e.getCollisionMesh();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this.boxes);!(n=(a=u.next()).done);n=!0){var s=a.value;if(s.someTouching(e.boxes))return!0}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}return!1}},{key:"someTouching",value:function(t){if(!t)throw new Error("someTouching requires argument 'others'");if(t.constructor!==Array)throw new Error("someTouching requires argument 'others' to resolve to type Array");var e=!0,n=!1,r=void 0;try{for(var i,a=(0,o.default)(t);!(e=(i=a.next()).done);e=!0){var u=i.value;if(this.isTouching(u))return!0}}catch(t){n=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw r}}return!1}},{key:"isColliding",value:function(e){if(!e)throw new Error("isColliding requires argument 'other'");e=e.constructor===Array?new t(e):e.getCollisionMesh();
var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this.boxes);!(n=(a=u.next()).done);n=!0){var s=a.value;if(s.someColliding(e.boxes))return!0}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}return!1}},{key:"someColliding",value:function(t){if(!t)throw new Error("someColliding requires argument 'others'");if(t.constructor!==Array)throw new Error("someColliding requires argument 'others' to resolve to type Array");var e=!0,n=!1,r=void 0;try{for(var i,a=(0,o.default)(t);!(e=(i=a.next()).done);e=!0){var u=i.value,s=!0,d=!1,f=void 0;try{for(var l,c=(0,o.default)(this.boxes);!(s=(l=c.next()).done);s=!0){var h=l.value;if(h.isColliding(u))return!0}}catch(t){d=!0,f=t}finally{try{!s&&c.return&&c.return()}finally{if(d)throw f}}}}catch(t){n=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw r}}return!1}},{key:"getColliding",value:function(e){if(!e)throw new Error("getColliding requires argument 'other'");e=e.constructor===Array?new t(e):e.getCollisionMesh();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this.boxes);!(n=(a=u.next()).done);n=!0){var s=a.value,d=s.getColliding(e.boxes);if(d)return d}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}]),t}();e.default=v,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(69);var r=void 0;r=n("undefined"!=typeof process&&process&&process.versions&&(process.versions.electron||process.versions.node)||"undefined"!=typeof window&&window&&window.nodeRequire&&window.nodeRequire.runtime?70:"undefined"!=typeof fin&&fin&&fin.desktop&&fin.desktop.main?136:142),e.default=r,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i),a=n(2),u=r(a),s=n(3),d=[],f=!1;u.default.onReady=function(t){if(!(t&&t.constructor&&t.call&&t.apply))throw new Error("onReady expects a function passed as the callback argument!");f&&t(),d.indexOf(t)>=0||d.push(t)},u.default.isReady=function(){return f},e.default=new s.SyncCallback(function(){f=!0;var t=!0,e=!1,n=void 0;try{for(var r,i=(0,o.default)(d);!(t=(r=i.next()).done);t=!0){var a=r.value;a()}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}d=[]}),t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(71),o=r(i);o.default._isNode?n(93):o.default._isRenderer&&n(95)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(72),o=r(i),a=n(2),u=r(a),s=n(92),d=r(s);if(u.default._isNode=!1,u.default._isStartup=!1,u.default._isRenderer=!1,u.default.runtime.name="Electron",u.default.runtime.version=void 0,u.default.runtime.isElectron=!0,"undefined"!=typeof global&&global){var f=(0,d.default)("electron"),l=f.BrowserWindow;u.default._isNode=null!=l,u.default._isStartup=!u.default._isNode,u.default.runtime.version=global.process.versions.electron,u.default._isStartup&&!function(){var t=d.default;t.runtime=u.default.runtime,t.workingDir=t("path").dirname(t.main.filename),t.windowmanagerPath=__filename,global.nodeRequire=t,process.once("loaded",function(){global.nodeRequire=t})}()}else"undefined"!=typeof window&&window&&(u.default._isRenderer=!0,null!=window.nodeRequire&&(u.default.runtime=window.nodeRequire.runtime,u.default._windows=new o.default));e.default=u.default,t.exports=e.default},function(t,e,n){t.exports={default:n(73),__esModule:!0}},function(t,e,n){n(74),n(53),n(7),n(75),n(89),t.exports=n(20).Map},function(t,e){},function(t,e,n){"use strict";var r=n(76);t.exports=n(84)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(24).f,i=n(36),o=n(77),a=n(21),u=n(78),s=n(15),d=n(79),f=n(16),l=n(10),c=n(82),h=n(28),v=n(83).fastKey,w=h?"_s":"size",y=function(t,e){var n,r=v(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var l=t(function(t,r){u(t,l,e,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[w]=0,void 0!=r&&d(r,n,t[f],t)});return o(l.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[w]=0},delete:function(t){var e=this,n=y(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[w]--}return!!n},forEach:function(t){u(this,l,"forEach");for(var e,n=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),h&&r(l.prototype,"size",{get:function(){return s(this[w])}}),l},def:function(t,e,n){var r,i,o=y(t,e);return o?o.v=n:(t._l=o={i:i=v(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[w]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),c(e)}}},function(t,e,n){var r=n(23);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(21),i=n(80),o=n(81),a=n(25),u=n(41),s=n(56),d={},f={},e=t.exports=function(t,e,n,l,c){var h,v,w,y,p=c?function(){return t}:s(t),_=r(n,l,e?2:1),g=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(o(p)){for(h=u(t.length);h>g;g++)if(y=e?_(a(v=t[g])[0],v[1]):_(t[g]),y===d||y===f)return y}else for(w=p.call(t);!(v=w.next()).done;)if(y=i(w,_,v.value,e),y===d||y===f)return y};e.BREAK=d,e.RETURN=f},function(t,e,n){var r=n(25);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(11),i=n(50)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(19),i=n(20),o=n(24),a=n(28),u=n(50)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[u]&&o.f(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(46)("meta"),i=n(26),o=n(34),a=n(24).f,u=0,s=Object.isExtensible||function(){return!0},d=!n(29)(function(){return s(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},l=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!s(t))return"F";if(!e)return"E";f(t)}return t[r].i},c=function(t,e){if(!o(t,r)){if(!s(t))return!0;if(!e)return!1;f(t)}return t[r].w},h=function(t){return d&&v.NEED&&s(t)&&!o(t,r)&&f(t),t},v=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:c,onFreeze:h}},function(t,e,n){"use strict";var r=n(19),i=n(18),o=n(83),a=n(29),u=n(23),s=n(77),d=n(79),f=n(78),l=n(26),c=n(49),h=n(24).f,v=n(85)(0),w=n(28);t.exports=function(t,e,n,y,p,_){var g=r[t],m=g,x=p?"set":"add",b=m&&m.prototype,k={};return w&&"function"==typeof m&&(_||b.forEach&&!a(function(){(new m).entries().next()}))?(m=e(function(e,n){f(e,m,t,"_c"),e._c=new g,void 0!=n&&d(n,p,e[x],e)}),v("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in b&&(!_||"clear"!=t)&&u(m.prototype,t,function(n,r){if(f(this,m,t),!e&&_&&!l(n))return"get"==t&&void 0;var i=this._c[t](0===n?0:n,r);return e?this:i})}),"size"in b&&h(m.prototype,"size",{get:function(){return this._c.size}})):(m=y.getConstructor(e,t,p,x),s(m.prototype,n),o.NEED=!0),c(m,t),k[t]=m,i(i.G+i.W+i.F,k),_||y.setStrong(m,t,p),m}},function(t,e,n){var r=n(21),i=n(13),o=n(52),a=n(41),u=n(86);t.exports=function(t,e){var n=1==t,s=2==t,d=3==t,f=4==t,l=6==t,c=5==t||l,h=e||u;return function(e,u,v){for(var w,y,p=o(e),_=i(p),g=r(u,v,3),m=a(_.length),x=0,b=n?h(e,m):s?h(e,0):void 0;m>x;x++)if((c||x in _)&&(w=_[x],y=g(w,x,p),t))if(n)b[x]=y;else if(y)switch(t){case 3:return!0;case 5:return w;case 6:return x;case 2:b.push(w)}else if(f)return!1;return l?-1:d||f?f:b}}},function(t,e,n){var r=n(87);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(26),i=n(88),o=n(50)("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){var r=n(14);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(18);r(r.P+r.R,"Map",{toJSON:n(90)("Map")})},function(t,e,n){var r=n(57),i=n(91);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(79);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=eval("typeof require !== 'undefined' && require"),module.exports=exports.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return process.argv.find(function(e){return e.indexOf("--"+t)>=0})}function o(t){var e=i(t);if(e){var n=e.indexOf("=")+1;if(n<e.length)return e.substr(n)}}function a(){function t(t){var e=t.url;delete t.url,b=new h(t),t.title=null==t.title?String(b.id):t.title,b.loadURL(e),b.setTitle(t.title),b.on("closed",function(){b=null,c.quit()}),s.default._deref()}function e(e){var n="";e.setEncoding("utf8"),e.on("data",function(t){n+=t}),e.on("end",function(){if(200===e.statusCode){var r=void 0;try{r=JSON.parse(n).startup_app||{}}catch(t){var i="Server failed to parse app.json ("+g+").";return v.showErrorBox("ERROR",i),c.quit()}for(var o in r)r.hasOwnProperty(o)&&void 0!==x[o]&&(r[x[o]]=r[o],delete r[o]);for(var a in m)m.hasOwnProperty(a)&&(r[a]=r[a]||m[a]);t(r)}else{var u="Server failed to load app.json ("+g+"). Status code: "+e.statusCode;v.showErrorBox("ERROR",u),c.quit()}})}if(null!=g)if(0===g.indexOf("https"))y.get(g,e);else if(0===g.indexOf("http"))w.get(g,e);else{var n="Server doesn't support endpoint for app.json ("+g+").";v.showErrorBox("ERROR",n),c.quit()}else if(null!=_)t(m);else{var r="No endpoint provided to start the app.";v.showErrorBox("ERROR",r),c.quit()}}var u=n(69),s=r(u),d=n(92),f=r(d);n(94);var l=(0,f.default)("electron"),c=l.app,h=l.BrowserWindow,v=l.dialog,w=(0,f.default)("http"),y=(0,f.default)("https"),p=(0,f.default)("./package.json"),_=o("endpoint")||p.endpoint,g=o("config")||p.config,m={url:_,width:800,height:500,frame:!0,resizable:!0,show:!0,hasShadow:!1,autoHideMenuBar:!0,icon:"favicon.ico",webPreferences:{nodeIntegration:!1,preload:__filename}},x={name:"title",autoShow:"show",defaultLeft:"x",defaultTop:"y",defaultWidth:"width",defaultHeight:"height"},b=void 0;c.on("ready",a),c.on("window-all-closed",function(){"darwin"!==process.platform&&c.quit()}),c.on("activate",function(){null===b&&a()})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(5),o=r(i),a=n(71),u=r(a),s=n(92),d=r(s),f=(0,d.default)("electron"),l=f.BrowserWindow,c=u.default.geometry,h=c.Vector,v=c.BoundingBox;l.prototype._notifyReady=function(){var t=!0,e=!1,n=void 0;try{for(var r,i=(0,o.default)(l.getAllWindows());!(t=(r=i.next()).done);t=!0){var a=r.value;a.webContents.send("window-create",this.id)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}},l.prototype._ensureDockSystem=function(){var t=this;void 0===this._dockedGroup&&!function(){t._dockedGroup=[t],t.on("closed",function(){this.undock()}),t.on("maximize",function(){this.undock()}),t.on("minimize",function(){this._dockMinimize()}),t.on("restore",function(){var t=!0,e=!1,n=void 0;try{for(var r,i=(0,o.default)(this._dockedGroup);!(t=(r=i.next()).done);t=!0){var a=r.value;a!==this&&a.restore()}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}});var e=t.getBounds();t.on("move",function(){var t=this.getBounds();e=t}),t.on("resize",function(){var t=this.getBounds();t.width===e.width&&t.height===e.height||this.undock(),e=t})}()},l.prototype.dock=function(t){this._ensureDockSystem();var e=l.fromId(t);if(void 0!==e&&!(this._dockedGroup.indexOf(e)>=0)){e._ensureDockSystem();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(e._dockedGroup);!(n=(a=u.next()).done);n=!0){var s=a.value;this._dockedGroup.push(s),s._dockedGroup=this._dockedGroup}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}},l.prototype.undock=function(){this._ensureDockSystem(),1!==this._dockedGroup.length&&(this._dockedGroup.splice(this._dockedGroup.indexOf(this),1),this._dockedGroup=[this])},l.prototype._dockFocus=function(){this._ensureDockSystem();var t=!0,e=!1,n=void 0;try{for(var r,i=(0,o.default)(this._dockedGroup);!(t=(r=i.next()).done);t=!0){var a=r.value;a!==this&&(a.setAlwaysOnTop(!0),a.setAlwaysOnTop(!1))}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}this.setAlwaysOnTop(!0),this.setAlwaysOnTop(!1)},l.prototype._dragStart=function(){this._ensureDockSystem(),this.restore();var t=!0,e=!1,n=void 0;try{for(var r,i=(0,o.default)(this._dockedGroup);!(t=(r=i.next()).done);t=!0){var a=r.value;a._dragStartPos=a.getPosition()}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}},l.prototype._getBounds=function(){var t=this.getBounds();return new v(t.x,t.y,t.x+t.width,t.y+t.height)},l.prototype._dragBy=function(t,e){this._ensureDockSystem();var n=this._getBounds().moveTo(this._dragStartPos[0]+t,this._dragStartPos[1]+e),r=new h(NaN,NaN),i=!0,a=!1,u=void 0;try{for(var s,d=(0,o.default)(l.getAllWindows());!(i=(s=d.next()).done);i=!0){var f=s.value;f._dockedGroup!==this._dockedGroup&&r.setMin(n.getSnapDelta(f._getBounds()))}}catch(t){a=!0,u=t}finally{try{!i&&d.return&&d.return()}finally{if(a)throw u}}t+=r.left||0,e+=r.top||0;var c=!0,v=!1,w=void 0;try{for(var y,p=(0,o.default)(this._dockedGroup);!(c=(y=p.next()).done);c=!0){var _=y.value,g=_._dragStartPos;void 0===g&&(g=_._dragStartPos=_.getPosition(),g[0]-=t,g[1]-=e),_.setPosition(g[0]+t,g[1]+e)}}catch(t){v=!0,w=t}finally{try{!c&&p.return&&p.return()}finally{if(v)throw w}}},l.prototype._dragStop=function(){this._ensureDockSystem();var t=this._getBounds(),e=!0,n=!1,r=void 0;try{for(var i,a=(0,o.default)(l.getAllWindows());!(e=(i=a.next()).done);e=!0){var u=i.value;t.isTouching(u._getBounds())&&this.dock(u.id)}}catch(t){n=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw r}}var s=!0,d=!1,f=void 0;try{for(var c,h=(0,o.default)(this._dockedGroup);!(s=(c=h.next()).done);s=!0){var v=c.value;delete v._dragStartPos}}catch(t){d=!0,f=t}finally{try{!s&&h.return&&h.return()}finally{if(d)throw f}}},l.prototype._dockMoveTo=function(t,e){this._ensureDockSystem();var n=this.getPosition(),r=t-n[0],i=e-n[1],a=!0,u=!1,s=void 0;try{for(var d,f=(0,o.default)(this._dockedGroup);!(a=(d=f.next()).done);a=!0){var l=d.value,c=l.getPosition();l.setPosition(c[0]+r,c[1]+i)}}catch(t){u=!0,s=t}finally{try{!a&&f.return&&f.return()}finally{if(u)throw s}}},l.prototype._dockMinimize=function(t,e){this._ensureDockSystem();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this._dockedGroup);!(n=(a=u.next()).done);n=!0){var s=a.value;s.minimize()}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}},l.prototype._dockHide=function(t,e){this._ensureDockSystem();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this._dockedGroup);!(n=(a=u.next()).done);n=!0){var s=a.value;s.hide()}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}},l.prototype._dockShow=function(t,e){this._ensureDockSystem();var n=!0,r=!1,i=void 0;try{for(var a,u=(0,o.default)(this._dockedGroup);!(n=(a=u.next()).done);n=!0){var s=a.value;s.show()}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(96),o=r(i),a=n(72),u=r(a),s=n(5),d=r(s),f=n(71),l=r(f),c=n(69),h=r(c),v=n(100),w=r(v),y=window.nodeRequire("electron"),p=y.ipcRenderer;l.default.messagebus=function(){function t(t,e){return function(n,r){if(!t||t._id===r.winID){var i=l.default.Window.getByID(r.winID);i._id!==l.default.Window.current._id&&e.apply(i,r.args)}}}var e={},n={};return{send:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=l.default.Window.current,o={id:0,winID:i._id,event:t,args:n};if(n.length>0&&n[0]instanceof w.default){var a=n.shift();if(a._id===i._id)return;a._window.webContents.send(t,o)}else{var u=!0,s=!1,f=void 0;try{for(var c,h=(0,d.default)(l.default.Window.getAll());!(u=(c=h.next()).done);u=!0){var v=c.value;v!==i&&v._window.webContents.send(t,o)}}catch(t){s=!0,f=t}finally{try{!u&&h.return&&h.return()}finally{if(s)throw f}}}},on:function(r,i,o){void 0===o&&(o=i,i=void 0);var a=t(i,o);if(void 0!==i){if(i._id===l.default.Window.current._id)return;var s=n[i._id]=n[i._id]||{};s[r]=s[r]||new u.default,s[r].set(o,a)}else e[r]=e[r]||new u.default,e[r].set(o,a);p.on(r,a)},off:function(t,r,i){if(void 0===i&&(i=r,r=void 0),void 0!==r){var a=n[r._id]=n[r._id]||{};a[t]=a[t]||new u.default,p.removeListener(t,a[t].delete(i))}else e[t]=e[t]||new o.default,p.removeListener(t,e[t].get(i))}}}(),h.default._deref()},function(t,e,n){t.exports={default:n(97),__esModule:!0}},function(t,e,n){n(74),n(53),n(7),n(98),n(99),t.exports=n(20).Set},function(t,e,n){"use strict";var r=n(76);t.exports=n(84)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){var r=n(18);r(r.P+r.R,"Set",{toJSON:n(90)("Set")})},function(t,e,n){"use strict";function r(t){return t&&t._