text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rexgridalignplugin=e():t.rexgridalignplugin=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=270)}({0:function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,o=i,s=0;s<n.length;s++){if(!r.hasOwnProperty(n[s])){o=i;break}o=r[n[s]],r=r[n[s]]}return o}return i}return i}},145:function(t,e,i){"use strict";var n=Math.sqrt(3);e.a=function(t){return 0===t.type?2*t.size:n*t.size}},146:function(t,e,i){"use strict";var n=Math.sqrt(3);e.a=function(t){return 0===t.type?n*t.size:2*t.size}},195:function(t,e,i){"use strict";var n=i(145),r=i(146),o=i(39),s=o.a.ODD_R,u=o.a.EVEN_R,a=o.a.ODD_Q,c=o.a.EVEN_Q,h={},f=function(t,e,i){void 0===i?i={}:!0===i&&(i=h);var n=t*this.width,r=e*this.height;switch(this.mode){case s:1&e&&(n+=this._halfWidth),r*=.75;break;case u:1&e&&(n-=this._halfWidth),r*=.75;break;case a:n*=.75,1&t&&(r+=this._halfHeight);break;case c:n*=.75,1&t&&(r-=this._halfHeight)}return n+=this.x,r+=this.y,i.x=n,i.y=r,i},l=function(t,e){return this.getWorldXY(t,e,!0).x},d=function(t,e){return this.getWorldXY(t,e,!0).y},y=i(50),g=o.a.ODD_R,p=o.a.EVEN_R,v=o.a.ODD_Q,x=o.a.EVEN_Q,b={},O={},T=function(t,e,i){var n,r;switch(void 0===i?i={}:!0===i&&(i=O),t-=this.x,e-=this.y,this.mode){case g:case p:r=e*(4/3)/this.height,n=t/this.width-2/3*(e/this.height);break;case v:case x:r=e/this.height-2/3*(t/this.width),n=t*(4/3)/this.width}var o=Object(y.c)(n,r,b);return Object(y.d)(o),Object(y.b)(this.mode,o.x,o.y,o.z,i),i},_=function(t,e){return this.getTileXY(t,e,!0).x},E=function(t,e){return this.getTileXY(t,e,!0).y},w=i(0),k=i.n(w);function m(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var P=o.a.ODD_R,W=o.a.EVEN_R,H=o.a.ODD_Q,R=o.a.EVEN_Q,j=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resetFromJSON(e)}var e,i,o;return e=t,(i=[{key:"resetFromJSON",value:function(t){if(this.setType(k()(t,"staggeraxis",1),k()(t,"staggerindex",1)),this.setDirectionMode(),this.setOriginPosition(k()(t,"x",0),k()(t,"y",0)),this.size=k()(t,"size",void 0),void 0!==this.size){var e={size:this.size,type:this.staggeraxis},i=Object(n.a)(e),o=Object(r.a)(e);this.setCellSize(i,o)}else this.setCellSize(k()(t,"cellWidth",0),k()(t,"cellHeight",0))}},{key:"setType",value:function(t,e){return"string"==typeof t&&(t=z[t]),"string"==typeof e&&(e=D[e]),this.staggeraxis=t,this.staggerindex=e,this.mode=0===t?0===e?R:H:0===e?W:P,this}},{key:"setDirectionMode",value:function(){return this.directions=6,this}},{key:"setOriginPosition",value:function(t,e){return this.x=t,this.y=e,this}},{key:"setCellSize",value:function(t,e){return this.width=t,this.height=e,this}},{key:"width",get:function(){return this._width},set:function(t){this._width=t,this._halfWidth=t/2}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this._halfHeight=t/2}},{key:"cellWidth",get:function(){return this.width},set:function(t){this.width=t}},{key:"cellHeight",get:function(){return this.height}},{key:"cellHieght",set:function(t){this.height=t}}])&&m(e.prototype,i),o&&m(e,o),t}(),M={getWorldXY:f,getWorldX:l,getWorldY:d,getTileXY:T,getTileX:_,getTileY:E};Object.assign(j.prototype,M);var z={y:0,x:1},D={even:0,odd:1};e.a=j},196:function(t,e,i){"use strict";var n={},r=function(t,e,i){var r,o;switch(void 0===i?i={}:!0===i&&(i=n),this.mode){case 0:r=t*this.width,o=e*this.height;break;case 1:r=(t-e)*this._halfWidth,o=(t+e)*this._halfHeight}return r+=this.x,o+=this.y,i.x=r,i.y=o,i},o=function(t,e){return this.getWorldXY(t,e,!0).x},s=function(t,e){return this.getWorldXY(t,e,!0).y},u={},a=function(t,e,i){void 0===i?i={}:!0===i&&(i=u),t-=this.x,e-=this.y;var n=t/this.width,r=e/this.height;switch(this.mode){case 0:i.x=Math.round(n),i.y=Math.round(r);break;case 1:i.x=Math.round(+n+r),i.y=Math.round(-n+r)}return i},c=function(t,e){return this.getTileXY(t,e,!0).x},h=function(t,e){return this.getTileXY(t,e,!0).y},f=i(0),l=i.n(f);function d(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resetFromJSON(e)}var e,i,n;return e=t,(i=[{key:"resetFromJSON",value:function(t){this.setType(l()(t,"type",0)),this.setDirectionMode(l()(t,"dir",4)),this.setOriginPosition(l()(t,"x",0),l()(t,"y",0)),this.setCellSize(l()(t,"cellWidth",0),l()(t,"cellHeight",0))}},{key:"setType",value:function(t){return"string"==typeof t&&(t=p[t]),this.mode=t,this}},{key:"setDirectionMode",value:function(t){return"string"==typeof t&&(t=v[t]),this.directions=t,this}},{key:"setOriginPosition",value:function(t,e){return this.x=t,this.y=e,this}},{key:"setCellSize",value:function(t,e){return this.width=t,this.height=e,this}},{key:"width",get:function(){return this._width},set:function(t){this._width=t,this._halfWidth=t/2}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this._halfHeight=t/2}},{key:"cellWidth",get:function(){return this.width},set:function(t){this.width=t}},{key:"cellHeight",get:function(){return this.height}},{key:"cellHieght",set:function(t){this.height=t}}])&&d(e.prototype,i),n&&d(e,n),t}(),g={getWorldXY:r,getWorldX:o,getWorldY:s,getTileXY:a,getTileX:c,getTileY:h};Object.assign(y.prototype,g);var p={orthogonal:0,isometric:1,staggered:2},v={"4dir":4,"8dir":8};e.a=y},20:function(t,e){t.exports=function(t){return t.y+t.displayHeight-t.displayHeight*t.originY}},21:function(t,e){t.exports=function(t){return t.x-t.displayWidth*t.originX+.5*t.displayWidth}},22:function(t,e){t.exports=function(t,e){return t.y=e-t.displayHeight+t.displayHeight*t.originY,t}},23:function(t,e){t.exports=function(t,e){var i=t.displayWidth*t.originX;return t.x=e+i-.5*t.displayWidth,t}},24:function(t,e){t.exports=function(t){return t.x-t.displayWidth*t.originX}},25:function(t,e){t.exports=function(t,e){return t.x=e+t.displayWidth*t.originX,t}},26:function(t,e){t.exports=function(t){return t.x+t.displayWidth-t.displayWidth*t.originX}},27:function(t,e){t.exports=function(t,e){return t.x=e-t.displayWidth+t.displayWidth*t.originX,t}},270:function(t,e,i){"use strict";i.r(e);var n=i(195),r=i(5),o=i(7),s=i.n(o),u=Phaser.Utils.Objects.GetFastValue,a=new n.a,c=function(t,e){void 0===e&&(e={});var i=u(e,"width",-1),n=u(e,"height",-1),o=u(e,"cellWidth",1),c=u(e,"cellHeight",o),h=u(e,"staggeraxis",1),f=u(e,"staggerindex",1),l=u(e,"position",Phaser.Display.Align.CENTER),d=u(e,"x",0),y=u(e,"y",0);a.setOriginPosition(d,y).setCellSize(o,c).setType(h,f),r.a.setSize(o,c);for(var g=n-1,p=i-1,v=0,x=0,b=0,O=t.length;b<O;b++)if(a.getWorldXY(x,v,r.a),s()(t[b],r.a,l),-1===i)v++;else if(-1===n)x++;else if(x===p){if(v===g)break;x=0,v++}else x++;return t},h=i(196),f=Phaser.Utils.Objects.GetFastValue,l=new h.a,d=function(t,e){void 0===e&&(e={});var i=f(e,"width",-1),n=f(e,"height",-1),o=f(e,"cellWidth",1),u=f(e,"cellHeight",o),a=f(e,"type",0),c=f(e,"position",Phaser.Display.Align.CENTER),h=f(e,"x",0),d=f(e,"y",0);l.setOriginPosition(h,d).setCellSize(o,u).setType(a),r.a.setSize(o,u);for(var y=n-1,g=i-1,p=0,v=0,x=0,b=t.length;x<b;x++)if(l.getWorldXY(v,p,r.a),s()(t[x],r.a,c),-1===i)p++;else if(-1===n)v++;else if(v===g){if(p===y)break;v=0,p++}else v++;return t};function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function x(t,e){return(x=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var b=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),p(this,v(e).call(this,t))}var i,n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&x(t,e)}(e,Phaser.Plugins.BasePlugin),i=e,(n=[{key:"start",value:function(){this.game.events.once("destroy",this.destroy,this)}},{key:"hexagon",value:function(t,e){return c(t,e)}},{key:"quad",value:function(t,e){return d(t,e)}}])&&g(i.prototype,n),r&&g(i,r),e}();e.default=b},28:function(t,e){t.exports=function(t,e){var i=t.displayHeight*t.originY;return t.y=e+i-.5*t.displayHeight,t}},29:function(t,e){t.exports=function(t){return t.y-t.displayHeight*t.originY+.5*t.displayHeight}},30:function(t,e){t.exports=function(t){return t.y-t.displayHeight*t.originY}},31:function(t,e){t.exports=function(t,e){return t.y=e+t.displayHeight*t.originY,t}},39:function(t,e,i){"use strict";e.a={ODD_R:0,EVEN_R:1,ODD_Q:2,EVEN_Q:3}},5:function(t,e,i){"use strict";var n=i(8),r=new Phaser.GameObjects.Zone({sys:{queueDepthSort:n.a,events:{once:n.a}}},0,0,1,1);r.setOrigin(0),e.a=r},50:function(t,e,i){"use strict";i.d(e,"a",function(){return a}),i.d(e,"d",function(){return c}),i.d(e,"b",function(){return h}),i.d(e,"c",function(){return f});var n=i(39),r=n.a.ODD_R,o=n.a.EVEN_R,s=n.a.ODD_Q,u=n.a.EVEN_Q,a=function(t,e,i,n){switch(void 0===n?n={}:!0===n&&(n=l),t){case r:n.x=e-(i-(1&i))/2,n.z=i;break;case o:n.x=e-(i+(1&i))/2,n.z=i;break;case s:n.x=e,n.z=i-(e-(1&e))/2;break;case u:n.x=e,n.z=i-(e+(1&e))/2}return n.y=-n.x-n.z,n},c=function(t,e,i,n){"number"!=typeof t&&(t=(n=t).x,e=n.y,i=n.z),void 0===n?n={}:!0===n&&(n=l);var r=Math.round(t),o=Math.round(e),s=Math.round(i),u=Math.abs(r-t),a=Math.abs(o-e),c=Math.abs(s-i);return u>a&&u>c?r=-o-s:a>c?o=-r-s:s=-r-o,n.x=r,n.y=o,n.z=s,n},h=function(t,e,i,n,a){switch(void 0===a?a={}:!0===a&&(a=d),t){case r:a.x=e+(n-(1&n))/2,a.y=n;break;case o:a.x=e+(n+(1&n))/2,a.y=n;break;case s:a.x=e,a.y=n+(e-(1&e))/2;break;case u:a.x=e,a.y=n+(e+(1&e))/2}return a},f=function(t,e,i){return void 0===i?i={}:!0===i&&(i=l),i.x=t,i.y=-t-e,i.z=e,i},l={},d={}},55:function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},56:function(t,e,i){var n=i(20),r=i(21),o=i(22),s=i(23);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),s(t,r(e)+i),o(t,n(e)+u),t}},57:function(t,e,i){var n=i(20),r=i(24),o=i(22),s=i(25);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),s(t,r(e)-i),o(t,n(e)+u),t}},58:function(t,e,i){var n=i(20),r=i(26),o=i(22),s=i(27);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),s(t,r(e)+i),o(t,n(e)+u),t}},59:function(t,e,i){var n=i(60),r=i(21),o=i(29);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),n(t,r(e)+i,o(e)+s),t}},60:function(t,e,i){var n=i(23),r=i(28);t.exports=function(t,e,i){return n(t,e),r(t,i)}},61:function(t,e,i){var n=i(29),r=i(24),o=i(28),s=i(25);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),s(t,r(e)-i),o(t,n(e)+u),t}},62:function(t,e,i){var n=i(29),r=i(26),o=i(28),s=i(27);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),s(t,r(e)+i),o(t,n(e)+u),t}},63:function(t,e,i){var n=i(21),r=i(30),o=i(23),s=i(31);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),o(t,n(e)+i),s(t,r(e)-u),t}},64:function(t,e,i){var n=i(24),r=i(30),o=i(25),s=i(31);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),o(t,n(e)-i),s(t,r(e)-u),t}},65:function(t,e,i){var n=i(26),r=i(30),o=i(27),s=i(31);t.exports=function(t,e,i,u){return void 0===i&&(i=0),void 0===u&&(u=0),o(t,n(e)+i),s(t,r(e)-u),t}},7:function(t,e,i){var n=i(55),r=[];r[n.BOTTOM_CENTER]=i(56),r[n.BOTTOM_LEFT]=i(57),r[n.BOTTOM_RIGHT]=i(58),r[n.CENTER]=i(59),r[n.LEFT_CENTER]=i(61),r[n.RIGHT_CENTER]=i(62),r[n.TOP_CENTER]=i(63),r[n.TOP_LEFT]=i(64),r[n.TOP_RIGHT]=i(65);t.exports=function(t,e,i,n,o){return r[i](t,e,n,o)}},8:function(t,e,i){"use strict";e.a=function(){}}}).default});