!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexgesturesplugin=e();}(undefined,(function(){function t(t,i,n){return i=h(i),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}(t,e()?Reflect.construct(i,n||[],h(t).constructor):i.apply(t,n))}function e(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));}catch(t){}return (e=function(){return !!t})()}function i(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(t,"string");return "symbol"==typeof e?e:String(e)}function n(t){return n="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},n(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n0),this.onDragStart()));}},{key:"onPointerUp",value:function(t){this.enable&&((!this.bounds||this.bounds.contains(t.x,t.y))&&this.pointer===t&&(this.pointer=void 0,this.movedState=!1,this.tracerState=F,this.onDragEnd()));}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown){var e=!this.bounds||this.bounds.contains(t.x,t.y),i=this.pointer===t;!i&&e||(i&&!e?this.onPointerUp(t):(this.movedState||(this.movedState=t.x!==t.downX||t.y!==t.downY),this.movedState&&this.onDrag()));}}},{key:"dragCancel",value:function(){return this.tracerState===V&&this.onDragEnd(),this.pointer=void 0,this.tracerState=F,this}},{key:"onDragStart",value:function(){this.emit("dragstart",this);}},{key:"onDragEnd",value:function(){this.emit("dragend",this);}},{key:"onDrag",value:function(){this.emit("drag",this);}},{key:"preUpdate",value:function(t,e){}},{key:"postUpdate",value:function(t,e){}},{key:"startTicking",value:function(){l(h(i.prototype),"startTicking",this).call(this),this.scene.sys.events.on("preupdate",this.preUpdate,this),this.scene.sys.events.on("postupdate",this.postUpdate,this);}},{key:"stopTicking",value:function(){l(h(i.prototype),"stopTicking",this).call(this),this.scene&&(this.scene.sys.events.off("preupdate",this.preUpdate,this),this.scene.sys.events.off("postupdate",this.postUpdate,this));}},{key:"setRecongizedStateObject",value:function(t){return this.recongizedState=t,this}},{key:"state",get:function(){return this.recongizedState.state},set:function(t){this.recongizedState.state=t;}},{key:"cancel",value:function(){return this.state=J,this}},{key:"isPointerInGameObject",value:function(t,e,i){var n=this.lastPointer;return !!n&&X(t,n,e,i)}}]),i}(_),F=0,V=1,J="IDLE";function z(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Z={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1;}function r(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,r||t,o),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e];}function a(){this._events=new n,this._eventsCount=0;}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,s=[];if(0===this._eventsCount)return s;for(n in t=this._events)e.call(t,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return [];if(n.fn)return [n.fn];for(var s=0,r=n.length,o=new Array(r);sthis.tapOffset&&(this.state=at,this.state=ot);break;case at:this.state=ot;}}},{key:"onDragEnd",value:function(){this.state===ot&&(this.tapsCount++,this.emit("tapping",this,this.gameObject,this.lastPointer),void 0!==this.maxTaps&&this.tapsCount===this.maxTaps&&(this.state=at));}},{key:"onDrag",value:function(){this.state!==rt&&this.pointer.getDistance()>this.dragThreshold&&(this.state=rt);}},{key:"preUpdate",value:function(t,e){if(this.isRunning&&this.enable&&this.state===ot){var i=this.lastPointer;if(i.isDown)t-i.downTime>this.holdTime&&(this.state=rt);else t-i.upTime>this.tapInterval&&(void 0===this.minTaps||this.tapsCount>=this.minTaps?this.state=at:this.state=rt);}}},{key:"postUpdate",value:function(t,e){this.isRunning&&this.enable&&this.state===at&&(this.state=rt);}},{key:"isTapped",get:function(){return this.state===at}},{key:"setHoldTime",value:function(t){return this.holdTime=t,this}},{key:"setTapInterval",value:function(t){return this.tapInterval=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"setTapOffset",value:function(t){return this.tapOffset=t,this}},{key:"setMaxTaps",value:function(t){return this.maxTaps=t,this}},{key:"setMinTaps",value:function(t){return this.minTaps=t,this}},{key:"setTaps",value:function(t,e){return void 0===e&&(e=t),this.setMinTaps(t).setMaxTaps(e),this}}]),i}(A),rt="IDLE",ot="BEGIN",at="RECOGNIZED",ht=function(t){return null==t||""===t||0===t.length},ut=function(t,e,i,s){if(void 0===s&&(s="."),"object"===n(t)){if(ht(e)){if(null==i)return;"object"===n(i)&&(t=i);}else {"string"==typeof e&&(e=e.split(s));var r=e.pop(),o=function(t,e,i){var s=t;if(ht(e));else {var r;"string"==typeof e&&(e=e.split("."));for(var o=0,a=e.length;othis.dragThreshold&&(this.state=pt);}},{key:"preUpdate",value:function(t,e){this.isRunning&&this.enable&&(this.state===dt&&t-this.pointer.downTime>=this.holdTime&&(this.state=yt));}},{key:"isPressed",get:function(){return this.state===yt}},{key:"setHoldTime",value:function(t){return this.holdTime=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(A),pt="IDLE",dt="BEGIN",yt="RECOGNIZED";v.register("press",(function(t,e){return lt(t)||(e=t,t=this.scene),new ft(t,e)})),ut(window,"RexPlugins.Gestures.Press",ft);var gt=Phaser.Utils.Objects.GetValue,mt=function(e){function i(e,n){var r;s(this,i);var o=c(r=t(this,i,[e,n])),a={states:{IDLE:{},BEGIN:{enter:function(){var t=o.pointer;o.startX=t.x,o.startY=t.y,o.startWorldX=t.worldX,o.startWorldY=t.worldY;}},RECOGNIZED:{enter:function(){o.emit("panstart",o,o.gameObject,o.lastPointer);},exit:function(){var t=o.lastPointer;o.endX=t.x,o.endY=t.y,o.endWorldX=t.worldX,o.endWorldY=t.worldY,o.emit("panend",o,o.gameObject,o.lastPointer);}}},init:function(){this.state=Et;},eventEmitter:!1};return r.setRecongizedStateObject(new et(a)),r}return a(i,e),o(i,[{key:"resetFromJSON",value:function(t){return l(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(gt(t,"threshold",10)),this}},{key:"onDragStart",value:function(){this.state=bt,0===this.dragThreshold&&(this.state=kt);}},{key:"onDragEnd",value:function(){this.state=Et;}},{key:"onDrag",value:function(){switch(this.state){case bt:this.pointer.getDistance()>=this.dragThreshold&&(this.state=kt);break;case kt:var t=this.pointer.position,e=this.pointer.prevPosition;this.dx=t.x-e.x,this.dy=t.y-e.y;var i=this.pointer;this.x=i.x,this.y=i.y,this.worldX=i.worldX,this.worldY=i.worldY,this.emit("pan",this,this.gameObject,this.lastPointer);}}},{key:"isPanned",get:function(){return this.state===kt}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(A),Et="IDLE",bt="BEGIN",kt="RECOGNIZED";v.register("pan",(function(t,e){return lt(t)||(e=t,t=this.scene),new mt(t,e)})),ut(window,"RexPlugins.Gestures.Pan",mt);var wt=Phaser.Math.Distance.Between,_t=Phaser.Math.Angle.Between,Pt={getDt:function(){var t;return t=this.scene,E(t).loop.delta},getVelocity:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return wt(e.x,e.y,t.x,t.y)/(.001*this.getDt())},getVelocityX:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Math.abs(t.x-e.x)/(.001*this.getDt())},getVelocityY:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Math.abs(t.y-e.y)/(.001*this.getDt())},getVelocityAngle:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return _t(e.x,e.y,t.x,t.y)}},xt={"up&down":0,"left&right":1,"4dir":2,"8dir":3},Dt={},St=Phaser.Utils.Objects.GetValue,Ot=Phaser.Math.RadToDeg,Tt=function(e){function i(e,n){var r;s(this,i);var o=c(r=t(this,i,[e,n])),a={states:{IDLE:{enter:function(){o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.validDrag=!1;}},RECOGNIZED:{enter:function(){o.start(),o.updateDirectionStates(),o.emit("swipe",o,o.gameObject,o.lastPointer);},exit:function(){o.stop(),o.clearDirectionStates();}}},init:function(){this.state=jt;},eventEmitter:!1};return r.setRecongizedStateObject(new et(a)),r.clearDirectionStates(),r}return a(i,e),o(i,[{key:"resetFromJSON",value:function(t){return l(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(St(t,"threshold",10)),this.setVelocityThreshold(St(t,"velocityThreshold",1e3)),this.setDirectionMode(St(t,"dir","8dir")),this}},{key:"onDragStart",value:function(){this.state=Rt;}},{key:"onDragEnd",value:function(){this.state=jt;}},{key:"onDrag",value:function(){this.state===Rt&&(this.validDrag||(this.validDrag=0===this.dragThreshold||this.pointer.getDistance()>=this.dragThreshold),this.validDrag&&this.dragVelocity>this.velocityThreshold&&(this.state=Ct));}},{key:"postUpdate",value:function(t,e){this.isRunning&&this.enable&&this.state===Ct&&(this.state=jt);}},{key:"isSwiped",get:function(){return this.state===Ct}},{key:"dragVelocity",get:function(){var t;switch(this.dirMode){case 0:t=this.getVelocityY();break;case 1:t=this.getVelocityX();break;default:t=this.getVelocity();}return t}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"setVelocityThreshold",value:function(t){return this.velocityThreshold=t,this}},{key:"setDirectionMode",value:function(t){return "string"==typeof t&&(t=xt[t]),this.dirMode=t,this}},{key:"updateDirectionStates",value:function(){return function(t,e,i){switch(void 0===i?i={}:!0===i&&(i=Dt),i.left=!1,i.right=!1,i.up=!1,i.down=!1,t=(t+360)%360,e){case 0:t<180?i.down=!0:i.up=!0;break;case 1:t>90&&t<=270?i.left=!0:i.right=!0;break;case 2:t>45&&t<=135?i.down=!0:t>135&&t<=225?i.left=!0:t>225&&t<=315?i.up=!0:i.right=!0;break;case 3:t>22.5&&t<=67.5?(i.down=!0,i.right=!0):t>67.5&&t<=112.5?i.down=!0:t>112.5&&t<=157.5?(i.down=!0,i.left=!0):t>157.5&&t<=202.5?i.left=!0:t>202.5&&t<=247.5?(i.left=!0,i.up=!0):t>247.5&&t<=292.5?i.up=!0:t>292.5&&t<=337.5?(i.up=!0,i.right=!0):i.right=!0;}}(Ot(this.getVelocityAngle()),this.dirMode,this),this}},{key:"clearDirectionStates",value:function(){return this.left=!1,this.right=!1,this.up=!1,this.down=!1,this}}]),i}(A);Object.assign(Tt.prototype,Pt);var jt="IDLE",Rt="BEGIN",Ct="RECOGNIZED";v.register("swipe",(function(t,e){return lt(t)||(e=t,t=this.scene),new Tt(t,e)})),ut(window,"RexPlugins.Gestures.Swipe",Tt);var Nt=function(t){if("object"!==n(t)||null===t)return t;if(Array.isArray(t))t.length=0;else for(var e in t)delete t[e];return t},Mt=Phaser.Utils.Objects.GetValue,It=Phaser.Utils.Array.SpliceOne,Gt=Phaser.Math.Distance.Between,Lt=Phaser.Math.Angle.Between,Bt=function(){function t(e,i){s(this,t);var n=y(e);n===e&&(e=void 0);var r=n.input.manager.pointersTotal-1;r<2&&n.input.addPointer(2-r),this.scene=n,this.gameObject=e,e&&e.setInteractive(Mt(i,"inputConfig",void 0)),this.setEventEmitter(Mt(i,"eventEmitter",void 0)),this._enable=void 0,this.pointers=[],this.movedState={},this.resetFromJSON(i),this.boot();}return o(t,[{key:"resetFromJSON",value:function(t){return this.setEnable(Mt(t,"enable",!0)),this.bounds=Mt(t,"bounds",void 0),this.tracerState=Xt,this.pointers.length=0,Nt(this.movedState),this}},{key:"boot",value:function(){this.gameObject?this.gameObject.on("pointerdown",this.onPointerDown,this):this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("gameout",this.dragCancel,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.sys.events.once("shutdown",this.destroy,this);}},{key:"shutdown",value:function(){this.scene&&(this.destroyEventEmitter(),this.pointers.length=0,Nt(this.movedState),this.gameObject||this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("gameout",this.dragCancel,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.sys.events.off("shutdown",this.destroy,this),this.scene=void 0,this.gameObject=void 0);}},{key:"destroy",value:function(){this.shutdown();}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t)return t||this.dragCancel(),this._enable=t,this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"onPointerDown",value:function(t){if(this.enable&&(2!==this.pointers.length&&(!this.bounds||this.bounds.contains(t.x,t.y))&&-1===this.pointers.indexOf(t)))switch(this.movedState[t.id]=!1,this.pointers.push(t),this.tracerState){case Xt:this.tracerState=Yt,this.onDrag1Start();break;case Yt:this.tracerState=At,this.onDrag2Start();}}},{key:"onPointerUp",value:function(t){if(this.enable&&(!this.bounds||this.bounds.contains(t.x,t.y))){var e=this.pointers.indexOf(t);if(-1!==e)switch(delete this.movedState[t.id],It(this.pointers,e),this.tracerState){case Yt:this.tracerState=Xt,this.onDrag1End();break;case At:this.tracerState=Yt,this.onDrag2End(),this.onDrag1Start();}}}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown){var e=!this.bounds||this.bounds.contains(t.x,t.y),i=-1!==this.pointers.indexOf(t);if(!i&&e);else if(i&&!e)this.onPointerUp(t);else if(this.movedState[t.id]||(this.movedState[t.id]=t.x!==t.downX||t.y!==t.downY),this.movedState[t.id])switch(this.tracerState){case Yt:this.onDrag1();break;case At:this.onDrag2();}}}},{key:"dragCancel",value:function(){return this.tracerState===At&&this.onDrag2End(),this.pointers.length=0,Nt(this.movedState),this.tracerState=Xt,this}},{key:"onDrag1Start",value:function(){this.emit("drag1start",this);}},{key:"onDrag1End",value:function(){this.emit("drag1end",this);}},{key:"onDrag1",value:function(){this.emit("drag1",this);}},{key:"onDrag2Start",value:function(){this.emit("drag2start",this);}},{key:"onDrag2End",value:function(){this.emit("drag2end",this);}},{key:"onDrag2",value:function(){this.emit("drag2",this);}},{key:"distanceBetween",get:function(){if(this.tracerState!==At)return 0;var t=this.pointers[0],e=this.pointers[1];return Gt(t.x,t.y,e.x,e.y)}},{key:"angleBetween",get:function(){if(this.tracerState!==At)return 0;var t=this.pointers[0],e=this.pointers[1];return Lt(t.x,t.y,e.x,e.y)}},{key:"drag1Vector",get:function(){var t=this.pointers[0];if(t&&this.movedState[t.id]){var e=t.position,i=t.prevPosition;Ut.x=e.x-i.x,Ut.y=e.y-i.y;}else Ut.x=0,Ut.y=0;return Ut}},{key:"centerX",get:function(){if(this.tracerState!==At)return 0;var t=this.pointers[0].position,e=this.pointers[1].position;return (t.x+e.x)/2}},{key:"centerY",get:function(){if(this.tracerState!==At)return 0;var t=this.pointers[0].position,e=this.pointers[1].position;return (t.y+e.y)/2}},{key:"prevCenterX",get:function(){if(this.tracerState!==At)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,e=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return (t.x+e.x)/2}},{key:"prevCenterY",get:function(){if(this.tracerState!==At)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,e=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return (t.y+e.y)/2}},{key:"movementCenterX",get:function(){return this.centerX-this.prevCenterX}},{key:"movementCenterY",get:function(){return this.centerY-this.prevCenterY}},{key:"setRecongizedStateObject",value:function(t){return this.recongizedState=t,this}},{key:"state",get:function(){return this.recongizedState.state},set:function(t){this.recongizedState.state=t;}},{key:"cancel",value:function(){return this.state=Ft,this}},{key:"isPointer0InGameObject",value:function(t,e,i){var n=this.pointers[0];return !!n&&X(t,n,e,i)}},{key:"isPointer1InGameObject",value:function(t,e,i){var n=this.pointers[1];return !!n&&X(t,n,e,i)}}]),t}();Object.assign(Bt.prototype,f);var Ut={},Xt=0,Yt=1,At=2,Ft="IDLE",Vt=Phaser.Utils.Objects.GetValue,Jt=function(e){function i(e,n){var r;s(this,i);var o=c(r=t(this,i,[e,n])),a={states:{IDLE:{enter:function(){o.prevDistance=void 0,o.scaleFactor=1;}},BEGIN:{},RECOGNIZED:{enter:function(){o.emit("pinchstart",o);},exit:function(){o.emit("pinchend",o);}}},init:function(){this.state=zt;},eventEmitter:!1};return r.setRecongizedStateObject(new et(a)),r}return a(i,e),o(i,[{key:"resetFromJSON",value:function(t){return l(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(Vt(t,"threshold",0)),this}},{key:"onDrag2Start",value:function(){this.scaleFactor=1,this.prevDistance=this.distanceBetween,this.state=Zt,0===this.dragThreshold&&(this.state=Wt);}},{key:"onDrag2End",value:function(){this.state=zt;}},{key:"onDrag2",value:function(){switch(this.state){case Zt:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var t=this.distanceBetween;this.scaleFactor=t/this.prevDistance,this.prevDistance=t,this.state=Wt;}break;case Wt:t=this.distanceBetween;this.scaleFactor=t/this.prevDistance,this.emit("pinch",this),this.prevDistance=t;}}},{key:"isPinched",get:function(){return this.state===Wt}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(Bt),zt="IDLE",Zt="BEGIN",Wt="RECOGNIZED";v.register("pinch",(function(t,e){return lt(t)||(e=t,t=this.scene),new Jt(t,e)})),ut(window,"RexPlugins.Gestures.Pinch",Jt);var Ht=Phaser.Math.RotateAround,qt=function(t,e,i,n){return Ht(t,e,i,n),t.rotation+=n,t},Kt={},Qt=Phaser.Utils.Objects.GetValue,$t=Phaser.Math.Angle.WrapDegrees,te=Phaser.Math.Angle.ShortestBetween,ee=Phaser.Math.RadToDeg,ie=Phaser.Math.DegToRad,ne=function(e){function i(e,n){var r;s(this,i);var o=c(r=t(this,i,[e,n])),a={states:{IDLE:{enter:function(){o.prevAngle=void 0,o.angle=0;}},BEGIN:{},RECOGNIZED:{enter:function(){o.emit("rotatestart",o);},exit:function(){o.emit("rotateend",o);}}},init:function(){this.state=re;},eventEmitter:!1};return r.setRecongizedStateObject(new et(a)),r}return a(i,e),o(i,[{key:"resetFromJSON",value:function(t){return l(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(Qt(t,"threshold",0)),this}},{key:"onDrag2Start",value:function(){this.prevAngle=$t(ee(this.angleBetween)),this.state=oe,0===this.dragThreshold&&(this.state=ae);}},{key:"onDrag2End",value:function(){this.state=re;}},{key:"onDrag2",value:function(){switch(this.state){case oe:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var t=$t(ee(this.angleBetween));this.angle=te(this.prevAngle,t),this.prevAngle=t,this.state=ae;}break;case ae:t=$t(ee(this.angleBetween));this.angle=te(this.prevAngle,t),this.prevAngle=t,this.emit("rotate",this);}}},{key:"isRotated",get:function(){return this.state===ae}},{key:"rotation",get:function(){return ie(this.angle)}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(Bt),se={spinObject:function(t,e){if(!this.isRotation)return this;void 0===e&&(e=this.pointers[0].camera);var i=this.movementCenterX,n=this.movementCenterY,s=function(t,e,i,n){return void 0===n?n={}:!0===n&&(n=Kt),i.getWorldPoint(t,e,n),n}(this.centerX,this.centerY,e,!0),r=s.x,o=s.y,a=this.rotation;if(Array.isArray(t))for(var h=t,u=0,c=h.length;u