text: !function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!b[e]||!g[e])return;for(var n in g[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(h[n]=t[n]);0==--_&&0===y&&I()}(e,n),t&&t(e,n)};var n,r=!0,o="d4a382",i={},d=[],l=[];function a(e){var t=j[e];if(!t)return C;var r=function(r){return t.hot.active?(j[r]?-1===j[r].parents.indexOf(e)&&j[r].parents.push(e):(d=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),d=[]),C(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return C[e]},set:function(t){C[e]=t}}};for(var i in C)Object.prototype.hasOwnProperty.call(C,i)&&"e"!==i&&"t"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===u&&f("prepare"),y++,C.e(e).then(t,(function(e){throw t(),e}));function t(){y--,"prepare"===u&&(O[e]||E(e),0===y&&0===_&&I())}},r.t=function(e,t){return 1&t&&(e=r(e)),C.t(e,-2&t)},r}function c(e){var t={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:n!==e,active:!0,accept:function(e,n){if(void 0===e)t._selfAccepted=!0;else if("function"==typeof e)t._selfAccepted=e;else if("object"==typeof e)for(var r=0;r<e.length;r++)t._acceptedDependencies[e[r]]=n||function(){};else t._acceptedDependencies[e]=n||function(){}},decline:function(e){if(void 0===e)t._selfDeclined=!0;else if("object"==typeof e)for(var n=0;n<e.length;n++)t._declinedDependencies[e[n]]=!0;else t._declinedDependencies[e]=!0},dispose:function(e){t._disposeHandlers.push(e)},addDisposeHandler:function(e){t._disposeHandlers.push(e)},removeDisposeHandler:function(e){var n=t._disposeHandlers.indexOf(e);n>=0&&t._disposeHandlers.splice(n,1)},check:m,apply:P,status:function(e){if(!e)return u;s.push(e)},addStatusHandler:function(e){s.push(e)},removeStatusHandler:function(e){var t=s.indexOf(e);t>=0&&s.splice(t,1)},data:i[e]};return n=void 0,t}var s=[],u="idle";function f(e){u=e;for(var t=0;t<s.length;t++)s[t].call(null,e)}var p,h,v,_=0,y=0,O={},g={},b={};function w(e){return+e+""===e?+e:e}function m(e){if("idle"!==u)throw new Error("check() is only allowed in idle status");return r=e,f("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=C.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return f("idle"),null;g={},O={},b=e.c,v=e.h,f("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));h={};return E(0),"prepare"===u&&0===y&&0===_&&I(),t}));var t}function E(e){b[e]?(g[e]=!0,_++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=C.p+""+e+"."+o+".hot-update.js",document.head.appendChild(t)}(e)):O[e]=!0}function I(){f("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return P(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in h)Object.prototype.hasOwnProperty.call(h,n)&&t.push(w(n));e.resolve(t)}}function P(t){if("ready"!==u)throw new Error("apply() is only allowed in ready status");var n,r,l,a,c;function s(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var o=r.pop(),i=o.id,d=o.chain;if((a=j[i])&&!a.hot._selfAccepted){if(a.hot._selfDeclined)return{type:"self-declined",chain:d,moduleId:i};if(a.hot._main)return{type:"unaccepted",chain:d,moduleId:i};for(var l=0;l<a.parents.length;l++){var c=a.parents[l],s=j[c];if(s){if(s.hot._declinedDependencies[i])return{type:"declined",chain:d.concat([c]),moduleId:i,parentId:c};-1===t.indexOf(c)&&(s.hot._acceptedDependencies[i]?(n[c]||(n[c]=[]),p(n[c],[i])):(delete n[c],t.push(c),r.push({chain:d.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}t=t||{};var _={},y=[],O={},g=function(){console.warn("[HMR] unexpected require("+E.moduleId+") to disposed module")};for(var m in h)if(Object.prototype.hasOwnProperty.call(h,m)){var E;c=w(m);var I=!1,P=!1,k=!1,x="";switch((E=h[m]?s(c):{type:"disposed",moduleId:m}).chain&&(x="\nUpdate propagation: "+E.chain.join(" -> ")),E.type){case"self-declined":t.onDeclined&&t.onDeclined(E),t.ignoreDeclined||(I=new Error("Aborted because of self decline: "+E.moduleId+x));break;case"declined":t.onDeclined&&t.onDeclined(E),t.ignoreDeclined||(I=new Error("Aborted because of declined dependency: "+E.moduleId+" in "+E.parentId+x));break;case"unaccepted":t.onUnaccepted&&t.onUnaccepted(E),t.ignoreUnaccepted||(I=new Error("Aborted because "+c+" is not accepted"+x));break;case"accepted":t.onAccepted&&t.onAccepted(E),P=!0;break;case"disposed":t.onDisposed&&t.onDisposed(E),k=!0;break;default:throw new Error("Unexception type "+E.type)}if(I)return f("abort"),Promise.reject(I);if(P)for(c in O[c]=h[c],p(y,E.outdatedModules),E.outdatedDependencies)Object.prototype.hasOwnProperty.call(E.outdatedDependencies,c)&&(_[c]||(_[c]=[]),p(_[c],E.outdatedDependencies[c]));k&&(p(y,[E.moduleId]),O[c]=g)}var A,D=[];for(r=0;r<y.length;r++)c=y[r],j[c]&&j[c].hot._selfAccepted&&O[c]!==g&&D.push({module:c,errorHandler:j[c].hot._selfAccepted});f("dispose"),Object.keys(b).forEach((function(e){!1===b[e]&&function(e){delete installedChunks[e]}(e)}));for(var N,M,F=y.slice();F.length>0;)if(c=F.pop(),a=j[c]){var G={},S=a.hot._disposeHandlers;for(l=0;l<S.length;l++)(n=S[l])(G);for(i[c]=G,a.hot.active=!1,delete j[c],delete _[c],l=0;l<a.children.length;l++){var R=j[a.children[l]];R&&((A=R.parents.indexOf(c))>=0&&R.parents.splice(A,1))}}for(c in _)if(Object.prototype.hasOwnProperty.call(_,c)&&(a=j[c]))for(M=_[c],l=0;l<M.length;l++)N=M[l],(A=a.children.indexOf(N))>=0&&a.children.splice(A,1);for(c in f("apply"),o=v,O)Object.prototype.hasOwnProperty.call(O,c)&&(e[c]=O[c]);var H=null;for(c in _)if(Object.prototype.hasOwnProperty.call(_,c)&&(a=j[c])){M=_[c];var X=[];for(r=0;r<M.length;r++)if(N=M[r],n=a.hot._acceptedDependencies[N]){if(-1!==X.indexOf(n))continue;X.push(n)}for(r=0;r<X.length;r++){n=X[r];try{n(M)}catch(e){t.onErrored&&t.onErrored({type:"accept-errored",moduleId:c,dependencyId:M[r],error:e}),t.ignoreErrored||H||(H=e)}}}for(r=0;r<D.length;r++){var T=D[r];c=T.module,d=[c];try{C(c)}catch(e){if("function"==typeof T.errorHandler)try{T.errorHandler(e)}catch(n){t.onErrored&&t.onErrored({type:"self-accept-error-handler-errored",moduleId:c,error:n,originalError:e}),t.ignoreErrored||H||(H=n),H||(H=e)}else t.onErrored&&t.onErrored({type:"self-accept-errored",moduleId:c,error:e}),t.ignoreErrored||H||(H=e)}}return H?(f("fail"),Promise.reject(H)):(f("idle"),new Promise((function(e){e(y)})))}var j={};function C(t){if(j[t])return j[t].exports;var n=j[t]={i:t,l:!1,exports:{},hot:c(t),parents:(l=d,d=[],l),children:[]};return e[t].call(n.exports,n,n.exports,a(t)),n.l=!0,n.exports}C.m=e,C.c=j,C.d=function(e,t,n){C.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},C.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},C.t=function(e,t){if(1&t&&(e=C(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(C.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)C.d(n,r,function(t){return e[t]}.bind(null,r));return n},C.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return C.d(t,"a",t),t},C.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},C.p="",C.h=function(){return o},a(2)(C.s=2)}([function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5)),i=n(1),d=function(){function e(e){var t,n,r,d,l,a,c,s;this.id=o.default.uuid(),this.name=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:i.OBJECT_CONFIG.name,this.x=null!==(n=null==e?void 0:e.x)&&void 0!==n?n:i.OBJECT_CONFIG.x,this.y=null!==(r=null==e?void 0:e.y)&&void 0!==r?r:i.OBJECT_CONFIG.y,this.anchorX=null!==(d=null==e?void 0:e.anchorX)&&void 0!==d?d:i.OBJECT_CONFIG.anchorX,this.anchorY=null!==(l=null==e?void 0:e.anchorY)&&void 0!==l?l:i.OBJECT_CONFIG.anchorY,this.scale=null!==(a=null==e?void 0:e.scale)&&void 0!==a?a:i.OBJECT_CONFIG.scale,this.rotation=null!==(c=null==e?void 0:e.rotation)&&void 0!==c?c:i.OBJECT_CONFIG.rotation,this.update=null!==(s=null==e?void 0:e.update)&&void 0!==s?s:i.OBJECT_CONFIG.update,this.worldX=0,this.worldY=0,this.parent=null,this.children=[]}return e.prototype.render=function(e,t){},e.prototype.dispose=function(){},e.prototype.addObject=function(e){this.children.push(e),e.parent=this},e}();t.default=d},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.OBJECT_CONFIG={name:"NewObject",x:0,y:0,anchorX:.5,anchorY:.5,scale:1,rotation:0,update:function(){}},t.RECT_CONFIG=r({width:100,height:100,color:"#000000",stroke:!1,strokeWidth:10,cornerRadius:0},t.OBJECT_CONFIG),t.ELLIPSE_CONFIG=r({radiusX:50,radiusY:50,startAngle:0,endAngle:2*Math.PI,color:"#000000",stroke:!1,strokeWidth:10},t.OBJECT_CONFIG)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=document.getElementById("app");if(o){var i=new r.Scene(o);i.debug=!0,i.addObject(new r.Rect({x:200,y:200,color:"#00ff00",stroke:!0})),i.addObject(new r.Ellipse({x:-200,y:-200,radiusX:100,radiusY:20,color:"#0000ff",stroke:!1,strokeWidth:30,update:function(e){this.rotation+=.001*e}}));var d=new r.Rect({x:-800,update:function(e){this.x+=.1*e,this.width+=.1*e}});d.addObject(new r.Rect({x:50,y:50,color:"#ff0000",update:function(e){this.rotation+=.001*-e}})),i.addObject(d),i.loop()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(0);t.Object=o.default;var i=n(6);t.Scene=i.default;var d=n(7);t.Rect=d.default;var l=n(8);t.Ellipse=l.default;var a={version:r.version};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version="0.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={uuid:function(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(function(e){return(parseInt(e)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>parseInt(e)/4).toString(16)}))}};t.default=r},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],d=0,l=i.length;d<l;d++,o++)r[o]=i[d];return r},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=e.call(this,{name:"Scene",x:t.clientWidth/2,y:t.clientHeight/2})||this;return n.loop=function(e){if(void 0===e&&(e=0),n._mounted||(n.dom.appendChild(n._canvas),n._mounted=!0),n._rendering){var t=n._canvas.getContext("2d");if(t){t.clearRect(0,0,n.dom.clientWidth,n.dom.clientHeight);var r=e-n._time;n._time=e,n.updateAndRender(t,r)}requestAnimationFrame(n.loop)}},n.dom=t,n.translate=[0,0],n.debug=!1,n._canvas=document.createElement("canvas"),n._canvas.width=n.dom.clientWidth,n._canvas.height=n.dom.clientHeight,n._mounted=!1,n._rendering=!0,n._time=0,n}return o(t,e),t.prototype.dispose=function(){this._rendering=!1},t.prototype.updateAndRender=function(e,t){this.worldX=this.translate[0]+this.dom.clientWidth*this.anchorX,this.worldY=this.translate[1]+this.dom.clientHeight*this.anchorY;for(var n=i(this.children);n.length>0;){var r=n.shift();r&&(r.update(t),e.save(),r.parent&&(r.worldX=r.parent.worldX+r.x,r.worldY=r.parent.worldY+r.y,e.translate(r.worldX,r.worldY),e.rotate(r.rotation),r.render(e,this.debug)),e.restore(),r.children.forEach((function(e){return n.push(e)})))}},t}(d(n(0)).default);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=i(n(0)),l=n(1),a=function(e){function t(t){var n,r,o,i,d,a,c=e.call(this,t)||this;return c.width=null!==(n=null==t?void 0:t.width)&&void 0!==n?n:l.RECT_CONFIG.width,c.height=null!==(r=null==t?void 0:t.height)&&void 0!==r?r:l.RECT_CONFIG.height,c.color=null!==(o=null==t?void 0:t.color)&&void 0!==o?o:l.RECT_CONFIG.color,c.stroke=null!==(i=null==t?void 0:t.stroke)&&void 0!==i?i:l.RECT_CONFIG.stroke,c.strokeWidth=null!==(d=null==t?void 0:t.strokeWidth)&&void 0!==d?d:l.RECT_CONFIG.strokeWidth,c.cornerRadius=null!==(a=null==t?void 0:t.cornerRadius)&&void 0!==a?a:l.RECT_CONFIG.cornerRadius,c}return o(t,e),t.prototype.render=function(e,t){var n=-this.width*this.anchorX,r=-this.height*this.anchorY;this.stroke?(e.strokeStyle=this.color,e.lineWidth=this.strokeWidth,e.beginPath(),e.strokeRect(n,r,this.width,this.height)):(e.fillStyle=this.color,e.beginPath(),e.fillRect(n,r,this.width,this.height)),t&&(e.fillStyle="#666666",e.beginPath(),e.ellipse(0,0,3,3,0,0,2*Math.PI),e.fill())},t.prototype.dispose=function(){},t}(d.default);t.default=a},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=i(n(0)),l=n(1),a=function(e){function t(t){var n,r,o,i,d,a,c,s=e.call(this,t)||this;return s.radiusX=null!==(n=null==t?void 0:t.radiusX)&&void 0!==n?n:l.ELLIPSE_CONFIG.radiusX,s.radiusY=null!==(r=null==t?void 0:t.radiusY)&&void 0!==r?r:l.ELLIPSE_CONFIG.radiusY,s.startAngle=null!==(o=null==t?void 0:t.startAngle)&&void 0!==o?o:l.ELLIPSE_CONFIG.startAngle,s.endAngle=null!==(i=null==t?void 0:t.endAngle)&&void 0!==i?i:l.ELLIPSE_CONFIG.endAngle,s.stroke=null!==(d=null==t?void 0:t.stroke)&&void 0!==d?d:l.ELLIPSE_CONFIG.stroke,s.strokeWidth=null!==(a=null==t?void 0:t.strokeWidth)&&void 0!==a?a:l.ELLIPSE_CONFIG.strokeWidth,s.color=null!==(c=null==t?void 0:t.color)&&void 0!==c?c:l.ELLIPSE_CONFIG.color,s}return o(t,e),t.prototype.render=function(e,t){var n=2*-this.radiusX*this.anchorX+this.radiusX,r=2*-this.radiusY*this.anchorY+this.radiusY;this.stroke?(e.strokeStyle=this.color,e.lineWidth=this.strokeWidth,e.beginPath(),e.ellipse(n,r,this.radiusX,this.radiusY,0,this.startAngle,this.endAngle),e.stroke()):(e.fillStyle=this.color,e.beginPath(),e.ellipse(n,r,this.radiusX,this.radiusY,0,this.startAngle,this.endAngle),e.fill()),t&&(e.fillStyle="#666666",e.beginPath(),e.ellipse(0,0,3,3,0,0,2*Math.PI),e.fill())},t.prototype.dispose=function(){},t}(d.default);t.default=a}]);