// Generated by Haxe 3.4.4
(function ($hx_exports, $global) { "use strict";
$hx_exports["openfl"] = $hx_exports["openfl"] || {};
$hx_exports["lime"] = $hx_exports["lime"] || {};
var $hxClasses = {},$estr = function() { return js_Boot.__string_rec(this,''); };
function $extend(from, fields) {
	function Inherit() {} Inherit.prototype = from; var proto = new Inherit();
	for (var name in fields) proto[name] = fields[name];
	if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString;
	return proto;
}
var ApplicationMain = function() { };
$hxClasses["ApplicationMain"] = ApplicationMain;
ApplicationMain.__name__ = ["ApplicationMain"];
ApplicationMain.config = null;
ApplicationMain.preloader = null;
ApplicationMain.create = function() {
	var app = new openfl_display_Application();
	app.create(ApplicationMain.config);
	var display = new flixel_system_FlxPreloader();
	ApplicationMain.preloader = new openfl_display_Preloader(display);
	app.setPreloader(ApplicationMain.preloader);
	ApplicationMain.preloader.onComplete.add(ApplicationMain.init);
	ApplicationMain.preloader.create(ApplicationMain.config);
	var urls = [];
	var types = [];
	urls.push("assets/data/data-goes-here.txt");
	types.push("TEXT");
	urls.push("ChevyRay - Express Mono Regular");
	types.push("FONT");
	urls.push("ChevyRay - Express Regular");
	types.push("FONT");
	urls.push("ChevyRay - Tentown Regular");
	types.push("FONT");
	urls.push("assets/images/bg.ase");
	types.push("BINARY");
	urls.push("assets/images/bg.aseprite");
	types.push("BINARY");
	urls.push("assets/images/bg2.aseprite");
	types.push("BINARY");
	urls.push("assets/images/bg3.aseprite");
	types.push("BINARY");
	urls.push("assets/images/bg_grass.png");
	types.push("IMAGE");
	urls.push("assets/images/bg_trail.png");
	types.push("IMAGE");
	urls.push("assets/images/explosion.aseprite");
	types.push("BINARY");
	urls.push("assets/images/explosion.png");
	types.push("IMAGE");
	urls.push("assets/images/hotdog.aseprite");
	types.push("BINARY");
	urls.push("assets/images/hotdog1.png");
	types.push("IMAGE");
	urls.push("assets/images/hotdog2.aseprite");
	types.push("BINARY");
	urls.push("assets/images/hotdog2.png");
	types.push("IMAGE");
	urls.push("assets/images/hotdog3.png");
	types.push("IMAGE");
	urls.push("assets/images/hotdog4.png");
	types.push("IMAGE");
	urls.push("assets/images/hotdograin.aseprite");
	types.push("BINARY");
	urls.push("assets/images/hotdograin.png");
	types.push("IMAGE");
	urls.push("assets/images/images-go-here.txt");
	types.push("TEXT");
	urls.push("assets/images/manu.aseprite");
	types.push("BINARY");
	urls.push("assets/images/menu.aseprite");
	types.push("BINARY");
	urls.push("assets/images/menu.png");
	types.push("IMAGE");
	urls.push("assets/images/pin.aseprite");
	types.push("BINARY");
	urls.push("assets/images/pin.png");
	types.push("IMAGE");
	urls.push("assets/images/shadow.png");
	types.push("IMAGE");
	urls.push("assets/images/signbg.aseprite");
	types.push("BINARY");
	urls.push("assets/images/signbg.png");
	types.push("IMAGE");
	urls.push("assets/images/truck.ase");
	types.push("BINARY");
	urls.push("assets/images/truck.aseprite");
	types.push("BINARY");
	urls.push("assets/images/truck_back.png");
	types.push("IMAGE");
	urls.push("assets/images/truck_body.png");
	types.push("IMAGE");
	urls.push("assets/images/truck_person.png");
	types.push("IMAGE");
	urls.push("assets/images/truck_wheel.png");
	types.push("IMAGE");
	urls.push("assets/music/music-goes-here.txt");
	types.push("TEXT");
	urls.push("assets/music/music.wav");
	types.push("SOUND");
	urls.push("assets/sounds/bonus.wav");
	types.push("SOUND");
	urls.push("assets/sounds/engine.wav");
	types.push("SOUND");
	urls.push("assets/sounds/explode1.wav");
	types.push("SOUND");
	urls.push("assets/sounds/explode2.wav");
	types.push("SOUND");
	urls.push("assets/sounds/explode3.wav");
	types.push("SOUND");
	urls.push("assets/sounds/hit1.wav");
	types.push("SOUND");
	urls.push("assets/sounds/hit2.wav");
	types.push("SOUND");
	urls.push("assets/sounds/hit3.wav");
	types.push("SOUND");
	urls.push("assets/sounds/hit4.wav");
	types.push("SOUND");
	urls.push("assets/sounds/sounds-go-here.txt");
	types.push("TEXT");
	urls.push("flixel/sounds/beep.ogg");
	types.push("SOUND");
	urls.push("flixel/sounds/flixel.ogg");
	types.push("SOUND");
	urls.push("Nokia Cellphone FC Small");
	types.push("FONT");
	urls.push("Monsterrat");
	types.push("FONT");
	urls.push("flixel/images/ui/button.png");
	types.push("IMAGE");
	urls.push("flixel/images/logo/default.png");
	types.push("IMAGE");
	if(ApplicationMain.config.assetsPrefix != null) {
		var _g1 = 0;
		var _g = urls.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(types[i] != "FONT") {
				urls[i] = ApplicationMain.config.assetsPrefix + urls[i];
			}
		}
	}
	ApplicationMain.preloader.load(urls,types);
	var result = app.exec();
};
ApplicationMain.init = function() {
	var loaded = 0;
	var total = 0;
	var library_onLoad = function(__) {
		loaded += 1;
		if(loaded == total) {
			ApplicationMain.start();
		}
	};
	ApplicationMain.preloader = null;
	if(total == 0) {
		ApplicationMain.start();
	}
};
ApplicationMain.main = function() {
	ApplicationMain.config = { build : "264", company : "HaxeFlixel", file : "FlxProject", fps : 60, name : "FlxProject", orientation : "", packageName : "com.example.myapp", version : "0.0.1", windows : [{ antialiasing : 0, background : 0, borderless : false, depthBuffer : false, display : 0, fullscreen : false, hardware : false, height : 360, parameters : "{}", resizable : false, stencilBuffer : true, title : "FlxProject", vsync : true, width : 640, x : null, y : null}]};
};
ApplicationMain.start = function() {
	var hasMain = false;
	var entryPoint = Type.resolveClass("Main");
	var _g = 0;
	var _g1 = Type.getClassFields(entryPoint);
	while(_g < _g1.length) {
		var methodName = _g1[_g];
		++_g;
		if(methodName == "main") {
			hasMain = true;
			break;
		}
	}
	lime_Assets.initialize();
	if(hasMain) {
		Reflect.field(entryPoint,"main").apply(entryPoint,[]);
	} else {
		var instance = Type.createInstance(DocumentClass,[]);
	}
	if(openfl_Lib.current.stage.window.__fullscreen) {
		openfl_Lib.current.stage.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true));
	}
	openfl_Lib.current.stage.dispatchEvent(new openfl_events_Event("resize",false,false));
};
var openfl_events_IEventDispatcher = function() { };
$hxClasses["openfl.events.IEventDispatcher"] = openfl_events_IEventDispatcher;
openfl_events_IEventDispatcher.__name__ = ["openfl","events","IEventDispatcher"];
openfl_events_IEventDispatcher.prototype = {
	__class__: openfl_events_IEventDispatcher
};
var openfl_events_EventDispatcher = function(target) {
	if(target != null) {
		this.__targetDispatcher = target;
	}
};
$hxClasses["openfl.events.EventDispatcher"] = openfl_events_EventDispatcher;
openfl_events_EventDispatcher.__name__ = ["openfl","events","EventDispatcher"];
openfl_events_EventDispatcher.__interfaces__ = [openfl_events_IEventDispatcher];
openfl_events_EventDispatcher.__sortByPriority = function(l1,l2) {
	if(l1.priority == l2.priority) {
		return 0;
	} else if(l1.priority > l2.priority) {
		return -1;
	} else {
		return 1;
	}
};
openfl_events_EventDispatcher.prototype = {
	addEventListener: function(type,listener,useCapture,priority,useWeakReference) {
		if(useWeakReference == null) {
			useWeakReference = false;
		}
		if(priority == null) {
			priority = 0;
		}
		if(useCapture == null) {
			useCapture = false;
		}
		if(this.__eventMap == null) {
			this.__dispatching = new haxe_ds_StringMap();
			this.__eventMap = new haxe_ds_StringMap();
			this.__newEventMap = new haxe_ds_StringMap();
		}
		var _this = this.__eventMap;
		if(!(__map_reserved[type] != null ? _this.existsReserved(type) : _this.h.hasOwnProperty(type))) {
			var list = [];
			list.push(new openfl_events__$EventDispatcher_Listener(listener,useCapture,priority));
			var _this1 = this.__eventMap;
			if(__map_reserved[type] != null) {
				_this1.setReserved(type,list);
			} else {
				_this1.h[type] = list;
			}
		} else {
			var list1;
			var _this2 = this.__dispatching;
			if((__map_reserved[type] != null ? _this2.getReserved(type) : _this2.h[type]) == true) {
				var _this3 = this.__newEventMap;
				if(!(__map_reserved[type] != null ? _this3.existsReserved(type) : _this3.h.hasOwnProperty(type))) {
					var _this4 = this.__eventMap;
					list1 = (__map_reserved[type] != null ? _this4.getReserved(type) : _this4.h[type]).slice();
					var _this5 = this.__newEventMap;
					if(__map_reserved[type] != null) {
						_this5.setReserved(type,list1);
					} else {
						_this5.h[type] = list1;
					}
				} else {
					var _this6 = this.__newEventMap;
					if(__map_reserved[type] != null) {
						list1 = _this6.getReserved(type);
					} else {
						list1 = _this6.h[type];
					}
				}
			} else {
				var _this7 = this.__eventMap;
				if(__map_reserved[type] != null) {
					list1 = _this7.getReserved(type);
				} else {
					list1 = _this7.h[type];
				}
			}
			var _g1 = 0;
			var _g = list1.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(Reflect.compareMethods(list1[i].callback,listener)) {
					return;
				}
			}
			list1.push(new openfl_events__$EventDispatcher_Listener(listener,useCapture,priority));
			list1.sort(openfl_events_EventDispatcher.__sortByPriority);
		}
	}
	,dispatchEvent: function(event) {
		if(this.__targetDispatcher != null) {
			event.target = this.__targetDispatcher;
		} else {
			event.target = this;
		}
		return this.__dispatchEvent(event);
	}
	,hasEventListener: function(type) {
		if(this.__eventMap == null) {
			return false;
		}
		var tmp;
		var _this = this.__dispatching;
		if((__map_reserved[type] != null ? _this.getReserved(type) : _this.h[type]) == true) {
			var _this1 = this.__newEventMap;
			if(__map_reserved[type] != null) {
				tmp = _this1.existsReserved(type);
			} else {
				tmp = _this1.h.hasOwnProperty(type);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this2 = this.__newEventMap;
			return (__map_reserved[type] != null ? _this2.getReserved(type) : _this2.h[type]).length > 0;
		} else {
			var _this3 = this.__eventMap;
			if(__map_reserved[type] != null) {
				return _this3.existsReserved(type);
			} else {
				return _this3.h.hasOwnProperty(type);
			}
		}
	}
	,removeEventListener: function(type,listener,useCapture) {
		if(useCapture == null) {
			useCapture = false;
		}
		if(this.__eventMap == null) {
			return;
		}
		var _this = this.__eventMap;
		var list = __map_reserved[type] != null ? _this.getReserved(type) : _this.h[type];
		if(list == null) {
			return;
		}
		var _this1 = this.__dispatching;
		var dispatching = (__map_reserved[type] != null ? _this1.getReserved(type) : _this1.h[type]) == true;
		if(dispatching) {
			var _this2 = this.__newEventMap;
			if(!(__map_reserved[type] != null ? _this2.existsReserved(type) : _this2.h.hasOwnProperty(type))) {
				var _this3 = this.__eventMap;
				list = (__map_reserved[type] != null ? _this3.getReserved(type) : _this3.h[type]).slice();
				var _this4 = this.__newEventMap;
				if(__map_reserved[type] != null) {
					_this4.setReserved(type,list);
				} else {
					_this4.h[type] = list;
				}
			} else {
				var _this5 = this.__newEventMap;
				if(__map_reserved[type] != null) {
					list = _this5.getReserved(type);
				} else {
					list = _this5.h[type];
				}
			}
		}
		var _g1 = 0;
		var _g = list.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(list[i].match(listener,useCapture)) {
				list.splice(i,1);
				break;
			}
		}
		if(!dispatching) {
			if(list.length == 0) {
				this.__eventMap.remove(type);
			}
			var _this6 = this.__eventMap;
			if(!new haxe_ds__$StringMap_StringMapIterator(_this6,_this6.arrayKeys()).hasNext()) {
				this.__eventMap = null;
				this.__newEventMap = null;
			}
		}
	}
	,toString: function() {
		var full = Type.getClassName(js_Boot.getClass(this));
		var $short = full.split(".").pop();
		return "[object " + $short + "]";
	}
	,willTrigger: function(type) {
		return this.hasEventListener(type);
	}
	,__dispatchEvent: function(event) {
		if(this.__eventMap == null || event == null) {
			return false;
		}
		var type = event.type;
		var list;
		var _this = this.__dispatching;
		if((__map_reserved[type] != null ? _this.getReserved(type) : _this.h[type]) == true) {
			var _this1 = this.__newEventMap;
			if(__map_reserved[type] != null) {
				list = _this1.getReserved(type);
			} else {
				list = _this1.h[type];
			}
			if(list == null) {
				return false;
			}
			list = list.slice();
		} else {
			var _this2 = this.__eventMap;
			if(__map_reserved[type] != null) {
				list = _this2.getReserved(type);
			} else {
				list = _this2.h[type];
			}
			if(list == null) {
				return false;
			}
			var _this3 = this.__dispatching;
			if(__map_reserved[type] != null) {
				_this3.setReserved(type,true);
			} else {
				_this3.h[type] = true;
			}
		}
		if(event.target == null) {
			if(this.__targetDispatcher != null) {
				event.target = this.__targetDispatcher;
			} else {
				event.target = this;
			}
		}
		event.currentTarget = this;
		var capture = event.eventPhase == 1;
		var index = 0;
		var listener;
		while(index < list.length) {
			listener = list[index];
			if(listener.useCapture == capture) {
				listener.callback(event);
				if(event.__isCanceledNow) {
					break;
				}
			}
			if(listener == list[index]) {
				++index;
			}
		}
		var tmp;
		if(this.__newEventMap != null) {
			var _this4 = this.__newEventMap;
			if(__map_reserved[type] != null) {
				tmp = _this4.existsReserved(type);
			} else {
				tmp = _this4.h.hasOwnProperty(type);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this5 = this.__newEventMap;
			var list1 = __map_reserved[type] != null ? _this5.getReserved(type) : _this5.h[type];
			if(list1.length > 0) {
				var _this6 = this.__eventMap;
				if(__map_reserved[type] != null) {
					_this6.setReserved(type,list1);
				} else {
					_this6.h[type] = list1;
				}
			} else {
				this.__eventMap.remove(type);
			}
			var _this7 = this.__eventMap;
			if(!new haxe_ds__$StringMap_StringMapIterator(_this7,_this7.arrayKeys()).hasNext()) {
				this.__eventMap = null;
				this.__newEventMap = null;
			} else {
				this.__newEventMap.remove(type);
			}
		}
		var key = event.type;
		var _this8 = this.__dispatching;
		if(__map_reserved[key] != null) {
			_this8.setReserved(key,false);
		} else {
			_this8.h[key] = false;
		}
		return true;
	}
	,__class__: openfl_events_EventDispatcher
};
var openfl_display_IBitmapDrawable = function() { };
$hxClasses["openfl.display.IBitmapDrawable"] = openfl_display_IBitmapDrawable;
openfl_display_IBitmapDrawable.__name__ = ["openfl","display","IBitmapDrawable"];
openfl_display_IBitmapDrawable.prototype = {
	__class__: openfl_display_IBitmapDrawable
};
var openfl_display_DisplayObject = function() {
	this.__cacheAsBitmapSmooth = true;
	this.__cacheAsBitmap = false;
	this.__maskCached = false;
	openfl_events_EventDispatcher.call(this);
	this.__alpha = 1;
	this.__transform = new openfl_geom_Matrix();
	this.__visible = true;
	this.__rotation = 0;
	this.__rotationSine = 0;
	this.__rotationCosine = 1;
	this.__renderTransform = new openfl_geom_Matrix();
	this.__offset = new openfl_geom_Point();
	this.__worldOffset = new openfl_geom_Point();
	this.__worldAlpha = 1;
	this.__worldTransform = new openfl_geom_Matrix();
	this.__worldColorTransform = new openfl_geom_ColorTransform();
	this.set_name("instance" + ++openfl_display_DisplayObject.__instanceCount);
};
$hxClasses["openfl.display.DisplayObject"] = openfl_display_DisplayObject;
openfl_display_DisplayObject.__name__ = ["openfl","display","DisplayObject"];
openfl_display_DisplayObject.__interfaces__ = [openfl_display_IBitmapDrawable];
openfl_display_DisplayObject.__super__ = openfl_events_EventDispatcher;
openfl_display_DisplayObject.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	getBounds: function(targetCoordinateSpace) {
		var matrix;
		if(targetCoordinateSpace != null) {
			matrix = this.__getWorldTransform().clone();
			matrix.concat(targetCoordinateSpace.__getWorldTransform().clone().invert());
		} else {
			matrix = openfl_geom_Matrix.__temp;
			matrix.identity();
		}
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,matrix);
		return bounds;
	}
	,getRect: function(targetCoordinateSpace) {
		return this.getBounds(targetCoordinateSpace);
	}
	,globalToLocal: function(pos) {
		pos = pos.clone();
		var _this = this.__getWorldTransform();
		var norm = _this.a * _this.d - _this.b * _this.c;
		if(norm == 0) {
			pos.x = -_this.tx;
			pos.y = -_this.ty;
		} else {
			var px = 1.0 / norm * (_this.c * (_this.ty - pos.y) + _this.d * (pos.x - _this.tx));
			pos.y = 1.0 / norm * (_this.a * (pos.y - _this.ty) + _this.b * (_this.tx - pos.x));
			pos.x = px;
		}
		return pos;
	}
	,hitTestObject: function(obj) {
		if(obj != null && obj.parent != null && this.parent != null) {
			var currentBounds = this.getBounds(this);
			var targetBounds = obj.getBounds(this);
			return currentBounds.intersects(targetBounds);
		}
		return false;
	}
	,hitTestPoint: function(x,y,shapeFlag) {
		if(shapeFlag == null) {
			shapeFlag = false;
		}
		if(this.parent != null) {
			var bounds = new openfl_geom_Rectangle();
			this.__getBounds(bounds,this.__getWorldTransform());
			return bounds.containsPoint(new openfl_geom_Point(x,y));
		}
		return false;
	}
	,localToGlobal: function(point) {
		return this.__getWorldTransform().transformPoint(point);
	}
	,__broadcast: function(event,notifyChilden) {
		if(this.__eventMap != null && this.hasEventListener(event.type)) {
			var result = openfl_events_EventDispatcher.prototype.__dispatchEvent.call(this,event);
			if(event.__isCanceled) {
				return true;
			}
			return result;
		}
		return false;
	}
	,__dispatchEvent: function(event) {
		var result = openfl_events_EventDispatcher.prototype.__dispatchEvent.call(this,event);
		if(event.__isCanceled) {
			return true;
		}
		if(event.bubbles && this.parent != null && this.parent != this) {
			event.eventPhase = 3;
			if(event.target == null) {
				event.target = this;
			}
			this.parent.__dispatchEvent(event);
		}
		return result;
	}
	,__enterFrame: function(deltaTime) {
	}
	,__getBounds: function(rect,matrix) {
		if(this.__graphics != null) {
			this.__graphics.__getBounds(rect,matrix);
		}
	}
	,__getCursor: function() {
		return null;
	}
	,__getInteractive: function(stack) {
		return false;
	}
	,__getLocalBounds: function(rect) {
		this.__getBounds(rect,this.__transform);
	}
	,__getRenderBounds: function(rect,matrix) {
		if(this.__scrollRect == null) {
			this.__getBounds(rect,matrix);
		} else {
			var r = openfl_geom_Rectangle.__temp;
			r.copyFrom(this.__scrollRect);
			r.__transform(r,matrix);
			rect.__expand(matrix.tx,matrix.ty,r.width,r.height);
		}
	}
	,__getWorldTransform: function() {
		if(this.__transformDirty || openfl_display_DisplayObject.__worldTransformDirty > 0) {
			var list = [];
			var current = this;
			var transformDirty = this.__transformDirty;
			if(this.parent == null) {
				if(transformDirty) {
					this.__update(true,false);
				}
			} else {
				while(current.parent != null) {
					list.push(current);
					current = current.parent;
					if(current.__transformDirty) {
						transformDirty = true;
					}
				}
			}
			if(transformDirty) {
				var i = list.length;
				while(--i >= 0) list[i].__update(true,false);
			}
		}
		return this.__worldTransform;
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(this.__graphics != null) {
			if(!hitObject.get_visible() || this.__isMask) {
				return false;
			}
			if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
				return false;
			}
			if(this.__graphics.__hitTest(x,y,shapeFlag,this.__getWorldTransform())) {
				if(stack != null && !interactiveOnly) {
					stack.push(hitObject);
				}
				return true;
			}
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		if(this.__graphics != null) {
			if(this.__graphics.__hitTest(x,y,true,this.__getWorldTransform())) {
				return true;
			}
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_cairo_CairoShape.render(this,renderSession);
		}
	}
	,__renderCairoMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_cairo_CairoGraphics.renderMask(this.__graphics,renderSession);
		}
	}
	,__renderCanvas: function(renderSession) {
		if(this.__graphics != null) {
			if(!(!this.__renderable || this.__worldAlpha <= 0)) {
				var graphics = this.__graphics;
				if(graphics != null) {
					openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
					if(graphics.__canvas != null) {
						var context = renderSession.context;
						var scrollRect = this.get_scrollRect();
						if(graphics.__bounds.width > 0 && graphics.__bounds.height > 0 && (scrollRect == null || scrollRect.width > 0 && scrollRect.height > 0)) {
							if(this.__mask != null) {
								renderSession.maskManager.pushMask(this.__mask);
							}
							context.globalAlpha = this.__worldAlpha;
							var transform = this.__renderTransform;
							if(renderSession.roundPixels) {
								context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
							} else {
								context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
							}
							if(scrollRect == null) {
								context.drawImage(graphics.__canvas,graphics.__bounds.x,graphics.__bounds.y);
							} else {
								context.drawImage(graphics.__canvas,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height);
							}
							if(this.__mask != null) {
								renderSession.maskManager.popMask();
							}
						}
					}
				}
			}
		}
	}
	,__renderCanvasMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,renderSession);
		}
	}
	,__renderDOM: function(renderSession) {
		if(this.__graphics != null) {
			var graphics = this.__graphics;
			if(this.stage != null && this.__worldVisible && this.__renderable && graphics != null) {
				if(graphics.__dirty || this.__worldAlphaChanged || this.__canvas == null && graphics.__canvas != null) {
					openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
					if(graphics.__canvas != null) {
						if(this.__canvas == null) {
							this.__canvas = window.document.createElement("canvas");
							this.__context = this.__canvas.getContext("2d");
							openfl__$internal_renderer_dom_DOMRenderer.initializeElement(this,this.__canvas,renderSession);
						}
						this.__canvas.width = graphics.__canvas.width;
						this.__canvas.height = graphics.__canvas.height;
						this.__context.globalAlpha = this.__worldAlpha;
						this.__context.drawImage(graphics.__canvas,0,0);
					} else if(this.__canvas != null) {
						renderSession.element.removeChild(this.__canvas);
						this.__canvas = null;
						this.__style = null;
					}
				}
				if(this.__canvas != null) {
					if(this.__worldTransformChanged || graphics.__transformDirty) {
						graphics.__transformDirty = false;
						var transform = openfl_geom_Matrix.__temp;
						transform.identity();
						transform.translate(graphics.__bounds.x,graphics.__bounds.y);
						transform.concat(this.__worldTransform);
						this.__style.setProperty(renderSession.transformProperty,renderSession.roundPixels ? "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + (transform.tx | 0) + ", " + (transform.ty | 0) + ", 0, 1)" : "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + transform.tx + ", " + transform.ty + ", 0, 1)",null);
					}
					openfl__$internal_renderer_dom_DOMRenderer.applyStyle(this,renderSession,false,false,true);
				}
			} else if(this.__canvas != null) {
				renderSession.element.removeChild(this.__canvas);
				this.__canvas = null;
				this.__style = null;
			}
		}
	}
	,__renderGL: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		if(this.__cacheAsBitmap) {
			var hasCacheMatrix = this.__cacheAsBitmapMatrix != null;
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(hasCacheMatrix) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(this.__graphics != null) {
			if(this.__graphics.__hardware) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render(this,renderSession);
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.render(this.__graphics,renderSession);
				openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession);
			}
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__drawGraphicsGL: function(renderSession) {
		if(this.__graphics != null) {
			if(this.__graphics.__hardware) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render(this,renderSession);
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.render(this.__graphics,renderSession);
				openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession);
			}
		}
	}
	,__preRenderGL: function(renderSession) {
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
	}
	,__postRenderGL: function(renderSession) {
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__cacheGL: function(renderSession) {
		var hasCacheMatrix = this.__cacheAsBitmapMatrix != null;
		var x = this.__cachedBitmapBounds.x;
		var y = this.__cachedBitmapBounds.y;
		var w = this.__cachedBitmapBounds.width;
		var h = this.__cachedBitmapBounds.height;
		if(this.__cacheGLMatrix == null) {
			this.__cacheGLMatrix = new openfl_geom_Matrix();
		}
		if(hasCacheMatrix) {
			var bmpBounds = openfl_geom_Rectangle.__temp;
			this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
			x = bmpBounds.x;
			y = bmpBounds.y;
			w = bmpBounds.width;
			h = bmpBounds.height;
			this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
		} else {
			this.__cacheGLMatrix.identity();
		}
		if(w <= 0 && h <= 0) {
			return;
		}
		if(this.__updateCachedBitmap || this.__updateFilters) {
			if(this.__cachedFilterBounds != null) {
				w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
				h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
			}
			if(this.__cachedBitmap == null) {
				this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
			}
			this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
			var m = this.__cacheGLMatrix.clone();
			m.translate(-x,-y);
			var shader = this.__shader;
			this.__shader = null;
			this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
			this.__shader = shader;
			this.__updateCachedBitmap = false;
		}
		if(this.__updateFilters) {
			openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
			this.__updateFilters = false;
		}
		this.__cacheGLMatrix.invert();
		var _this = this.__cacheGLMatrix;
		_this.tx = x * _this.a + y * _this.c + _this.tx;
		_this.ty = x * _this.b + y * _this.d + _this.ty;
		this.__cacheGLMatrix.concat(this.__renderTransform);
		this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
		renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
	}
	,__setStageReference: function(stage) {
		if(this.stage != stage) {
			if(this.stage != null) {
				if(this.stage.get_focus() == this) {
					this.stage.set_focus(null);
				}
				this.dispatchEvent(new openfl_events_Event("removedFromStage",false,false));
			}
			this.stage = stage;
			if(stage != null) {
				this.dispatchEvent(new openfl_events_Event("addedToStage",false,false));
			}
		}
	}
	,__setRenderDirty: function() {
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
	}
	,__setTransformDirty: function() {
		if(!this.__transformDirty) {
			this.__transformDirty = true;
			openfl_display_DisplayObject.__worldTransformDirty++;
		}
	}
	,__update: function(transformOnly,updateChildren,maskGraphics) {
		this.__renderable = this.get_visible() && this.get_scaleX() != 0 && this.get_scaleY() != 0 && !this.__isMask;
		this.__updateTransforms();
		if(this.parent != null && this.__isMask) {
			this.__maskCached = false;
		}
		if(updateChildren && this.__transformDirty) {
			this.__transformDirty = false;
			openfl_display_DisplayObject.__worldTransformDirty--;
		}
		if(!transformOnly && this.__mask != null && !this.__mask.__maskCached) {
			if(this.__maskGraphics == null) {
				this.__maskGraphics = new openfl_display_Graphics();
			}
			this.__maskGraphics.clear();
			this.__mask.__update(true,true,this.__maskGraphics);
			this.__mask.__maskCached = true;
		}
		if(maskGraphics != null) {
			this.__updateMask(maskGraphics);
		}
		if(!transformOnly && this.__cacheAsBitmap) {
			if(this.__updateCachedBitmap || this.__updateFilters) {
				if(this.__cachedBitmapBounds == null) {
					this.__cachedBitmapBounds = new openfl_geom_Rectangle();
				}
				if(this.cacheAsBitmapBounds != null) {
					this.__cachedBitmapBounds.copyFrom(this.cacheAsBitmapBounds);
				} else {
					this.__cachedBitmapBounds.setEmpty();
					this.__getRenderBounds(this.__cachedBitmapBounds,openfl_geom_Matrix.__identity);
				}
				if(this.__filters != null) {
					if(this.__cachedFilterBounds == null) {
						this.__cachedFilterBounds = new openfl_geom_Rectangle();
					}
					this.__cachedFilterBounds.setEmpty();
					openfl_filters_BitmapFilter.__expandBounds(this.__filters,this.__cachedFilterBounds,openfl_geom_Matrix.__identity);
					this.__cachedBitmapBounds.x += this.__cachedFilterBounds.x;
					this.__cachedBitmapBounds.y += this.__cachedFilterBounds.y;
				}
			}
		}
		if(!transformOnly) {
			if(!this.__worldColorTransform.__equals(this.get_transform().get_colorTransform())) {
				this.__worldColorTransform = this.get_transform().get_colorTransform().__clone();
			}
			if(this.parent != null) {
				this.__worldAlpha = this.get_alpha() * this.parent.__worldAlpha;
				this.__worldColorTransform.__combine(this.parent.__worldColorTransform);
				if(this.blendMode == null || this.blendMode == 10) {
					this.__blendMode = this.parent.__blendMode;
				}
				if(this.shader == null) {
					this.__shader = this.parent.__shader;
				}
			} else {
				this.__worldAlpha = this.get_alpha();
			}
			if(updateChildren && this.__renderDirty) {
				this.__renderDirty = false;
			}
		}
	}
	,__updateChildren: function(transformOnly) {
		this.__renderable = this.get_visible() && this.get_scaleX() != 0 && this.get_scaleY() != 0 && !this.__isMask;
		if(!this.__renderable && !this.__isMask) {
			return;
		}
		this.__worldAlpha = this.get_alpha();
		if(this.__transformDirty) {
			this.__transformDirty = false;
			openfl_display_DisplayObject.__worldTransformDirty--;
		}
	}
	,__updateMask: function(maskGraphics) {
		if(this.__graphics != null) {
			maskGraphics.__commands.overrideMatrix(this.__worldTransform);
			maskGraphics.__commands.append(this.__graphics.__commands);
			maskGraphics.set___dirty(true);
			maskGraphics.__visible = true;
			if(maskGraphics.__bounds == null) {
				maskGraphics.__bounds = new openfl_geom_Rectangle();
			}
			this.__graphics.__getBounds(maskGraphics.__bounds,openfl_geom_Matrix.__identity);
		}
	}
	,__updateTransforms: function(overrideTransform) {
		var overrided = overrideTransform != null;
		var local = overrided ? overrideTransform.clone() : this.__transform;
		if(this.__worldTransform == null) {
			this.__worldTransform = new openfl_geom_Matrix();
		}
		if(!overrided && this.parent != null) {
			var parentTransform = this.parent.__worldTransform;
			this.__worldTransform.a = local.a * parentTransform.a + local.b * parentTransform.c;
			this.__worldTransform.b = local.a * parentTransform.b + local.b * parentTransform.d;
			this.__worldTransform.c = local.c * parentTransform.a + local.d * parentTransform.c;
			this.__worldTransform.d = local.c * parentTransform.b + local.d * parentTransform.d;
			this.__worldTransform.tx = local.tx * parentTransform.a + local.ty * parentTransform.c + parentTransform.tx;
			this.__worldTransform.ty = local.tx * parentTransform.b + local.ty * parentTransform.d + parentTransform.ty;
			this.__worldOffset.copyFrom(this.parent.__worldOffset);
		} else {
			this.__worldTransform.copyFrom(local);
			this.__worldOffset.setTo(0,0);
		}
		if(this.__scrollRect != null) {
			this.__offset = this.__worldTransform.deltaTransformPoint(this.__scrollRect.get_topLeft());
			this.__worldOffset.offset(this.__offset.x,this.__offset.y);
		} else {
			this.__offset.setTo(0,0);
		}
		this.__renderTransform.copyFrom(this.__worldTransform);
		this.__renderTransform.translate(-this.__worldOffset.x,-this.__worldOffset.y);
	}
	,get_alpha: function() {
		return this.__alpha;
	}
	,set_alpha: function(value) {
		if(value > 1.0) {
			value = 1.0;
		}
		if(value != this.__alpha) {
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__alpha = value;
	}
	,set_blendMode: function(value) {
		this.__blendMode = value;
		return this.blendMode = value;
	}
	,set_shader: function(value) {
		this.__shader = value;
		return this.shader = value;
	}
	,get_cacheAsBitmap: function() {
		return this.__cacheAsBitmap;
	}
	,set_cacheAsBitmap: function(value) {
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
		return this.__cacheAsBitmap = this.__forceCacheAsBitmap ? true : value;
	}
	,get_cacheAsBitmapMatrix: function() {
		return this.__cacheAsBitmapMatrix;
	}
	,set_cacheAsBitmapMatrix: function(value) {
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
		return this.__cacheAsBitmapMatrix = value.clone();
	}
	,get_cacheAsBitmapSmooth: function() {
		return this.__cacheAsBitmapSmooth;
	}
	,set_cacheAsBitmapSmooth: function(value) {
		return this.__cacheAsBitmapSmooth = value;
	}
	,get_filters: function() {
		if(this.__filters == null) {
			return [];
		} else {
			return this.__filters.slice();
		}
	}
	,set_filters: function(value) {
		if(value != null && value.length > 0) {
			this.__filters = value;
			this.__forceCacheAsBitmap = true;
			this.__cacheAsBitmap = true;
			this.__updateFilters = true;
		} else {
			this.__filters = null;
			this.__forceCacheAsBitmap = false;
			this.__cacheAsBitmap = false;
			this.__updateFilters = false;
		}
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
		return value;
	}
	,get_height: function() {
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,this.__transform);
		return bounds.height;
	}
	,set_height: function(value) {
		var bounds = new openfl_geom_Rectangle();
		var matrix = openfl_geom_Matrix.__temp;
		matrix.identity();
		this.__getBounds(bounds,matrix);
		if(value != bounds.height) {
			this.set_scaleY(value / bounds.height);
		} else {
			this.set_scaleY(1);
		}
		return value;
	}
	,get_mask: function() {
		return this.__mask;
	}
	,set_mask: function(value) {
		if(value != this.__mask) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		if(this.__mask != null) {
			this.__mask.__isMask = false;
			this.__mask.__maskCached = false;
			var _this = this.__mask;
			if(!_this.__transformDirty) {
				_this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			var _this1 = this.__mask;
			if(!_this1.__renderDirty) {
				_this1.__updateCachedBitmap = true;
				_this1.__updateFilters = _this1.get_filters() != null && _this1.get_filters().length > 0;
				_this1.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			this.__maskGraphics = null;
		}
		if(value != null) {
			value.__isMask = true;
		}
		return this.__mask = value;
	}
	,get_mouseX: function() {
		var mouseX = this.stage != null ? this.stage.__mouseX : openfl_Lib.current.stage.__mouseX;
		var mouseY = this.stage != null ? this.stage.__mouseY : openfl_Lib.current.stage.__mouseY;
		var _this = this.__getWorldTransform();
		var norm = _this.a * _this.d - _this.b * _this.c;
		if(norm == 0) {
			return -_this.tx;
		} else {
			return 1.0 / norm * (_this.c * (_this.ty - mouseY) + _this.d * (mouseX - _this.tx));
		}
	}
	,get_mouseY: function() {
		var mouseX = this.stage != null ? this.stage.__mouseX : openfl_Lib.current.stage.__mouseX;
		var mouseY = this.stage != null ? this.stage.__mouseY : openfl_Lib.current.stage.__mouseY;
		var _this = this.__getWorldTransform();
		var norm = _this.a * _this.d - _this.b * _this.c;
		if(norm == 0) {
			return -_this.ty;
		} else {
			return 1.0 / norm * (_this.a * (mouseY - _this.ty) + _this.b * (_this.tx - mouseX));
		}
	}
	,get_name: function() {
		return this.__name;
	}
	,set_name: function(value) {
		return this.__name = value;
	}
	,get_root: function() {
		if(this.stage != null) {
			return openfl_Lib.current;
		}
		return null;
	}
	,get_rotation: function() {
		return this.__rotation;
	}
	,set_rotation: function(value) {
		if(value != this.__rotation) {
			this.__rotation = value;
			var radians = this.__rotation * (Math.PI / 180);
			this.__rotationSine = Math.sin(radians);
			this.__rotationCosine = Math.cos(radians);
			var __scaleX = this.get_scaleX();
			var __scaleY = this.get_scaleY();
			this.__transform.a = this.__rotationCosine * __scaleX;
			this.__transform.b = this.__rotationSine * __scaleX;
			this.__transform.c = -this.__rotationSine * __scaleY;
			this.__transform.d = this.__rotationCosine * __scaleY;
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return value;
	}
	,get_scaleX: function() {
		if(this.__transform.b == 0) {
			return this.__transform.a;
		} else {
			return Math.sqrt(this.__transform.a * this.__transform.a + this.__transform.b * this.__transform.b);
		}
	}
	,set_scaleX: function(value) {
		if(this.__transform.c == 0) {
			if(value != this.__transform.a) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.a = value;
		} else {
			var a = this.__rotationCosine * value;
			var b = this.__rotationSine * value;
			if(this.__transform.a != a || this.__transform.b != b) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.a = a;
			this.__transform.b = b;
		}
		return value;
	}
	,get_scaleY: function() {
		if(this.__transform.c == 0) {
			return this.__transform.d;
		} else {
			return Math.sqrt(this.__transform.c * this.__transform.c + this.__transform.d * this.__transform.d);
		}
	}
	,set_scaleY: function(value) {
		if(this.__transform.c == 0) {
			if(value != this.__transform.d) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.d = value;
		} else {
			var c = -this.__rotationSine * value;
			var d = this.__rotationCosine * value;
			if(this.__transform.d != d || this.__transform.c != c) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.c = c;
			this.__transform.d = d;
		}
		return value;
	}
	,get_scrollRect: function() {
		if(this.__scrollRect == null) {
			return null;
		}
		return this.__scrollRect.clone();
	}
	,set_scrollRect: function(value) {
		if(value != this.__scrollRect) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return this.__scrollRect = value;
	}
	,get_transform: function() {
		if(this.__objectTransform == null) {
			this.__objectTransform = new openfl_geom_Transform(this);
		}
		return this.__objectTransform;
	}
	,set_transform: function(value) {
		if(value == null) {
			throw new js__$Boot_HaxeError(new openfl_errors_TypeError("Parameter transform must be non-null."));
		}
		if(this.__objectTransform == null) {
			this.__objectTransform = new openfl_geom_Transform(this);
		}
		if(!this.__transformDirty) {
			this.__transformDirty = true;
			openfl_display_DisplayObject.__worldTransformDirty++;
		}
		this.__objectTransform.set_matrix(value.get_matrix());
		this.__objectTransform.set_colorTransform(value.get_colorTransform().__clone());
		return this.__objectTransform;
	}
	,get_visible: function() {
		return this.__visible;
	}
	,set_visible: function(value) {
		if(value != this.__visible) {
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__visible = value;
	}
	,get_width: function() {
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,this.__transform);
		return bounds.width;
	}
	,set_width: function(value) {
		var bounds = new openfl_geom_Rectangle();
		var matrix = openfl_geom_Matrix.__temp;
		matrix.identity();
		this.__getBounds(bounds,matrix);
		if(value != bounds.width) {
			this.set_scaleX(value / bounds.width);
		} else {
			this.set_scaleX(1);
		}
		return value;
	}
	,get_x: function() {
		return this.__transform.tx;
	}
	,set_x: function(value) {
		if(value != this.__transform.tx) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return this.__transform.tx = value;
	}
	,get_y: function() {
		return this.__transform.ty;
	}
	,set_y: function(value) {
		if(value != this.__transform.ty) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return this.__transform.ty = value;
	}
	,__class__: openfl_display_DisplayObject
	,__properties__: {set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_transform:"set_transform",get_transform:"get_transform",set_shader:"set_shader",set_scrollRect:"set_scrollRect",get_scrollRect:"get_scrollRect",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",get_root:"get_root",set_name:"set_name",get_name:"get_name",get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_mask:"set_mask",get_mask:"get_mask",set_height:"set_height",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmapSmooth:"set_cacheAsBitmapSmooth",get_cacheAsBitmapSmooth:"get_cacheAsBitmapSmooth",set_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}
});
var openfl_display_InteractiveObject = function() {
	openfl_display_DisplayObject.call(this);
	this.doubleClickEnabled = false;
	this.mouseEnabled = true;
	this.needsSoftKeyboard = false;
	this.__tabEnabled = false;
	this.tabIndex = -1;
};
$hxClasses["openfl.display.InteractiveObject"] = openfl_display_InteractiveObject;
openfl_display_InteractiveObject.__name__ = ["openfl","display","InteractiveObject"];
openfl_display_InteractiveObject.__super__ = openfl_display_DisplayObject;
openfl_display_InteractiveObject.prototype = $extend(openfl_display_DisplayObject.prototype,{
	requestSoftKeyboard: function() {
		openfl_Lib.notImplemented("InteractiveObject.requestSoftKeyboard");
		return false;
	}
	,__getInteractive: function(stack) {
		if(stack != null) {
			stack.push(this);
			if(this.parent != null) {
				this.parent.__getInteractive(stack);
			}
		}
		return true;
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled) {
			return false;
		}
		return openfl_display_DisplayObject.prototype.__hitTest.call(this,x,y,shapeFlag,stack,interactiveOnly,hitObject);
	}
	,get_tabEnabled: function() {
		return this.__tabEnabled;
	}
	,set_tabEnabled: function(value) {
		return this.__tabEnabled = value;
	}
	,__class__: openfl_display_InteractiveObject
	,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})
});
var openfl_display_DisplayObjectContainer = function() {
	openfl_display_InteractiveObject.call(this);
	this.mouseChildren = true;
	this.__children = [];
	this.__removedChildren = [];
};
$hxClasses["openfl.display.DisplayObjectContainer"] = openfl_display_DisplayObjectContainer;
openfl_display_DisplayObjectContainer.__name__ = ["openfl","display","DisplayObjectContainer"];
openfl_display_DisplayObjectContainer.__super__ = openfl_display_InteractiveObject;
openfl_display_DisplayObjectContainer.prototype = $extend(openfl_display_InteractiveObject.prototype,{
	addChild: function(child) {
		if(child != null) {
			if(child.parent != null) {
				child.parent.removeChild(child);
			}
			this.__children.push(child);
			child.parent = this;
			if(this.stage != null) {
				child.__setStageReference(this.stage);
			}
			if(!child.__transformDirty) {
				child.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!child.__renderDirty) {
				child.__updateCachedBitmap = true;
				child.__updateFilters = child.get_filters() != null && child.get_filters().length > 0;
				child.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			var event = new openfl_events_Event("added",true);
			event.target = child;
			child.__dispatchEvent(event);
		}
		return child;
	}
	,addChildAt: function(child,index) {
		if(index > this.__children.length || index < 0) {
			throw new js__$Boot_HaxeError("Invalid index position " + index);
		}
		if(child.parent == this) {
			HxOverrides.remove(this.__children,child);
		} else {
			if(child.parent != null) {
				child.parent.removeChild(child);
			}
			child.parent = this;
			if(this.stage != null) {
				child.__setStageReference(this.stage);
			}
			if(!child.__transformDirty) {
				child.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!child.__renderDirty) {
				child.__updateCachedBitmap = true;
				child.__updateFilters = child.get_filters() != null && child.get_filters().length > 0;
				child.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			var event = new openfl_events_Event("added",true);
			event.target = child;
			child.__dispatchEvent(event);
		}
		this.__children.splice(index,0,child);
		return child;
	}
	,areInaccessibleObjectsUnderPoint: function(point) {
		return false;
	}
	,contains: function(child) {
		while(child != this && child != null) child = child.parent;
		return child == this;
	}
	,getChildAt: function(index) {
		if(index >= 0 && index < this.__children.length) {
			return this.__children[index];
		}
		return null;
	}
	,getChildByName: function(name) {
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_name() == name) {
				return child;
			}
		}
		return null;
	}
	,getChildIndex: function(child) {
		var _g1 = 0;
		var _g = this.__children.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.__children[i] == child) {
				return i;
			}
		}
		return -1;
	}
	,getObjectsUnderPoint: function(point) {
		var stack = [];
		this.__hitTest(point.x,point.y,false,stack,false,this);
		stack.reverse();
		return stack;
	}
	,removeChild: function(child) {
		if(child != null && child.parent == this) {
			child.__dispatchEvent(new openfl_events_Event("removed",true));
			if(this.stage != null) {
				child.__setStageReference(null);
			}
			child.parent = null;
			HxOverrides.remove(this.__children,child);
			this.__removedChildren.push(child);
			if(!child.__transformDirty) {
				child.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!child.__renderDirty) {
				child.__updateCachedBitmap = true;
				child.__updateFilters = child.get_filters() != null && child.get_filters().length > 0;
				child.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return child;
	}
	,removeChildAt: function(index) {
		if(index >= 0 && index < this.__children.length) {
			return this.removeChild(this.__children[index]);
		}
		return null;
	}
	,removeChildren: function(beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 2147483647;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
		if(endIndex == 2147483647) {
			endIndex = this.__children.length - 1;
			if(endIndex < 0) {
				return;
			}
		}
		if(beginIndex > this.__children.length - 1) {
			return;
		} else if(endIndex < beginIndex || beginIndex < 0 || endIndex > this.__children.length) {
			throw new js__$Boot_HaxeError(new openfl_errors_RangeError("The supplied index is out of bounds."));
		}
		var numRemovals = endIndex - beginIndex;
		while(numRemovals >= 0) {
			this.removeChildAt(beginIndex);
			--numRemovals;
		}
	}
	,resolve: function(fieldName) {
		if(this.__children == null) {
			return null;
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_name() == fieldName) {
				return child;
			}
		}
		return null;
	}
	,setChildIndex: function(child,index) {
		if(index >= 0 && index <= this.__children.length && child.parent == this) {
			HxOverrides.remove(this.__children,child);
			this.__children.splice(index,0,child);
		}
	}
	,swapChildren: function(child1,child2) {
		if(child1.parent == this && child2.parent == this) {
			var index1 = this.__children.indexOf(child1);
			var index2 = this.__children.indexOf(child2);
			this.__children[index1] = child2;
			this.__children[index2] = child1;
		}
	}
	,swapChildrenAt: function(index1,index2) {
		var swap = this.__children[index1];
		this.__children[index1] = this.__children[index2];
		this.__children[index2] = swap;
		swap = null;
	}
	,__broadcast: function(event,notifyChilden) {
		if(event.target == null) {
			event.target = this;
		}
		var result = openfl_display_InteractiveObject.prototype.__broadcast.call(this,event,notifyChilden);
		if(!event.__isCanceled && notifyChilden) {
			var _g = 0;
			var _g1 = this.__children;
			while(_g < _g1.length) {
				var child = _g1[_g];
				++_g;
				child.__broadcast(event,true);
				if(event.__isCanceled) {
					return true;
				}
			}
		}
		return result;
	}
	,__enterFrame: function(deltaTime) {
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__enterFrame(deltaTime);
		}
	}
	,__getBounds: function(rect,matrix) {
		openfl_display_InteractiveObject.prototype.__getBounds.call(this,rect,matrix);
		if(this.__children.length == 0) {
			return;
		}
		if(matrix != null) {
			this.__updateTransforms(matrix);
			this.__updateChildren(true);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_scaleX() == 0 || child.get_scaleY() == 0) {
				continue;
			}
			child.__getBounds(rect,child.__worldTransform);
		}
		if(matrix != null) {
			this.__updateTransforms();
			this.__updateChildren(true);
		}
	}
	,__getRenderBounds: function(rect,matrix) {
		if(this.__scrollRect != null) {
			openfl_display_InteractiveObject.prototype.__getRenderBounds.call(this,rect,matrix);
			return;
		} else {
			openfl_display_InteractiveObject.prototype.__getBounds.call(this,rect,matrix);
		}
		if(this.__children.length == 0) {
			return;
		}
		if(matrix != null) {
			this.__updateTransforms(matrix);
			this.__updateChildren(true);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_scaleX() == 0 || child.get_scaleY() == 0 || child.__isMask) {
				continue;
			}
			child.__getRenderBounds(rect,child.__worldTransform);
		}
		if(matrix != null) {
			this.__updateTransforms();
			this.__updateChildren(true);
		}
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled && !this.mouseChildren) {
			return false;
		}
		if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
			return false;
		}
		if(this.get_scrollRect() != null && !this.get_scrollRect().containsPoint(this.globalToLocal(new openfl_geom_Point(x,y)))) {
			return false;
		}
		var i = this.__children.length;
		if(interactiveOnly) {
			if(stack == null || !this.mouseChildren) {
				while(--i >= 0) if(this.__children[i].__hitTest(x,y,shapeFlag,null,true,this.__children[i])) {
					if(stack != null) {
						stack.push(hitObject);
					}
					return true;
				}
			} else if(stack != null) {
				var length = stack.length;
				var interactive = false;
				var hitTest = false;
				while(--i >= 0) {
					interactive = this.__children[i].__getInteractive(null);
					if(interactive || this.mouseEnabled && !hitTest) {
						if(this.__children[i].__hitTest(x,y,shapeFlag,stack,true,this.__children[i])) {
							hitTest = true;
							if(interactive) {
								break;
							}
						}
					}
				}
				if(hitTest) {
					stack.splice(length,0,hitObject);
					return true;
				}
			}
		} else {
			while(--i >= 0) this.__children[i].__hitTest(x,y,shapeFlag,stack,false,this.__children[i]);
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		var i = this.__children.length;
		while(--i >= 0) if(this.__children[i].__hitTestMask(x,y)) {
			return true;
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		openfl_display_InteractiveObject.prototype.__renderCairo.call(this,renderSession);
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.pushRect(this.get_scrollRect(),this.__worldTransform);
		}
		if(this.__mask != null) {
			renderSession.maskManager.pushMask(this.__mask);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderCairo(renderSession);
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
		if(this.__mask != null) {
			renderSession.maskManager.popMask();
		}
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__renderCairoMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_cairo_CairoGraphics.renderMask(this.__graphics,renderSession);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderCairoMask(renderSession);
		}
	}
	,__renderCanvas: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,renderSession);
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.pushRect(this.get_scrollRect(),this.__worldTransform);
		}
		if(this.__mask != null) {
			renderSession.maskManager.pushMask(this.__mask);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderCanvas(renderSession);
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
		if(this.__mask != null) {
			renderSession.maskManager.popMask();
		}
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__renderCanvasMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,renderSession);
		}
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,this.__transform);
		renderSession.context.rect(0,0,bounds.width,bounds.height);
	}
	,__renderDOM: function(renderSession) {
		openfl_display_InteractiveObject.prototype.__renderDOM.call(this,renderSession);
		if(this.__mask != null) {
			renderSession.maskManager.pushMask(this.__mask);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderDOM(renderSession);
		}
		var _g2 = 0;
		var _g11 = this.__removedChildren;
		while(_g2 < _g11.length) {
			var orphan = _g11[_g2];
			++_g2;
			if(orphan.stage == null) {
				orphan.__renderDOM(renderSession);
			}
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
		if(this.__mask != null) {
			renderSession.maskManager.popMask();
		}
	}
	,__renderGL: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		if(this.__cacheAsBitmap) {
			var hasCacheMatrix = this.__cacheAsBitmapMatrix != null;
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(hasCacheMatrix) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(this.__graphics != null) {
			if(this.__graphics.__hardware) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render(this,renderSession);
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.render(this.__graphics,renderSession);
				openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession);
			}
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderGL(renderSession);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
	}
	,__setStageReference: function(stage) {
		if(this.stage != stage) {
			if(this.stage != null) {
				this.__dispatchEvent(new openfl_events_Event("removedFromStage",false,false));
			}
			this.stage = stage;
			if(stage != null) {
				this.__dispatchEvent(new openfl_events_Event("addedToStage",false,false));
			}
			if(this.__children != null) {
				var _g = 0;
				var _g1 = this.__children;
				while(_g < _g1.length) {
					var child = _g1[_g];
					++_g;
					child.__setStageReference(stage);
				}
			}
		}
	}
	,__update: function(transformOnly,updateChildren,maskGraphics) {
		openfl_display_InteractiveObject.prototype.__update.call(this,transformOnly,updateChildren,maskGraphics);
		if(!this.__renderable && !this.__isMask) {
			return;
		}
		if(updateChildren) {
			var _g = 0;
			var _g1 = this.__children;
			while(_g < _g1.length) {
				var child = _g1[_g];
				++_g;
				child.__update(transformOnly,true,maskGraphics);
			}
		}
	}
	,__updateChildren: function(transformOnly) {
		openfl_display_InteractiveObject.prototype.__updateChildren.call(this,transformOnly);
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__update(transformOnly,true);
		}
	}
	,get_numChildren: function() {
		return this.__children.length;
	}
	,__class__: openfl_display_DisplayObjectContainer
	,__properties__: $extend(openfl_display_InteractiveObject.prototype.__properties__,{get_numChildren:"get_numChildren"})
});
var openfl_display_Sprite = function() {
	openfl_display_DisplayObjectContainer.call(this);
	this.buttonMode = false;
	this.useHandCursor = true;
	this.loaderInfo = openfl_display_LoaderInfo.create(null);
};
$hxClasses["openfl.display.Sprite"] = openfl_display_Sprite;
openfl_display_Sprite.__name__ = ["openfl","display","Sprite"];
openfl_display_Sprite.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Sprite.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
	startDrag: function(lockCenter,bounds) {
		if(lockCenter == null) {
			lockCenter = false;
		}
		if(this.stage != null) {
			this.stage.__startDrag(this,lockCenter,bounds);
		}
	}
	,stopDrag: function() {
		if(this.stage != null) {
			this.stage.__stopDrag(this);
		}
	}
	,__getCursor: function() {
		if(this.buttonMode && this.useHandCursor) {
			return lime_ui_MouseCursor.POINTER;
		} else {
			return null;
		}
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(this.hitArea != null) {
			if(!this.hitArea.mouseEnabled) {
				this.hitArea.mouseEnabled = true;
				var hitTest = this.hitArea.__hitTest(x,y,shapeFlag,null,true,hitObject);
				this.hitArea.mouseEnabled = false;
				if(hitTest) {
					stack[stack.length] = hitObject;
				}
				return hitTest;
			}
		} else {
			if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled && !this.mouseChildren) {
				return false;
			}
			if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
				return false;
			}
			if(openfl_display_DisplayObjectContainer.prototype.__hitTest.call(this,x,y,shapeFlag,stack,interactiveOnly,hitObject)) {
				return interactiveOnly;
			} else if((!interactiveOnly || this.mouseEnabled) && this.__graphics != null && this.__graphics.__hitTest(x,y,shapeFlag,this.__getWorldTransform())) {
				if(stack != null) {
					stack.push(hitObject);
				}
				return true;
			}
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		if(openfl_display_DisplayObjectContainer.prototype.__hitTestMask.call(this,x,y)) {
			return true;
		} else if(this.__graphics != null && this.__graphics.__hitTest(x,y,true,this.__getWorldTransform())) {
			return true;
		}
		return false;
	}
	,get_graphics: function() {
		if(this.__graphics == null) {
			this.__graphics = new openfl_display_Graphics();
			this.__graphics.__owner = this;
		}
		return this.__graphics;
	}
	,get_tabEnabled: function() {
		if(!this.__tabEnabled) {
			return this.buttonMode;
		} else {
			return true;
		}
	}
	,__class__: openfl_display_Sprite
	,__properties__: $extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{get_graphics:"get_graphics"})
});
var Main = function() {
	openfl_display_Sprite.call(this);
	this.addChild(new flixel_FlxGame(320,180,MenuState,4,60,60,true));
};
$hxClasses["Main"] = Main;
Main.__name__ = ["Main"];
Main.__super__ = openfl_display_Sprite;
Main.prototype = $extend(openfl_display_Sprite.prototype,{
	__class__: Main
});
var DocumentClass = function() {
	openfl_Lib.current.addChild(this);
	Main.call(this);
	this.dispatchEvent(new openfl_events_Event("addedToStage",false,false));
};
$hxClasses["DocumentClass"] = DocumentClass;
DocumentClass.__name__ = ["DocumentClass"];
DocumentClass.__super__ = Main;
DocumentClass.prototype = $extend(Main.prototype,{
	__class__: DocumentClass
});
var lime_AssetLibrary = function() {
	this.onChange = new lime_app_Event_$Void_$Void();
};
$hxClasses["lime.AssetLibrary"] = lime_AssetLibrary;
lime_AssetLibrary.__name__ = ["lime","AssetLibrary"];
lime_AssetLibrary.prototype = {
	exists: function(id,type) {
		return false;
	}
	,getAudioBuffer: function(id) {
		return null;
	}
	,getBytes: function(id) {
		return null;
	}
	,getFont: function(id) {
		return null;
	}
	,getImage: function(id) {
		return null;
	}
	,getPath: function(id) {
		return null;
	}
	,getText: function(id) {
		var bytes = this.getBytes(id);
		if(bytes == null) {
			return null;
		} else {
			return bytes.getString(0,bytes.length);
		}
	}
	,isLocal: function(id,type) {
		return true;
	}
	,list: function(type) {
		return null;
	}
	,load: function() {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis;
		});
	}
	,loadAudioBuffer: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getAudioBuffer(id);
		});
	}
	,loadBytes: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getBytes(id);
		});
	}
	,loadFont: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getFont(id);
		});
	}
	,loadImage: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getImage(id);
		});
	}
	,loadText: function(id) {
		return this.loadBytes(id).then(function(bytes) {
			return new lime_app_Future(function() {
				if(bytes == null) {
					return null;
				} else {
					return bytes.getString(0,bytes.length);
				}
			});
		});
	}
	,unload: function() {
	}
	,__class__: lime_AssetLibrary
};
var DefaultAssetLibrary = function() {
	this.type = new haxe_ds_StringMap();
	this.path = new haxe_ds_StringMap();
	this.className = new haxe_ds_StringMap();
	lime_AssetLibrary.call(this);
	var id = "assets/data/data-goes-here.txt";
	var _this = this.path;
	if(__map_reserved[id] != null) {
		_this.setReserved(id,id);
	} else {
		_this.h[id] = id;
	}
	var _this1 = this.type;
	var value = "TEXT";
	if(__map_reserved[id] != null) {
		_this1.setReserved(id,value);
	} else {
		_this1.h[id] = value;
	}
	id = "assets/fonts/ChevyRay - Express Mono.ttf";
	var _this2 = this.className;
	var value1 = _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf;
	if(__map_reserved[id] != null) {
		_this2.setReserved(id,value1);
	} else {
		_this2.h[id] = value1;
	}
	var _this3 = this.type;
	var value2 = "FONT";
	if(__map_reserved[id] != null) {
		_this3.setReserved(id,value2);
	} else {
		_this3.h[id] = value2;
	}
	id = "assets/fonts/ChevyRay - Express.ttf";
	var _this4 = this.className;
	var value3 = _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf;
	if(__map_reserved[id] != null) {
		_this4.setReserved(id,value3);
	} else {
		_this4.h[id] = value3;
	}
	var _this5 = this.type;
	var value4 = "FONT";
	if(__map_reserved[id] != null) {
		_this5.setReserved(id,value4);
	} else {
		_this5.h[id] = value4;
	}
	id = "assets/fonts/ChevyRay - Tentown.ttf";
	var _this6 = this.className;
	var value5 = _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf;
	if(__map_reserved[id] != null) {
		_this6.setReserved(id,value5);
	} else {
		_this6.h[id] = value5;
	}
	var _this7 = this.type;
	var value6 = "FONT";
	if(__map_reserved[id] != null) {
		_this7.setReserved(id,value6);
	} else {
		_this7.h[id] = value6;
	}
	id = "assets/images/bg.ase";
	var _this8 = this.path;
	if(__map_reserved[id] != null) {
		_this8.setReserved(id,id);
	} else {
		_this8.h[id] = id;
	}
	var _this9 = this.type;
	var value7 = "BINARY";
	if(__map_reserved[id] != null) {
		_this9.setReserved(id,value7);
	} else {
		_this9.h[id] = value7;
	}
	id = "assets/images/bg.aseprite";
	var _this10 = this.path;
	if(__map_reserved[id] != null) {
		_this10.setReserved(id,id);
	} else {
		_this10.h[id] = id;
	}
	var _this11 = this.type;
	var value8 = "BINARY";
	if(__map_reserved[id] != null) {
		_this11.setReserved(id,value8);
	} else {
		_this11.h[id] = value8;
	}
	id = "assets/images/bg2.aseprite";
	var _this12 = this.path;
	if(__map_reserved[id] != null) {
		_this12.setReserved(id,id);
	} else {
		_this12.h[id] = id;
	}
	var _this13 = this.type;
	var value9 = "BINARY";
	if(__map_reserved[id] != null) {
		_this13.setReserved(id,value9);
	} else {
		_this13.h[id] = value9;
	}
	id = "assets/images/bg3.aseprite";
	var _this14 = this.path;
	if(__map_reserved[id] != null) {
		_this14.setReserved(id,id);
	} else {
		_this14.h[id] = id;
	}
	var _this15 = this.type;
	var value10 = "BINARY";
	if(__map_reserved[id] != null) {
		_this15.setReserved(id,value10);
	} else {
		_this15.h[id] = value10;
	}
	id = "assets/images/bg_grass.png";
	var _this16 = this.path;
	if(__map_reserved[id] != null) {
		_this16.setReserved(id,id);
	} else {
		_this16.h[id] = id;
	}
	var _this17 = this.type;
	var value11 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this17.setReserved(id,value11);
	} else {
		_this17.h[id] = value11;
	}
	id = "assets/images/bg_trail.png";
	var _this18 = this.path;
	if(__map_reserved[id] != null) {
		_this18.setReserved(id,id);
	} else {
		_this18.h[id] = id;
	}
	var _this19 = this.type;
	var value12 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this19.setReserved(id,value12);
	} else {
		_this19.h[id] = value12;
	}
	id = "assets/images/explosion.aseprite";
	var _this20 = this.path;
	if(__map_reserved[id] != null) {
		_this20.setReserved(id,id);
	} else {
		_this20.h[id] = id;
	}
	var _this21 = this.type;
	var value13 = "BINARY";
	if(__map_reserved[id] != null) {
		_this21.setReserved(id,value13);
	} else {
		_this21.h[id] = value13;
	}
	id = "assets/images/explosion.png";
	var _this22 = this.path;
	if(__map_reserved[id] != null) {
		_this22.setReserved(id,id);
	} else {
		_this22.h[id] = id;
	}
	var _this23 = this.type;
	var value14 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this23.setReserved(id,value14);
	} else {
		_this23.h[id] = value14;
	}
	id = "assets/images/hotdog.aseprite";
	var _this24 = this.path;
	if(__map_reserved[id] != null) {
		_this24.setReserved(id,id);
	} else {
		_this24.h[id] = id;
	}
	var _this25 = this.type;
	var value15 = "BINARY";
	if(__map_reserved[id] != null) {
		_this25.setReserved(id,value15);
	} else {
		_this25.h[id] = value15;
	}
	id = "assets/images/hotdog1.png";
	var _this26 = this.path;
	if(__map_reserved[id] != null) {
		_this26.setReserved(id,id);
	} else {
		_this26.h[id] = id;
	}
	var _this27 = this.type;
	var value16 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this27.setReserved(id,value16);
	} else {
		_this27.h[id] = value16;
	}
	id = "assets/images/hotdog2.aseprite";
	var _this28 = this.path;
	if(__map_reserved[id] != null) {
		_this28.setReserved(id,id);
	} else {
		_this28.h[id] = id;
	}
	var _this29 = this.type;
	var value17 = "BINARY";
	if(__map_reserved[id] != null) {
		_this29.setReserved(id,value17);
	} else {
		_this29.h[id] = value17;
	}
	id = "assets/images/hotdog2.png";
	var _this30 = this.path;
	if(__map_reserved[id] != null) {
		_this30.setReserved(id,id);
	} else {
		_this30.h[id] = id;
	}
	var _this31 = this.type;
	var value18 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this31.setReserved(id,value18);
	} else {
		_this31.h[id] = value18;
	}
	id = "assets/images/hotdog3.png";
	var _this32 = this.path;
	if(__map_reserved[id] != null) {
		_this32.setReserved(id,id);
	} else {
		_this32.h[id] = id;
	}
	var _this33 = this.type;
	var value19 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this33.setReserved(id,value19);
	} else {
		_this33.h[id] = value19;
	}
	id = "assets/images/hotdog4.png";
	var _this34 = this.path;
	if(__map_reserved[id] != null) {
		_this34.setReserved(id,id);
	} else {
		_this34.h[id] = id;
	}
	var _this35 = this.type;
	var value20 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this35.setReserved(id,value20);
	} else {
		_this35.h[id] = value20;
	}
	id = "assets/images/hotdograin.aseprite";
	var _this36 = this.path;
	if(__map_reserved[id] != null) {
		_this36.setReserved(id,id);
	} else {
		_this36.h[id] = id;
	}
	var _this37 = this.type;
	var value21 = "BINARY";
	if(__map_reserved[id] != null) {
		_this37.setReserved(id,value21);
	} else {
		_this37.h[id] = value21;
	}
	id = "assets/images/hotdograin.png";
	var _this38 = this.path;
	if(__map_reserved[id] != null) {
		_this38.setReserved(id,id);
	} else {
		_this38.h[id] = id;
	}
	var _this39 = this.type;
	var value22 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this39.setReserved(id,value22);
	} else {
		_this39.h[id] = value22;
	}
	id = "assets/images/images-go-here.txt";
	var _this40 = this.path;
	if(__map_reserved[id] != null) {
		_this40.setReserved(id,id);
	} else {
		_this40.h[id] = id;
	}
	var _this41 = this.type;
	var value23 = "TEXT";
	if(__map_reserved[id] != null) {
		_this41.setReserved(id,value23);
	} else {
		_this41.h[id] = value23;
	}
	id = "assets/images/manu.aseprite";
	var _this42 = this.path;
	if(__map_reserved[id] != null) {
		_this42.setReserved(id,id);
	} else {
		_this42.h[id] = id;
	}
	var _this43 = this.type;
	var value24 = "BINARY";
	if(__map_reserved[id] != null) {
		_this43.setReserved(id,value24);
	} else {
		_this43.h[id] = value24;
	}
	id = "assets/images/menu.aseprite";
	var _this44 = this.path;
	if(__map_reserved[id] != null) {
		_this44.setReserved(id,id);
	} else {
		_this44.h[id] = id;
	}
	var _this45 = this.type;
	var value25 = "BINARY";
	if(__map_reserved[id] != null) {
		_this45.setReserved(id,value25);
	} else {
		_this45.h[id] = value25;
	}
	id = "assets/images/menu.png";
	var _this46 = this.path;
	if(__map_reserved[id] != null) {
		_this46.setReserved(id,id);
	} else {
		_this46.h[id] = id;
	}
	var _this47 = this.type;
	var value26 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this47.setReserved(id,value26);
	} else {
		_this47.h[id] = value26;
	}
	id = "assets/images/pin.aseprite";
	var _this48 = this.path;
	if(__map_reserved[id] != null) {
		_this48.setReserved(id,id);
	} else {
		_this48.h[id] = id;
	}
	var _this49 = this.type;
	var value27 = "BINARY";
	if(__map_reserved[id] != null) {
		_this49.setReserved(id,value27);
	} else {
		_this49.h[id] = value27;
	}
	id = "assets/images/pin.png";
	var _this50 = this.path;
	if(__map_reserved[id] != null) {
		_this50.setReserved(id,id);
	} else {
		_this50.h[id] = id;
	}
	var _this51 = this.type;
	var value28 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this51.setReserved(id,value28);
	} else {
		_this51.h[id] = value28;
	}
	id = "assets/images/shadow.png";
	var _this52 = this.path;
	if(__map_reserved[id] != null) {
		_this52.setReserved(id,id);
	} else {
		_this52.h[id] = id;
	}
	var _this53 = this.type;
	var value29 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this53.setReserved(id,value29);
	} else {
		_this53.h[id] = value29;
	}
	id = "assets/images/signbg.aseprite";
	var _this54 = this.path;
	if(__map_reserved[id] != null) {
		_this54.setReserved(id,id);
	} else {
		_this54.h[id] = id;
	}
	var _this55 = this.type;
	var value30 = "BINARY";
	if(__map_reserved[id] != null) {
		_this55.setReserved(id,value30);
	} else {
		_this55.h[id] = value30;
	}
	id = "assets/images/signbg.png";
	var _this56 = this.path;
	if(__map_reserved[id] != null) {
		_this56.setReserved(id,id);
	} else {
		_this56.h[id] = id;
	}
	var _this57 = this.type;
	var value31 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this57.setReserved(id,value31);
	} else {
		_this57.h[id] = value31;
	}
	id = "assets/images/truck.ase";
	var _this58 = this.path;
	if(__map_reserved[id] != null) {
		_this58.setReserved(id,id);
	} else {
		_this58.h[id] = id;
	}
	var _this59 = this.type;
	var value32 = "BINARY";
	if(__map_reserved[id] != null) {
		_this59.setReserved(id,value32);
	} else {
		_this59.h[id] = value32;
	}
	id = "assets/images/truck.aseprite";
	var _this60 = this.path;
	if(__map_reserved[id] != null) {
		_this60.setReserved(id,id);
	} else {
		_this60.h[id] = id;
	}
	var _this61 = this.type;
	var value33 = "BINARY";
	if(__map_reserved[id] != null) {
		_this61.setReserved(id,value33);
	} else {
		_this61.h[id] = value33;
	}
	id = "assets/images/truck_back.png";
	var _this62 = this.path;
	if(__map_reserved[id] != null) {
		_this62.setReserved(id,id);
	} else {
		_this62.h[id] = id;
	}
	var _this63 = this.type;
	var value34 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this63.setReserved(id,value34);
	} else {
		_this63.h[id] = value34;
	}
	id = "assets/images/truck_body.png";
	var _this64 = this.path;
	if(__map_reserved[id] != null) {
		_this64.setReserved(id,id);
	} else {
		_this64.h[id] = id;
	}
	var _this65 = this.type;
	var value35 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this65.setReserved(id,value35);
	} else {
		_this65.h[id] = value35;
	}
	id = "assets/images/truck_person.png";
	var _this66 = this.path;
	if(__map_reserved[id] != null) {
		_this66.setReserved(id,id);
	} else {
		_this66.h[id] = id;
	}
	var _this67 = this.type;
	var value36 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this67.setReserved(id,value36);
	} else {
		_this67.h[id] = value36;
	}
	id = "assets/images/truck_wheel.png";
	var _this68 = this.path;
	if(__map_reserved[id] != null) {
		_this68.setReserved(id,id);
	} else {
		_this68.h[id] = id;
	}
	var _this69 = this.type;
	var value37 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this69.setReserved(id,value37);
	} else {
		_this69.h[id] = value37;
	}
	id = "assets/music/music-goes-here.txt";
	var _this70 = this.path;
	if(__map_reserved[id] != null) {
		_this70.setReserved(id,id);
	} else {
		_this70.h[id] = id;
	}
	var _this71 = this.type;
	var value38 = "TEXT";
	if(__map_reserved[id] != null) {
		_this71.setReserved(id,value38);
	} else {
		_this71.h[id] = value38;
	}
	id = "assets/music/music.wav";
	var _this72 = this.path;
	if(__map_reserved[id] != null) {
		_this72.setReserved(id,id);
	} else {
		_this72.h[id] = id;
	}
	var _this73 = this.type;
	var value39 = "SOUND";
	if(__map_reserved[id] != null) {
		_this73.setReserved(id,value39);
	} else {
		_this73.h[id] = value39;
	}
	id = "assets/sounds/bonus.wav";
	var _this74 = this.path;
	if(__map_reserved[id] != null) {
		_this74.setReserved(id,id);
	} else {
		_this74.h[id] = id;
	}
	var _this75 = this.type;
	var value40 = "SOUND";
	if(__map_reserved[id] != null) {
		_this75.setReserved(id,value40);
	} else {
		_this75.h[id] = value40;
	}
	id = "assets/sounds/engine.wav";
	var _this76 = this.path;
	if(__map_reserved[id] != null) {
		_this76.setReserved(id,id);
	} else {
		_this76.h[id] = id;
	}
	var _this77 = this.type;
	var value41 = "SOUND";
	if(__map_reserved[id] != null) {
		_this77.setReserved(id,value41);
	} else {
		_this77.h[id] = value41;
	}
	id = "assets/sounds/explode1.wav";
	var _this78 = this.path;
	if(__map_reserved[id] != null) {
		_this78.setReserved(id,id);
	} else {
		_this78.h[id] = id;
	}
	var _this79 = this.type;
	var value42 = "SOUND";
	if(__map_reserved[id] != null) {
		_this79.setReserved(id,value42);
	} else {
		_this79.h[id] = value42;
	}
	id = "assets/sounds/explode2.wav";
	var _this80 = this.path;
	if(__map_reserved[id] != null) {
		_this80.setReserved(id,id);
	} else {
		_this80.h[id] = id;
	}
	var _this81 = this.type;
	var value43 = "SOUND";
	if(__map_reserved[id] != null) {
		_this81.setReserved(id,value43);
	} else {
		_this81.h[id] = value43;
	}
	id = "assets/sounds/explode3.wav";
	var _this82 = this.path;
	if(__map_reserved[id] != null) {
		_this82.setReserved(id,id);
	} else {
		_this82.h[id] = id;
	}
	var _this83 = this.type;
	var value44 = "SOUND";
	if(__map_reserved[id] != null) {
		_this83.setReserved(id,value44);
	} else {
		_this83.h[id] = value44;
	}
	id = "assets/sounds/hit1.wav";
	var _this84 = this.path;
	if(__map_reserved[id] != null) {
		_this84.setReserved(id,id);
	} else {
		_this84.h[id] = id;
	}
	var _this85 = this.type;
	var value45 = "SOUND";
	if(__map_reserved[id] != null) {
		_this85.setReserved(id,value45);
	} else {
		_this85.h[id] = value45;
	}
	id = "assets/sounds/hit2.wav";
	var _this86 = this.path;
	if(__map_reserved[id] != null) {
		_this86.setReserved(id,id);
	} else {
		_this86.h[id] = id;
	}
	var _this87 = this.type;
	var value46 = "SOUND";
	if(__map_reserved[id] != null) {
		_this87.setReserved(id,value46);
	} else {
		_this87.h[id] = value46;
	}
	id = "assets/sounds/hit3.wav";
	var _this88 = this.path;
	if(__map_reserved[id] != null) {
		_this88.setReserved(id,id);
	} else {
		_this88.h[id] = id;
	}
	var _this89 = this.type;
	var value47 = "SOUND";
	if(__map_reserved[id] != null) {
		_this89.setReserved(id,value47);
	} else {
		_this89.h[id] = value47;
	}
	id = "assets/sounds/hit4.wav";
	var _this90 = this.path;
	if(__map_reserved[id] != null) {
		_this90.setReserved(id,id);
	} else {
		_this90.h[id] = id;
	}
	var _this91 = this.type;
	var value48 = "SOUND";
	if(__map_reserved[id] != null) {
		_this91.setReserved(id,value48);
	} else {
		_this91.h[id] = value48;
	}
	id = "assets/sounds/sounds-go-here.txt";
	var _this92 = this.path;
	if(__map_reserved[id] != null) {
		_this92.setReserved(id,id);
	} else {
		_this92.h[id] = id;
	}
	var _this93 = this.type;
	var value49 = "TEXT";
	if(__map_reserved[id] != null) {
		_this93.setReserved(id,value49);
	} else {
		_this93.h[id] = value49;
	}
	id = "flixel/sounds/beep.ogg";
	var _this94 = this.path;
	if(__map_reserved[id] != null) {
		_this94.setReserved(id,id);
	} else {
		_this94.h[id] = id;
	}
	var _this95 = this.type;
	var value50 = "SOUND";
	if(__map_reserved[id] != null) {
		_this95.setReserved(id,value50);
	} else {
		_this95.h[id] = value50;
	}
	id = "flixel/sounds/flixel.ogg";
	var _this96 = this.path;
	if(__map_reserved[id] != null) {
		_this96.setReserved(id,id);
	} else {
		_this96.h[id] = id;
	}
	var _this97 = this.type;
	var value51 = "SOUND";
	if(__map_reserved[id] != null) {
		_this97.setReserved(id,value51);
	} else {
		_this97.h[id] = value51;
	}
	id = "flixel/fonts/nokiafc22.ttf";
	var _this98 = this.className;
	var value52 = _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf;
	if(__map_reserved[id] != null) {
		_this98.setReserved(id,value52);
	} else {
		_this98.h[id] = value52;
	}
	var _this99 = this.type;
	var value53 = "FONT";
	if(__map_reserved[id] != null) {
		_this99.setReserved(id,value53);
	} else {
		_this99.h[id] = value53;
	}
	id = "flixel/fonts/monsterrat.ttf";
	var _this100 = this.className;
	var value54 = _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf;
	if(__map_reserved[id] != null) {
		_this100.setReserved(id,value54);
	} else {
		_this100.h[id] = value54;
	}
	var _this101 = this.type;
	var value55 = "FONT";
	if(__map_reserved[id] != null) {
		_this101.setReserved(id,value55);
	} else {
		_this101.h[id] = value55;
	}
	id = "flixel/images/ui/button.png";
	var _this102 = this.path;
	if(__map_reserved[id] != null) {
		_this102.setReserved(id,id);
	} else {
		_this102.h[id] = id;
	}
	var _this103 = this.type;
	var value56 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this103.setReserved(id,value56);
	} else {
		_this103.h[id] = value56;
	}
	id = "flixel/images/logo/default.png";
	var _this104 = this.path;
	if(__map_reserved[id] != null) {
		_this104.setReserved(id,id);
	} else {
		_this104.h[id] = id;
	}
	var _this105 = this.type;
	var value57 = "IMAGE";
	if(__map_reserved[id] != null) {
		_this105.setReserved(id,value57);
	} else {
		_this105.h[id] = value57;
	}
	var assetsPrefix = null;
	if(ApplicationMain.config != null && Object.prototype.hasOwnProperty.call(ApplicationMain.config,"assetsPrefix")) {
		assetsPrefix = ApplicationMain.config.assetsPrefix;
	}
	if(assetsPrefix != null) {
		var k = this.path.keys();
		while(k.hasNext()) {
			var k1 = k.next();
			var this1 = this.path;
			var _this106 = this.path;
			var value58 = assetsPrefix + (__map_reserved[k1] != null ? _this106.getReserved(k1) : _this106.h[k1]);
			var _this107 = this1;
			if(__map_reserved[k1] != null) {
				_this107.setReserved(k1,value58);
			} else {
				_this107.h[k1] = value58;
			}
		}
	}
};
$hxClasses["DefaultAssetLibrary"] = DefaultAssetLibrary;
DefaultAssetLibrary.__name__ = ["DefaultAssetLibrary"];
DefaultAssetLibrary.__super__ = lime_AssetLibrary;
DefaultAssetLibrary.prototype = $extend(lime_AssetLibrary.prototype,{
	exists: function(id,type) {
		var requestedType = type != null ? js_Boot.__cast(type , String) : null;
		var _this = this.type;
		var assetType = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		if(assetType != null) {
			if(assetType == requestedType || (requestedType == "SOUND" || requestedType == "MUSIC") && (assetType == "MUSIC" || assetType == "SOUND")) {
				return true;
			}
			if(requestedType == "BINARY" || requestedType == null || assetType == "BINARY" && requestedType == "TEXT") {
				return true;
			}
		}
		return false;
	}
	,getAudioBuffer: function(id) {
		return null;
	}
	,getBytes: function(id) {
		var this1 = lime_app_Preloader.loaders;
		var _this = this.path;
		var key = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		var _this1 = this1;
		var loader = __map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key];
		if(loader == null) {
			return null;
		}
		var bytes = loader.bytes;
		if(bytes != null) {
			return bytes;
		} else {
			return null;
		}
	}
	,getFont: function(id) {
		var _this = this.className;
		return js_Boot.__cast(Type.createInstance(__map_reserved[id] != null ? _this.getReserved(id) : _this.h[id],[]) , lime_text_Font);
	}
	,getImage: function(id) {
		var this1 = lime_app_Preloader.images;
		var _this = this.path;
		var key = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		var _this1 = this1;
		return lime_graphics_Image.fromImageElement(__map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key]);
	}
	,getPath: function(id) {
		var _this = this.path;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,getText: function(id) {
		var this1 = lime_app_Preloader.loaders;
		var _this = this.path;
		var key = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		var _this1 = this1;
		var loader = __map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key];
		if(loader == null) {
			return null;
		}
		var bytes = loader.bytes;
		if(bytes != null) {
			return bytes.getString(0,bytes.length);
		} else {
			return null;
		}
	}
	,isLocal: function(id,type) {
		var requestedType = type != null ? js_Boot.__cast(type , String) : null;
		return true;
	}
	,list: function(type) {
		var requestedType = type != null ? js_Boot.__cast(type , String) : null;
		var items = [];
		var id = this.type.keys();
		while(id.hasNext()) {
			var id1 = id.next();
			if(requestedType == null || this.exists(id1,type)) {
				items.push(id1);
			}
		}
		return items;
	}
	,loadAudioBuffer: function(id) {
		var _gthis = this;
		var promise = new lime_app_Promise();
		promise.completeWith(new lime_app_Future(function() {
			return _gthis.getAudioBuffer(id);
		}));
		return promise.future;
	}
	,loadBytes: function(id) {
		var promise = new lime_app_Promise();
		var _this = this.path;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var request = new lime_net_HTTPRequest();
			var _this1 = this.path;
			promise.completeWith(request.load((__map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id]) + "?" + lime_Assets.cache.version));
		} else {
			promise.complete(this.getBytes(id));
		}
		return promise.future;
	}
	,loadImage: function(id) {
		var promise = new lime_app_Promise();
		var _this = this.path;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var image = new Image();
			image.onload = function(_) {
				var tmp = lime_graphics_Image.fromImageElement(image);
				promise.complete(tmp);
			};
			image.onerror = $bind(promise,promise.error);
			var _this1 = this.path;
			var tmp1 = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
			image.src = tmp1 + "?" + lime_Assets.cache.version;
		} else {
			var tmp2 = this.getImage(id);
			promise.complete(tmp2);
		}
		return promise.future;
	}
	,loadText: function(id) {
		var promise = new lime_app_Promise();
		var _this = this.path;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var request = new lime_net_HTTPRequest();
			var _this1 = this.path;
			var future = request.load((__map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id]) + "?" + lime_Assets.cache.version);
			future.onProgress(function(progress) {
				promise.progress(progress);
			});
			future.onError(function(msg) {
				promise.error(msg);
			});
			future.onComplete(function(bytes) {
				var tmp = bytes.getString(0,bytes.length);
				promise.complete(tmp);
			});
		} else {
			var tmp1 = this.getText(id);
			promise.complete(tmp1);
		}
		return promise.future;
	}
	,__class__: DefaultAssetLibrary
});
var lime_text_Font = function(name) {
	if(name != null) {
		this.name = name;
	}
	if(this.__fontPath != null) {
		this.__fromFile(this.__fontPath);
	}
};
$hxClasses["lime.text.Font"] = lime_text_Font;
lime_text_Font.__name__ = ["lime","text","Font"];
lime_text_Font.fromBytes = function(bytes) {
	var font = new lime_text_Font();
	font.__fromBytes(bytes);
	return font;
};
lime_text_Font.fromFile = function(path) {
	var font = new lime_text_Font();
	font.__fromFile(path);
	return font;
};
lime_text_Font.prototype = {
	decompose: function() {
		return null;
	}
	,getGlyph: function(character) {
		return -1;
	}
	,getGlyphs: function(characters) {
		if(characters == null) {
			characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. ";
		}
		return null;
	}
	,getGlyphMetrics: function(glyph) {
		return null;
	}
	,renderGlyph: function(glyph,fontSize) {
		return null;
	}
	,renderGlyphs: function(glyphs,fontSize) {
		return null;
	}
	,__fromBytes: function(bytes) {
		this.__fontPath = null;
	}
	,__fromFile: function(path) {
		this.__fontPath = path;
	}
	,__setSize: function(size) {
	}
	,get_ascender: function() {
		return 0;
	}
	,get_descender: function() {
		return 0;
	}
	,get_height: function() {
		return 0;
	}
	,get_numGlyphs: function() {
		return 0;
	}
	,get_underlinePosition: function() {
		return 0;
	}
	,get_underlineThickness: function() {
		return 0;
	}
	,get_unitsPerEM: function() {
		return 0;
	}
	,__class__: lime_text_Font
	,__properties__: {get_unitsPerEM:"get_unitsPerEM",get_underlineThickness:"get_underlineThickness",get_underlinePosition:"get_underlinePosition",get_numGlyphs:"get_numGlyphs",get_height:"get_height",get_descender:"get_descender",get_ascender:"get_ascender"}
};
var _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "ChevyRay - Express Mono Regular";
};
$hxClasses["__ASSET__assets_fonts_chevyray___express_mono_ttf"] = _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf;
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf.__name__ = ["__ASSET__assets_fonts_chevyray___express_mono_ttf"];
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$mono_$ttf
});
var _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "ChevyRay - Express Regular";
};
$hxClasses["__ASSET__assets_fonts_chevyray___express_ttf"] = _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf;
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf.__name__ = ["__ASSET__assets_fonts_chevyray___express_ttf"];
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$express_$ttf
});
var _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "ChevyRay - Tentown Regular";
};
$hxClasses["__ASSET__assets_fonts_chevyray___tentown_ttf"] = _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf;
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf.__name__ = ["__ASSET__assets_fonts_chevyray___tentown_ttf"];
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$assets_$fonts_$chevyray_$_$_$tentown_$ttf
});
var _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "Nokia Cellphone FC Small";
};
$hxClasses["__ASSET__flixel_fonts_nokiafc22_ttf"] = _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf;
_$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf.__name__ = ["__ASSET__flixel_fonts_nokiafc22_ttf"];
_$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf
});
var _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "Monsterrat";
};
$hxClasses["__ASSET__flixel_fonts_monsterrat_ttf"] = _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf;
_$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf.__name__ = ["__ASSET__flixel_fonts_monsterrat_ttf"];
_$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf
});
var EReg = function(r,opt) {
	this.r = new RegExp(r,opt.split("u").join(""));
};
$hxClasses["EReg"] = EReg;
EReg.__name__ = ["EReg"];
EReg.prototype = {
	match: function(s) {
		if(this.r.global) {
			this.r.lastIndex = 0;
		}
		this.r.m = this.r.exec(s);
		this.r.s = s;
		return this.r.m != null;
	}
	,matched: function(n) {
		if(this.r.m != null && n >= 0 && n < this.r.m.length) {
			return this.r.m[n];
		} else {
			throw new js__$Boot_HaxeError("EReg::matched");
		}
	}
	,split: function(s) {
		var d = "#__delim__#";
		return s.replace(this.r,d).split(d);
	}
	,__class__: EReg
};
var HxOverrides = function() { };
$hxClasses["HxOverrides"] = HxOverrides;
HxOverrides.__name__ = ["HxOverrides"];
HxOverrides.strDate = function(s) {
	var _g = s.length;
	switch(_g) {
	case 8:
		var k = s.split(":");
		var d = new Date();
		d["setTime"](0);
		d["setUTCHours"](k[0]);
		d["setUTCMinutes"](k[1]);
		d["setUTCSeconds"](k[2]);
		return d;
	case 10:
		var k1 = s.split("-");
		return new Date(k1[0],k1[1] - 1,k1[2],0,0,0);
	case 19:
		var k2 = s.split(" ");
		var y = k2[0].split("-");
		var t = k2[1].split(":");
		return new Date(y[0],y[1] - 1,y[2],t[0],t[1],t[2]);
	default:
		throw new js__$Boot_HaxeError("Invalid date format : " + s);
	}
};
HxOverrides.cca = function(s,index) {
	var x = s.charCodeAt(index);
	if(x != x) {
		return undefined;
	}
	return x;
};
HxOverrides.substr = function(s,pos,len) {
	if(len == null) {
		len = s.length;
	} else if(len < 0) {
		if(pos == 0) {
			len = s.length + len;
		} else {
			return "";
		}
	}
	return s.substr(pos,len);
};
HxOverrides.remove = function(a,obj) {
	var i = a.indexOf(obj);
	if(i == -1) {
		return false;
	}
	a.splice(i,1);
	return true;
};
HxOverrides.iter = function(a) {
	return { cur : 0, arr : a, hasNext : function() {
		return this.cur < this.arr.length;
	}, next : function() {
		return this.arr[this.cur++];
	}};
};
var Lambda = function() { };
$hxClasses["Lambda"] = Lambda;
Lambda.__name__ = ["Lambda"];
Lambda.array = function(it) {
	var a = [];
	var i = $iterator(it)();
	while(i.hasNext()) {
		var i1 = i.next();
		a.push(i1);
	}
	return a;
};
var List = function() {
	this.length = 0;
};
$hxClasses["List"] = List;
List.__name__ = ["List"];
List.prototype = {
	add: function(item) {
		var x = new _$List_ListNode(item,null);
		if(this.h == null) {
			this.h = x;
		} else {
			this.q.next = x;
		}
		this.q = x;
		this.length++;
	}
	,pop: function() {
		if(this.h == null) {
			return null;
		}
		var x = this.h.item;
		this.h = this.h.next;
		if(this.h == null) {
			this.q = null;
		}
		this.length--;
		return x;
	}
	,iterator: function() {
		return new _$List_ListIterator(this.h);
	}
	,__class__: List
};
var _$List_ListNode = function(item,next) {
	this.item = item;
	this.next = next;
};
$hxClasses["_List.ListNode"] = _$List_ListNode;
_$List_ListNode.__name__ = ["_List","ListNode"];
_$List_ListNode.prototype = {
	__class__: _$List_ListNode
};
var _$List_ListIterator = function(head) {
	this.head = head;
};
$hxClasses["_List.ListIterator"] = _$List_ListIterator;
_$List_ListIterator.__name__ = ["_List","ListIterator"];
_$List_ListIterator.prototype = {
	hasNext: function() {
		return this.head != null;
	}
	,next: function() {
		var val = this.head.item;
		this.head = this.head.next;
		return val;
	}
	,__class__: _$List_ListIterator
};
Math.__name__ = ["Math"];
var flixel_util_IFlxDestroyable = function() { };
$hxClasses["flixel.util.IFlxDestroyable"] = flixel_util_IFlxDestroyable;
flixel_util_IFlxDestroyable.__name__ = ["flixel","util","IFlxDestroyable"];
flixel_util_IFlxDestroyable.prototype = {
	__class__: flixel_util_IFlxDestroyable
};
var flixel_FlxBasic = function() {
	this.flixelType = 0;
	this.exists = true;
	this.alive = true;
	this.visible = true;
	this.active = true;
	this.ID = -1;
};
$hxClasses["flixel.FlxBasic"] = flixel_FlxBasic;
flixel_FlxBasic.__name__ = ["flixel","FlxBasic"];
flixel_FlxBasic.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_FlxBasic.prototype = {
	destroy: function() {
		this.set_exists(false);
		this._cameras = null;
	}
	,kill: function() {
		this.set_alive(false);
		this.set_exists(false);
	}
	,revive: function() {
		this.set_alive(true);
		this.set_exists(true);
	}
	,update: function(elapsed) {
	}
	,draw: function() {
	}
	,toString: function() {
		var value = this.active;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "active";
		_this.value = value;
		var value1 = this.visible;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "visible";
		_this1.value = value1;
		var value2 = this.alive;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "alive";
		_this2.value = value2;
		var value3 = this.exists;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "exists";
		_this3.value = value3;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
	}
	,set_visible: function(Value) {
		return this.visible = Value;
	}
	,set_active: function(Value) {
		return this.active = Value;
	}
	,set_exists: function(Value) {
		return this.exists = Value;
	}
	,set_alive: function(Value) {
		return this.alive = Value;
	}
	,get_camera: function() {
		if(this._cameras == null || this._cameras.length == 0) {
			return flixel_FlxCamera.defaultCameras[0];
		} else {
			return this._cameras[0];
		}
	}
	,set_camera: function(Value) {
		if(this._cameras == null) {
			this._cameras = [Value];
		} else {
			this._cameras[0] = Value;
		}
		return Value;
	}
	,get_cameras: function() {
		if(this._cameras == null) {
			return flixel_FlxCamera.defaultCameras;
		} else {
			return this._cameras;
		}
	}
	,set_cameras: function(Value) {
		return this._cameras = Value;
	}
	,__class__: flixel_FlxBasic
	,__properties__: {set_cameras:"set_cameras",get_cameras:"get_cameras",set_camera:"set_camera",get_camera:"get_camera",set_exists:"set_exists",set_alive:"set_alive",set_visible:"set_visible",set_active:"set_active"}
};
var flixel_group_FlxTypedGroup = function(MaxSize) {
	if(MaxSize == null) {
		MaxSize = 0;
	}
	this._marker = 0;
	this.length = 0;
	flixel_FlxBasic.call(this);
	this.members = [];
	this.set_maxSize(Math.abs(MaxSize) | 0);
	this.flixelType = 2;
};
$hxClasses["flixel.group.FlxTypedGroup"] = flixel_group_FlxTypedGroup;
flixel_group_FlxTypedGroup.__name__ = ["flixel","group","FlxTypedGroup"];
flixel_group_FlxTypedGroup.overlaps = function(Callback,Group,X,Y,InScreenSpace,Camera) {
	var result = false;
	if(Group != null) {
		var i = 0;
		var l = Group.length;
		var basic;
		while(i < l) {
			basic = Group.members[i++];
			if(basic != null && Callback(basic,X,Y,InScreenSpace,Camera)) {
				result = true;
				break;
			}
		}
	}
	return result;
};
flixel_group_FlxTypedGroup.resolveGroup = function(ObjectOrGroup) {
	var group = null;
	if(ObjectOrGroup != null) {
		if(ObjectOrGroup.flixelType == 2) {
			group = ObjectOrGroup;
		} else if(ObjectOrGroup.flixelType == 4) {
			var spriteGroup = ObjectOrGroup;
			group = spriteGroup.group;
		}
	}
	return group;
};
flixel_group_FlxTypedGroup.__super__ = flixel_FlxBasic;
flixel_group_FlxTypedGroup.prototype = $extend(flixel_FlxBasic.prototype,{
	destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		if(this.members != null) {
			var i = 0;
			var basic = null;
			while(i < this.length) {
				basic = this.members[i++];
				if(basic != null) {
					basic.destroy();
				}
			}
			this.members = null;
		}
	}
	,update: function(elapsed) {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.active) {
				basic.update(elapsed);
			}
		}
	}
	,draw: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.visible) {
				basic.draw();
			}
		}
	}
	,add: function(Object) {
		if(Object == null) {
			var _this = flixel_FlxG.log;
			return null;
		}
		if(this.members.indexOf(Object) >= 0) {
			return Object;
		}
		var index = this.getFirstNull();
		if(index != -1) {
			this.members[index] = Object;
			if(index >= this.length) {
				this.length = index + 1;
			}
			return Object;
		}
		if(this.maxSize > 0 && this.length >= this.maxSize) {
			return Object;
		}
		this.members.push(Object);
		this.length++;
		return Object;
	}
	,insert: function(position,object) {
		if(object == null) {
			var _this = flixel_FlxG.log;
			return null;
		}
		if(this.members.indexOf(object) >= 0) {
			return object;
		}
		if(position < this.length && this.members[position] == null) {
			this.members[position] = object;
			return object;
		}
		if(this.maxSize > 0 && this.length >= this.maxSize) {
			return object;
		}
		this.members.splice(position,0,object);
		this.length++;
		return object;
	}
	,recycle: function(ObjectClass,ObjectFactory,Force,Revive) {
		if(Revive == null) {
			Revive = true;
		}
		if(Force == null) {
			Force = false;
		}
		var basic = null;
		if(this.maxSize > 0) {
			if(this.length < this.maxSize) {
				var object = null;
				if(ObjectFactory != null) {
					object = ObjectFactory();
					this.add(object);
				} else if(ObjectClass != null) {
					object = Type.createInstance(ObjectClass,[]);
					this.add(object);
				}
				return object;
			} else {
				basic = this.members[this._marker++];
				if(this._marker >= this.maxSize) {
					this._marker = 0;
				}
				if(Revive) {
					basic.revive();
				}
				return basic;
			}
		} else {
			basic = this.getFirstAvailable(ObjectClass,Force);
			if(basic != null) {
				if(Revive) {
					basic.revive();
				}
				return basic;
			}
			var object1 = null;
			if(ObjectFactory != null) {
				object1 = ObjectFactory();
				this.add(object1);
			} else if(ObjectClass != null) {
				object1 = Type.createInstance(ObjectClass,[]);
				this.add(object1);
			}
			return object1;
		}
	}
	,recycleCreateObject: function(ObjectClass,ObjectFactory) {
		var object = null;
		if(ObjectFactory != null) {
			object = ObjectFactory();
			this.add(object);
		} else if(ObjectClass != null) {
			object = Type.createInstance(ObjectClass,[]);
			this.add(object);
		}
		return object;
	}
	,remove: function(Object,Splice) {
		if(Splice == null) {
			Splice = false;
		}
		if(this.members == null) {
			return null;
		}
		var index = this.members.indexOf(Object);
		if(index < 0) {
			return null;
		}
		if(Splice) {
			this.members.splice(index,1);
			this.length--;
		} else {
			this.members[index] = null;
		}
		return Object;
	}
	,replace: function(OldObject,NewObject) {
		var index = this.members.indexOf(OldObject);
		if(index < 0) {
			return null;
		}
		this.members[index] = NewObject;
		return NewObject;
	}
	,sort: function(Function,Order) {
		if(Order == null) {
			Order = -1;
		}
		var f = Function;
		var a1 = Order;
		var tmp = function(a2,a3) {
			return f(a1,a2,a3);
		};
		this.members.sort(tmp);
	}
	,getFirstAvailable: function(ObjectClass,Force) {
		if(Force == null) {
			Force = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.exists && (ObjectClass == null || js_Boot.__instanceof(basic,ObjectClass))) {
				if(Force && Type.getClassName(basic == null ? null : js_Boot.getClass(basic)) != Type.getClassName(ObjectClass)) {
					continue;
				}
				return this.members[i - 1];
			}
		}
		return null;
	}
	,getFirstNull: function() {
		var i = 0;
		while(i < this.length) {
			if(this.members[i] == null) {
				return i;
			}
			++i;
		}
		return -1;
	}
	,getFirstExisting: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists) {
				return basic;
			}
		}
		return null;
	}
	,getFirstAlive: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.alive) {
				return basic;
			}
		}
		return null;
	}
	,getFirstDead: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.alive) {
				return basic;
			}
		}
		return null;
	}
	,countLiving: function() {
		var i = 0;
		var count = -1;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(count < 0) {
					count = 0;
				}
				if(basic.exists && basic.alive) {
					++count;
				}
			}
		}
		return count;
	}
	,countDead: function() {
		var i = 0;
		var count = -1;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(count < 0) {
					count = 0;
				}
				if(!basic.alive) {
					++count;
				}
			}
		}
		return count;
	}
	,getRandom: function(StartIndex,Length) {
		if(Length == null) {
			Length = 0;
		}
		if(StartIndex == null) {
			StartIndex = 0;
		}
		if(StartIndex < 0) {
			StartIndex = 0;
		}
		if(Length <= 0) {
			Length = this.length;
		}
		return flixel_FlxG.random.getObject_flixel_group_FlxTypedGroup_T(this.members,null,StartIndex,Length);
	}
	,clear: function() {
		this.length = 0;
		flixel_util_FlxArrayUtil.clearArray(this.members);
	}
	,kill: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists) {
				basic.kill();
			}
		}
		flixel_FlxBasic.prototype.kill.call(this);
	}
	,revive: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.exists) {
				basic.revive();
			}
		}
		flixel_FlxBasic.prototype.revive.call(this);
	}
	,iterator: function(filter) {
		return new flixel_group_FlxTypedGroupIterator(this.members,filter);
	}
	,forEach: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEach(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachAlive: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.alive) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachAlive(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachDead: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.alive) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachDead(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachExists: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachExists(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachOfType: function(ObjectClass,Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachOfType(ObjectClass,Function,Recurse);
					}
				}
				if(js_Boot.__instanceof(basic,ObjectClass)) {
					Function(basic);
				}
			}
		}
	}
	,set_maxSize: function(Size) {
		this.maxSize = Math.abs(Size) | 0;
		if(this._marker >= this.maxSize) {
			this._marker = 0;
		}
		if(this.maxSize == 0 || this.members == null || this.maxSize >= this.length) {
			return this.maxSize;
		}
		var i = this.maxSize;
		var l = this.length;
		var basic = null;
		while(i < l) {
			basic = this.members[i++];
			if(basic != null) {
				basic.destroy();
			}
		}
		flixel_util_FlxArrayUtil.setLength_flixel_group_FlxTypedGroup_T(this.members,this.maxSize);
		this.length = this.members.length;
		return this.maxSize;
	}
	,__class__: flixel_group_FlxTypedGroup
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_maxSize:"set_maxSize"})
});
var flixel_FlxState = function(MaxSize) {
	this._requestSubStateReset = false;
	this.destroySubStates = true;
	this.persistentDraw = true;
	this.persistentUpdate = false;
	flixel_group_FlxTypedGroup.call(this,MaxSize);
};
$hxClasses["flixel.FlxState"] = flixel_FlxState;
flixel_FlxState.__name__ = ["flixel","FlxState"];
flixel_FlxState.__super__ = flixel_group_FlxTypedGroup;
flixel_FlxState.prototype = $extend(flixel_group_FlxTypedGroup.prototype,{
	create: function() {
	}
	,draw: function() {
		if(this.persistentDraw || this.subState == null) {
			flixel_group_FlxTypedGroup.prototype.draw.call(this);
		}
		if(this.subState != null) {
			this.subState.draw();
		}
	}
	,openSubState: function(SubState) {
		this._requestSubStateReset = true;
		this._requestedSubState = SubState;
	}
	,closeSubState: function() {
		this._requestSubStateReset = true;
	}
	,resetSubState: function() {
		if(this.subState != null) {
			if(this.subState.closeCallback != null) {
				this.subState.closeCallback();
			}
			if(this.destroySubStates) {
				this.subState.destroy();
			}
		}
		this.subState = this._requestedSubState;
		this._requestedSubState = null;
		if(this.subState != null) {
			if(!this.persistentUpdate) {
				flixel_FlxG.inputs.onStateSwitch();
			}
			this.subState._parentState = this;
			if(!this.subState._created) {
				this.subState._created = true;
				this.subState.create();
			}
			if(this.subState.openCallback != null) {
				this.subState.openCallback();
			}
		}
	}
	,destroy: function() {
		if(this.subState != null) {
			this.subState.destroy();
			this.subState = null;
		}
		flixel_group_FlxTypedGroup.prototype.destroy.call(this);
	}
	,switchTo: function(nextState) {
		return true;
	}
	,onFocusLost: function() {
	}
	,onFocus: function() {
	}
	,onResize: function(Width,Height) {
	}
	,tryUpdate: function(elapsed) {
		if(this.persistentUpdate || this.subState == null) {
			this.update(elapsed);
		}
		if(this._requestSubStateReset) {
			this._requestSubStateReset = false;
			this.resetSubState();
		} else if(this.subState != null) {
			this.subState.tryUpdate(elapsed);
		}
	}
	,get_bgColor: function() {
		return flixel_FlxG.cameras.get_bgColor();
	}
	,set_bgColor: function(Value) {
		return flixel_FlxG.cameras.set_bgColor(Value);
	}
	,__class__: flixel_FlxState
	,__properties__: $extend(flixel_group_FlxTypedGroup.prototype.__properties__,{set_bgColor:"set_bgColor",get_bgColor:"get_bgColor"})
});
var MenuState = function(MaxSize) {
	flixel_FlxState.call(this,MaxSize);
};
$hxClasses["MenuState"] = MenuState;
MenuState.__name__ = ["MenuState"];
MenuState.__super__ = flixel_FlxState;
MenuState.prototype = $extend(flixel_FlxState.prototype,{
	create: function() {
		flixel_FlxG.camera.flash(0,.5);
		flixel_FlxG.sound.playMusic("assets/music/music.wav",1,true);
		var _bg = new flixel_FlxSprite(0,0);
		_bg.loadGraphic("assets/images/menu.png",false,320,180);
		this.add(_bg);
		flixel_FlxState.prototype.create.call(this);
	}
	,destroy: function() {
		flixel_FlxState.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		this.checkEnterButton();
		flixel_FlxState.prototype.update.call(this,elapsed);
	}
	,playGame: function() {
		var _this = flixel_FlxG.log;
		var nextState = new PlayState();
		if(flixel_FlxG.game._state.switchTo(nextState)) {
			flixel_FlxG.game._requestedState = nextState;
		}
		var _this1 = flixel_FlxG.log;
	}
	,checkEnterButton: function() {
		if(flixel_FlxG.keys.checkKeyArrayState([32],-1)) {
			this.playGame();
			var _this = flixel_FlxG.log;
		}
	}
	,__class__: MenuState
});
var NMEPreloader = function() {
	openfl_display_Sprite.call(this);
	var backgroundColor = this.getBackgroundColor();
	var r = backgroundColor >> 16 & 255;
	var g = backgroundColor >> 8 & 255;
	var b = backgroundColor & 255;
	var perceivedLuminosity = 0.299 * r + 0.587 * g + 0.114 * b;
	var color = 0;
	if(perceivedLuminosity < 70) {
		color = 16777215;
	}
	var x = 30;
	var height = 7;
	var y = this.getHeight() / 2 - height / 2;
	var width = this.getWidth() - x * 2;
	var padding = 2;
	this.outline = new openfl_display_Sprite();
	this.outline.get_graphics().beginFill(color,0.07);
	this.outline.get_graphics().drawRect(0,0,width,height);
	this.outline.set_x(x);
	this.outline.set_y(y);
	this.addChild(this.outline);
	this.progress = new openfl_display_Sprite();
	this.progress.get_graphics().beginFill(color,0.35);
	this.progress.get_graphics().drawRect(0,0,width - padding * 2,height - padding * 2);
	this.progress.set_x(x + padding);
	this.progress.set_y(y + padding);
	this.progress.set_scaleX(0);
	this.addChild(this.progress);
};
$hxClasses["NMEPreloader"] = NMEPreloader;
NMEPreloader.__name__ = ["NMEPreloader"];
NMEPreloader.__super__ = openfl_display_Sprite;
NMEPreloader.prototype = $extend(openfl_display_Sprite.prototype,{
	getBackgroundColor: function() {
		return 0;
	}
	,getHeight: function() {
		var height = 360;
		if(height > 0) {
			return height;
		} else {
			return openfl_Lib.current.stage.stageHeight;
		}
	}
	,getWidth: function() {
		var width = 640;
		if(width > 0) {
			return width;
		} else {
			return openfl_Lib.current.stage.stageWidth;
		}
	}
	,onInit: function() {
	}
	,onLoaded: function() {
		this.dispatchEvent(new openfl_events_Event("complete"));
	}
	,onUpdate: function(bytesLoaded,bytesTotal) {
		var percentLoaded = bytesLoaded / bytesTotal;
		if(percentLoaded > 1) {
			percentLoaded = 1;
		}
		this.progress.set_scaleX(percentLoaded);
	}
	,__class__: NMEPreloader
});
var PlayState = function(MaxSize) {
	this.townSpeed = 7;
	this.canDestroy = true;
	this.canFeed = true;
	flixel_FlxState.call(this,MaxSize);
};
$hxClasses["PlayState"] = PlayState;
PlayState.__name__ = ["PlayState"];
PlayState.__super__ = flixel_FlxState;
PlayState.prototype = $extend(flixel_FlxState.prototype,{
	create: function() {
		var _gthis = this;
		flixel_FlxG.sound.play("assets/sounds/engine.wav",.1,true);
		flixel_FlxG.camera.bgColor = -10789005;
		var bg = new flixel_addons_display_FlxBackdrop("assets/images/bg_grass.png",.1,0,true,false);
		this.add(bg);
		var bg_trail = new flixel_addons_display_FlxBackdrop("assets/images/bg_trail.png",.25,0,true,false);
		var _g = bg_trail;
		_g.set_y(_g.y + 20);
		this.add(bg_trail);
		this.allTheTowns = new flixel_group_FlxTypedGroup();
		this.add(this.allTheTowns);
		this.allTheTowns.add(new Town(-200,70));
		var _firsttownTween = flixel_tweens_FlxTween.tween(this.allTheTowns.members[this.allTheTowns.length - 1],{ x : this.allTheTowns.members[this.allTheTowns.length - 1].x + 600},this.townSpeed,{ type : 8});
		new flixel_util_FlxTimer().start(this.townSpeed / 2,null,0).onComplete = function(t) {
			_gthis.allTheTowns.add(new Town(-200,70));
			var _townTween = flixel_tweens_FlxTween.tween(_gthis.allTheTowns.members[_gthis.allTheTowns.length - 1],{ x : _gthis.allTheTowns.members[_gthis.allTheTowns.length - 1].x + 600},_gthis.townSpeed,{ type : 8});
		};
		this.truck = new Truck(200,121);
		this.add(this.truck);
		this.truck.scrollFactor.set_x(0);
		var _truckTween = flixel_tweens_FlxTween.tween(this.truck,{ y : this.truck.y + 2},.25,{ type : 4, ease : flixel_tweens_FlxEase.sineInOut});
		var scoreBox = new flixel_FlxSprite(0,0);
		scoreBox.makeGraphic(360,15,-13817311,false);
		this.add(scoreBox);
		scoreBox.scrollFactor.set_x(0);
		this.scoreText = new flixel_text_FlxText(2,2,0,"",30);
		this.scoreText.set_text("Score: " + Reg.score);
		this.scoreText.setFormat("assets/fonts/ChevyRay - Express.ttf",9,-1,"left");
		this.add(this.scoreText);
		this.scoreText.scrollFactor.set_x(0);
		this.hotDogText = new flixel_text_FlxText(flixel_FlxG.width - 150,2,150,"",30);
		this.hotDogText.set_text("Hot Dogs: " + Reg.hotdogs);
		this.hotDogText.setFormat("assets/fonts/ChevyRay - Express.ttf",9,-1,"right");
		this.add(this.hotDogText);
		this.hotDogText.scrollFactor.set_x(0);
		flixel_FlxState.prototype.create.call(this);
	}
	,update: function(elapsed) {
		flixel_FlxState.prototype.update.call(this,elapsed);
		this.scoreText.set_text("Score: " + Reg.score);
		this.hotDogText.set_text("Hot Dogs: " + Reg.hotdogs);
		var _this = flixel_FlxG.camera.scroll;
		var _g = _this;
		_g.set_x(_g.x + -5);
		var _g1 = _this;
		_g1.set_y(_g1.y);
		var _this1 = flixel_FlxG.keys.justPressed;
		if(_this1.keyManager.checkStatus(72,_this1.status)) {
			var _this2 = flixel_FlxG.log;
			if(this.canFeed == true) {
				flixel_FlxG.overlap(this.truck,this.allTheTowns,$bind(this,this.feedTown));
			}
			this.canFeed = true;
		}
		var _this3 = flixel_FlxG.keys.justPressed;
		if(_this3.keyManager.checkStatus(68,_this3.status)) {
			if(this.canDestroy == true) {
				flixel_FlxG.overlap(this.truck,this.allTheTowns,$bind(this,this.destroyTown));
			}
			this.canDestroy = true;
		}
	}
	,feedTown: function(P,T) {
		var _this = flixel_FlxG.log;
		if(this.canFeed == false) {
			return;
		}
		if(P.alive && P.exists && T.alive && T.exists && Reg.hotdogs > 0) {
			T.hotDogStock += 1;
			Reg.hotdogs -= 1;
			Reg.score += 1;
			this.canFeed = false;
			this.throwHotDog();
		}
	}
	,destroyTown: function(P,T) {
		var _this = flixel_FlxG.log;
		if(this.canDestroy == false) {
			return;
		}
		if(P.alive && P.exists && T.alive && T.exists) {
			this.explosion(T);
			T.kill();
			this.canDestroy = false;
		}
	}
	,throwHotDog: function() {
		flixel_FlxG.sound.play("assets/sounds/hit" + flixel_FlxG.random["int"](1,4) + ".wav",.5);
		var hotDog = new flixel_FlxSprite(270,120);
		hotDog.loadGraphic("assets/images/hotdog" + flixel_FlxG.random["int"](1,4) + ".png",false,10,15);
		this.add(hotDog);
		hotDog.scrollFactor.set_x(0);
		var _hotDogTween = flixel_tweens_FlxTween.tween(hotDog,{ y : hotDog.y - 150},.5,{ type : 8, ease : flixel_tweens_FlxEase.sineInOut});
	}
	,explosion: function(T) {
		var _gthis = this;
		flixel_FlxG.sound.play("assets/sounds/explode1.wav",.7);
		var explosionGraphic = new flixel_FlxSprite(T.x - 58,T.y - 35);
		explosionGraphic.loadGraphic("assets/images/explosion.png",true,121,77);
		explosionGraphic.animation.add("explode",[1,2,3,4,5,6,7,8,0],24,false);
		explosionGraphic.animation.play("explode");
		this.add(explosionGraphic);
		explosionGraphic.scrollFactor.set_x(0);
		new flixel_util_FlxTimer().start(.1,null,1).onComplete = function(t) {
			new flixel_util_FlxTimer().start(.1,null,8).onComplete = function(t1) {
				flixel_FlxG.sound.play("assets/sounds/hit" + flixel_FlxG.random["int"](1,4) + ".wav",.25);
			};
			var hotDogRain = new flixel_FlxSprite(220,-77);
			hotDogRain.loadGraphic("assets/images/hotdograin.png",false,69,77);
			_gthis.add(hotDogRain);
			hotDogRain.scrollFactor.set_x(0);
			var _hotDogTween = flixel_tweens_FlxTween.tween(hotDogRain,{ y : 180},1,{ type : 8, ease : flixel_tweens_FlxEase.sineInOut});
		};
	}
	,__class__: PlayState
});
var Reflect = function() { };
$hxClasses["Reflect"] = Reflect;
Reflect.__name__ = ["Reflect"];
Reflect.field = function(o,field) {
	try {
		return o[field];
	} catch( e ) {
		haxe_CallStack.lastException = e;
		return null;
	}
};
Reflect.getProperty = function(o,field) {
	var tmp;
	if(o == null) {
		return null;
	} else {
		var tmp1;
		if(o.__properties__) {
			tmp = o.__properties__["get_" + field];
			tmp1 = tmp;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			return o[tmp]();
		} else {
			return o[field];
		}
	}
};
Reflect.setProperty = function(o,field,value) {
	var tmp;
	var tmp1;
	if(o.__properties__) {
		tmp = o.__properties__["set_" + field];
		tmp1 = tmp;
	} else {
		tmp1 = false;
	}
	if(tmp1) {
		o[tmp](value);
	} else {
		o[field] = value;
	}
};
Reflect.fields = function(o) {
	var a = [];
	if(o != null) {
		var hasOwnProperty = Object.prototype.hasOwnProperty;
		for( var f in o ) {
		if(f != "__id__" && f != "hx__closures__" && hasOwnProperty.call(o,f)) {
			a.push(f);
		}
		}
	}
	return a;
};
Reflect.isFunction = function(f) {
	if(typeof(f) == "function") {
		return !(f.__name__ || f.__ename__);
	} else {
		return false;
	}
};
Reflect.compare = function(a,b) {
	if(a == b) {
		return 0;
	} else if(a > b) {
		return 1;
	} else {
		return -1;
	}
};
Reflect.compareMethods = function(f1,f2) {
	if(f1 == f2) {
		return true;
	}
	if(!Reflect.isFunction(f1) || !Reflect.isFunction(f2)) {
		return false;
	}
	if(f1.scope == f2.scope && f1.method == f2.method) {
		return f1.method != null;
	} else {
		return false;
	}
};
Reflect.isObject = function(v) {
	if(v == null) {
		return false;
	}
	var t = typeof(v);
	if(!(t == "string" || t == "object" && v.__enum__ == null)) {
		if(t == "function") {
			return (v.__name__ || v.__ename__) != null;
		} else {
			return false;
		}
	} else {
		return true;
	}
};
Reflect.isEnumValue = function(v) {
	if(v != null) {
		return v.__enum__ != null;
	} else {
		return false;
	}
};
Reflect.deleteField = function(o,field) {
	if(!Object.prototype.hasOwnProperty.call(o,field)) {
		return false;
	}
	delete(o[field]);
	return true;
};
Reflect.makeVarArgs = function(f) {
	return function() {
		var a = Array.prototype.slice.call(arguments);
		return f(a);
	};
};
var Reg = function() { };
$hxClasses["Reg"] = Reg;
Reg.__name__ = ["Reg"];
Reg.resetLevel = function() {
	Reg.score = 0;
};
var Std = function() { };
$hxClasses["Std"] = Std;
Std.__name__ = ["Std"];
Std.string = function(s) {
	return js_Boot.__string_rec(s,"");
};
Std.parseInt = function(x) {
	var v = parseInt(x,10);
	if(v == 0 && (HxOverrides.cca(x,1) == 120 || HxOverrides.cca(x,1) == 88)) {
		v = parseInt(x);
	}
	if(isNaN(v)) {
		return null;
	}
	return v;
};
var StringBuf = function() {
	this.b = "";
};
$hxClasses["StringBuf"] = StringBuf;
StringBuf.__name__ = ["StringBuf"];
StringBuf.prototype = {
	__class__: StringBuf
};
var StringTools = function() { };
$hxClasses["StringTools"] = StringTools;
StringTools.__name__ = ["StringTools"];
StringTools.startsWith = function(s,start) {
	if(s.length >= start.length) {
		return HxOverrides.substr(s,0,start.length) == start;
	} else {
		return false;
	}
};
StringTools.endsWith = function(s,end) {
	var elen = end.length;
	var slen = s.length;
	if(slen >= elen) {
		return HxOverrides.substr(s,slen - elen,elen) == end;
	} else {
		return false;
	}
};
StringTools.isSpace = function(s,pos) {
	var c = HxOverrides.cca(s,pos);
	if(!(c > 8 && c < 14)) {
		return c == 32;
	} else {
		return true;
	}
};
StringTools.ltrim = function(s) {
	var l = s.length;
	var r = 0;
	while(r < l && StringTools.isSpace(s,r)) ++r;
	if(r > 0) {
		return HxOverrides.substr(s,r,l - r);
	} else {
		return s;
	}
};
StringTools.rtrim = function(s) {
	var l = s.length;
	var r = 0;
	while(r < l && StringTools.isSpace(s,l - r - 1)) ++r;
	if(r > 0) {
		return HxOverrides.substr(s,0,l - r);
	} else {
		return s;
	}
};
StringTools.trim = function(s) {
	return StringTools.ltrim(StringTools.rtrim(s));
};
StringTools.replace = function(s,sub,by) {
	return s.split(sub).join(by);
};
StringTools.hex = function(n,digits) {
	var s = "";
	var hexChars = "0123456789ABCDEF";
	while(true) {
		s = hexChars.charAt(n & 15) + s;
		n >>>= 4;
		if(!(n > 0)) {
			break;
		}
	}
	if(digits != null) {
		while(s.length < digits) s = "0" + s;
	}
	return s;
};
var flixel_util_IFlxPooled = function() { };
$hxClasses["flixel.util.IFlxPooled"] = flixel_util_IFlxPooled;
flixel_util_IFlxPooled.__name__ = ["flixel","util","IFlxPooled"];
flixel_util_IFlxPooled.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_IFlxPooled.prototype = {
	__class__: flixel_util_IFlxPooled
};
var flixel_util_IFlxPool = function() { };
$hxClasses["flixel.util.IFlxPool"] = flixel_util_IFlxPool;
flixel_util_IFlxPool.__name__ = ["flixel","util","IFlxPool"];
flixel_util_IFlxPool.prototype = {
	__class__: flixel_util_IFlxPool
};
var flixel_util_FlxPool_$flixel_$math_$FlxRect = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_math_FlxRect"] = flixel_util_FlxPool_$flixel_$math_$FlxRect;
flixel_util_FlxPool_$flixel_$math_$FlxRect.__name__ = ["flixel","util","FlxPool_flixel_math_FlxRect"];
flixel_util_FlxPool_$flixel_$math_$FlxRect.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$math_$FlxRect.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$math_$FlxRect
	,__properties__: {get_length:"get_length"}
};
var flixel_math_FlxRect = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._inPool = false;
	this._weak = false;
	this.x = X;
	this.y = Y;
	this.width = Width;
	this.height = Height;
};
$hxClasses["flixel.math.FlxRect"] = flixel_math_FlxRect;
flixel_math_FlxRect.__name__ = ["flixel","math","FlxRect"];
flixel_math_FlxRect.__interfaces__ = [flixel_util_IFlxPooled];
flixel_math_FlxRect.__properties__ = {get_pool:"get_pool"};
flixel_math_FlxRect.get = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = X;
	_this.y = Y;
	_this.width = Width;
	_this.height = Height;
	var rect = _this;
	rect._inPool = false;
	return rect;
};
flixel_math_FlxRect.weak = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = X;
	_this.y = Y;
	_this.width = Width;
	_this.height = Height;
	var rect = _this;
	rect._inPool = false;
	var rect1 = rect;
	rect1._weak = true;
	return rect1;
};
flixel_math_FlxRect.get_pool = function() {
	return flixel_math_FlxRect._pool;
};
flixel_math_FlxRect.prototype = {
	put: function() {
		if(!this._inPool) {
			this._inPool = true;
			this._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(this);
		}
	}
	,putWeak: function() {
		if(this._weak) {
			if(!this._inPool) {
				this._inPool = true;
				this._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(this);
			}
		}
	}
	,setSize: function(Width,Height) {
		this.width = Width;
		this.height = Height;
		return this;
	}
	,setPosition: function(x,y) {
		this.x = x;
		this.y = y;
		return this;
	}
	,set: function(X,Y,Width,Height) {
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.x = X;
		this.y = Y;
		this.width = Width;
		this.height = Height;
		return this;
	}
	,copyFrom: function(Rect) {
		this.x = Rect.x;
		this.y = Rect.y;
		this.width = Rect.width;
		this.height = Rect.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		return this;
	}
	,copyTo: function(Rect) {
		Rect.x = this.x;
		Rect.y = this.y;
		Rect.width = this.width;
		Rect.height = this.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		return Rect;
	}
	,copyFromFlash: function(FlashRect) {
		this.x = FlashRect.x;
		this.y = FlashRect.y;
		this.width = FlashRect.width;
		this.height = FlashRect.height;
		return this;
	}
	,copyToFlash: function(FlashRect) {
		if(FlashRect == null) {
			FlashRect = new openfl_geom_Rectangle();
		}
		FlashRect.x = this.x;
		FlashRect.y = this.y;
		FlashRect.width = this.width;
		FlashRect.height = this.height;
		return FlashRect;
	}
	,overlaps: function(Rect) {
		var result = Rect.x + Rect.width > this.x && Rect.x < this.x + this.width && Rect.y + Rect.height > this.y && Rect.y < this.y + this.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		return result;
	}
	,containsPoint: function(Point) {
		var result = flixel_math_FlxMath.pointInFlxRect(Point.x,Point.y,this);
		if(Point._weak) {
			Point.put();
		}
		return result;
	}
	,union: function(Rect) {
		var minX = Math.min(this.x,Rect.x);
		var minY = Math.min(this.y,Rect.y);
		var maxX = Math.max(this.x + this.width,Rect.x + Rect.width);
		var maxY = Math.max(this.y + this.height,Rect.y + Rect.height);
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
		return this;
	}
	,floor: function() {
		this.x = Math.floor(this.x);
		this.y = Math.floor(this.y);
		this.width = Math.floor(this.width);
		this.height = Math.floor(this.height);
		return this;
	}
	,ceil: function() {
		this.x = Math.ceil(this.x);
		this.y = Math.ceil(this.y);
		this.width = Math.ceil(this.width);
		this.height = Math.ceil(this.height);
		return this;
	}
	,round: function() {
		this.x = Math.round(this.x);
		this.y = Math.round(this.y);
		this.width = Math.round(this.width);
		this.height = Math.round(this.height);
		return this;
	}
	,fromTwoPoints: function(Point1,Point2) {
		var minX = Math.min(Point1.x,Point2.x);
		var minY = Math.min(Point1.y,Point2.y);
		var maxX = Math.max(Point1.x,Point2.x);
		var maxY = Math.max(Point1.y,Point2.y);
		if(Point1._weak) {
			Point1.put();
		}
		if(Point2._weak) {
			Point2.put();
		}
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
		return this;
	}
	,unionWithPoint: function(Point) {
		var minX = Math.min(this.x,Point.x);
		var minY = Math.min(this.y,Point.y);
		var maxX = Math.max(this.x + this.width,Point.x);
		var maxY = Math.max(this.y + this.height,Point.y);
		if(Point._weak) {
			Point.put();
		}
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
		return this;
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
		return this;
	}
	,destroy: function() {
	}
	,equals: function(rect) {
		var result = Math.abs(this.x - rect.x) <= 0.0000001 && Math.abs(this.y - rect.y) <= 0.0000001 && Math.abs(this.width - rect.width) <= 0.0000001 && Math.abs(this.height - rect.height) <= 0.0000001;
		if(rect._weak) {
			if(!rect._inPool) {
				rect._inPool = true;
				rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect);
			}
		}
		return result;
	}
	,intersection: function(rect,result) {
		if(result == null) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			var rect1 = _this;
			rect1._inPool = false;
			result = rect1;
		}
		var x0 = this.x < rect.x ? rect.x : this.x;
		var x1 = this.x + this.width > rect.x + rect.width ? rect.x + rect.width : this.x + this.width;
		if(x1 <= x0) {
			if(rect._weak) {
				if(!rect._inPool) {
					rect._inPool = true;
					rect._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(rect);
				}
			}
			return result;
		}
		var y0 = this.y < rect.y ? rect.y : this.y;
		var y1 = this.y + this.height > rect.y + rect.height ? rect.y + rect.height : this.y + this.height;
		if(y1 <= y0) {
			if(rect._weak) {
				if(!rect._inPool) {
					rect._inPool = true;
					rect._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(rect);
				}
			}
			return result;
		}
		if(rect._weak) {
			if(!rect._inPool) {
				rect._inPool = true;
				rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect);
			}
		}
		result.x = x0;
		result.y = y0;
		result.width = x1 - x0;
		result.height = y1 - y0;
		return result;
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		var value2 = this.width;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "w";
		_this2.value = value2;
		var value3 = this.height;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "h";
		_this3.value = value3;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
	}
	,get_left: function() {
		return this.x;
	}
	,set_left: function(Value) {
		this.width -= Value - this.x;
		return this.x = Value;
	}
	,get_right: function() {
		return this.x + this.width;
	}
	,set_right: function(Value) {
		this.width = Value - this.x;
		return Value;
	}
	,get_top: function() {
		return this.y;
	}
	,set_top: function(Value) {
		this.height -= Value - this.y;
		return this.y = Value;
	}
	,get_bottom: function() {
		return this.y + this.height;
	}
	,set_bottom: function(Value) {
		this.height = Value - this.y;
		return Value;
	}
	,get_isEmpty: function() {
		if(this.width != 0) {
			return this.height == 0;
		} else {
			return true;
		}
	}
	,__class__: flixel_math_FlxRect
	,__properties__: {get_isEmpty:"get_isEmpty",set_bottom:"set_bottom",get_bottom:"get_bottom",set_top:"set_top",get_top:"get_top",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left"}
};
var flixel_FlxObject = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	this._rect = rect;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this._point = point;
	this.path = null;
	this.collisonXDrag = true;
	this.allowCollisions = 4369;
	this.wasTouching = 0;
	this.touching = 0;
	this.health = 1;
	this.maxAngular = 10000;
	this.angularDrag = 0;
	this.angularAcceleration = 0;
	this.angularVelocity = 0;
	this.elasticity = 0;
	this.mass = 1;
	this.immovable = false;
	this.moves = true;
	this.angle = 0;
	this.pixelPerfectPosition = true;
	this.y = 0;
	this.x = 0;
	flixel_FlxBasic.call(this);
	this.set_x(X);
	this.set_y(Y);
	this.set_width(Width);
	this.set_height(Height);
	this.initVars();
};
$hxClasses["flixel.FlxObject"] = flixel_FlxObject;
flixel_FlxObject.__name__ = ["flixel","FlxObject"];
flixel_FlxObject.separate = function(Object1,Object2) {
	var separatedX = flixel_FlxObject.separateX(Object1,Object2);
	var separatedY = flixel_FlxObject.separateY(Object1,Object2);
	if(!separatedX) {
		return separatedY;
	} else {
		return true;
	}
};
flixel_FlxObject.updateTouchingFlags = function(Object1,Object2) {
	var touchingX = flixel_FlxObject.updateTouchingFlagsX(Object1,Object2);
	var touchingY = flixel_FlxObject.updateTouchingFlagsY(Object1,Object2);
	if(!touchingX) {
		return touchingY;
	} else {
		return true;
	}
};
flixel_FlxObject.computeOverlapX = function(Object1,Object2,checkMaxOverlap) {
	if(checkMaxOverlap == null) {
		checkMaxOverlap = true;
	}
	var overlap = 0;
	var obj1delta = Object1.x - Object1.last.x;
	var obj2delta = Object2.x - Object2.last.x;
	if(obj1delta != obj2delta) {
		var obj1deltaAbs = obj1delta > 0 ? obj1delta : -obj1delta;
		var obj2deltaAbs = obj2delta > 0 ? obj2delta : -obj2delta;
		var _this = flixel_FlxObject._firstSeparateFlxRect;
		var X = Object1.x - (obj1delta > 0 ? obj1delta : 0);
		var Y = Object1.last.y;
		var Width = Object1.get_width() + obj1deltaAbs;
		var Height = Object1.get_height();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var obj1rect = _this;
		var _this1 = flixel_FlxObject._secondSeparateFlxRect;
		var X1 = Object2.x - (obj2delta > 0 ? obj2delta : 0);
		var Y1 = Object2.last.y;
		var Width1 = Object2.get_width() + obj2deltaAbs;
		var Height1 = Object2.get_height();
		_this1.x = X1;
		_this1.y = Y1;
		_this1.width = Width1;
		_this1.height = Height1;
		var obj2rect = _this1;
		if(obj1rect.x + obj1rect.width > obj2rect.x && obj1rect.x < obj2rect.x + obj2rect.width && obj1rect.y + obj1rect.height > obj2rect.y && obj1rect.y < obj2rect.y + obj2rect.height) {
			var maxOverlap = checkMaxOverlap ? obj1deltaAbs + obj2deltaAbs + flixel_FlxObject.SEPARATE_BIAS : 0;
			if(obj1delta > obj2delta) {
				overlap = Object1.x + Object1.get_width() - Object2.x;
				if(checkMaxOverlap && overlap > maxOverlap || (Object1.allowCollisions & 16) == 0 || (Object2.allowCollisions & 1) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 16;
					Object2.touching |= 1;
				}
			} else if(obj1delta < obj2delta) {
				overlap = Object1.x - Object2.get_width() - Object2.x;
				if(checkMaxOverlap && -overlap > maxOverlap || (Object1.allowCollisions & 1) == 0 || (Object2.allowCollisions & 16) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 1;
					Object2.touching |= 16;
				}
			}
		}
	}
	return overlap;
};
flixel_FlxObject.separateX = function(Object1,Object2) {
	var obj1immovable = Object1.immovable;
	var obj2immovable = Object2.immovable;
	if(obj1immovable && obj2immovable) {
		return false;
	}
	if(Object1.flixelType == 3) {
		var tilemap = Object1;
		return tilemap.overlapsWithCallback(Object2,flixel_FlxObject.separateX);
	}
	if(Object2.flixelType == 3) {
		var tilemap1 = Object2;
		return tilemap1.overlapsWithCallback(Object1,flixel_FlxObject.separateX,true);
	}
	var overlap = flixel_FlxObject.computeOverlapX(Object1,Object2);
	if(overlap != 0) {
		var obj1v = Object1.velocity.x;
		var obj2v = Object2.velocity.x;
		if(!obj1immovable && !obj2immovable) {
			overlap *= 0.5;
			Object1.set_x(Object1.x - overlap);
			var _g = Object2;
			_g.set_x(_g.x + overlap);
			var obj1velocity = Math.sqrt(obj2v * obj2v * Object2.mass / Object1.mass) * (obj2v > 0 ? 1 : -1);
			var obj2velocity = Math.sqrt(obj1v * obj1v * Object1.mass / Object2.mass) * (obj1v > 0 ? 1 : -1);
			var average = (obj1velocity + obj2velocity) * 0.5;
			obj1velocity -= average;
			obj2velocity -= average;
			Object1.velocity.set_x(average + obj1velocity * Object1.elasticity);
			Object2.velocity.set_x(average + obj2velocity * Object2.elasticity);
		} else if(!obj1immovable) {
			Object1.set_x(Object1.x - overlap);
			Object1.velocity.set_x(obj2v - obj1v * Object1.elasticity);
		} else if(!obj2immovable) {
			var _g1 = Object2;
			_g1.set_x(_g1.x + overlap);
			Object2.velocity.set_x(obj1v - obj2v * Object2.elasticity);
		}
		return true;
	}
	return false;
};
flixel_FlxObject.updateTouchingFlagsX = function(Object1,Object2) {
	if(Object1.flixelType == 3) {
		var tilemap = Object1;
		return tilemap.overlapsWithCallback(Object2,flixel_FlxObject.updateTouchingFlagsX);
	}
	if(Object2.flixelType == 3) {
		var tilemap1 = Object2;
		return tilemap1.overlapsWithCallback(Object1,flixel_FlxObject.updateTouchingFlagsX,true);
	}
	return flixel_FlxObject.computeOverlapX(Object1,Object2,false) != 0;
};
flixel_FlxObject.computeOverlapY = function(Object1,Object2,checkMaxOverlap) {
	if(checkMaxOverlap == null) {
		checkMaxOverlap = true;
	}
	var overlap = 0;
	var obj1delta = Object1.y - Object1.last.y;
	var obj2delta = Object2.y - Object2.last.y;
	if(obj1delta != obj2delta) {
		var obj1deltaAbs = obj1delta > 0 ? obj1delta : -obj1delta;
		var obj2deltaAbs = obj2delta > 0 ? obj2delta : -obj2delta;
		var _this = flixel_FlxObject._firstSeparateFlxRect;
		var X = Object1.x;
		var Y = Object1.y - (obj1delta > 0 ? obj1delta : 0);
		var Width = Object1.get_width();
		var Height = Object1.get_height() + obj1deltaAbs;
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var obj1rect = _this;
		var _this1 = flixel_FlxObject._secondSeparateFlxRect;
		var X1 = Object2.x;
		var Y1 = Object2.y - (obj2delta > 0 ? obj2delta : 0);
		var Width1 = Object2.get_width();
		var Height1 = Object2.get_height() + obj2deltaAbs;
		_this1.x = X1;
		_this1.y = Y1;
		_this1.width = Width1;
		_this1.height = Height1;
		var obj2rect = _this1;
		if(obj1rect.x + obj1rect.width > obj2rect.x && obj1rect.x < obj2rect.x + obj2rect.width && obj1rect.y + obj1rect.height > obj2rect.y && obj1rect.y < obj2rect.y + obj2rect.height) {
			var maxOverlap = checkMaxOverlap ? obj1deltaAbs + obj2deltaAbs + flixel_FlxObject.SEPARATE_BIAS : 0;
			if(obj1delta > obj2delta) {
				overlap = Object1.y + Object1.get_height() - Object2.y;
				if(checkMaxOverlap && overlap > maxOverlap || (Object1.allowCollisions & 4096) == 0 || (Object2.allowCollisions & 256) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 4096;
					Object2.touching |= 256;
				}
			} else if(obj1delta < obj2delta) {
				overlap = Object1.y - Object2.get_height() - Object2.y;
				if(checkMaxOverlap && -overlap > maxOverlap || (Object1.allowCollisions & 256) == 0 || (Object2.allowCollisions & 4096) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 256;
					Object2.touching |= 4096;
				}
			}
		}
	}
	return overlap;
};
flixel_FlxObject.separateY = function(Object1,Object2) {
	var obj1immovable = Object1.immovable;
	var obj2immovable = Object2.immovable;
	if(obj1immovable && obj2immovable) {
		return false;
	}
	if(Object1.flixelType == 3) {
		var tilemap = Object1;
		return tilemap.overlapsWithCallback(Object2,flixel_FlxObject.separateY);
	}
	if(Object2.flixelType == 3) {
		var tilemap1 = Object2;
		return tilemap1.overlapsWithCallback(Object1,flixel_FlxObject.separateY,true);
	}
	var overlap = flixel_FlxObject.computeOverlapY(Object1,Object2);
	if(overlap != 0) {
		var obj1delta = Object1.y - Object1.last.y;
		var obj2delta = Object2.y - Object2.last.y;
		var obj1v = Object1.velocity.y;
		var obj2v = Object2.velocity.y;
		if(!obj1immovable && !obj2immovable) {
			overlap *= 0.5;
			Object1.set_y(Object1.y - overlap);
			var _g = Object2;
			_g.set_y(_g.y + overlap);
			var obj1velocity = Math.sqrt(obj2v * obj2v * Object2.mass / Object1.mass) * (obj2v > 0 ? 1 : -1);
			var obj2velocity = Math.sqrt(obj1v * obj1v * Object1.mass / Object2.mass) * (obj1v > 0 ? 1 : -1);
			var average = (obj1velocity + obj2velocity) * 0.5;
			obj1velocity -= average;
			obj2velocity -= average;
			Object1.velocity.set_y(average + obj1velocity * Object1.elasticity);
			Object2.velocity.set_y(average + obj2velocity * Object2.elasticity);
		} else if(!obj1immovable) {
			Object1.set_y(Object1.y - overlap);
			Object1.velocity.set_y(obj2v - obj1v * Object1.elasticity);
			if(Object1.collisonXDrag && Object2.active && Object2.moves && obj1delta > obj2delta) {
				var _g1 = Object1;
				_g1.set_x(_g1.x + (Object2.x - Object2.last.x));
			}
		} else if(!obj2immovable) {
			var _g2 = Object2;
			_g2.set_y(_g2.y + overlap);
			Object2.velocity.set_y(obj1v - obj2v * Object2.elasticity);
			if(Object2.collisonXDrag && Object1.active && Object1.moves && obj1delta < obj2delta) {
				var _g3 = Object2;
				_g3.set_x(_g3.x + (Object1.x - Object1.last.x));
			}
		}
		return true;
	}
	return false;
};
flixel_FlxObject.updateTouchingFlagsY = function(Object1,Object2) {
	if(Object1.flixelType == 3) {
		var tilemap = Object1;
		return tilemap.overlapsWithCallback(Object2,flixel_FlxObject.updateTouchingFlagsY);
	}
	if(Object2.flixelType == 3) {
		var tilemap1 = Object2;
		return tilemap1.overlapsWithCallback(Object1,flixel_FlxObject.updateTouchingFlagsY,true);
	}
	return flixel_FlxObject.computeOverlapY(Object1,Object2,false) != 0;
};
flixel_FlxObject.__super__ = flixel_FlxBasic;
flixel_FlxObject.prototype = $extend(flixel_FlxBasic.prototype,{
	initVars: function() {
		this.flixelType = 1;
		var X = this.x;
		var Y = this.y;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		this.last = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(1,1);
		point1._inPool = false;
		this.scrollFactor = point1;
		this.pixelPerfectPosition = flixel_FlxObject.defaultPixelPerfectPosition;
		var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
		point2._inPool = false;
		this.velocity = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
		point3._inPool = false;
		this.acceleration = point3;
		var point4 = flixel_math_FlxPoint._pool.get().set(0,0);
		point4._inPool = false;
		this.drag = point4;
		var point5 = flixel_math_FlxPoint._pool.get().set(10000,10000);
		point5._inPool = false;
		this.maxVelocity = point5;
	}
	,initMotionVars: function() {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.velocity = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.acceleration = point1;
		var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
		point2._inPool = false;
		this.drag = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(10000,10000);
		point3._inPool = false;
		this.maxVelocity = point3;
	}
	,destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		this.velocity = flixel_util_FlxDestroyUtil.put(this.velocity);
		this.acceleration = flixel_util_FlxDestroyUtil.put(this.acceleration);
		this.drag = flixel_util_FlxDestroyUtil.put(this.drag);
		this.maxVelocity = flixel_util_FlxDestroyUtil.put(this.maxVelocity);
		this.scrollFactor = flixel_util_FlxDestroyUtil.put(this.scrollFactor);
		this.last = flixel_util_FlxDestroyUtil.put(this.last);
		this._point = flixel_util_FlxDestroyUtil.put(this._point);
		this._rect = flixel_util_FlxDestroyUtil.put(this._rect);
	}
	,update: function(elapsed) {
		this.last.set(this.x,this.y);
		if(this.path != null && this.path.active) {
			this.path.update(elapsed);
		}
		if(this.moves) {
			this.updateMotion(elapsed);
		}
		this.wasTouching = this.touching;
		this.touching = 0;
	}
	,updateMotion: function(elapsed) {
		var velocityDelta = 0.5 * (flixel_math_FlxVelocity.computeVelocity(this.angularVelocity,this.angularAcceleration,this.angularDrag,this.maxAngular,elapsed) - this.angularVelocity);
		this.angularVelocity += velocityDelta;
		var _g = this;
		_g.set_angle(_g.angle + this.angularVelocity * elapsed);
		this.angularVelocity += velocityDelta;
		velocityDelta = 0.5 * (flixel_math_FlxVelocity.computeVelocity(this.velocity.x,this.acceleration.x,this.drag.x,this.maxVelocity.x,elapsed) - this.velocity.x);
		var _g1 = this.velocity;
		_g1.set_x(_g1.x + velocityDelta);
		var delta = this.velocity.x * elapsed;
		var _g2 = this.velocity;
		_g2.set_x(_g2.x + velocityDelta);
		var _g3 = this;
		_g3.set_x(_g3.x + delta);
		velocityDelta = 0.5 * (flixel_math_FlxVelocity.computeVelocity(this.velocity.y,this.acceleration.y,this.drag.y,this.maxVelocity.y,elapsed) - this.velocity.y);
		var _g4 = this.velocity;
		_g4.set_y(_g4.y + velocityDelta);
		delta = this.velocity.y * elapsed;
		var _g5 = this.velocity;
		_g5.set_y(_g5.y + velocityDelta);
		var _g6 = this;
		_g6.set_y(_g6.y + delta);
	}
	,draw: function() {
	}
	,overlaps: function(ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.overlapsCallback),group,0,0,InScreenSpace,Camera);
		}
		if(ObjectOrGroup.flixelType == 3) {
			var tilemap = ObjectOrGroup;
			return tilemap.overlaps(this,InScreenSpace,Camera);
		}
		var object = ObjectOrGroup;
		if(!InScreenSpace) {
			if(object.x + object.get_width() > this.x && object.x < this.x + this.get_width() && object.y + object.get_height() > this.y) {
				return object.y < this.y + this.get_height();
			} else {
				return false;
			}
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var objectScreenPos = object.getScreenPosition(null,Camera);
		this.getScreenPosition(this._point,Camera);
		if(objectScreenPos.x + object.get_width() > this._point.x && objectScreenPos.x < this._point.x + this.get_width() && objectScreenPos.y + object.get_height() > this._point.y) {
			return objectScreenPos.y < this._point.y + this.get_height();
		} else {
			return false;
		}
	}
	,overlapsCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		return this.overlaps(ObjectOrGroup,InScreenSpace,Camera);
	}
	,overlapsAt: function(X,Y,ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.overlapsAtCallback),group,X,Y,InScreenSpace,Camera);
		}
		if(ObjectOrGroup.flixelType == 3) {
			var tilemap = ObjectOrGroup;
			return tilemap.overlapsAt(tilemap.x - (X - this.x),tilemap.y - (Y - this.y),this,InScreenSpace,Camera);
		}
		var object = ObjectOrGroup;
		if(!InScreenSpace) {
			if(object.x + object.get_width() > X && object.x < X + this.get_width() && object.y + object.get_height() > Y) {
				return object.y < Y + this.get_height();
			} else {
				return false;
			}
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var objectScreenPos = object.getScreenPosition(null,Camera);
		this.getScreenPosition(this._point,Camera);
		if(objectScreenPos.x + object.get_width() > this._point.x && objectScreenPos.x < this._point.x + this.get_width() && objectScreenPos.y + object.get_height() > this._point.y) {
			return objectScreenPos.y < this._point.y + this.get_height();
		} else {
			return false;
		}
	}
	,overlapsAtCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		return this.overlapsAt(X,Y,ObjectOrGroup,InScreenSpace,Camera);
	}
	,overlapsPoint: function(point,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		if(!InScreenSpace) {
			if(point.x >= this.x && point.x < this.x + this.get_width() && point.y >= this.y) {
				return point.y < this.y + this.get_height();
			} else {
				return false;
			}
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var xPos = point.x - Camera.scroll.x;
		var yPos = point.y - Camera.scroll.y;
		this.getScreenPosition(this._point,Camera);
		if(point._weak) {
			point.put();
		}
		if(xPos >= this._point.x && xPos < this._point.x + this.get_width() && yPos >= this._point.y) {
			return yPos < this._point.y + this.get_height();
		} else {
			return false;
		}
	}
	,inWorldBounds: function() {
		var tmp;
		var tmp1;
		if(this.x + this.get_width() > flixel_FlxG.worldBounds.x) {
			var _this = flixel_FlxG.worldBounds;
			tmp1 = this.x < _this.x + _this.width;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = this.y + this.get_height() > flixel_FlxG.worldBounds.y;
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = flixel_FlxG.worldBounds;
			return this.y < _this1.y + _this1.height;
		} else {
			return false;
		}
	}
	,getScreenPosition: function(point,Camera) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		point.set(this.x,this.y);
		if(this.pixelPerfectPosition) {
			point.set_x(Math.floor(point.x));
			point.set_y(Math.floor(point.y));
		}
		var Y = Camera.scroll.y * this.scrollFactor.y;
		var _g = point;
		_g.set_x(_g.x - Camera.scroll.x * this.scrollFactor.x);
		var _g1 = point;
		_g1.set_y(_g1.y - Y);
		return point;
	}
	,getPosition: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x,this.y);
	}
	,getMidpoint: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x + this.get_width() * 0.5,this.y + this.get_height() * 0.5);
	}
	,getHitbox: function(rect) {
		if(rect == null) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			var rect1 = _this;
			rect1._inPool = false;
			rect = rect1;
		}
		var X = this.x;
		var Y = this.y;
		var Width = this.get_width();
		var Height = this.get_height();
		rect.x = X;
		rect.y = Y;
		rect.width = Width;
		rect.height = Height;
		return rect;
	}
	,reset: function(X,Y) {
		this.touching = 0;
		this.wasTouching = 0;
		this.setPosition(X,Y);
		this.last.set(this.x,this.y);
		this.velocity.set();
		this.revive();
	}
	,isOnScreen: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		this.getScreenPosition(this._point,Camera);
		var point = this._point;
		var width = this.get_width();
		var height = this.get_height();
		if(point.x + width > Camera.viewOffsetX && point.x < Camera.viewOffsetWidth && point.y + height > Camera.viewOffsetY) {
			return point.y < Camera.viewOffsetHeight;
		} else {
			return false;
		}
	}
	,isPixelPerfectRender: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(this.pixelPerfectRender == null) {
			return Camera.pixelPerfectRender;
		} else {
			return this.pixelPerfectRender;
		}
	}
	,isTouching: function(Direction) {
		return (this.touching & Direction) > 0;
	}
	,justTouched: function(Direction) {
		if((this.touching & Direction) > 0) {
			return (this.wasTouching & Direction) <= 0;
		} else {
			return false;
		}
	}
	,hurt: function(Damage) {
		this.health -= Damage;
		if(this.health <= 0) {
			this.kill();
		}
	}
	,screenCenter: function(axes) {
		if(axes == null) {
			axes = flixel_util_FlxAxes.XY;
		}
		if(axes != flixel_util_FlxAxes.Y) {
			this.set_x(flixel_FlxG.width / 2 - this.get_width() / 2);
		}
		if(axes != flixel_util_FlxAxes.X) {
			this.set_y(flixel_FlxG.height / 2 - this.get_height() / 2);
		}
		return this;
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
	}
	,setSize: function(Width,Height) {
		this.set_width(Width);
		this.set_height(Height);
	}
	,getBoundingBox: function(camera) {
		this.getScreenPosition(this._point,camera);
		var _this = this._rect;
		var X = this._point.x;
		var Y = this._point.y;
		var Width = this.get_width();
		var Height = this.get_height();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		this._rect = camera.transformRect(this._rect);
		if(this.isPixelPerfectRender(camera)) {
			var _this1 = this._rect;
			_this1.x = Math.floor(_this1.x);
			_this1.y = Math.floor(_this1.y);
			_this1.width = Math.floor(_this1.width);
			_this1.height = Math.floor(_this1.height);
		}
		return this._rect;
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		var value2 = this.get_width();
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "w";
		_this2.value = value2;
		var value3 = this.get_height();
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "h";
		_this3.value = value3;
		var value4 = this.visible;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "visible";
		_this4.value = value4;
		var value5 = this.velocity;
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "velocity";
		_this5.value = value5;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5]);
	}
	,set_x: function(NewX) {
		return this.x = NewX;
	}
	,set_y: function(NewY) {
		return this.y = NewY;
	}
	,set_width: function(Width) {
		return this.width = Width;
	}
	,set_height: function(Height) {
		return this.height = Height;
	}
	,get_width: function() {
		return this.width;
	}
	,get_height: function() {
		return this.height;
	}
	,get_solid: function() {
		return (this.allowCollisions & 4369) > 0;
	}
	,set_solid: function(Solid) {
		this.set_allowCollisions(Solid ? 4369 : 0);
		return Solid;
	}
	,set_angle: function(Value) {
		return this.angle = Value;
	}
	,set_moves: function(Value) {
		return this.moves = Value;
	}
	,set_immovable: function(Value) {
		return this.immovable = Value;
	}
	,set_pixelPerfectRender: function(Value) {
		return this.pixelPerfectRender = Value;
	}
	,set_allowCollisions: function(Value) {
		return this.allowCollisions = Value;
	}
	,set_path: function(path) {
		if(this.path == path) {
			return path;
		}
		if(this.path != null) {
			this.path.object = null;
		}
		if(path != null) {
			path.object = this;
		}
		return this.path = path;
	}
	,__class__: flixel_FlxObject
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_path:"set_path",set_allowCollisions:"set_allowCollisions",set_solid:"set_solid",get_solid:"get_solid",set_immovable:"set_immovable",set_moves:"set_moves",set_angle:"set_angle",set_pixelPerfectRender:"set_pixelPerfectRender",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_y:"set_y",set_x:"set_x"})
});
var flixel_FlxSprite = function(X,Y,SimpleGraphic) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._facingFlip = new haxe_ds_IntMap();
	this._angleChanged = true;
	this._cosAngle = 1;
	this._sinAngle = 0;
	this._facingVerticalMult = 1;
	this._facingHorizontalMult = 1;
	this.useColorTransform = false;
	this.color = 16777215;
	this.flipY = false;
	this.flipX = false;
	this.facing = 16;
	this.alpha = 1.0;
	this.bakedRotationAngle = 0;
	this.numFrames = 0;
	this.frameHeight = 0;
	this.frameWidth = 0;
	this.dirty = true;
	this.antialiasing = false;
	this.useFramePixels = true;
	flixel_FlxObject.call(this,X,Y);
	this.set_useFramePixels(flixel_FlxG.renderBlit);
	if(SimpleGraphic != null) {
		this.loadGraphic(SimpleGraphic);
	}
};
$hxClasses["flixel.FlxSprite"] = flixel_FlxSprite;
flixel_FlxSprite.__name__ = ["flixel","FlxSprite"];
flixel_FlxSprite.__super__ = flixel_FlxObject;
flixel_FlxSprite.prototype = $extend(flixel_FlxObject.prototype,{
	initVars: function() {
		flixel_FlxObject.prototype.initVars.call(this);
		this.animation = new flixel_animation_FlxAnimationController(this);
		this._flashPoint = new openfl_geom_Point();
		this._flashRect = new openfl_geom_Rectangle();
		this._flashRect2 = new openfl_geom_Rectangle();
		this._flashPointZero = new openfl_geom_Point();
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.offset = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.origin = point1;
		var point2 = flixel_math_FlxPoint._pool.get().set(1,1);
		point2._inPool = false;
		this.scale = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
		point3._inPool = false;
		this._halfSize = point3;
		this._matrix = new flixel_math_FlxMatrix();
		this.colorTransform = new openfl_geom_ColorTransform();
	}
	,destroy: function() {
		flixel_FlxObject.prototype.destroy.call(this);
		this.animation = flixel_util_FlxDestroyUtil.destroy(this.animation);
		this.offset = flixel_util_FlxDestroyUtil.put(this.offset);
		this.origin = flixel_util_FlxDestroyUtil.put(this.origin);
		this.scale = flixel_util_FlxDestroyUtil.put(this.scale);
		this._halfSize = flixel_util_FlxDestroyUtil.put(this._halfSize);
		this.framePixels = flixel_util_FlxDestroyUtil.dispose(this.framePixels);
		this._flashPoint = null;
		this._flashRect = null;
		this._flashRect2 = null;
		this._flashPointZero = null;
		this._matrix = null;
		this.colorTransform = null;
		this.set_blend(null);
		this.set_frames(null);
		this.set_graphic(null);
		this._frame = flixel_util_FlxDestroyUtil.destroy(this._frame);
		this._frameGraphic = flixel_util_FlxDestroyUtil.destroy(this._frameGraphic);
		this.shader = null;
	}
	,clone: function() {
		return new flixel_FlxSprite().loadGraphicFromSprite(this);
	}
	,loadGraphicFromSprite: function(Sprite) {
		this.set_frames(Sprite.frames);
		this.bakedRotationAngle = Sprite.bakedRotationAngle;
		if(this.bakedRotationAngle > 0) {
			this.set_width(Sprite.get_width());
			this.set_height(Sprite.get_height());
			this.centerOffsets();
		}
		this.set_antialiasing(Sprite.antialiasing);
		this.animation.copyFrom(Sprite.animation);
		this.graphicLoaded();
		this.set_clipRect(Sprite.clipRect);
		return this;
	}
	,loadGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		var graph = flixel_FlxG.bitmap.add(Graphic,Unique,Key);
		if(graph == null) {
			return this;
		}
		if(Width == 0) {
			if(Animated) {
				Width = graph.height;
			} else {
				Width = graph.width;
			}
			if(Width > graph.width) {
				Width = graph.width;
			} else {
				Width = Width;
			}
		}
		if(Height == 0) {
			if(Animated) {
				Height = Width;
			} else {
				Height = graph.height;
			}
			if(Height > graph.height) {
				Height = graph.height;
			} else {
				Height = Height;
			}
		}
		if(Animated) {
			var point = flixel_math_FlxPoint._pool.get().set(Width,Height);
			point._inPool = false;
			this.set_frames(flixel_graphics_frames_FlxTileFrames.fromGraphic(graph,point));
		} else {
			this.set_frames(graph.get_imageFrame());
		}
		return this;
	}
	,loadRotatedGraphic: function(Graphic,Rotations,Frame,AntiAliasing,AutoBuffer,Key) {
		if(AutoBuffer == null) {
			AutoBuffer = false;
		}
		if(AntiAliasing == null) {
			AntiAliasing = false;
		}
		if(Frame == null) {
			Frame = -1;
		}
		if(Rotations == null) {
			Rotations = 16;
		}
		var brushGraphic = flixel_FlxG.bitmap.add(Graphic,false,Key);
		if(brushGraphic == null) {
			return this;
		}
		var brush = brushGraphic.bitmap;
		var key = brushGraphic.key;
		if(Frame >= 0) {
			var brushSize = brush.height;
			var framesNum = brush.width / brushSize | 0;
			if(framesNum > Frame) {
				Frame = Frame;
			} else {
				Frame %= framesNum;
			}
			key += ":" + Frame;
			var full = brush;
			brush = new openfl_display_BitmapData(brushSize,brushSize,true,0);
			this._flashRect.setTo(Frame * brushSize,0,brushSize,brushSize);
			brush.copyPixels(full,this._flashRect,this._flashPointZero);
		}
		key += ":" + Rotations + ":" + (AutoBuffer == null ? "null" : "" + AutoBuffer);
		var tempGraph = flixel_FlxG.bitmap._cache.get(key);
		if(tempGraph == null) {
			var bitmap = flixel_util_FlxBitmapDataUtil.generateRotations(brush,Rotations,AntiAliasing,AutoBuffer);
			tempGraph = flixel_graphics_FlxGraphic.fromBitmapData(bitmap,false,key);
		}
		var max = brush.height > brush.width ? brush.height : brush.width;
		if(AutoBuffer) {
			max = max * 1.5 | 0;
		} else {
			max = max;
		}
		var point = flixel_math_FlxPoint._pool.get().set(max,max);
		point._inPool = false;
		this.set_frames(flixel_graphics_frames_FlxTileFrames.fromGraphic(tempGraph,point));
		if(AutoBuffer) {
			this.set_width(brush.width);
			this.set_height(brush.height);
			this.centerOffsets();
		}
		this.bakedRotationAngle = 360 / Rotations;
		this.animation.createPrerotated();
		return this;
	}
	,loadRotatedFrame: function(Frame,Rotations,AntiAliasing,AutoBuffer) {
		if(AutoBuffer == null) {
			AutoBuffer = false;
		}
		if(AntiAliasing == null) {
			AntiAliasing = false;
		}
		if(Rotations == null) {
			Rotations = 16;
		}
		var key = Frame.parent.key;
		if(Frame.name != null) {
			key += ":" + Frame.name;
		} else {
			var _this = Frame.frame;
			var value = _this.x;
			var _this1 = flixel_util_LabelValuePair._pool.get();
			_this1.label = "x";
			_this1.value = value;
			var value1 = _this.y;
			var _this2 = flixel_util_LabelValuePair._pool.get();
			_this2.label = "y";
			_this2.value = value1;
			var value2 = _this.width;
			var _this3 = flixel_util_LabelValuePair._pool.get();
			_this3.label = "w";
			_this3.value = value2;
			var value3 = _this.height;
			var _this4 = flixel_util_LabelValuePair._pool.get();
			_this4.label = "h";
			_this4.value = value3;
			key += ":" + flixel_util_FlxStringUtil.getDebugString([_this1,_this2,_this3,_this4]);
		}
		var graphic = flixel_FlxG.bitmap._cache.get(key);
		if(graphic == null) {
			graphic = flixel_graphics_FlxGraphic.fromBitmapData(Frame.paint(),false,key);
		}
		return this.loadRotatedGraphic(graphic,Rotations,-1,AntiAliasing,AutoBuffer);
	}
	,makeGraphic: function(Width,Height,Color,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Color == null) {
			Color = -1;
		}
		var graph = flixel_FlxG.bitmap.create(Width,Height,Color,Unique,Key);
		this.set_frames(graph.get_imageFrame());
		return this;
	}
	,graphicLoaded: function() {
	}
	,resetSize: function() {
		this._flashRect.x = 0;
		this._flashRect.y = 0;
		this._flashRect.width = this.frameWidth;
		this._flashRect.height = this.frameHeight;
	}
	,resetFrameSize: function() {
		if(this.frame != null) {
			this.frameWidth = this.frame.sourceSize.x | 0;
			this.frameHeight = this.frame.sourceSize.y | 0;
		}
		this._halfSize.set(0.5 * this.frameWidth,0.5 * this.frameHeight);
		this._flashRect.x = 0;
		this._flashRect.y = 0;
		this._flashRect.width = this.frameWidth;
		this._flashRect.height = this.frameHeight;
	}
	,resetSizeFromFrame: function() {
		this.set_width(this.frameWidth);
		this.set_height(this.frameHeight);
	}
	,resetFrame: function() {
		this.set_frame(this.frame);
	}
	,setGraphicSize: function(Width,Height) {
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Width <= 0 && Height <= 0) {
			return;
		}
		var newScaleX = Width / this.frameWidth;
		var newScaleY = Height / this.frameHeight;
		this.scale.set(newScaleX,newScaleY);
		if(Width <= 0) {
			this.scale.set_x(newScaleY);
		} else if(Height <= 0) {
			this.scale.set_y(newScaleX);
		}
	}
	,updateHitbox: function() {
		this.set_width(Math.abs(this.scale.x) * this.frameWidth);
		this.set_height(Math.abs(this.scale.y) * this.frameHeight);
		this.offset.set(-0.5 * (this.get_width() - this.frameWidth),-0.5 * (this.get_height() - this.frameHeight));
		this.origin.set(this.frameWidth * 0.5,this.frameHeight * 0.5);
	}
	,resetHelpers: function() {
		if(this.frame != null) {
			this.frameWidth = this.frame.sourceSize.x | 0;
			this.frameHeight = this.frame.sourceSize.y | 0;
		}
		this._halfSize.set(0.5 * this.frameWidth,0.5 * this.frameHeight);
		this._flashRect.x = 0;
		this._flashRect.y = 0;
		this._flashRect.width = this.frameWidth;
		this._flashRect.height = this.frameHeight;
		this.set_width(this.frameWidth);
		this.set_height(this.frameHeight);
		this._flashRect2.x = 0;
		this._flashRect2.y = 0;
		if(this.graphic != null) {
			this._flashRect2.width = this.graphic.width;
			this._flashRect2.height = this.graphic.height;
		}
		this.origin.set(this.frameWidth * 0.5,this.frameHeight * 0.5);
		if(flixel_FlxG.renderBlit) {
			this.dirty = true;
			this.updateFramePixels();
		}
	}
	,update: function(elapsed) {
		flixel_FlxObject.prototype.update.call(this,elapsed);
		this.updateAnimation(elapsed);
	}
	,updateAnimation: function(elapsed) {
		this.animation.update(elapsed);
	}
	,checkEmptyFrame: function() {
		if(this._frame == null) {
			this.loadGraphic("flixel/images/logo/default.png");
		}
	}
	,draw: function() {
		this.checkEmptyFrame();
		if(this.alpha == 0 || this._frame.type == 2) {
			return;
		}
		if(this.dirty) {
			this.calcFrame(this.useFramePixels);
		}
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(!camera.visible || !camera.exists || !this.isOnScreen(camera)) {
				continue;
			}
			this.getScreenPosition(this._point,camera).subtractPoint(this.offset);
			if(this.isSimpleRender(camera)) {
				this.drawSimple(camera);
			} else {
				this.drawComplex(camera);
			}
		}
	}
	,drawSimple: function(camera) {
		if(this.isPixelPerfectRender(camera)) {
			var _this = this._point;
			_this.set_x(Math.floor(_this.x));
			_this.set_y(Math.floor(_this.y));
		}
		var _this1 = this._point;
		var FlashPoint = this._flashPoint;
		if(FlashPoint == null) {
			FlashPoint = new openfl_geom_Point();
		}
		FlashPoint.x = _this1.x;
		FlashPoint.y = _this1.y;
		camera.copyPixels(this._frame,this.framePixels,this._flashRect,this._flashPoint,this.colorTransform,this.blend,this.antialiasing);
	}
	,drawComplex: function(camera) {
		var doFlipX = this.flipX != this._frame.flipX;
		var doFlipY = this.flipY != this._frame.flipY;
		this._frame.prepareMatrix(this._matrix,0,this.animation._curAnim != null ? doFlipX != this.animation._curAnim.flipX : doFlipX,this.animation._curAnim != null ? doFlipY != this.animation._curAnim.flipY : doFlipY);
		this._matrix.translate(-this.origin.x,-this.origin.y);
		this._matrix.scale(this.scale.x,this.scale.y);
		if(this.bakedRotationAngle <= 0) {
			if(this._angleChanged) {
				var radians = this.angle * (Math.PI / 180);
				this._sinAngle = Math.sin(radians);
				this._cosAngle = Math.cos(radians);
				this._angleChanged = false;
			}
			if(this.angle != 0) {
				var _this = this._matrix;
				var cos = this._cosAngle;
				var sin = this._sinAngle;
				var a1 = _this.a * cos - _this.b * sin;
				_this.b = _this.a * sin + _this.b * cos;
				_this.a = a1;
				var c1 = _this.c * cos - _this.d * sin;
				_this.d = _this.c * sin + _this.d * cos;
				_this.c = c1;
				var tx1 = _this.tx * cos - _this.ty * sin;
				_this.ty = _this.tx * sin + _this.ty * cos;
				_this.tx = tx1;
			}
		}
		var _this1 = this._point;
		var Y = this.origin.y;
		var _g = _this1;
		_g.set_x(_g.x + this.origin.x);
		var _g1 = _this1;
		_g1.set_y(_g1.y + Y);
		this._matrix.translate(this._point.x,this._point.y);
		if(this.isPixelPerfectRender(camera)) {
			this._matrix.tx = Math.floor(this._matrix.tx);
			this._matrix.ty = Math.floor(this._matrix.ty);
		}
		camera.drawPixels(this._frame,this.framePixels,this._matrix,this.colorTransform,this.blend,this.antialiasing,this.shader);
	}
	,stamp: function(Brush,X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		Brush.drawFrame();
		if(this.graphic == null || Brush.graphic == null) {
			throw new js__$Boot_HaxeError("Cannot stamp to or from a FlxSprite with no graphics.");
		}
		var bitmapData = Brush.framePixels;
		if(this.isSimpleRenderBlit()) {
			this._flashPoint.x = X + this.frame.frame.x;
			this._flashPoint.y = Y + this.frame.frame.y;
			this._flashRect2.width = bitmapData.width;
			this._flashRect2.height = bitmapData.height;
			this.graphic.bitmap.copyPixels(bitmapData,this._flashRect2,this._flashPoint,null,null,true);
			this._flashRect2.width = this.graphic.bitmap.width;
			this._flashRect2.height = this.graphic.bitmap.height;
		} else {
			this._matrix.identity();
			this._matrix.translate(-Brush.origin.x,-Brush.origin.y);
			this._matrix.scale(Brush.scale.x,Brush.scale.y);
			if(Brush.angle != 0) {
				this._matrix.rotate(Brush.angle * (Math.PI / 180));
			}
			this._matrix.translate(X + this.frame.frame.x + Brush.origin.x,Y + this.frame.frame.y + Brush.origin.y);
			var brushBlend = Brush.blend;
			this.graphic.bitmap.draw(bitmapData,this._matrix,null,brushBlend,null,Brush.antialiasing);
		}
		if(flixel_FlxG.renderBlit) {
			this.dirty = true;
			this.calcFrame();
		}
	}
	,drawFrame: function(Force) {
		if(Force == null) {
			Force = false;
		}
		if(flixel_FlxG.renderBlit) {
			if(Force || this.dirty) {
				this.dirty = true;
				this.calcFrame();
			}
		} else {
			this.dirty = true;
			this.calcFrame(true);
		}
	}
	,centerOffsets: function(AdjustPosition) {
		if(AdjustPosition == null) {
			AdjustPosition = false;
		}
		this.offset.set_x((this.frameWidth - this.get_width()) * 0.5);
		this.offset.set_y((this.frameHeight - this.get_height()) * 0.5);
		if(AdjustPosition) {
			var _g = this;
			_g.set_x(_g.x + this.offset.x);
			var _g1 = this;
			_g1.set_y(_g1.y + this.offset.y);
		}
	}
	,centerOrigin: function() {
		this.origin.set(this.frameWidth * 0.5,this.frameHeight * 0.5);
	}
	,replaceColor: function(Color,NewColor,FetchPositions) {
		if(FetchPositions == null) {
			FetchPositions = false;
		}
		var positions = flixel_util_FlxBitmapDataUtil.replaceColor(this.graphic.bitmap,Color,NewColor,FetchPositions);
		if(positions != null) {
			this.dirty = true;
		}
		return positions;
	}
	,setColorTransform: function(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset) {
		if(alphaOffset == null) {
			alphaOffset = 0;
		}
		if(blueOffset == null) {
			blueOffset = 0;
		}
		if(greenOffset == null) {
			greenOffset = 0;
		}
		if(redOffset == null) {
			redOffset = 0;
		}
		if(alphaMultiplier == null) {
			alphaMultiplier = 1.0;
		}
		if(blueMultiplier == null) {
			blueMultiplier = 1.0;
		}
		if(greenMultiplier == null) {
			greenMultiplier = 1.0;
		}
		if(redMultiplier == null) {
			redMultiplier = 1.0;
		}
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		var Value = Math.round(redMultiplier * 255);
		color &= -16711681;
		color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(greenMultiplier * 255);
		color &= -65281;
		color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(blueMultiplier * 255);
		color &= -256;
		color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(255);
		color &= 16777215;
		color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		this.set_color(color & 16777215);
		this.set_alpha(alphaMultiplier);
		flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
		flixel_util_FlxColorTransformUtil.setOffsets(this.colorTransform,redOffset,greenOffset,blueOffset,alphaOffset);
		this.useColorTransform = this.alpha != 1 || this.color != 16777215 || flixel_util_FlxColorTransformUtil.hasRGBOffsets(this.colorTransform);
		this.dirty = true;
	}
	,updateColorTransform: function() {
		if(this.colorTransform == null) {
			this.colorTransform = new openfl_geom_ColorTransform();
		}
		this.useColorTransform = this.alpha != 1 || this.color != 16777215;
		if(this.useColorTransform) {
			flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,(this.color >> 16 & 255) / 255,(this.color >> 8 & 255) / 255,(this.color & 255) / 255,this.alpha);
		} else {
			flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,1,1,1,1);
		}
		this.dirty = true;
	}
	,pixelsOverlapPoint: function(point,Mask,Camera) {
		if(Mask == null) {
			Mask = 255;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		this.getScreenPosition(this._point,Camera);
		this._point.subtractPoint(this.offset);
		this._flashPoint.x = point.x - Camera.scroll.x - this._point.x;
		this._flashPoint.y = point.y - Camera.scroll.y - this._point.y;
		if(point._weak) {
			point.put();
		}
		if(this._flashPoint.x < 0 || this._flashPoint.x > this.frameWidth || this._flashPoint.y < 0 || this._flashPoint.y > this.frameHeight) {
			return false;
		} else {
			var frameData = this.updateFramePixels();
			var pixelColor = frameData.getPixel32(this._flashPoint.x | 0,this._flashPoint.y | 0);
			return (pixelColor >> 24 & 255) * this.alpha >= Mask;
		}
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
		this.checkEmptyFrame();
		if(flixel_FlxG.renderTile && !RunOnCpp) {
			return;
		}
		this.updateFramePixels();
	}
	,updateFramePixels: function() {
		if(this._frame == null || !this.dirty) {
			return this.framePixels;
		}
		if(flixel_FlxG.renderTile && this._frameGraphic != null) {
			this.dirty = false;
			return this.framePixels;
		}
		var doFlipX = this.flipX != this._frame.flipX;
		var doFlipX1 = this.animation._curAnim != null ? doFlipX != this.animation._curAnim.flipX : doFlipX;
		var doFlipY = this.flipY != this._frame.flipY;
		var doFlipY1 = this.animation._curAnim != null ? doFlipY != this.animation._curAnim.flipY : doFlipY;
		if(!doFlipX1 && !doFlipY1 && this._frame.type == 0) {
			this.framePixels = this._frame.paint(this.framePixels,this._flashPointZero,false,true);
		} else {
			this.framePixels = this._frame.paintRotatedAndFlipped(this.framePixels,this._flashPointZero,0,doFlipX1,doFlipY1,false,true);
		}
		if(this.useColorTransform) {
			this.framePixels.colorTransform(this._flashRect,this.colorTransform);
		}
		if(flixel_FlxG.renderTile && this.useFramePixels) {
			this._frameGraphic = flixel_util_FlxDestroyUtil.destroy(this._frameGraphic);
			this._frameGraphic = flixel_graphics_FlxGraphic.fromBitmapData(this.framePixels,false,null,false);
			this._frame = this._frameGraphic.get_imageFrame().get_frame().copyTo(this._frame);
		}
		this.dirty = false;
		return this.framePixels;
	}
	,getGraphicMidpoint: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x + this.frameWidth * 0.5,this.y + this.frameHeight * 0.5);
	}
	,isOnScreen: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var minX = this.x - this.offset.x - Camera.scroll.x * this.scrollFactor.x;
		var minY = this.y - this.offset.y - Camera.scroll.y * this.scrollFactor.y;
		if((this.angle == 0 || this.bakedRotationAngle > 0) && this.scale.x == 1 && this.scale.y == 1) {
			this._point.set(minX,minY);
			var point = this._point;
			if(point.x + this.frameWidth > Camera.viewOffsetX && point.x < Camera.viewOffsetWidth && point.y + this.frameHeight > Camera.viewOffsetY) {
				return point.y < Camera.viewOffsetHeight;
			} else {
				return false;
			}
		}
		var radiusX = this._halfSize.x;
		var radiusY = this._halfSize.y;
		var ox = this.origin.x;
		if(ox != radiusX) {
			var x1 = Math.abs(ox);
			var x2 = Math.abs(this.frameWidth - ox);
			radiusX = Math.max(x2,x1);
		}
		var oy = this.origin.y;
		if(oy != radiusY) {
			var y1 = Math.abs(oy);
			var y2 = Math.abs(this.frameHeight - oy);
			radiusY = Math.max(y2,y1);
		}
		radiusX *= Math.abs(this.scale.x);
		radiusY *= Math.abs(this.scale.y);
		var radius = Math.max(radiusX,radiusY);
		radius *= 1.41421356237;
		minX += ox - radius;
		minY += oy - radius;
		var doubleRadius = 2 * radius;
		this._point.set(minX,minY);
		var point1 = this._point;
		if(point1.x + doubleRadius > Camera.viewOffsetX && point1.x < Camera.viewOffsetWidth && point1.y + doubleRadius > Camera.viewOffsetY) {
			return point1.y < Camera.viewOffsetHeight;
		} else {
			return false;
		}
	}
	,isSimpleRender: function(camera) {
		if(flixel_FlxG.renderTile) {
			return false;
		}
		return this.isSimpleRenderBlit(camera);
	}
	,isSimpleRenderBlit: function(camera) {
		var result = (this.angle == 0 || this.bakedRotationAngle > 0) && this.scale.x == 1 && this.scale.y == 1 && this.blend == null;
		if(result) {
			if(camera != null) {
				result = this.isPixelPerfectRender(camera);
			} else {
				result = this.pixelPerfectRender;
			}
		} else {
			result = false;
		}
		return result;
	}
	,setFacingFlip: function(Direction,FlipX,FlipY) {
		this._facingFlip.h[Direction] = { x : FlipX, y : FlipY};
	}
	,setFrames: function(Frames,saveAnimations) {
		if(saveAnimations == null) {
			saveAnimations = true;
		}
		if(saveAnimations) {
			var animations = this.animation._animations;
			var reverse = false;
			var index = 0;
			var frameIndex = this.animation.frameIndex;
			var currName = null;
			if(this.animation._curAnim != null) {
				reverse = this.animation._curAnim.reversed;
				index = this.animation._curAnim.curFrame;
				currName = this.animation._curAnim.name;
			}
			this.animation._animations = null;
			this.set_frames(Frames);
			this.set_frame(this.frames.frames[frameIndex]);
			this.animation._animations = animations;
			if(currName != null) {
				this.animation.play(currName,false,reverse,index);
			}
		} else {
			this.set_frames(Frames);
		}
		return this;
	}
	,get_pixels: function() {
		if(this.graphic == null) {
			return null;
		} else {
			return this.graphic.bitmap;
		}
	}
	,set_pixels: function(Pixels) {
		var key = flixel_FlxG.bitmap.findKeyForBitmap(Pixels);
		if(key == null) {
			key = flixel_FlxG.bitmap.getUniqueKey();
			this.set_graphic(flixel_FlxG.bitmap.add(Pixels,false,key));
		} else {
			this.set_graphic(flixel_FlxG.bitmap._cache.get(key));
		}
		this.set_frames(this.graphic.get_imageFrame());
		return Pixels;
	}
	,set_frame: function(Value) {
		this.frame = Value;
		if(this.frame != null) {
			if(this.frame != null) {
				this.frameWidth = this.frame.sourceSize.x | 0;
				this.frameHeight = this.frame.sourceSize.y | 0;
			}
			this._halfSize.set(0.5 * this.frameWidth,0.5 * this.frameHeight);
			this._flashRect.x = 0;
			this._flashRect.y = 0;
			this._flashRect.width = this.frameWidth;
			this._flashRect.height = this.frameHeight;
			this.dirty = true;
		} else if(this.frames != null && this.frames.frames != null && this.numFrames > 0) {
			this.frame = this.frames.frames[0];
			this.dirty = true;
		} else {
			return null;
		}
		if(flixel_FlxG.renderTile) {
			this._frameGraphic = flixel_util_FlxDestroyUtil.destroy(this._frameGraphic);
		}
		if(this.clipRect != null) {
			this._frame = this.frame.clipTo(this.clipRect,this._frame);
		} else {
			this._frame = this.frame.copyTo(this._frame);
		}
		return this.frame;
	}
	,set_facing: function(Direction) {
		var flip = this._facingFlip.h[Direction];
		if(flip != null) {
			this.set_flipX(flip.x);
			this.set_flipY(flip.y);
		}
		return this.facing = Direction;
	}
	,set_alpha: function(Alpha) {
		if(this.alpha == Alpha) {
			return Alpha;
		}
		var lowerBound = Alpha < 0 ? 0 : Alpha;
		this.alpha = lowerBound > 1 ? 1 : lowerBound;
		this.updateColorTransform();
		return this.alpha;
	}
	,set_color: function(Color) {
		if(this.color == Color) {
			return Color;
		}
		this.color = Color;
		this.updateColorTransform();
		return this.color;
	}
	,set_angle: function(Value) {
		var newAngle = this.angle != Value;
		var ret = flixel_FlxObject.prototype.set_angle.call(this,Value);
		if(newAngle) {
			this._angleChanged = true;
			this.animation.update(0);
		}
		return ret;
	}
	,updateTrig: function() {
		if(this._angleChanged) {
			var radians = this.angle * (Math.PI / 180);
			this._sinAngle = Math.sin(radians);
			this._cosAngle = Math.cos(radians);
			this._angleChanged = false;
		}
	}
	,set_blend: function(Value) {
		return this.blend = Value;
	}
	,set_graphic: function(Value) {
		var oldGraphic = this.graphic;
		if(this.graphic != Value && Value != null) {
			var _g = Value;
			var _g1 = _g.get_useCount();
			_g.set_useCount(_g1 + 1);
		}
		if(oldGraphic != null && oldGraphic != Value) {
			var _g2 = oldGraphic;
			var _g11 = _g2.get_useCount();
			_g2.set_useCount(_g11 - 1);
		}
		return this.graphic = Value;
	}
	,set_clipRect: function(rect) {
		if(rect != null) {
			rect.x = Math.round(rect.x);
			rect.y = Math.round(rect.y);
			rect.width = Math.round(rect.width);
			rect.height = Math.round(rect.height);
			this.clipRect = rect;
		} else {
			this.clipRect = null;
		}
		if(this.frames != null) {
			this.set_frame(this.frames.frames[this.animation.frameIndex]);
		}
		return rect;
	}
	,set_frames: function(Frames) {
		if(this.animation != null) {
			this.animation.destroyAnimations();
		}
		if(Frames != null) {
			this.set_graphic(Frames.parent);
			this.frames = Frames;
			this.set_frame(this.frames.frames[0]);
			this.numFrames = this.frames.frames.length;
			this.resetHelpers();
			this.bakedRotationAngle = 0;
			this.animation.set_frameIndex(0);
			this.graphicLoaded();
		} else {
			this.frames = null;
			this.set_frame(null);
			this.set_graphic(null);
		}
		this.set_clipRect(null);
		return Frames;
	}
	,set_flipX: function(Value) {
		if(flixel_FlxG.renderTile) {
			this._facingHorizontalMult = Value ? -1 : 1;
		}
		this.dirty = this.flipX != Value || this.dirty;
		return this.flipX = Value;
	}
	,set_flipY: function(Value) {
		if(flixel_FlxG.renderTile) {
			this._facingVerticalMult = Value ? -1 : 1;
		}
		this.dirty = this.flipY != Value || this.dirty;
		return this.flipY = Value;
	}
	,set_antialiasing: function(value) {
		return this.antialiasing = value;
	}
	,set_useFramePixels: function(value) {
		if(flixel_FlxG.renderTile) {
			if(value != this.useFramePixels) {
				this.useFramePixels = value;
				this.set_frame(this.frame);
				if(value) {
					this.updateFramePixels();
				}
			}
			return value;
		} else {
			this.useFramePixels = true;
			return true;
		}
	}
	,checkFlipX: function() {
		var doFlipX = this.flipX != this._frame.flipX;
		if(this.animation._curAnim != null) {
			return doFlipX != this.animation._curAnim.flipX;
		}
		return doFlipX;
	}
	,checkFlipY: function() {
		var doFlipY = this.flipY != this._frame.flipY;
		if(this.animation._curAnim != null) {
			return doFlipY != this.animation._curAnim.flipY;
		}
		return doFlipY;
	}
	,__class__: flixel_FlxSprite
	,__properties__: $extend(flixel_FlxObject.prototype.__properties__,{set_clipRect:"set_clipRect",set_color:"set_color",set_blend:"set_blend",set_flipY:"set_flipY",set_flipX:"set_flipX",set_facing:"set_facing",set_alpha:"set_alpha",set_graphic:"set_graphic",set_frames:"set_frames",set_frame:"set_frame",set_pixels:"set_pixels",get_pixels:"get_pixels",set_antialiasing:"set_antialiasing",set_useFramePixels:"set_useFramePixels"})
});
var Town = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	flixel_FlxSprite.call(this,X,Y);
	this.scrollFactor.set_x(0);
	this.generateName();
	this.generateHotDogs();
	this.loadGraphic("assets/images/pin.png",false,29,39);
	this.setSize(49,80);
	this.nameText = new flixel_text_FlxText(this.x - 86,this.y - 30,200,"",30);
	this.nameText.set_text(this.townName);
	this.nameText.setFormat("assets/fonts/ChevyRay - Tentown.ttf",10,-1,"center");
	flixel_FlxG.game._state.add(this.nameText);
	this.nameText.scrollFactor.set_x(0);
	this.hotDogStockText = new flixel_text_FlxText(this.x - 60,this.y - 15,150,"",30);
	this.hotDogStockText.set_text("Needs: " + this.hotDogStock + " Hot Dogs");
	this.hotDogStockText.setFormat("assets/fonts/ChevyRay - Express.ttf",9,-1,"center");
	flixel_FlxG.game._state.add(this.hotDogStockText);
	this.hotDogStockText.scrollFactor.set_x(0);
	var _this = flixel_FlxG.log;
	var Data = "HotDogText Pos: (" + this.hotDogStockText.x + "," + this.hotDogStockText.y + ")";
};
$hxClasses["Town"] = Town;
Town.__name__ = ["Town"];
Town.__super__ = flixel_FlxSprite;
Town.prototype = $extend(flixel_FlxSprite.prototype,{
	update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
		var _this = flixel_FlxG.keys.justPressed;
		if(_this.keyManager.checkStatus(38,_this.status)) {
			var _g = this.hotDogStockText;
			_g.set_size((_g._defaultFormat.size | 0) + 1);
		}
		this.nameText.set_x(this.x - 86);
		this.hotDogStockText.set_x(this.x - 60);
		if(this.hotDogStock < 0) {
			this.hotDogStockText.set_text("Needs: " + -this.hotDogStock + " Hot Dogs");
		} else if(this.hotDogStock > 0) {
			this.hotDogStockText.set_text("Has: " + this.hotDogStock + " Hot Dogs");
		} else if(this.hotDogStock == 0) {
			this.hotDogStockText.set_text("We got enough hot dogs!");
		}
	}
	,kill: function() {
		if(this.hotDogStock > 0) {
			Reg.hotdogs += this.hotDogStock;
			Reg.score -= Math.round(this.hotDogStock / 2);
		}
		this.kill2();
	}
	,kill2: function() {
		var _gthis = this;
		new flixel_util_FlxTimer().start(.1).onComplete = function(t) {
			_gthis.hotDogStockText.set_alive(false);
			_gthis.hotDogStockText.set_exists(false);
			_gthis.nameText.set_alive(false);
			_gthis.nameText.set_exists(false);
			_gthis.set_alive(false);
			_gthis.set_exists(false);
		};
	}
	,generateHotDogs: function() {
		var coinFlip = flixel_FlxG.random["float"](0,100) < 50;
		if(coinFlip == true) {
			this.hotDogStock = flixel_FlxG.random["int"](1,10);
		} else if(coinFlip == false) {
			this.hotDogStock = flixel_FlxG.random["int"](-10,-1);
		}
	}
	,generateName: function() {
		var arrayOfPrefixes_0 = "New ";
		var arrayOfPrefixes_1 = "Neo ";
		var arrayOfPrefixes_2 = "Fort ";
		var arrayOfPrefixes_3 = "Old ";
		var arrayOfPrefixes_4 = "O'";
		var arrayOfFirstParts = ["Fart","Barf","Poo","Tinkel","Toil","Boog","Toot","Scum","Piss","Taint","Gooch","Dook","Bonk","Shat","Scat","Turd","Ding","Dung","Crap","Colon","Plop","Duck","Dump","Tush","Burp","Belch"];
		var arrayOfSecondParts = ["ing","er","nana","son","i","ain","wich","a","le","caca","ick","en","ex","ui","ine","um","co","lin","o"];
		var arrayOfThirdParts = ["ton","burg"," City","field","town"," Ridge","boro"," Town","land","istan","bourg","delphia","topia"," Point"," Pass","ville","shire","bury","opolis"];
		var prefix = "";
		var secondPart = "";
		var firstPart = arrayOfFirstParts[flixel_FlxG.random["int"](0,arrayOfFirstParts.length - 1)];
		var thirdPart = arrayOfThirdParts[flixel_FlxG.random["int"](0,arrayOfThirdParts.length - 1)];
		var secondPart1 = arrayOfSecondParts[flixel_FlxG.random["int"](0,arrayOfSecondParts.length - 1)];
		this.townName = "" + prefix + firstPart + secondPart1 + thirdPart;
	}
	,__class__: Town
});
var Truck = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	flixel_FlxSprite.call(this,X,Y);
	this.loadGraphic("assets/images/truck_body.png",false,93,43);
	var truck_back = new flixel_FlxSprite(200,121);
	truck_back.loadGraphic("assets/images/truck_back.png",false,93,43);
	flixel_FlxG.game._state.add(truck_back);
	truck_back.scrollFactor.set_x(0);
	var _truckbacktween = flixel_tweens_FlxTween.tween(truck_back,{ y : truck_back.y + 2},.25,{ type : 4, ease : flixel_tweens_FlxEase.sineInOut});
	var truck_person = new flixel_FlxSprite(200,121);
	truck_person.loadGraphic("assets/images/truck_person.png",false,93,43);
	flixel_FlxG.game._state.add(truck_person);
	truck_person.scrollFactor.set_x(0);
	new flixel_util_FlxTimer().start(.035).onComplete = function(t) {
		var _avatarHeadTween = flixel_tweens_FlxTween.tween(truck_person,{ y : truck_person.y + 2},.25,{ type : 4, ease : flixel_tweens_FlxEase.sineInOut});
	};
	var truck_frontWheel = new flixel_FlxSprite(203,146);
	truck_frontWheel.loadGraphic("assets/images/truck_wheel.png",false,18,18);
	flixel_FlxG.game._state.add(truck_frontWheel);
	truck_frontWheel.scrollFactor.set_x(0);
	var _avatarFrontWheelTween = flixel_tweens_FlxTween.angle(truck_frontWheel,360,0,1,{ type : 2});
	var truck_backWheel = new flixel_FlxSprite(267,146);
	truck_backWheel.loadGraphic("assets/images/truck_wheel.png",false,18,18);
	flixel_FlxG.game._state.add(truck_backWheel);
	truck_backWheel.scrollFactor.set_x(0);
	var _avatarBackWheelTween = flixel_tweens_FlxTween.angle(truck_backWheel,360,0,1,{ type : 2});
};
$hxClasses["Truck"] = Truck;
Truck.__name__ = ["Truck"];
Truck.__super__ = flixel_FlxSprite;
Truck.prototype = $extend(flixel_FlxSprite.prototype,{
	update: function(elapsed) {
		this.movement();
		flixel_FlxSprite.prototype.update.call(this,elapsed);
	}
	,movement: function() {
	}
	,__class__: Truck
});
var ValueType = $hxClasses["ValueType"] = { __ename__ : ["ValueType"], __constructs__ : ["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"] };
ValueType.TNull = ["TNull",0];
ValueType.TNull.toString = $estr;
ValueType.TNull.__enum__ = ValueType;
ValueType.TInt = ["TInt",1];
ValueType.TInt.toString = $estr;
ValueType.TInt.__enum__ = ValueType;
ValueType.TFloat = ["TFloat",2];
ValueType.TFloat.toString = $estr;
ValueType.TFloat.__enum__ = ValueType;
ValueType.TBool = ["TBool",3];
ValueType.TBool.toString = $estr;
ValueType.TBool.__enum__ = ValueType;
ValueType.TObject = ["TObject",4];
ValueType.TObject.toString = $estr;
ValueType.TObject.__enum__ = ValueType;
ValueType.TFunction = ["TFunction",5];
ValueType.TFunction.toString = $estr;
ValueType.TFunction.__enum__ = ValueType;
ValueType.TClass = function(c) { var $x = ["TClass",6,c]; $x.__enum__ = ValueType; $x.toString = $estr; return $x; };
ValueType.TEnum = function(e) { var $x = ["TEnum",7,e]; $x.__enum__ = ValueType; $x.toString = $estr; return $x; };
ValueType.TUnknown = ["TUnknown",8];
ValueType.TUnknown.toString = $estr;
ValueType.TUnknown.__enum__ = ValueType;
var Type = function() { };
$hxClasses["Type"] = Type;
Type.__name__ = ["Type"];
Type.getSuperClass = function(c) {
	return c.__super__;
};
Type.getClassName = function(c) {
	var a = c.__name__;
	if(a == null) {
		return null;
	}
	return a.join(".");
};
Type.getEnumName = function(e) {
	var a = e.__ename__;
	return a.join(".");
};
Type.resolveClass = function(name) {
	var cl = $hxClasses[name];
	if(cl == null || !cl.__name__) {
		return null;
	}
	return cl;
};
Type.resolveEnum = function(name) {
	var e = $hxClasses[name];
	if(e == null || !e.__ename__) {
		return null;
	}
	return e;
};
Type.createInstance = function(cl,args) {
	var _g = args.length;
	switch(_g) {
	case 0:
		return new cl();
	case 1:
		return new cl(args[0]);
	case 2:
		return new cl(args[0],args[1]);
	case 3:
		return new cl(args[0],args[1],args[2]);
	case 4:
		return new cl(args[0],args[1],args[2],args[3]);
	case 5:
		return new cl(args[0],args[1],args[2],args[3],args[4]);
	case 6:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5]);
	case 7:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);
	case 8:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
	case 9:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);
	case 10:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9]);
	case 11:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]);
	case 12:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]);
	case 13:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11],args[12]);
	case 14:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11],args[12],args[13]);
	default:
		throw new js__$Boot_HaxeError("Too many arguments");
	}
};
Type.createEmptyInstance = function(cl) {
	function empty() {}; empty.prototype = cl.prototype;
	return new empty();
};
Type.createEnum = function(e,constr,params) {
	var f = Reflect.field(e,constr);
	if(f == null) {
		throw new js__$Boot_HaxeError("No such constructor " + constr);
	}
	if(Reflect.isFunction(f)) {
		if(params == null) {
			throw new js__$Boot_HaxeError("Constructor " + constr + " need parameters");
		}
		return f.apply(e,params);
	}
	if(params != null && params.length != 0) {
		throw new js__$Boot_HaxeError("Constructor " + constr + " does not need parameters");
	}
	return f;
};
Type.getClassFields = function(c) {
	var a = Reflect.fields(c);
	HxOverrides.remove(a,"__name__");
	HxOverrides.remove(a,"__interfaces__");
	HxOverrides.remove(a,"__properties__");
	HxOverrides.remove(a,"__super__");
	HxOverrides.remove(a,"__meta__");
	HxOverrides.remove(a,"prototype");
	return a;
};
Type["typeof"] = function(v) {
	var _g = typeof(v);
	switch(_g) {
	case "boolean":
		return ValueType.TBool;
	case "function":
		if(v.__name__ || v.__ename__) {
			return ValueType.TObject;
		}
		return ValueType.TFunction;
	case "number":
		if(Math.ceil(v) == v % 2147483648.0) {
			return ValueType.TInt;
		}
		return ValueType.TFloat;
	case "object":
		if(v == null) {
			return ValueType.TNull;
		}
		var e = v.__enum__;
		if(e != null) {
			return ValueType.TEnum(e);
		}
		var c = js_Boot.getClass(v);
		if(c != null) {
			return ValueType.TClass(c);
		}
		return ValueType.TObject;
	case "string":
		return ValueType.TClass(String);
	case "undefined":
		return ValueType.TNull;
	default:
		return ValueType.TUnknown;
	}
};
Type.enumEq = function(a,b) {
	if(a == b) {
		return true;
	}
	try {
		if(a[0] != b[0]) {
			return false;
		}
		var _g1 = 2;
		var _g = a.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(!Type.enumEq(a[i],b[i])) {
				return false;
			}
		}
		var e = a.__enum__;
		if(e != b.__enum__ || e == null) {
			return false;
		}
	} catch( e1 ) {
		haxe_CallStack.lastException = e1;
		return false;
	}
	return true;
};
var _$UInt_UInt_$Impl_$ = {};
$hxClasses["_UInt.UInt_Impl_"] = _$UInt_UInt_$Impl_$;
_$UInt_UInt_$Impl_$.__name__ = ["_UInt","UInt_Impl_"];
_$UInt_UInt_$Impl_$.gt = function(a,b) {
	var aNeg = a < 0;
	var bNeg = b < 0;
	if(aNeg != bNeg) {
		return aNeg;
	} else {
		return a > b;
	}
};
_$UInt_UInt_$Impl_$.toFloat = function(this1) {
	var $int = this1;
	if($int < 0) {
		return 4294967296.0 + $int;
	} else {
		return $int + 0.0;
	}
};
var Xml = function(nodeType) {
	this.nodeType = nodeType;
	this.children = [];
	this.attributeMap = new haxe_ds_StringMap();
};
$hxClasses["Xml"] = Xml;
Xml.__name__ = ["Xml"];
Xml.parse = function(str) {
	return haxe_xml_Parser.parse(str);
};
Xml.createElement = function(name) {
	var xml = new Xml(Xml.Element);
	if(xml.nodeType != Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + xml.nodeType);
	}
	xml.nodeName = name;
	return xml;
};
Xml.createPCData = function(data) {
	var xml = new Xml(Xml.PCData);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createCData = function(data) {
	var xml = new Xml(Xml.CData);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createComment = function(data) {
	var xml = new Xml(Xml.Comment);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createDocType = function(data) {
	var xml = new Xml(Xml.DocType);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createProcessingInstruction = function(data) {
	var xml = new Xml(Xml.ProcessingInstruction);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createDocument = function() {
	return new Xml(Xml.Document);
};
Xml.prototype = {
	get: function(att) {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		var _this = this.attributeMap;
		if(__map_reserved[att] != null) {
			return _this.getReserved(att);
		} else {
			return _this.h[att];
		}
	}
	,set: function(att,value) {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		var _this = this.attributeMap;
		if(__map_reserved[att] != null) {
			_this.setReserved(att,value);
		} else {
			_this.h[att] = value;
		}
	}
	,exists: function(att) {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		var _this = this.attributeMap;
		if(__map_reserved[att] != null) {
			return _this.existsReserved(att);
		} else {
			return _this.h.hasOwnProperty(att);
		}
	}
	,elements: function() {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		var _g = [];
		var _g1 = 0;
		var _g2 = this.children;
		while(_g1 < _g2.length) {
			var child = _g2[_g1];
			++_g1;
			if(child.nodeType == Xml.Element) {
				_g.push(child);
			}
		}
		var ret = _g;
		return HxOverrides.iter(ret);
	}
	,elementsNamed: function(name) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		var _g = [];
		var _g1 = 0;
		var _g2 = this.children;
		while(_g1 < _g2.length) {
			var child = _g2[_g1];
			++_g1;
			var tmp;
			if(child.nodeType == Xml.Element) {
				if(child.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + child.nodeType);
				}
				tmp = child.nodeName == name;
			} else {
				tmp = false;
			}
			if(tmp) {
				_g.push(child);
			}
		}
		var ret = _g;
		return HxOverrides.iter(ret);
	}
	,firstElement: function() {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		var _g = 0;
		var _g1 = this.children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.nodeType == Xml.Element) {
				return child;
			}
		}
		return null;
	}
	,addChild: function(x) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		if(x.parent != null) {
			x.parent.removeChild(x);
		}
		this.children.push(x);
		x.parent = this;
	}
	,removeChild: function(x) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		if(HxOverrides.remove(this.children,x)) {
			x.parent = null;
			return true;
		}
		return false;
	}
	,__class__: Xml
};
var flixel_IFlxBasic = function() { };
$hxClasses["flixel.IFlxBasic"] = flixel_IFlxBasic;
flixel_IFlxBasic.__name__ = ["flixel","IFlxBasic"];
flixel_IFlxBasic.prototype = {
	__class__: flixel_IFlxBasic
	,__properties__: {set_exists:"set_exists",set_alive:"set_alive",set_visible:"set_visible",set_active:"set_active"}
};
var openfl_VectorData = function() {
	this.length = 0;
};
$hxClasses["openfl.VectorData"] = openfl_VectorData;
openfl_VectorData.__name__ = ["openfl","VectorData"];
openfl_VectorData.prototype = {
	__class__: openfl_VectorData
};
var flixel_util_FlxPool_$flixel_$math_$FlxPoint = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_math_FlxPoint"] = flixel_util_FlxPool_$flixel_$math_$FlxPoint;
flixel_util_FlxPool_$flixel_$math_$FlxPoint.__name__ = ["flixel","util","FlxPool_flixel_math_FlxPoint"];
flixel_util_FlxPool_$flixel_$math_$FlxPoint.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$math_$FlxPoint.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$math_$FlxPoint
	,__properties__: {get_length:"get_length"}
};
var flixel_math_FlxPoint = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._inPool = false;
	this._weak = false;
	this.y = 0;
	this.x = 0;
	this.set(X,Y);
};
$hxClasses["flixel.math.FlxPoint"] = flixel_math_FlxPoint;
flixel_math_FlxPoint.__name__ = ["flixel","math","FlxPoint"];
flixel_math_FlxPoint.__interfaces__ = [flixel_util_IFlxPooled];
flixel_math_FlxPoint.__properties__ = {get_pool:"get_pool"};
flixel_math_FlxPoint.get = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_math_FlxPoint.weak = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	var point1 = point;
	point1._weak = true;
	return point1;
};
flixel_math_FlxPoint.get_pool = function() {
	return flixel_math_FlxPoint._pool;
};
flixel_math_FlxPoint.prototype = {
	put: function() {
		if(!this._inPool) {
			this._inPool = true;
			this._weak = false;
			flixel_math_FlxPoint._pool.putUnsafe(this);
		}
	}
	,putWeak: function() {
		if(this._weak) {
			this.put();
		}
	}
	,set: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
		return this;
	}
	,add: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		var _g = this;
		_g.set_x(_g.x + X);
		var _g1 = this;
		_g1.set_y(_g1.y + Y);
		return this;
	}
	,addPoint: function(point) {
		var _g = this;
		_g.set_x(_g.x + point.x);
		var _g1 = this;
		_g1.set_y(_g1.y + point.y);
		if(point._weak) {
			point.put();
		}
		return this;
	}
	,subtract: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		var _g = this;
		_g.set_x(_g.x - X);
		var _g1 = this;
		_g1.set_y(_g1.y - Y);
		return this;
	}
	,subtractPoint: function(point) {
		var _g = this;
		_g.set_x(_g.x - point.x);
		var _g1 = this;
		_g1.set_y(_g1.y - point.y);
		if(point._weak) {
			point.put();
		}
		return this;
	}
	,scale: function(k) {
		var _g = this;
		_g.set_x(_g.x * k);
		var _g1 = this;
		_g1.set_y(_g1.y * k);
		return this;
	}
	,copyFrom: function(point) {
		this.set_x(point.x);
		this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		return this;
	}
	,copyTo: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		point.set_x(this.x);
		point.set_y(this.y);
		return point;
	}
	,copyFromFlash: function(FlashPoint) {
		this.set_x(FlashPoint.x);
		this.set_y(FlashPoint.y);
		return this;
	}
	,copyToFlash: function(FlashPoint) {
		if(FlashPoint == null) {
			FlashPoint = new openfl_geom_Point();
		}
		FlashPoint.x = this.x;
		FlashPoint.y = this.y;
		return FlashPoint;
	}
	,addToFlash: function(FlashPoint) {
		FlashPoint.x += this.x;
		FlashPoint.y += this.y;
		return FlashPoint;
	}
	,subtractFromFlash: function(FlashPoint) {
		FlashPoint.x -= this.x;
		FlashPoint.y -= this.y;
		return FlashPoint;
	}
	,inCoords: function(RectX,RectY,RectWidth,RectHeight) {
		return flixel_math_FlxMath.pointInCoordinates(this.x,this.y,RectX,RectY,RectWidth,RectHeight);
	}
	,inRect: function(Rect) {
		return flixel_math_FlxMath.pointInFlxRect(this.x,this.y,Rect);
	}
	,distanceTo: function(point) {
		var dx = this.x - point.x;
		var dy = this.y - point.y;
		if(point._weak) {
			point.put();
		}
		return Math.sqrt(dx * dx + dy * dy);
	}
	,floor: function() {
		this.set_x(Math.floor(this.x));
		this.set_y(Math.floor(this.y));
		return this;
	}
	,ceil: function() {
		this.set_x(Math.ceil(this.x));
		this.set_y(Math.ceil(this.y));
		return this;
	}
	,round: function() {
		this.set_x(Math.round(this.x));
		this.set_y(Math.round(this.y));
		return this;
	}
	,rotate: function(Pivot,Angle) {
		var radians = Angle * (Math.PI / 180);
		var n = radians;
		n *= 0.3183098862;
		if(n > 1) {
			n -= Math.ceil(n) >> 1 << 1;
		} else if(n < -1) {
			n += Math.ceil(-n) >> 1 << 1;
		}
		var sin = n > 0 ? n * (3.1 + n * (0.5 + n * (-7.2 + n * 3.6))) : n * (3.1 - n * (0.5 + n * (7.2 + n * 3.6)));
		var n1 = radians + 1.570796327;
		n1 *= 0.3183098862;
		if(n1 > 1) {
			n1 -= Math.ceil(n1) >> 1 << 1;
		} else if(n1 < -1) {
			n1 += Math.ceil(-n1) >> 1 << 1;
		}
		var cos = n1 > 0 ? n1 * (3.1 + n1 * (0.5 + n1 * (-7.2 + n1 * 3.6))) : n1 * (3.1 - n1 * (0.5 + n1 * (7.2 + n1 * 3.6)));
		var dx = this.x - Pivot.x;
		var dy = this.y - Pivot.y;
		this.set_x(cos * dx - sin * dy + Pivot.x);
		this.set_y(sin * dx + cos * dy + Pivot.y);
		if(Pivot._weak) {
			Pivot.put();
		}
		return this;
	}
	,angleBetween: function(point) {
		var x = point.x - this.x;
		var y = point.y - this.y;
		var angle = 0;
		if(x != 0 || y != 0) {
			var c1 = Math.PI * 0.25;
			var c2 = 3 * c1;
			var ay = y < 0 ? -y : y;
			if(x >= 0) {
				angle = c1 - c1 * ((x - ay) / (x + ay));
			} else {
				angle = c2 - c1 * ((x + ay) / (ay - x));
			}
			angle = (y < 0 ? -angle : angle) * (180 / Math.PI);
			if(angle > 90) {
				angle -= 270;
			} else {
				angle += 90;
			}
		}
		if(point._weak) {
			point.put();
		}
		return angle;
	}
	,toVector: function() {
		var X = this.x;
		var Y = this.y;
		var vector = flixel_math_FlxVector._pool.get().set(X,Y);
		vector._inPool = false;
		return vector;
	}
	,equals: function(point) {
		var result = Math.abs(this.x - point.x) <= 0.0000001 && Math.abs(this.y - point.y) <= 0.0000001;
		if(point._weak) {
			point.put();
		}
		return result;
	}
	,destroy: function() {
	}
	,transform: function(matrix) {
		var x1 = this.x * matrix.a + this.y * matrix.c + matrix.tx;
		var y1 = this.x * matrix.b + this.y * matrix.d + matrix.ty;
		return this.set(x1,y1);
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,set_x: function(Value) {
		return this.x = Value;
	}
	,set_y: function(Value) {
		return this.y = Value;
	}
	,__class__: flixel_math_FlxPoint
	,__properties__: {set_y:"set_y",set_x:"set_x"}
};
var openfl_display_LoaderInfo = function() {
	openfl_events_EventDispatcher.call(this);
	this.applicationDomain = openfl_system_ApplicationDomain.currentDomain;
	this.bytesLoaded = 0;
	this.bytesTotal = 0;
	this.childAllowsParent = true;
	this.parameters = { };
};
$hxClasses["openfl.display.LoaderInfo"] = openfl_display_LoaderInfo;
openfl_display_LoaderInfo.__name__ = ["openfl","display","LoaderInfo"];
openfl_display_LoaderInfo.create = function(loader) {
	var loaderInfo = new openfl_display_LoaderInfo();
	loaderInfo.uncaughtErrorEvents = new openfl_events_UncaughtErrorEvents();
	if(loader != null) {
		loaderInfo.loader = loader;
	} else {
		loaderInfo.url = openfl_display_LoaderInfo.__rootURL;
	}
	return loaderInfo;
};
openfl_display_LoaderInfo.__super__ = openfl_events_EventDispatcher;
openfl_display_LoaderInfo.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_display_LoaderInfo
});
var openfl_system_ApplicationDomain = function(parentDomain) {
	if(parentDomain != null) {
		this.parentDomain = parentDomain;
	} else {
		this.parentDomain = openfl_system_ApplicationDomain.currentDomain;
	}
};
$hxClasses["openfl.system.ApplicationDomain"] = openfl_system_ApplicationDomain;
openfl_system_ApplicationDomain.__name__ = ["openfl","system","ApplicationDomain"];
openfl_system_ApplicationDomain.prototype = {
	getDefinition: function(name) {
		return Type.resolveClass(name);
	}
	,hasDefinition: function(name) {
		return Type.resolveClass(name) != null;
	}
	,__class__: openfl_system_ApplicationDomain
};
var openfl_events_UncaughtErrorEvents = function() {
	openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.events.UncaughtErrorEvents"] = openfl_events_UncaughtErrorEvents;
openfl_events_UncaughtErrorEvents.__name__ = ["openfl","events","UncaughtErrorEvents"];
openfl_events_UncaughtErrorEvents.__super__ = openfl_events_EventDispatcher;
openfl_events_UncaughtErrorEvents.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_events_UncaughtErrorEvents
});
var openfl_geom_Matrix = function(a,b,c,d,tx,ty) {
	if(ty == null) {
		ty = 0;
	}
	if(tx == null) {
		tx = 0;
	}
	if(d == null) {
		d = 1;
	}
	if(c == null) {
		c = 0;
	}
	if(b == null) {
		b = 0;
	}
	if(a == null) {
		a = 1;
	}
	this.a = a;
	this.b = b;
	this.c = c;
	this.d = d;
	this.tx = tx;
	this.ty = ty;
};
$hxClasses["openfl.geom.Matrix"] = openfl_geom_Matrix;
openfl_geom_Matrix.__name__ = ["openfl","geom","Matrix"];
openfl_geom_Matrix.prototype = {
	clone: function() {
		return new openfl_geom_Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty);
	}
	,concat: function(m) {
		var a1 = this.a * m.a + this.b * m.c;
		this.b = this.a * m.b + this.b * m.d;
		this.a = a1;
		var c1 = this.c * m.a + this.d * m.c;
		this.d = this.c * m.b + this.d * m.d;
		this.c = c1;
		var tx1 = this.tx * m.a + this.ty * m.c + m.tx;
		this.ty = this.tx * m.b + this.ty * m.d + m.ty;
		this.tx = tx1;
	}
	,copyColumnFrom: function(column,vector3D) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			this.a = vector3D.x;
			this.c = vector3D.y;
		} else if(column == 1) {
			this.b = vector3D.x;
			this.d = vector3D.y;
		} else {
			this.tx = vector3D.x;
			this.ty = vector3D.y;
		}
	}
	,copyColumnTo: function(column,vector3D) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			vector3D.x = this.a;
			vector3D.y = this.c;
			vector3D.z = 0;
		} else if(column == 1) {
			vector3D.x = this.b;
			vector3D.y = this.d;
			vector3D.z = 0;
		} else {
			vector3D.x = this.tx;
			vector3D.y = this.ty;
			vector3D.z = 1;
		}
	}
	,copyFrom: function(sourceMatrix) {
		this.a = sourceMatrix.a;
		this.b = sourceMatrix.b;
		this.c = sourceMatrix.c;
		this.d = sourceMatrix.d;
		this.tx = sourceMatrix.tx;
		this.ty = sourceMatrix.ty;
	}
	,copyRowFrom: function(row,vector3D) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			this.a = vector3D.x;
			this.c = vector3D.y;
		} else if(row == 1) {
			this.b = vector3D.x;
			this.d = vector3D.y;
		} else {
			this.tx = vector3D.x;
			this.ty = vector3D.y;
		}
	}
	,copyRowTo: function(row,vector3D) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			vector3D.x = this.a;
			vector3D.y = this.b;
			vector3D.z = this.tx;
		} else if(row == 1) {
			vector3D.x = this.c;
			vector3D.y = this.d;
			vector3D.z = this.ty;
		} else {
			vector3D.setTo(0,0,1);
		}
	}
	,createBox: function(scaleX,scaleY,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		if(rotation != 0) {
			var cos = Math.cos(rotation);
			var sin = Math.sin(rotation);
			this.a = cos * scaleX;
			this.b = sin * scaleY;
			this.c = -sin * scaleX;
			this.d = cos * scaleY;
		} else {
			this.a = scaleX;
			this.b = 0;
			this.c = 0;
			this.d = scaleY;
		}
		this.tx = tx;
		this.ty = ty;
	}
	,createGradientBox: function(width,height,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		this.a = width / 1638.4;
		this.d = height / 1638.4;
		if(rotation != 0) {
			var cos = Math.cos(rotation);
			var sin = Math.sin(rotation);
			this.b = sin * this.d;
			this.c = -sin * this.a;
			this.a *= cos;
			this.d *= cos;
		} else {
			this.b = 0;
			this.c = 0;
		}
		this.tx = tx + width / 2;
		this.ty = ty + height / 2;
	}
	,deltaTransformPoint: function(point) {
		return new openfl_geom_Point(point.x * this.a + point.y * this.c,point.x * this.b + point.y * this.d);
	}
	,equals: function(matrix) {
		if(matrix != null && this.tx == matrix.tx && this.ty == matrix.ty && this.a == matrix.a && this.b == matrix.b && this.c == matrix.c) {
			return this.d == matrix.d;
		} else {
			return false;
		}
	}
	,identity: function() {
		this.a = 1;
		this.b = 0;
		this.c = 0;
		this.d = 1;
		this.tx = 0;
		this.ty = 0;
	}
	,invert: function() {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			this.a = this.b = this.c = this.d = 0;
			this.tx = -this.tx;
			this.ty = -this.ty;
		} else {
			norm = 1.0 / norm;
			var a1 = this.d * norm;
			this.d = this.a * norm;
			this.a = a1;
			this.b *= -norm;
			this.c *= -norm;
			var tx1 = -this.a * this.tx - this.c * this.ty;
			this.ty = -this.b * this.tx - this.d * this.ty;
			this.tx = tx1;
		}
		return this;
	}
	,rotate: function(theta) {
		var cos = Math.cos(theta);
		var sin = Math.sin(theta);
		var a1 = this.a * cos - this.b * sin;
		this.b = this.a * sin + this.b * cos;
		this.a = a1;
		var c1 = this.c * cos - this.d * sin;
		this.d = this.c * sin + this.d * cos;
		this.c = c1;
		var tx1 = this.tx * cos - this.ty * sin;
		this.ty = this.tx * sin + this.ty * cos;
		this.tx = tx1;
	}
	,scale: function(sx,sy) {
		this.a *= sx;
		this.b *= sy;
		this.c *= sx;
		this.d *= sy;
		this.tx *= sx;
		this.ty *= sy;
	}
	,setRotation: function(theta,scale) {
		if(scale == null) {
			scale = 1;
		}
		this.a = Math.cos(theta) * scale;
		this.c = Math.sin(theta) * scale;
		this.b = -this.c;
		this.d = this.a;
	}
	,setTo: function(a,b,c,d,tx,ty) {
		this.a = a;
		this.b = b;
		this.c = c;
		this.d = d;
		this.tx = tx;
		this.ty = ty;
	}
	,to3DString: function(roundPixels) {
		if(roundPixels == null) {
			roundPixels = false;
		}
		if(roundPixels) {
			return "matrix3d(" + this.a + ", " + this.b + ", 0, 0, " + this.c + ", " + this.d + ", 0, 0, 0, 0, 1, 0, " + (this.tx | 0) + ", " + (this.ty | 0) + ", 0, 1)";
		} else {
			return "matrix3d(" + this.a + ", " + this.b + ", 0, 0, " + this.c + ", " + this.d + ", 0, 0, 0, 0, 1, 0, " + this.tx + ", " + this.ty + ", 0, 1)";
		}
	}
	,toMozString: function() {
		return "matrix(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + "px, " + this.ty + "px)";
	}
	,toString: function() {
		return "matrix(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + ", " + this.ty + ")";
	}
	,transformPoint: function(pos) {
		return new openfl_geom_Point(pos.x * this.a + pos.y * this.c + this.tx,pos.x * this.b + pos.y * this.d + this.ty);
	}
	,translate: function(dx,dy) {
		this.tx += dx;
		this.ty += dy;
	}
	,toArray: function(transpose) {
		if(transpose == null) {
			transpose = false;
		}
		if(this.__array == null) {
			var this1 = new Float32Array(9);
			this.__array = this1;
		}
		if(transpose) {
			this.__array[0] = this.a;
			this.__array[1] = this.b;
			this.__array[2] = 0;
			this.__array[3] = this.c;
			this.__array[4] = this.d;
			this.__array[5] = 0;
			this.__array[6] = this.tx;
			this.__array[7] = this.ty;
			this.__array[8] = 1;
		} else {
			this.__array[0] = this.a;
			this.__array[1] = this.c;
			this.__array[2] = this.tx;
			this.__array[3] = this.b;
			this.__array[4] = this.d;
			this.__array[5] = this.ty;
			this.__array[6] = 0;
			this.__array[7] = 0;
			this.__array[8] = 1;
		}
		return this.__array;
	}
	,__cleanValues: function() {
		this.a = Math.round(this.a * 1000) / 1000;
		this.b = Math.round(this.b * 1000) / 1000;
		this.c = Math.round(this.c * 1000) / 1000;
		this.d = Math.round(this.d * 1000) / 1000;
		this.tx = Math.round(this.tx * 10) / 10;
		this.ty = Math.round(this.ty * 10) / 10;
	}
	,__toMatrix3: function() {
		return new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
	}
	,__transformInversePoint: function(point) {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			point.x = -this.tx;
			point.y = -this.ty;
		} else {
			var px = 1.0 / norm * (this.c * (this.ty - point.y) + this.d * (point.x - this.tx));
			point.y = 1.0 / norm * (this.a * (point.y - this.ty) + this.b * (this.tx - point.x));
			point.x = px;
		}
	}
	,__transformInverseX: function(px,py) {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			return -this.tx;
		} else {
			return 1.0 / norm * (this.c * (this.ty - py) + this.d * (px - this.tx));
		}
	}
	,__transformInverseY: function(px,py) {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			return -this.ty;
		} else {
			return 1.0 / norm * (this.a * (py - this.ty) + this.b * (this.tx - px));
		}
	}
	,__transformPoint: function(point) {
		var px = point.x;
		var py = point.y;
		point.x = px * this.a + py * this.c + this.tx;
		point.y = px * this.b + py * this.d + this.ty;
	}
	,__transformX: function(px,py) {
		return px * this.a + py * this.c + this.tx;
	}
	,__transformY: function(px,py) {
		return px * this.b + py * this.d + this.ty;
	}
	,__translateTransformed: function(px,py) {
		this.tx = px * this.a + py * this.c + this.tx;
		this.ty = px * this.b + py * this.d + this.ty;
	}
	,__class__: openfl_geom_Matrix
};
var openfl_geom_Point = function(x,y) {
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
};
$hxClasses["openfl.geom.Point"] = openfl_geom_Point;
openfl_geom_Point.__name__ = ["openfl","geom","Point"];
openfl_geom_Point.distance = function(pt1,pt2) {
	var dx = pt1.x - pt2.x;
	var dy = pt1.y - pt2.y;
	return Math.sqrt(dx * dx + dy * dy);
};
openfl_geom_Point.interpolate = function(pt1,pt2,f) {
	return new openfl_geom_Point(pt2.x + f * (pt1.x - pt2.x),pt2.y + f * (pt1.y - pt2.y));
};
openfl_geom_Point.polar = function(len,angle) {
	return new openfl_geom_Point(len * Math.cos(angle),len * Math.sin(angle));
};
openfl_geom_Point.prototype = {
	add: function(v) {
		return new openfl_geom_Point(v.x + this.x,v.y + this.y);
	}
	,clone: function() {
		return new openfl_geom_Point(this.x,this.y);
	}
	,copyFrom: function(sourcePoint) {
		this.x = sourcePoint.x;
		this.y = sourcePoint.y;
	}
	,equals: function(toCompare) {
		if(toCompare != null && toCompare.x == this.x) {
			return toCompare.y == this.y;
		} else {
			return false;
		}
	}
	,normalize: function(thickness) {
		if(this.x == 0 && this.y == 0) {
			return;
		} else {
			var norm = thickness / Math.sqrt(this.x * this.x + this.y * this.y);
			this.x *= norm;
			this.y *= norm;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,setTo: function(xa,ya) {
		this.x = xa;
		this.y = ya;
	}
	,subtract: function(v) {
		return new openfl_geom_Point(this.x - v.x,this.y - v.y);
	}
	,toString: function() {
		return "(x=" + this.x + ", y=" + this.y + ")";
	}
	,__toLimeVector2: function() {
		return new lime_math_Vector2(this.x,this.y);
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,__class__: openfl_geom_Point
	,__properties__: {get_length:"get_length"}
};
var openfl_geom_ColorTransform = function(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset) {
	if(alphaOffset == null) {
		alphaOffset = 0;
	}
	if(blueOffset == null) {
		blueOffset = 0;
	}
	if(greenOffset == null) {
		greenOffset = 0;
	}
	if(redOffset == null) {
		redOffset = 0;
	}
	if(alphaMultiplier == null) {
		alphaMultiplier = 1;
	}
	if(blueMultiplier == null) {
		blueMultiplier = 1;
	}
	if(greenMultiplier == null) {
		greenMultiplier = 1;
	}
	if(redMultiplier == null) {
		redMultiplier = 1;
	}
	this.redMultiplier = redMultiplier;
	this.greenMultiplier = greenMultiplier;
	this.blueMultiplier = blueMultiplier;
	this.alphaMultiplier = alphaMultiplier;
	this.redOffset = redOffset;
	this.greenOffset = greenOffset;
	this.blueOffset = blueOffset;
	this.alphaOffset = alphaOffset;
};
$hxClasses["openfl.geom.ColorTransform"] = openfl_geom_ColorTransform;
openfl_geom_ColorTransform.__name__ = ["openfl","geom","ColorTransform"];
openfl_geom_ColorTransform.prototype = {
	concat: function(second) {
		this.redMultiplier *= second.redMultiplier;
		this.greenMultiplier *= second.greenMultiplier;
		this.blueMultiplier *= second.blueMultiplier;
		this.alphaMultiplier *= second.alphaMultiplier;
		this.redOffset = second.redMultiplier * this.redOffset + second.redOffset;
		this.greenOffset = second.greenMultiplier * this.greenOffset + second.greenOffset;
		this.blueOffset = second.blueMultiplier * this.blueOffset + second.blueOffset;
		this.alphaOffset = second.alphaMultiplier * this.alphaOffset + second.alphaOffset;
	}
	,toString: function() {
		return "(redMultiplier=" + this.redMultiplier + ", greenMultiplier=" + this.greenMultiplier + ", blueMultiplier=" + this.blueMultiplier + ", alphaMultiplier=" + this.alphaMultiplier + ", redOffset=" + this.redOffset + ", greenOffset=" + this.greenOffset + ", blueOffset=" + this.blueOffset + ", alphaOffset=" + this.alphaOffset + ")";
	}
	,__clone: function() {
		return new openfl_geom_ColorTransform(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset);
	}
	,__combine: function(ct) {
		this.redMultiplier *= ct.redMultiplier;
		this.greenMultiplier *= ct.greenMultiplier;
		this.blueMultiplier *= ct.blueMultiplier;
		this.alphaMultiplier *= ct.alphaMultiplier;
		this.redOffset += ct.redOffset;
		this.greenOffset += ct.greenOffset;
		this.blueOffset += ct.blueOffset;
		this.alphaOffset += ct.alphaOffset;
	}
	,__equals: function(ct,skipAlphaMultiplier) {
		if(skipAlphaMultiplier == null) {
			skipAlphaMultiplier = false;
		}
		if(ct != null && this.redMultiplier == ct.redMultiplier && this.greenMultiplier == ct.greenMultiplier && this.blueMultiplier == ct.blueMultiplier && (skipAlphaMultiplier || this.alphaMultiplier == ct.alphaMultiplier) && this.redOffset == ct.redOffset && this.greenOffset == ct.greenOffset && this.blueOffset == ct.blueOffset) {
			return this.alphaOffset == ct.alphaOffset;
		} else {
			return false;
		}
	}
	,__isDefault: function() {
		if(this.redMultiplier == 1 && this.greenMultiplier == 1 && this.blueMultiplier == 1 && this.alphaMultiplier == 1 && this.redOffset == 0 && this.greenOffset == 0 && this.blueOffset == 0) {
			return this.alphaOffset == 0;
		} else {
			return false;
		}
	}
	,get_color: function() {
		return (this.redOffset | 0) << 16 | (this.greenOffset | 0) << 8 | (this.blueOffset | 0);
	}
	,set_color: function(value) {
		this.redOffset = value >> 16 & 255;
		this.greenOffset = value >> 8 & 255;
		this.blueOffset = value & 255;
		this.redMultiplier = 0;
		this.greenMultiplier = 0;
		this.blueMultiplier = 0;
		return this.get_color();
	}
	,__toLimeColorMatrix: function() {
		var array = [this.redMultiplier,0,0,0,this.redOffset / 255,0,this.greenMultiplier,0,0,this.greenOffset / 255,0,0,this.blueMultiplier,0,this.blueOffset / 255,0,0,0,this.alphaMultiplier,this.alphaOffset / 255];
		var this1;
		if(array != null) {
			this1 = new Float32Array(array);
		} else {
			this1 = null;
		}
		return this1;
	}
	,__class__: openfl_geom_ColorTransform
	,__properties__: {set_color:"set_color",get_color:"get_color"}
};
var flixel_FlxCamera = function(X,Y,Width,Height,Zoom) {
	if(Zoom == null) {
		Zoom = 0;
	}
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._helperPoint = new openfl_geom_Point();
	this._helperMatrix = new flixel_math_FlxMatrix();
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	this._bounds = rect;
	this._scrollRect = new openfl_display_Sprite();
	this.initialZoom = 1;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this._point = point;
	this._fxShakeAxes = flixel_util_FlxAxes.XY;
	this._fxShakeDuration = 0;
	this._fxShakeIntensity = 0;
	this._fxFadeAlpha = 0;
	this._fxFadeCompleted = true;
	this._fxFadeComplete = null;
	this._fxFadeIn = false;
	this._fxFadeDuration = 0;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this._scrollTarget = point1;
	this._fxFadeColor = 0;
	this._fxFlashAlpha = 0;
	this._fxFlashComplete = null;
	this._fxFlashDuration = 0;
	this._fxFlashColor = 0;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
	point2._inPool = false;
	this._flashOffset = point2;
	this._flashPoint = new openfl_geom_Point();
	this.filtersEnabled = true;
	var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
	point3._inPool = false;
	this.followLead = point3;
	this.antialiasing = false;
	this.color = -1;
	this.angle = 0;
	this.alpha = 1;
	this._useBlitMatrix = false;
	this._blitMatrix = new flixel_math_FlxMatrix();
	this.viewHeight = 0;
	this.viewWidth = 0;
	this.viewOffsetHeight = 0;
	this.viewOffsetWidth = 0;
	this.viewOffsetY = 0;
	this.viewOffsetX = 0;
	this.height = 0;
	this.width = 0;
	this.flashSprite = new openfl_display_Sprite();
	this.useBgAlphaBlending = false;
	var point4 = flixel_math_FlxPoint._pool.get().set(0,0);
	point4._inPool = false;
	this.scroll = point4;
	this.followLerp = 60 / flixel_FlxG.updateFramerate;
	var point5 = flixel_math_FlxPoint._pool.get().set(0,0);
	point5._inPool = false;
	this.targetOffset = point5;
	this.scaleY = 0;
	this.scaleX = 0;
	this.y = 0;
	this.x = 0;
	flixel_FlxBasic.call(this);
	this.set_x(X);
	this.set_y(Y);
	this.set_width(Width <= 0 ? flixel_FlxG.width : Width);
	this.set_height(Height <= 0 ? flixel_FlxG.height : Height);
	this._flashRect = new openfl_geom_Rectangle(0,0,this.width,this.height);
	this.flashSprite.addChild(this._scrollRect);
	this._scrollRect.set_scrollRect(new openfl_geom_Rectangle());
	this.pixelPerfectRender = flixel_FlxG.renderBlit;
	if(flixel_FlxG.renderBlit) {
		this.screen = new flixel_FlxSprite();
		this.buffer = new openfl_display_BitmapData(this.width,this.height,true,0);
		this.screen.set_pixels(this.buffer);
		this.screen.origin.set();
		this._flashBitmap = new openfl_display_Bitmap(this.buffer);
		this._scrollRect.addChild(this._flashBitmap);
		this._fill = new openfl_display_BitmapData(this.width,this.height,true,0);
	} else {
		this.canvas = new openfl_display_Sprite();
		this._scrollRect.addChild(this.canvas);
	}
	this.set_color(-1);
	this.initialZoom = Zoom == 0 ? flixel_FlxCamera.defaultZoom : Zoom;
	this.set_zoom(Zoom);
	this.updateScrollRect();
	this.updateFlashOffset();
	this.updateFlashSpritePosition();
	this.updateInternalSpritePositions();
	this.bgColor = flixel_FlxG.cameras.get_bgColor();
};
$hxClasses["flixel.FlxCamera"] = flixel_FlxCamera;
flixel_FlxCamera.__name__ = ["flixel","FlxCamera"];
flixel_FlxCamera.defaultZoom = null;
flixel_FlxCamera.defaultCameras = null;
flixel_FlxCamera._storageTilesHead = null;
flixel_FlxCamera._storageTrianglesHead = null;
flixel_FlxCamera.__super__ = flixel_FlxBasic;
flixel_FlxCamera.prototype = $extend(flixel_FlxBasic.prototype,{
	startQuadBatch: function(graphic,colored,hasColorOffsets,blend,smooth,shader) {
		if(smooth == null) {
			smooth = false;
		}
		if(hasColorOffsets == null) {
			hasColorOffsets = false;
		}
		var itemToReturn = null;
		var blendInt = flixel_graphics_tile_FlxDrawBaseItem.blendToInt(blend);
		if(this._currentDrawItem != null && this._currentDrawItem.type == flixel_graphics_tile_FlxDrawItemType.TILES && this._headTiles.graphics == graphic && this._headTiles.colored == colored && this._headTiles.hasColorOffsets == hasColorOffsets && this._headTiles.blending == blendInt && this._headTiles.antialiasing == smooth && this._headTiles.shader == shader) {
			return this._headTiles;
		}
		if(flixel_FlxCamera._storageTilesHead != null) {
			itemToReturn = flixel_FlxCamera._storageTilesHead;
			var newHead = flixel_FlxCamera._storageTilesHead.nextTyped;
			itemToReturn.reset();
			flixel_FlxCamera._storageTilesHead = newHead;
		} else {
			itemToReturn = new flixel_graphics_tile_FlxDrawTilesItem();
		}
		itemToReturn.graphics = graphic;
		itemToReturn.antialiasing = smooth;
		itemToReturn.colored = colored;
		itemToReturn.hasColorOffsets = hasColorOffsets;
		itemToReturn.blending = blendInt;
		itemToReturn.shader = shader;
		itemToReturn.nextTyped = this._headTiles;
		this._headTiles = itemToReturn;
		if(this._headOfDrawStack == null) {
			this._headOfDrawStack = itemToReturn;
		}
		if(this._currentDrawItem != null) {
			this._currentDrawItem.next = itemToReturn;
		}
		this._currentDrawItem = itemToReturn;
		return itemToReturn;
	}
	,startTrianglesBatch: function(graphic,smoothing,isColored,blend) {
		if(isColored == null) {
			isColored = false;
		}
		if(smoothing == null) {
			smoothing = false;
		}
		var blendInt = flixel_graphics_tile_FlxDrawBaseItem.blendToInt(blend);
		if(this._currentDrawItem != null && this._currentDrawItem.type == flixel_graphics_tile_FlxDrawItemType.TRIANGLES && this._headTriangles.graphics == graphic && this._headTriangles.antialiasing == smoothing && this._headTriangles.colored == isColored && this._headTriangles.blending == blendInt) {
			return this._headTriangles;
		}
		return this.getNewDrawTrianglesItem(graphic,smoothing,isColored,blend);
	}
	,getNewDrawTrianglesItem: function(graphic,smoothing,isColored,blend) {
		if(isColored == null) {
			isColored = false;
		}
		if(smoothing == null) {
			smoothing = false;
		}
		var itemToReturn = null;
		var blendInt = flixel_graphics_tile_FlxDrawBaseItem.blendToInt(blend);
		if(flixel_FlxCamera._storageTrianglesHead != null) {
			itemToReturn = flixel_FlxCamera._storageTrianglesHead;
			var newHead = flixel_FlxCamera._storageTrianglesHead.nextTyped;
			itemToReturn.reset();
			flixel_FlxCamera._storageTrianglesHead = newHead;
		} else {
			itemToReturn = new flixel_graphics_tile_FlxDrawTrianglesItem();
		}
		itemToReturn.graphics = graphic;
		itemToReturn.antialiasing = smoothing;
		itemToReturn.colored = isColored;
		itemToReturn.blending = blendInt;
		itemToReturn.nextTyped = this._headTriangles;
		this._headTriangles = itemToReturn;
		if(this._headOfDrawStack == null) {
			this._headOfDrawStack = itemToReturn;
		}
		if(this._currentDrawItem != null) {
			this._currentDrawItem.next = itemToReturn;
		}
		this._currentDrawItem = itemToReturn;
		return itemToReturn;
	}
	,clearDrawStack: function() {
		var currTiles = this._headTiles;
		var newTilesHead;
		while(currTiles != null) {
			newTilesHead = currTiles.nextTyped;
			currTiles.reset();
			currTiles.nextTyped = flixel_FlxCamera._storageTilesHead;
			flixel_FlxCamera._storageTilesHead = currTiles;
			currTiles = newTilesHead;
		}
		var currTriangles = this._headTriangles;
		var newTrianglesHead;
		while(currTriangles != null) {
			newTrianglesHead = currTriangles.nextTyped;
			currTriangles.reset();
			currTriangles.nextTyped = flixel_FlxCamera._storageTrianglesHead;
			flixel_FlxCamera._storageTrianglesHead = currTriangles;
			currTriangles = newTrianglesHead;
		}
		this._currentDrawItem = null;
		this._headOfDrawStack = null;
		this._headTiles = null;
		this._headTriangles = null;
	}
	,render: function() {
		var currItem = this._headOfDrawStack;
		while(currItem != null) {
			currItem.render(this);
			currItem = currItem.next;
		}
	}
	,drawPixels: function(frame,pixels,matrix,transform,blend,smoothing,shader) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(flixel_FlxG.renderBlit) {
			this._helperMatrix.copyFrom(matrix);
			if(this._useBlitMatrix) {
				this._helperMatrix.concat(this._blitMatrix);
				this.buffer.draw(pixels,this._helperMatrix,null,null,null,smoothing || this.antialiasing);
			} else {
				this._helperMatrix.translate(-this.viewOffsetX,-this.viewOffsetY);
				this.buffer.draw(pixels,this._helperMatrix,null,blend,null,smoothing || this.antialiasing);
			}
		} else {
			var isColored = transform != null && flixel_util_FlxColorTransformUtil.hasRGBMultipliers(transform);
			var hasColorOffsets = transform != null && flixel_util_FlxColorTransformUtil.hasRGBAOffsets(transform);
			var drawItem = this.startQuadBatch(frame.parent,isColored,hasColorOffsets,blend,smoothing,shader);
			drawItem.addQuad(frame,matrix,transform);
		}
	}
	,copyPixels: function(frame,pixels,sourceRect,destPoint,transform,blend,smoothing,shader) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(flixel_FlxG.renderBlit) {
			if(pixels != null) {
				if(this._useBlitMatrix) {
					this._helperMatrix.identity();
					this._helperMatrix.translate(destPoint.x,destPoint.y);
					this._helperMatrix.concat(this._blitMatrix);
					this.buffer.draw(pixels,this._helperMatrix,null,null,null,smoothing || this.antialiasing);
				} else {
					this._helperPoint.x = destPoint.x - (this.viewOffsetX | 0);
					this._helperPoint.y = destPoint.y - (this.viewOffsetY | 0);
					this.buffer.copyPixels(pixels,sourceRect,this._helperPoint,null,null,true);
				}
			} else if(frame != null) {
				frame.paint(this.buffer,destPoint,true);
			}
		} else {
			this._helperMatrix.identity();
			this._helperMatrix.translate(destPoint.x + frame.offset.x,destPoint.y + frame.offset.y);
			var isColored = transform != null && flixel_util_FlxColorTransformUtil.hasRGBMultipliers(transform);
			var hasColorOffsets = transform != null && flixel_util_FlxColorTransformUtil.hasRGBAOffsets(transform);
			var drawItem = this.startQuadBatch(frame.parent,isColored,hasColorOffsets,blend,smoothing,shader);
			drawItem.addQuad(frame,this._helperMatrix,transform);
		}
	}
	,drawTriangles: function(graphic,vertices,indices,uvtData,colors,position,blend,repeat,smoothing) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(repeat == null) {
			repeat = false;
		}
		if(flixel_FlxG.renderBlit) {
			if(position == null) {
				position = flixel_FlxCamera.renderPoint.set();
			}
			var _this = this._bounds;
			_this.x = 0;
			_this.y = 0;
			_this.width = this.width;
			_this.height = this.height;
			var verticesLength = vertices.length;
			var currentVertexPosition = 0;
			var tempX;
			var tempY;
			var i = 0;
			var _this1 = flixel_FlxCamera.renderRect;
			_this1.x = 0;
			_this1.y = 0;
			_this1.width = 0;
			_this1.height = 0;
			var bounds = _this1;
			var this1 = flixel_FlxCamera.drawVertices;
			var pos = 0;
			var len = flixel_FlxCamera.drawVertices.length;
			if(pos < 0) {
				pos += this1.length;
			}
			if(pos + len > this1.length) {
				len = this1.length - pos;
			}
			if(len < 0) {
				len = 0;
			}
			var vectorData = new openfl_VectorData();
			vectorData.length = len;
			vectorData.fixed = false;
			var this2 = new Array(len);
			vectorData.data = this2;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos,vectorData.data,0,len);
			if(len > 0) {
				this1.length -= len;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos + len,this1.data,pos,this1.length - pos);
			}
			while(i < verticesLength) {
				tempX = position.x + vertices[i];
				tempY = position.y + vertices[i + 1];
				var this3 = flixel_FlxCamera.drawVertices;
				var key = currentVertexPosition++;
				if(!this3.fixed) {
					if(key >= this3.length) {
						this3.length = key + 1;
					}
					if(this3.data.length < this3.length) {
						var length = this3.data.length + 10;
						var this4 = new Array(length);
						var data = this4;
						haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data,0,this3.data.length);
						this3.data = data;
					}
				}
				this3.data[key] = tempX;
				var this5 = flixel_FlxCamera.drawVertices;
				var key1 = currentVertexPosition++;
				if(!this5.fixed) {
					if(key1 >= this5.length) {
						this5.length = key1 + 1;
					}
					if(this5.data.length < this5.length) {
						var length1 = this5.data.length + 10;
						var this6 = new Array(length1);
						var data1 = this6;
						haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data1,0,this5.data.length);
						this5.data = data1;
					}
				}
				this5.data[key1] = tempY;
				if(i == 0) {
					bounds.x = tempX;
					bounds.y = tempY;
					bounds.width = 0;
					bounds.height = 0;
				} else {
					if(tempX < bounds.x) {
						bounds.width += bounds.x - tempX;
						bounds.x = tempX;
					}
					if(tempY < bounds.y) {
						bounds.height += bounds.y - tempY;
						bounds.y = tempY;
					}
					if(tempX > bounds.x + bounds.width) {
						bounds.width = tempX - bounds.x;
					}
					if(tempY > bounds.y + bounds.height) {
						bounds.height = tempY - bounds.y;
					}
				}
				i += 2;
			}
			if(position._weak) {
				position.put();
			}
			var _this2 = this._bounds;
			var result = bounds.x + bounds.width > _this2.x && bounds.x < _this2.x + _this2.width && bounds.y + bounds.height > _this2.y && bounds.y < _this2.y + _this2.height;
			if(bounds._weak) {
				if(!bounds._inPool) {
					bounds._inPool = true;
					bounds._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(bounds);
				}
			}
			if(!result) {
				var this7 = flixel_FlxCamera.drawVertices;
				var pos1 = flixel_FlxCamera.drawVertices.length - verticesLength;
				var len1 = verticesLength;
				if(pos1 < 0) {
					pos1 += this7.length;
				}
				if(pos1 + len1 > this7.length) {
					len1 = this7.length - pos1;
				}
				if(len1 < 0) {
					len1 = 0;
				}
				var vectorData1 = new openfl_VectorData();
				vectorData1.length = len1;
				vectorData1.fixed = false;
				var this8 = new Array(len1);
				vectorData1.data = this8;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,pos1,vectorData1.data,0,len1);
				if(len1 > 0) {
					this7.length -= len1;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,pos1 + len1,this7.data,pos1,this7.length - pos1);
				}
			} else {
				flixel_FlxCamera.trianglesSprite.get_graphics().clear();
				flixel_FlxCamera.trianglesSprite.get_graphics().beginBitmapFill(graphic.bitmap,null,repeat,smoothing);
				var tmp = flixel_FlxCamera.trianglesSprite.get_graphics();
				var tmp1 = flixel_FlxCamera.drawVertices;
				var vectorData2 = new openfl_VectorData();
				vectorData2.length = indices.length;
				vectorData2.fixed = true;
				vectorData2.data = indices.slice(0);
				var vectorData3 = new openfl_VectorData();
				vectorData3.length = uvtData.length;
				vectorData3.fixed = true;
				vectorData3.data = uvtData.slice(0);
				tmp.drawTriangles(tmp1,vectorData2,vectorData3);
				flixel_FlxCamera.trianglesSprite.get_graphics().endFill();
				if(this._useBlitMatrix) {
					this._helperMatrix.copyFrom(this._blitMatrix);
				} else {
					this._helperMatrix.identity();
					this._helperMatrix.translate(-this.viewOffsetX,-this.viewOffsetY);
				}
				this.buffer.draw(flixel_FlxCamera.trianglesSprite,this._helperMatrix);
			}
			if(!bounds._inPool) {
				bounds._inPool = true;
				bounds._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(bounds);
			}
		} else {
			var _this3 = this._bounds;
			_this3.x = 0;
			_this3.y = 0;
			_this3.width = this.width;
			_this3.height = this.height;
			var isColored = colors != null && colors.length != 0;
			var drawItem = this.startTrianglesBatch(graphic,smoothing,isColored,blend);
			drawItem.addTriangles(vertices,indices,uvtData,colors,position,this._bounds);
		}
	}
	,transformRect: function(rect) {
		if(flixel_FlxG.renderBlit) {
			rect.x += -this.viewOffsetX;
			rect.y += -this.viewOffsetY;
			if(this._useBlitMatrix) {
				rect.x *= this.zoom;
				rect.y *= this.zoom;
				rect.width *= this.zoom;
				rect.height *= this.zoom;
			}
		}
		return rect;
	}
	,transformPoint: function(point) {
		if(flixel_FlxG.renderBlit) {
			var Y = this.viewOffsetY;
			var _g = point;
			_g.set_x(_g.x - this.viewOffsetX);
			var _g1 = point;
			_g1.set_y(_g1.y - Y);
			if(this._useBlitMatrix) {
				point.scale(this.zoom);
			}
		}
		return point;
	}
	,transformVector: function(vector) {
		if(flixel_FlxG.renderBlit && this._useBlitMatrix) {
			vector.scale(this.zoom);
		}
		return vector;
	}
	,transformObject: function(object) {
		var _g = object;
		_g.set_scaleX(_g.get_scaleX() * this.totalScaleX);
		var _g1 = object;
		_g1.set_scaleY(_g1.get_scaleY() * this.totalScaleY);
		var _g2 = object;
		_g2.set_x(_g2.get_x() - this.scroll.x * this.totalScaleX);
		var _g3 = object;
		_g3.set_y(_g3.get_y() - this.scroll.y * this.totalScaleY);
		var _g4 = object;
		_g4.set_x(_g4.get_x() - 0.5 * this.width * (this.scaleX - this.initialZoom) * flixel_FlxG.scaleMode.scale.x);
		var _g5 = object;
		_g5.set_y(_g5.get_y() - 0.5 * this.height * (this.scaleY - this.initialZoom) * flixel_FlxG.scaleMode.scale.y);
		return object;
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.removeChild(this.flashSprite,this._scrollRect);
		if(flixel_FlxG.renderBlit) {
			flixel_util_FlxDestroyUtil.removeChild(this._scrollRect,this._flashBitmap);
			this.screen = flixel_util_FlxDestroyUtil.destroy(this.screen);
			this.buffer = null;
			this._flashBitmap = null;
			this._fill = flixel_util_FlxDestroyUtil.dispose(this._fill);
		} else {
			flixel_util_FlxDestroyUtil.removeChild(this._scrollRect,this.canvas);
			if(this.canvas != null) {
				var _g1 = 0;
				var _g = this.canvas.get_numChildren();
				while(_g1 < _g) {
					var i = _g1++;
					this.canvas.removeChildAt(0);
				}
				this.canvas = null;
			}
			if(this._headOfDrawStack != null) {
				this.clearDrawStack();
			}
			this._blitMatrix = null;
			this._helperMatrix = null;
			this._helperPoint = null;
		}
		this._bounds = null;
		this.scroll = flixel_util_FlxDestroyUtil.put(this.scroll);
		this.targetOffset = flixel_util_FlxDestroyUtil.put(this.targetOffset);
		this.deadzone = flixel_util_FlxDestroyUtil.put(this.deadzone);
		this.target = null;
		this.flashSprite = null;
		this._scrollRect = null;
		this._flashRect = null;
		this._flashPoint = null;
		this._fxFlashComplete = null;
		this._fxFadeComplete = null;
		this._fxShakeComplete = null;
		flixel_FlxBasic.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		if(this.target != null) {
			this.updateFollow();
		}
		this.updateScroll();
		this.updateFlash(elapsed);
		this.updateFade(elapsed);
		this.flashSprite.set_filters(this.filtersEnabled ? this._filters : null);
		this.updateFlashSpritePosition();
		this.updateShake(elapsed);
	}
	,updateScroll: function() {
		var zoom = this.zoom / flixel_FlxG.initialZoom;
		var minX = this.minScrollX == null ? null : this.minScrollX - (zoom - 1) * this.width / (2 * zoom);
		var maxX = this.maxScrollX == null ? null : this.maxScrollX + (zoom - 1) * this.width / (2 * zoom);
		var minY = this.minScrollY == null ? null : this.minScrollY - (zoom - 1) * this.height / (2 * zoom);
		var maxY = this.maxScrollY == null ? null : this.maxScrollY + (zoom - 1) * this.height / (2 * zoom);
		var Value = this.scroll.x;
		var Max = maxX != null ? maxX - this.width : null;
		var lowerBound = minX != null && Value < minX ? minX : Value;
		this.scroll.set_x(Max != null && lowerBound > Max ? Max : lowerBound);
		var Value1 = this.scroll.y;
		var Max1 = maxY != null ? maxY - this.height : null;
		var lowerBound1 = minY != null && Value1 < minY ? minY : Value1;
		this.scroll.set_y(Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1);
	}
	,updateFollow: function() {
		if(this.deadzone == null) {
			this.target.getMidpoint(this._point);
			this._point.addPoint(this.targetOffset);
			var point = this._point;
			this.scroll.set(point.x - this.width * 0.5,point.y - this.height * 0.5);
			if(point._weak) {
				point.put();
			}
		} else {
			var edge;
			var targetX = this.target.x + this.targetOffset.x;
			var targetY = this.target.y + this.targetOffset.y;
			if(this.style == flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN) {
				if(targetX >= this.scroll.x + this.width) {
					var _g = this._scrollTarget;
					_g.set_x(_g.x + this.width);
				} else if(targetX < this.scroll.x) {
					var _g1 = this._scrollTarget;
					_g1.set_x(_g1.x - this.width);
				}
				if(targetY >= this.scroll.y + this.height) {
					var _g2 = this._scrollTarget;
					_g2.set_y(_g2.y + this.height);
				} else if(targetY < this.scroll.y) {
					var _g3 = this._scrollTarget;
					_g3.set_y(_g3.y - this.height);
				}
			} else {
				edge = targetX - this.deadzone.x;
				if(this._scrollTarget.x > edge) {
					this._scrollTarget.set_x(edge);
				}
				edge = targetX + this.target.get_width() - this.deadzone.x - this.deadzone.width;
				if(this._scrollTarget.x < edge) {
					this._scrollTarget.set_x(edge);
				}
				edge = targetY - this.deadzone.y;
				if(this._scrollTarget.y > edge) {
					this._scrollTarget.set_y(edge);
				}
				edge = targetY + this.target.get_height() - this.deadzone.y - this.deadzone.height;
				if(this._scrollTarget.y < edge) {
					this._scrollTarget.set_y(edge);
				}
			}
			if(js_Boot.__instanceof(this.target,flixel_FlxSprite)) {
				if(this._lastTargetPosition == null) {
					var X = this.target.x;
					var Y = this.target.y;
					var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
					point1._inPool = false;
					this._lastTargetPosition = point1;
				}
				var _g4 = this._scrollTarget;
				_g4.set_x(_g4.x + (this.target.x - this._lastTargetPosition.x) * this.followLead.x);
				var _g5 = this._scrollTarget;
				_g5.set_y(_g5.y + (this.target.y - this._lastTargetPosition.y) * this.followLead.y);
				this._lastTargetPosition.set_x(this.target.x);
				this._lastTargetPosition.set_y(this.target.y);
			}
			if(this.followLerp >= 60 / flixel_FlxG.updateFramerate) {
				var _this = this.scroll;
				var point2 = this._scrollTarget;
				_this.set_x(point2.x);
				_this.set_y(point2.y);
				if(point2._weak) {
					point2.put();
				}
			} else {
				var _g6 = this.scroll;
				_g6.set_x(_g6.x + (this._scrollTarget.x - this.scroll.x) * this.followLerp * flixel_FlxG.updateFramerate / 60);
				var _g7 = this.scroll;
				_g7.set_y(_g7.y + (this._scrollTarget.y - this.scroll.y) * this.followLerp * flixel_FlxG.updateFramerate / 60);
			}
		}
	}
	,updateFlash: function(elapsed) {
		if(this._fxFlashAlpha > 0.0) {
			this._fxFlashAlpha -= elapsed / this._fxFlashDuration;
			if(this._fxFlashAlpha <= 0 && this._fxFlashComplete != null) {
				this._fxFlashComplete();
			}
		}
	}
	,updateFade: function(elapsed) {
		if(this._fxFadeCompleted) {
			return;
		}
		if(this._fxFadeIn) {
			this._fxFadeAlpha -= elapsed / this._fxFadeDuration;
			if(this._fxFadeAlpha <= 0.0) {
				this._fxFadeAlpha = 0.0;
				this.completeFade();
			}
		} else {
			this._fxFadeAlpha += elapsed / this._fxFadeDuration;
			if(this._fxFadeAlpha >= 1.0) {
				this._fxFadeAlpha = 1.0;
				this.completeFade();
			}
		}
	}
	,completeFade: function() {
		this._fxFadeCompleted = true;
		if(this._fxFadeComplete != null) {
			this._fxFadeComplete();
		}
	}
	,updateShake: function(elapsed) {
		if(this._fxShakeDuration > 0) {
			this._fxShakeDuration -= elapsed;
			if(this._fxShakeDuration <= 0) {
				if(this._fxShakeComplete != null) {
					this._fxShakeComplete();
				}
			} else {
				if(this._fxShakeAxes != flixel_util_FlxAxes.Y) {
					var _g = this.flashSprite;
					_g.set_x(_g.get_x() + flixel_FlxG.random["float"](-this._fxShakeIntensity * this.width,this._fxShakeIntensity * this.width) * this.zoom * flixel_FlxG.scaleMode.scale.x);
				}
				if(this._fxShakeAxes != flixel_util_FlxAxes.X) {
					var _g1 = this.flashSprite;
					_g1.set_y(_g1.get_y() + flixel_FlxG.random["float"](-this._fxShakeIntensity * this.height,this._fxShakeIntensity * this.height) * this.zoom * flixel_FlxG.scaleMode.scale.y);
				}
			}
		}
	}
	,updateFlashSpritePosition: function() {
		if(this.flashSprite != null) {
			this.flashSprite.set_x(this.x * flixel_FlxG.scaleMode.scale.x + this._flashOffset.x);
			this.flashSprite.set_y(this.y * flixel_FlxG.scaleMode.scale.y + this._flashOffset.y);
		}
	}
	,updateFlashOffset: function() {
		this._flashOffset.set_x(this.width * 0.5 * flixel_FlxG.scaleMode.scale.x * this.initialZoom);
		this._flashOffset.set_y(this.height * 0.5 * flixel_FlxG.scaleMode.scale.y * this.initialZoom);
	}
	,updateScrollRect: function() {
		var rect = this._scrollRect != null ? this._scrollRect.get_scrollRect() : null;
		if(rect != null) {
			rect.x = rect.y = 0;
			rect.width = this.width * this.initialZoom * flixel_FlxG.scaleMode.scale.x;
			rect.height = this.height * this.initialZoom * flixel_FlxG.scaleMode.scale.y;
			this._scrollRect.set_scrollRect(rect);
			this._scrollRect.set_x(-0.5 * rect.width);
			this._scrollRect.set_y(-0.5 * rect.height);
		}
	}
	,updateInternalSpritePositions: function() {
		if(flixel_FlxG.renderBlit) {
			if(this._flashBitmap != null) {
				this._flashBitmap.set_x(0);
				this._flashBitmap.set_y(0);
			}
		} else if(this.canvas != null) {
			this.canvas.set_x(-0.5 * this.width * (this.scaleX - this.initialZoom) * flixel_FlxG.scaleMode.scale.x);
			this.canvas.set_y(-0.5 * this.height * (this.scaleY - this.initialZoom) * flixel_FlxG.scaleMode.scale.y);
			this.canvas.set_scaleX(this.totalScaleX);
			this.canvas.set_scaleY(this.totalScaleY);
		}
	}
	,follow: function(Target,Style,Lerp) {
		if(Style == null) {
			Style = flixel_FlxCameraFollowStyle.LOCKON;
		}
		if(Lerp == null) {
			Lerp = 60 / flixel_FlxG.updateFramerate;
		}
		this.style = Style;
		this.target = Target;
		this.set_followLerp(Lerp);
		var helper;
		var w = 0;
		var h = 0;
		this._lastTargetPosition = null;
		switch(Style[1]) {
		case 0:
			if(this.target != null) {
				w = this.target.get_width();
				h = this.target.get_height();
			}
			var X = (this.width - w) / 2;
			var Y = (this.height - h) / 2 - h * 0.25;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = X;
			_this.y = Y;
			_this.width = w;
			_this.height = h;
			var rect = _this;
			rect._inPool = false;
			this.deadzone = rect;
			break;
		case 1:
			var w1 = this.width / 8;
			var h1 = this.height / 3;
			var X1 = (this.width - w1) / 2;
			var Y1 = (this.height - h1) / 2 - h1 * 0.25;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X1;
			_this1.y = Y1;
			_this1.width = w1;
			_this1.height = h1;
			var rect1 = _this1;
			rect1._inPool = false;
			this.deadzone = rect1;
			break;
		case 2:
			helper = Math.max(this.width,this.height) / 4;
			var X2 = (this.width - helper) / 2;
			var Y2 = (this.height - helper) / 2;
			var _this2 = flixel_math_FlxRect._pool.get();
			_this2.x = X2;
			_this2.y = Y2;
			_this2.width = helper;
			_this2.height = helper;
			var rect2 = _this2;
			rect2._inPool = false;
			this.deadzone = rect2;
			break;
		case 3:
			helper = Math.max(this.width,this.height) / 8;
			var X3 = (this.width - helper) / 2;
			var Y3 = (this.height - helper) / 2;
			var _this3 = flixel_math_FlxRect._pool.get();
			_this3.x = X3;
			_this3.y = Y3;
			_this3.width = helper;
			_this3.height = helper;
			var rect3 = _this3;
			rect3._inPool = false;
			this.deadzone = rect3;
			break;
		case 4:
			var Width = this.width;
			var Height = this.height;
			var _this4 = flixel_math_FlxRect._pool.get();
			_this4.x = 0;
			_this4.y = 0;
			_this4.width = Width;
			_this4.height = Height;
			var rect4 = _this4;
			rect4._inPool = false;
			this.deadzone = rect4;
			break;
		case 5:
			this.deadzone = null;
			break;
		}
	}
	,snapToTarget: function() {
		this.updateFollow();
		var _this = this.scroll;
		var point = this._scrollTarget;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
	}
	,focusOn: function(point) {
		this.scroll.set(point.x - this.width * 0.5,point.y - this.height * 0.5);
		if(point._weak) {
			point.put();
		}
	}
	,flash: function(Color,Duration,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -1;
		}
		if(!Force && this._fxFlashAlpha > 0.0) {
			return;
		}
		this._fxFlashColor = Color;
		if(Duration <= 0) {
			Duration = 0.000001;
		}
		this._fxFlashDuration = Duration;
		this._fxFlashComplete = OnComplete;
		this._fxFlashAlpha = 1.0;
	}
	,fade: function(Color,Duration,FadeIn,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(FadeIn == null) {
			FadeIn = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -16777216;
		}
		if(!this._fxFadeCompleted && !Force) {
			return;
		}
		this._fxFadeColor = Color;
		if(Duration <= 0) {
			Duration = 0.000001;
		}
		this._fxFadeIn = FadeIn;
		this._fxFadeDuration = Duration;
		this._fxFadeComplete = OnComplete;
		this._fxFadeAlpha = this._fxFadeIn ? 0.999999 : 0.000001;
		this._fxFadeCompleted = false;
	}
	,shake: function(Intensity,Duration,OnComplete,Force,Axes) {
		if(Force == null) {
			Force = true;
		}
		if(Duration == null) {
			Duration = 0.5;
		}
		if(Intensity == null) {
			Intensity = 0.05;
		}
		if(Axes == null) {
			Axes = flixel_util_FlxAxes.XY;
		}
		if(!Force && this._fxShakeDuration > 0) {
			return;
		}
		this._fxShakeIntensity = Intensity;
		this._fxShakeDuration = Duration;
		this._fxShakeComplete = OnComplete;
		this._fxShakeAxes = Axes;
	}
	,stopFX: function() {
		this._fxFlashAlpha = 0.0;
		this._fxFadeAlpha = 0.0;
		this._fxShakeDuration = 0;
		this.updateFlashSpritePosition();
	}
	,setFilters: function(filters) {
		this._filters = filters;
	}
	,copyFrom: function(Camera) {
		this.setScrollBounds(Camera.minScrollX,Camera.maxScrollX,Camera.minScrollY,Camera.maxScrollY);
		this.target = Camera.target;
		if(this.target != null) {
			if(Camera.deadzone == null) {
				this.deadzone = null;
			} else {
				if(this.deadzone == null) {
					var _this = flixel_math_FlxRect._pool.get();
					_this.x = 0;
					_this.y = 0;
					_this.width = 0;
					_this.height = 0;
					var rect = _this;
					rect._inPool = false;
					this.deadzone = rect;
				}
				var _this1 = this.deadzone;
				var Rect = Camera.deadzone;
				_this1.x = Rect.x;
				_this1.y = Rect.y;
				_this1.width = Rect.width;
				_this1.height = Rect.height;
				if(Rect._weak) {
					if(!Rect._inPool) {
						Rect._inPool = true;
						Rect._weak = false;
						flixel_math_FlxRect._pool.putUnsafe(Rect);
					}
				}
			}
		}
		return this;
	}
	,fill: function(Color,BlendAlpha,FxAlpha,graphics) {
		if(FxAlpha == null) {
			FxAlpha = 1.0;
		}
		if(BlendAlpha == null) {
			BlendAlpha = true;
		}
		if(flixel_FlxG.renderBlit) {
			if(BlendAlpha) {
				this._fill.fillRect(this._flashRect,Color);
				this.buffer.copyPixels(this._fill,this._flashRect,this._flashPoint,null,null,BlendAlpha);
			} else {
				this.buffer.fillRect(this._flashRect,Color);
			}
		} else {
			var targetGraphics = graphics == null ? this.canvas.get_graphics() : graphics;
			targetGraphics.beginFill(Color,FxAlpha);
			targetGraphics.drawRect(this.viewOffsetX - 1,this.viewOffsetY - 1,this.viewWidth + 2,this.viewHeight + 2);
			targetGraphics.endFill();
		}
	}
	,drawFX: function() {
		var alphaComponent;
		if(this._fxFlashAlpha > 0.0) {
			alphaComponent = this._fxFlashColor >> 24 & 255;
			if(flixel_FlxG.renderBlit) {
				this.fill((((alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFlashAlpha | 0) << 24) + (this._fxFlashColor & 16777215));
			} else {
				this.fill(this._fxFlashColor & 16777215,true,(alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFlashAlpha / 255,this.canvas.get_graphics());
			}
		}
		if(this._fxFadeAlpha > 0.0) {
			alphaComponent = this._fxFadeColor >> 24 & 255;
			if(flixel_FlxG.renderBlit) {
				this.fill((((alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFadeAlpha | 0) << 24) + (this._fxFadeColor & 16777215));
			} else {
				this.fill(this._fxFadeColor & 16777215,true,(alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFadeAlpha / 255,this.canvas.get_graphics());
			}
		}
	}
	,checkResize: function() {
		if(flixel_FlxG.renderBlit) {
			if(this.width != this.buffer.width || this.height != this.buffer.height) {
				var oldBuffer = this.screen.graphic;
				this.buffer = new openfl_display_BitmapData(this.width,this.height,true,0);
				this.screen.set_pixels(this.buffer);
				this.screen.origin.set();
				this._flashBitmap.bitmapData = this.buffer;
				this._flashRect.width = this.width;
				this._flashRect.height = this.height;
				this._fill = flixel_util_FlxDestroyUtil.dispose(this._fill);
				this._fill = new openfl_display_BitmapData(this.width,this.height,true,0);
				flixel_FlxG.bitmap.removeIfNoUse(oldBuffer);
			}
			this._blitMatrix.identity();
			this._blitMatrix.translate(-this.viewOffsetX,-this.viewOffsetY);
			this._blitMatrix.scale(this.scaleX,this.scaleY);
			this._useBlitMatrix = this.scaleX < this.initialZoom || this.scaleY < this.initialZoom;
		}
	}
	,updateBlitMatrix: function() {
		this._blitMatrix.identity();
		this._blitMatrix.translate(-this.viewOffsetX,-this.viewOffsetY);
		this._blitMatrix.scale(this.scaleX,this.scaleY);
		this._useBlitMatrix = this.scaleX < this.initialZoom || this.scaleY < this.initialZoom;
	}
	,setSize: function(Width,Height) {
		this.set_width(Width);
		this.set_height(Height);
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
	}
	,setScrollBoundsRect: function(X,Y,Width,Height,UpdateWorld) {
		if(UpdateWorld == null) {
			UpdateWorld = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		if(UpdateWorld) {
			var _this = flixel_FlxG.worldBounds;
			_this.x = X;
			_this.y = Y;
			_this.width = Width;
			_this.height = Height;
		}
		this.setScrollBounds(X,X + Width,Y,Y + Height);
	}
	,setScrollBounds: function(MinX,MaxX,MinY,MaxY) {
		this.minScrollX = MinX;
		this.maxScrollX = MaxX;
		this.minScrollY = MinY;
		this.maxScrollY = MaxY;
		this.updateScroll();
	}
	,setScale: function(X,Y) {
		this.scaleX = X;
		this.scaleY = Y;
		this.totalScaleX = this.scaleX * flixel_FlxG.scaleMode.scale.x;
		this.totalScaleY = this.scaleY * flixel_FlxG.scaleMode.scale.y;
		if(flixel_FlxG.renderBlit) {
			this._blitMatrix.identity();
			this._blitMatrix.translate(-this.viewOffsetX,-this.viewOffsetY);
			this._blitMatrix.scale(this.scaleX,this.scaleY);
			this._useBlitMatrix = this.scaleX < this.initialZoom || this.scaleY < this.initialZoom;
			if(this._useBlitMatrix) {
				this._flashBitmap.set_scaleX(this.initialZoom * flixel_FlxG.scaleMode.scale.x);
				this._flashBitmap.set_scaleY(this.initialZoom * flixel_FlxG.scaleMode.scale.y);
			} else {
				this._flashBitmap.set_scaleX(this.totalScaleX);
				this._flashBitmap.set_scaleY(this.totalScaleY);
			}
		}
		this.viewOffsetX = 0.5 * this.width * (this.scaleX - this.initialZoom) / this.scaleX;
		this.viewOffsetWidth = this.width - this.viewOffsetX;
		this.viewWidth = this.width - 2 * this.viewOffsetX;
		this.viewOffsetY = 0.5 * this.height * (this.scaleY - this.initialZoom) / this.scaleY;
		this.viewOffsetHeight = this.height - this.viewOffsetY;
		this.viewHeight = this.height - 2 * this.viewOffsetY;
		this.updateScrollRect();
		this.updateInternalSpritePositions();
		flixel_FlxG.cameras.cameraResized.dispatch(this);
	}
	,onResize: function() {
		this.updateFlashOffset();
		this.setScale(this.scaleX,this.scaleY);
	}
	,containsPoint: function(point,width,height) {
		if(height == null) {
			height = 0;
		}
		if(width == null) {
			width = 0;
		}
		if(point.x + width > this.viewOffsetX && point.x < this.viewOffsetWidth && point.y + height > this.viewOffsetY) {
			return point.y < this.viewOffsetHeight;
		} else {
			return false;
		}
	}
	,set_followLerp: function(Value) {
		var Max = 60 / flixel_FlxG.updateFramerate;
		var lowerBound = Value < 0 ? 0 : Value;
		return this.followLerp = Max != null && lowerBound > Max ? Max : lowerBound;
	}
	,set_width: function(Value) {
		if(this.width != Value && Value > 0) {
			this.width = Value;
			this.viewOffsetX = 0.5 * this.width * (this.scaleX - this.initialZoom) / this.scaleX;
			this.viewOffsetWidth = this.width - this.viewOffsetX;
			this.viewWidth = this.width - 2 * this.viewOffsetX;
			this.updateFlashOffset();
			this.updateScrollRect();
			this.updateInternalSpritePositions();
			flixel_FlxG.cameras.cameraResized.dispatch(this);
		}
		return Value;
	}
	,set_height: function(Value) {
		if(this.height != Value && Value > 0) {
			this.height = Value;
			this.viewOffsetY = 0.5 * this.height * (this.scaleY - this.initialZoom) / this.scaleY;
			this.viewOffsetHeight = this.height - this.viewOffsetY;
			this.viewHeight = this.height - 2 * this.viewOffsetY;
			this.updateFlashOffset();
			this.updateScrollRect();
			this.updateInternalSpritePositions();
			flixel_FlxG.cameras.cameraResized.dispatch(this);
		}
		return Value;
	}
	,set_zoom: function(Zoom) {
		this.zoom = Zoom == 0 ? flixel_FlxCamera.defaultZoom : Zoom;
		this.setScale(this.zoom,this.zoom);
		return this.zoom;
	}
	,set_alpha: function(Alpha) {
		var lowerBound = Alpha < 0 ? 0 : Alpha;
		this.alpha = lowerBound > 1 ? 1 : lowerBound;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.set_alpha(Alpha);
		} else {
			this.canvas.set_alpha(Alpha);
		}
		return Alpha;
	}
	,set_angle: function(Angle) {
		this.angle = Angle;
		this.flashSprite.set_rotation(Angle);
		return Angle;
	}
	,set_color: function(Color) {
		this.color = Color;
		var colorTransform;
		if(flixel_FlxG.renderBlit) {
			if(this._flashBitmap == null) {
				return Color;
			}
			colorTransform = this._flashBitmap.get_transform().get_colorTransform();
		} else {
			colorTransform = this.canvas.get_transform().get_colorTransform();
		}
		colorTransform.redMultiplier = (this.color >> 16 & 255) / 255;
		colorTransform.greenMultiplier = (this.color >> 8 & 255) / 255;
		colorTransform.blueMultiplier = (this.color & 255) / 255;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.get_transform().set_colorTransform(colorTransform);
		} else {
			this.canvas.get_transform().set_colorTransform(colorTransform);
		}
		return Color;
	}
	,set_antialiasing: function(Antialiasing) {
		this.antialiasing = Antialiasing;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.smoothing = Antialiasing;
		}
		return Antialiasing;
	}
	,set_x: function(x) {
		this.x = x;
		this.updateFlashSpritePosition();
		return x;
	}
	,set_y: function(y) {
		this.y = y;
		this.updateFlashSpritePosition();
		return y;
	}
	,set_visible: function(visible) {
		if(this.flashSprite != null) {
			this.flashSprite.set_visible(visible);
		}
		return this.visible = visible;
	}
	,calcOffsetX: function() {
		this.viewOffsetX = 0.5 * this.width * (this.scaleX - this.initialZoom) / this.scaleX;
		this.viewOffsetWidth = this.width - this.viewOffsetX;
		this.viewWidth = this.width - 2 * this.viewOffsetX;
	}
	,calcOffsetY: function() {
		this.viewOffsetY = 0.5 * this.height * (this.scaleY - this.initialZoom) / this.scaleY;
		this.viewOffsetHeight = this.height - this.viewOffsetY;
		this.viewHeight = this.height - 2 * this.viewOffsetY;
	}
	,__class__: flixel_FlxCamera
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_antialiasing:"set_antialiasing",set_color:"set_color",set_angle:"set_angle",set_alpha:"set_alpha",set_zoom:"set_zoom",set_height:"set_height",set_width:"set_width",set_followLerp:"set_followLerp",set_y:"set_y",set_x:"set_x"})
});
var flixel_FlxCameraFollowStyle = $hxClasses["flixel.FlxCameraFollowStyle"] = { __ename__ : ["flixel","FlxCameraFollowStyle"], __constructs__ : ["LOCKON","PLATFORMER","TOPDOWN","TOPDOWN_TIGHT","SCREEN_BY_SCREEN","NO_DEAD_ZONE"] };
flixel_FlxCameraFollowStyle.LOCKON = ["LOCKON",0];
flixel_FlxCameraFollowStyle.LOCKON.toString = $estr;
flixel_FlxCameraFollowStyle.LOCKON.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.PLATFORMER = ["PLATFORMER",1];
flixel_FlxCameraFollowStyle.PLATFORMER.toString = $estr;
flixel_FlxCameraFollowStyle.PLATFORMER.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.TOPDOWN = ["TOPDOWN",2];
flixel_FlxCameraFollowStyle.TOPDOWN.toString = $estr;
flixel_FlxCameraFollowStyle.TOPDOWN.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.TOPDOWN_TIGHT = ["TOPDOWN_TIGHT",3];
flixel_FlxCameraFollowStyle.TOPDOWN_TIGHT.toString = $estr;
flixel_FlxCameraFollowStyle.TOPDOWN_TIGHT.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN = ["SCREEN_BY_SCREEN",4];
flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN.toString = $estr;
flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.NO_DEAD_ZONE = ["NO_DEAD_ZONE",5];
flixel_FlxCameraFollowStyle.NO_DEAD_ZONE.toString = $estr;
flixel_FlxCameraFollowStyle.NO_DEAD_ZONE.__enum__ = flixel_FlxCameraFollowStyle;
var flixel_system_FlxVersion = function(Major,Minor,Patch) {
	this.major = Major;
	this.minor = Minor;
	this.patch = Patch;
};
$hxClasses["flixel.system.FlxVersion"] = flixel_system_FlxVersion;
flixel_system_FlxVersion.__name__ = ["flixel","system","FlxVersion"];
flixel_system_FlxVersion.prototype = {
	toString: function() {
		var sha = flixel_system_FlxVersion.sha;
		if(sha != "") {
			sha = "@" + sha.substring(0,7);
		}
		return "HaxeFlixel " + this.major + "." + this.minor + "." + this.patch + sha;
	}
	,__class__: flixel_system_FlxVersion
};
var flixel_system_frontEnds_BitmapFrontEnd = function() {
	this._lastUniqueKeyIndex = 0;
	this.reset();
};
$hxClasses["flixel.system.frontEnds.BitmapFrontEnd"] = flixel_system_frontEnds_BitmapFrontEnd;
flixel_system_frontEnds_BitmapFrontEnd.__name__ = ["flixel","system","frontEnds","BitmapFrontEnd"];
flixel_system_frontEnds_BitmapFrontEnd.prototype = {
	onAssetsReload: function(_) {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && (obj.assetsClass != null || obj.assetsKey != null)) {
				obj.onAssetsReload();
			}
		}
	}
	,onContext: function() {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && obj.isDumped) {
				obj.onContext();
			}
		}
	}
	,dumpCache: function() {
	}
	,undumpCache: function() {
	}
	,checkCache: function(Key) {
		return this._cache.get(Key) != null;
	}
	,create: function(Width,Height,Color,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		return flixel_graphics_FlxGraphic.fromRectangle(Width,Height,Color,Unique,Key);
	}
	,add: function(Graphic,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(js_Boot.__instanceof(Graphic,flixel_graphics_FlxGraphic)) {
			return flixel_graphics_FlxGraphic.fromGraphic(Graphic,Unique,Key);
		} else if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
			return flixel_graphics_FlxGraphic.fromBitmapData(Graphic,Unique,Key);
		}
		return flixel_graphics_FlxGraphic.fromAssetKey(Std.string(Graphic),Unique,Key);
	}
	,addGraphic: function(graphic) {
		var key = graphic.key;
		var _this = this._cache;
		if(__map_reserved[key] != null) {
			_this.setReserved(key,graphic);
		} else {
			_this.h[key] = graphic;
		}
		return graphic;
	}
	,get: function(key) {
		var _this = this._cache;
		if(__map_reserved[key] != null) {
			return _this.getReserved(key);
		} else {
			return _this.h[key];
		}
	}
	,findKeyForBitmap: function(bmd) {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			if((__map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1]).bitmap == bmd) {
				return key1;
			}
		}
		return null;
	}
	,getKeyForClass: function(source) {
		return Type.getClassName(source);
	}
	,generateKey: function(systemKey,userKey,unique) {
		if(unique == null) {
			unique = false;
		}
		var key = userKey;
		if(key == null) {
			key = systemKey;
		}
		if(unique || key == null) {
			key = this.getUniqueKey(key);
		}
		return key;
	}
	,getUniqueKey: function(baseKey) {
		if(baseKey == null) {
			baseKey = "pixels";
		}
		if(this._cache.get(baseKey) == null) {
			return baseKey;
		}
		var i = this._lastUniqueKeyIndex;
		var uniqueKey;
		while(true) {
			++i;
			uniqueKey = baseKey + i;
			if(!(this._cache.get(uniqueKey) != null)) {
				break;
			}
		}
		this._lastUniqueKeyIndex = i;
		return uniqueKey;
	}
	,getKeyWithSpacesAndBorders: function(baseKey,frameSize,frameSpacing,frameBorder,region) {
		var result = baseKey;
		if(region != null) {
			result += "_Region:" + region.x + "_" + region.y + "_" + region.width + "_" + region.height;
		}
		if(frameSize != null) {
			result += "_FrameSize:" + frameSize.x + "_" + frameSize.y;
		}
		if(frameSpacing != null) {
			result += "_Spaces:" + frameSpacing.x + "_" + frameSpacing.y;
		}
		if(frameBorder != null) {
			result += "_Border:" + frameBorder.x + "_" + frameBorder.y;
		}
		return result;
	}
	,remove: function(graphic) {
		if(graphic != null) {
			var key = graphic.key;
			if(key != null) {
				openfl_Assets.cache.removeBitmapData(key);
				this._cache.remove(key);
			}
			graphic.destroy();
		}
	}
	,removeByKey: function(key) {
		if(key != null) {
			var obj = this._cache.get(key);
			if(key != null) {
				openfl_Assets.cache.removeBitmapData(key);
				this._cache.remove(key);
			}
			if(obj != null) {
				obj.destroy();
			}
		}
	}
	,removeIfNoUse: function(graphic) {
		if(graphic != null && graphic.get_useCount() == 0 && !graphic.persist) {
			this.remove(graphic);
		}
	}
	,clearCache: function() {
		if(this._cache == null) {
			this._cache = new haxe_ds_StringMap();
			return;
		}
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var obj = this._cache.get(key1);
			if(obj != null && !obj.persist && obj.get_useCount() <= 0) {
				if(key1 != null) {
					openfl_Assets.cache.removeBitmapData(key1);
					this._cache.remove(key1);
				}
				obj.destroy();
			}
		}
	}
	,removeKey: function(key) {
		if(key != null) {
			openfl_Assets.cache.removeBitmapData(key);
			this._cache.remove(key);
		}
	}
	,reset: function() {
		if(this._cache == null) {
			this._cache = new haxe_ds_StringMap();
			return;
		}
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var obj = this._cache.get(key1);
			if(key1 != null) {
				openfl_Assets.cache.removeBitmapData(key1);
				this._cache.remove(key1);
			}
			if(obj != null) {
				obj.destroy();
			}
		}
	}
	,clearUnused: function() {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && obj.get_useCount() <= 0 && !obj.persist && obj.get_destroyOnNoUse()) {
				this.removeByKey(key1);
			}
		}
	}
	,get_maxTextureSize: function() {
		return lime_graphics_opengl_GL.context.getParameter(3379);
	}
	,get_whitePixel: function() {
		if(this._whitePixel == null) {
			var bd = new openfl_display_BitmapData(10,10,true,-1);
			var graphic = flixel_FlxG.bitmap.add(bd,true,"whitePixels");
			graphic.persist = true;
			this._whitePixel = graphic.get_imageFrame().get_frame();
		}
		return this._whitePixel;
	}
	,__class__: flixel_system_frontEnds_BitmapFrontEnd
	,__properties__: {get_whitePixel:"get_whitePixel",get_maxTextureSize:"get_maxTextureSize"}
};
var flixel_system_frontEnds_BitmapLogFrontEnd = function() {
};
$hxClasses["flixel.system.frontEnds.BitmapLogFrontEnd"] = flixel_system_frontEnds_BitmapLogFrontEnd;
flixel_system_frontEnds_BitmapLogFrontEnd.__name__ = ["flixel","system","frontEnds","BitmapLogFrontEnd"];
flixel_system_frontEnds_BitmapLogFrontEnd.prototype = {
	add: function(Data,Name) {
		if(Name == null) {
			Name = "";
		}
	}
	,clear: function() {
	}
	,clearAt: function(Index) {
		if(Index == null) {
			Index = -1;
		}
	}
	,viewCache: function() {
	}
	,__class__: flixel_system_frontEnds_BitmapLogFrontEnd
};
var flixel_system_frontEnds_CameraFrontEnd = function() {
	this._cameraRect = new openfl_geom_Rectangle();
	this.useBufferLocking = false;
	this.cameraResized = new flixel_util__$FlxSignal_FlxSignal1();
	this.cameraRemoved = new flixel_util__$FlxSignal_FlxSignal1();
	this.cameraAdded = new flixel_util__$FlxSignal_FlxSignal1();
	this.list = [];
	flixel_FlxCamera.defaultCameras = this.list;
};
$hxClasses["flixel.system.frontEnds.CameraFrontEnd"] = flixel_system_frontEnds_CameraFrontEnd;
flixel_system_frontEnds_CameraFrontEnd.__name__ = ["flixel","system","frontEnds","CameraFrontEnd"];
flixel_system_frontEnds_CameraFrontEnd.prototype = {
	add: function(NewCamera) {
		flixel_FlxG.game.addChildAt(NewCamera.flashSprite,flixel_FlxG.game.getChildIndex(flixel_FlxG.game._inputContainer));
		flixel_FlxG.cameras.list.push(NewCamera);
		NewCamera.ID = flixel_FlxG.cameras.list.length - 1;
		this.cameraAdded.dispatch(NewCamera);
		return NewCamera;
	}
	,remove: function(Camera,Destroy) {
		if(Destroy == null) {
			Destroy = true;
		}
		var index = this.list.indexOf(Camera);
		if(Camera != null && index != -1) {
			flixel_FlxG.game.removeChild(Camera.flashSprite);
			this.list.splice(index,1);
		} else {
			var _this = flixel_FlxG.log;
			return;
		}
		if(flixel_FlxG.renderTile) {
			var _g1 = 0;
			var _g = this.list.length;
			while(_g1 < _g) {
				var i = _g1++;
				this.list[i].ID = i;
			}
		}
		if(Destroy) {
			Camera.destroy();
		}
		this.cameraRemoved.dispatch(Camera);
	}
	,reset: function(NewCamera) {
		while(this.list.length > 0) this.remove(this.list[0]);
		if(NewCamera == null) {
			NewCamera = new flixel_FlxCamera(0,0,flixel_FlxG.width,flixel_FlxG.height);
		}
		flixel_FlxG.camera = this.add(NewCamera);
		NewCamera.ID = 0;
		flixel_FlxCamera.defaultCameras = this.list;
	}
	,flash: function(Color,Duration,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -1;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.flash(Color,Duration,OnComplete,Force);
		}
	}
	,fade: function(Color,Duration,FadeIn,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(FadeIn == null) {
			FadeIn = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -16777216;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.fade(Color,Duration,FadeIn,OnComplete,Force);
		}
	}
	,shake: function(Intensity,Duration,OnComplete,Force,Axes) {
		if(Force == null) {
			Force = true;
		}
		if(Duration == null) {
			Duration = 0.5;
		}
		if(Intensity == null) {
			Intensity = 0.05;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.shake(Intensity,Duration,OnComplete,Force,Axes);
		}
	}
	,lock: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera == null || !camera.exists || !camera.visible) {
				continue;
			}
			if(flixel_FlxG.renderBlit) {
				camera.checkResize();
				if(this.useBufferLocking) {
					camera.buffer.lock();
				}
			}
			if(flixel_FlxG.renderTile) {
				camera.clearDrawStack();
				camera.canvas.get_graphics().clear();
			}
			if(flixel_FlxG.renderBlit) {
				camera.fill(camera.bgColor,camera.useBgAlphaBlending);
				camera.screen.dirty = true;
			} else {
				camera.fill(camera.bgColor & 16777215,camera.useBgAlphaBlending,(camera.bgColor >> 24 & 255) / 255);
			}
		}
	}
	,render: function() {
		if(flixel_FlxG.renderTile) {
			var _g = 0;
			var _g1 = this.list;
			while(_g < _g1.length) {
				var camera = _g1[_g];
				++_g;
				if(camera != null && camera.exists && camera.visible) {
					camera.render();
				}
			}
		}
	}
	,unlock: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera == null || !camera.exists || !camera.visible) {
				continue;
			}
			camera.drawFX();
			if(flixel_FlxG.renderBlit) {
				if(this.useBufferLocking) {
					camera.buffer.unlock();
				}
				camera.screen.dirty = true;
			}
		}
	}
	,update: function(elapsed) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera != null && camera.exists && camera.active) {
				camera.update(elapsed);
			}
		}
	}
	,resize: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.onResize();
		}
	}
	,get_bgColor: function() {
		if(flixel_FlxG.camera == null) {
			return -16777216;
		} else {
			return flixel_FlxG.camera.bgColor;
		}
	}
	,set_bgColor: function(Color) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.bgColor = Color;
		}
		return Color;
	}
	,__class__: flixel_system_frontEnds_CameraFrontEnd
	,__properties__: {set_bgColor:"set_bgColor",get_bgColor:"get_bgColor"}
};
var flixel_system_frontEnds_ConsoleFrontEnd = function() {
	this.stepAfterCommand = true;
	this.autoPause = true;
};
$hxClasses["flixel.system.frontEnds.ConsoleFrontEnd"] = flixel_system_frontEnds_ConsoleFrontEnd;
flixel_system_frontEnds_ConsoleFrontEnd.__name__ = ["flixel","system","frontEnds","ConsoleFrontEnd"];
flixel_system_frontEnds_ConsoleFrontEnd.prototype = {
	registerFunction: function(FunctionAlias,Function) {
	}
	,registerObject: function(ObjectAlias,AnyObject) {
	}
	,registerClass: function(cl) {
	}
	,__class__: flixel_system_frontEnds_ConsoleFrontEnd
};
var flixel_system_frontEnds_DebuggerFrontEnd = function() {
	this.visible = false;
	this.visibilityChanged = new flixel_util__$FlxSignal_FlxSignal0();
	this.drawDebugChanged = new flixel_util__$FlxSignal_FlxSignal0();
	this.drawDebug = false;
	this.toggleKeys = [113,192,220];
	this.precision = 3;
};
$hxClasses["flixel.system.frontEnds.DebuggerFrontEnd"] = flixel_system_frontEnds_DebuggerFrontEnd;
flixel_system_frontEnds_DebuggerFrontEnd.__name__ = ["flixel","system","frontEnds","DebuggerFrontEnd"];
flixel_system_frontEnds_DebuggerFrontEnd.prototype = {
	setLayout: function(Layout) {
	}
	,resetLayout: function() {
	}
	,addButton: function(Alignment,Icon,UpHandler,ToggleMode,UpdateLayout) {
		if(UpdateLayout == null) {
			UpdateLayout = true;
		}
		if(ToggleMode == null) {
			ToggleMode = false;
		}
		return null;
	}
	,track: function(ObjectOrClass,WindowTitle) {
		return null;
	}
	,addTrackerProfile: function(Profile) {
	}
	,removeButton: function(Button,UpdateLayout) {
		if(UpdateLayout == null) {
			UpdateLayout = true;
		}
	}
	,set_drawDebug: function(Value) {
		if(this.drawDebug == Value) {
			return this.drawDebug;
		}
		this.drawDebug = Value;
		return this.drawDebug;
	}
	,set_visible: function(Value) {
		if(this.visible == Value) {
			return this.visible;
		}
		this.visible = Value;
		return this.visible;
	}
	,__class__: flixel_system_frontEnds_DebuggerFrontEnd
	,__properties__: {set_visible:"set_visible",set_drawDebug:"set_drawDebug"}
};
var flixel_system_frontEnds_HTML5FrontEnd = function() {
	this.browser = this.getBrowser();
	this.platform = this.getPlatform();
	this.onMobile = this.getOnMobile();
};
$hxClasses["flixel.system.frontEnds.HTML5FrontEnd"] = flixel_system_frontEnds_HTML5FrontEnd;
flixel_system_frontEnds_HTML5FrontEnd.__name__ = ["flixel","system","frontEnds","HTML5FrontEnd"];
flixel_system_frontEnds_HTML5FrontEnd.prototype = {
	getBrowser: function() {
		if(this.userAgentContains(" OPR/")) {
			return flixel_system_frontEnds_FlxBrowser.OPERA;
		} else if(this.userAgentContains("chrome",true)) {
			return flixel_system_frontEnds_FlxBrowser.CHROME;
		} else if(window.navigator.appName == "Netscape") {
			return flixel_system_frontEnds_FlxBrowser.FIREFOX;
		} else if(!(!document.documentMode)) {
			return flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER;
		} else if(Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0) {
			return flixel_system_frontEnds_FlxBrowser.SAFARI;
		}
		return flixel_system_frontEnds_FlxBrowser.UNKNOWN;
	}
	,getPlatform: function() {
		if(this.userAgentContains("Win")) {
			return flixel_system_frontEnds_FlxPlatform.WINDOWS;
		} else if(this.userAgentContains("IEMobile")) {
			return flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE;
		} else if(this.userAgentContains("Android")) {
			return flixel_system_frontEnds_FlxPlatform.ANDROID;
		} else if(this.userAgentContains("Linux")) {
			return flixel_system_frontEnds_FlxPlatform.LINUX;
		} else if(this.userAgentContains("BlackBerry")) {
			return flixel_system_frontEnds_FlxPlatform.BLACKBERRY;
		} else if(this.userAgentContains("iPhone")) {
			return flixel_system_frontEnds_FlxPlatform.IOS(flixel_system_frontEnds_FlxIOSDevice.IPHONE);
		} else if(this.userAgentContains("iPad")) {
			return flixel_system_frontEnds_FlxPlatform.IOS(flixel_system_frontEnds_FlxIOSDevice.IPAD);
		} else if(this.userAgentContains("iPod")) {
			return flixel_system_frontEnds_FlxPlatform.IOS(flixel_system_frontEnds_FlxIOSDevice.IPOD);
		} else if(this.userAgentContains("Mac")) {
			return flixel_system_frontEnds_FlxPlatform.MAC;
		} else {
			return flixel_system_frontEnds_FlxPlatform.UNKNOWN;
		}
	}
	,getOnMobile: function() {
		var _g = this.platform;
		switch(_g[1]) {
		case 3:case 4:case 5:case 6:
			return true;
		default:
			return false;
		}
	}
	,userAgentContains: function(substring,toLowerCase) {
		if(toLowerCase == null) {
			toLowerCase = false;
		}
		var userAgent = window.navigator.userAgent;
		if(toLowerCase) {
			userAgent = userAgent.toLowerCase();
		}
		return userAgent.indexOf(substring) != -1;
	}
	,get_browserPosition: function() {
		if(this.browserPosition == null) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			this.browserPosition = point;
		}
		this.browserPosition.set(window.screenX,window.screenY);
		return this.browserPosition;
	}
	,get_browserWidth: function() {
		return window.innerWidth;
	}
	,get_browserHeight: function() {
		return window.innerHeight;
	}
	,__class__: flixel_system_frontEnds_HTML5FrontEnd
	,__properties__: {get_browserPosition:"get_browserPosition",get_browserHeight:"get_browserHeight",get_browserWidth:"get_browserWidth"}
};
var flixel_system_frontEnds_InputFrontEnd = function() {
	this.resetOnStateSwitch = true;
	this.list = [];
};
$hxClasses["flixel.system.frontEnds.InputFrontEnd"] = flixel_system_frontEnds_InputFrontEnd;
flixel_system_frontEnds_InputFrontEnd.__name__ = ["flixel","system","frontEnds","InputFrontEnd"];
flixel_system_frontEnds_InputFrontEnd.prototype = {
	replace_flixel_input_mouse_FlxMouse: function(Old,New) {
		var i = 0;
		var success = false;
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(input == Old) {
				this.list[i] = New;
				success = true;
				break;
			}
			++i;
		}
		if(success) {
			return New;
		}
		return null;
	}
	,add_flixel_input_gamepad_FlxGamepadManager: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,add_flixel_input_touch_FlxTouchManager: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,add_flixel_input_mouse_FlxMouse: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,add_flixel_input_keyboard_FlxKeyboard: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.reset();
		}
	}
	,update: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.update();
		}
	}
	,onFocus: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocus();
		}
	}
	,onFocusLost: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocusLost();
		}
	}
	,onStateSwitch: function() {
		if(this.resetOnStateSwitch) {
			this.reset();
		}
	}
	,destroy: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input = flixel_util_FlxDestroyUtil.destroy(input);
		}
	}
	,__class__: flixel_system_frontEnds_InputFrontEnd
};
var flixel_system_frontEnds_LogFrontEnd = function() {
	this.redirectTraces = false;
	this._standardTraceFunction = haxe_Log.trace;
};
$hxClasses["flixel.system.frontEnds.LogFrontEnd"] = flixel_system_frontEnds_LogFrontEnd;
flixel_system_frontEnds_LogFrontEnd.__name__ = ["flixel","system","frontEnds","LogFrontEnd"];
flixel_system_frontEnds_LogFrontEnd.prototype = {
	add: function(Data) {
	}
	,warn: function(Data) {
	}
	,error: function(Data) {
	}
	,notice: function(Data) {
	}
	,advanced: function(Data,Style,FireOnce) {
		if(FireOnce == null) {
			FireOnce = false;
		}
	}
	,clear: function() {
	}
	,set_redirectTraces: function(Redirect) {
		haxe_Log.trace = Redirect ? $bind(this,this.processTraceData) : this._standardTraceFunction;
		return this.redirectTraces = Redirect;
	}
	,processTraceData: function(Data,Info) {
		var paramArray = [Data];
		if(Info.customParams != null) {
			var _g = 0;
			var _g1 = Info.customParams;
			while(_g < _g1.length) {
				var i = _g1[_g];
				++_g;
				paramArray.push(i);
			}
		}
		this.advanced(paramArray,flixel_system_debug_log_LogStyle.NORMAL);
	}
	,__class__: flixel_system_frontEnds_LogFrontEnd
	,__properties__: {set_redirectTraces:"set_redirectTraces"}
};
var haxe_Log = function() { };
$hxClasses["haxe.Log"] = haxe_Log;
haxe_Log.__name__ = ["haxe","Log"];
haxe_Log.trace = function(v,infos) {
	js_Boot.__trace(v,infos);
};
var js_Boot = function() { };
$hxClasses["js.Boot"] = js_Boot;
js_Boot.__name__ = ["js","Boot"];
js_Boot.__unhtml = function(s) {
	return s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
};
js_Boot.__trace = function(v,i) {
	var msg = i != null ? i.fileName + ":" + i.lineNumber + ": " : "";
	msg += js_Boot.__string_rec(v,"");
	if(i != null && i.customParams != null) {
		var _g = 0;
		var _g1 = i.customParams;
		while(_g < _g1.length) {
			var v1 = _g1[_g];
			++_g;
			msg += "," + js_Boot.__string_rec(v1,"");
		}
	}
	var d;
	var tmp;
	if(typeof(document) != "undefined") {
		d = document.getElementById("haxe:trace");
		tmp = d != null;
	} else {
		tmp = false;
	}
	if(tmp) {
		d.innerHTML += js_Boot.__unhtml(msg) + "<br/>";
	} else if(typeof console != "undefined" && console.log != null) {
		console.log(msg);
	}
};
js_Boot.getClass = function(o) {
	if((o instanceof Array) && o.__enum__ == null) {
		return Array;
	} else {
		var cl = o.__class__;
		if(cl != null) {
			return cl;
		}
		var name = js_Boot.__nativeClassName(o);
		if(name != null) {
			return js_Boot.__resolveNativeClass(name);
		}
		return null;
	}
};
js_Boot.__string_rec = function(o,s) {
	if(o == null) {
		return "null";
	}
	if(s.length >= 5) {
		return "<...>";
	}
	var t = typeof(o);
	if(t == "function" && (o.__name__ || o.__ename__)) {
		t = "object";
	}
	switch(t) {
	case "function":
		return "<function>";
	case "object":
		if(o instanceof Array) {
			if(o.__enum__) {
				if(o.length == 2) {
					return o[0];
				}
				var str = o[0] + "(";
				s += "\t";
				var _g1 = 2;
				var _g = o.length;
				while(_g1 < _g) {
					var i = _g1++;
					if(i != 2) {
						str += "," + js_Boot.__string_rec(o[i],s);
					} else {
						str += js_Boot.__string_rec(o[i],s);
					}
				}
				return str + ")";
			}
			var l = o.length;
			var i1;
			var str1 = "[";
			s += "\t";
			var _g11 = 0;
			var _g2 = l;
			while(_g11 < _g2) {
				var i2 = _g11++;
				str1 += (i2 > 0 ? "," : "") + js_Boot.__string_rec(o[i2],s);
			}
			str1 += "]";
			return str1;
		}
		var tostr;
		try {
			tostr = o.toString;
		} catch( e ) {
			haxe_CallStack.lastException = e;
			return "???";
		}
		if(tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
			var s2 = o.toString();
			if(s2 != "[object Object]") {
				return s2;
			}
		}
		var k = null;
		var str2 = "{\n";
		s += "\t";
		var hasp = o.hasOwnProperty != null;
		for( var k in o ) {
		if(hasp && !o.hasOwnProperty(k)) {
			continue;
		}
		if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__") {
			continue;
		}
		if(str2.length != 2) {
			str2 += ", \n";
		}
		str2 += s + k + " : " + js_Boot.__string_rec(o[k],s);
		}
		s = s.substring(1);
		str2 += "\n" + s + "}";
		return str2;
	case "string":
		return o;
	default:
		return String(o);
	}
};
js_Boot.__interfLoop = function(cc,cl) {
	if(cc == null) {
		return false;
	}
	if(cc == cl) {
		return true;
	}
	var intf = cc.__interfaces__;
	if(intf != null) {
		var _g1 = 0;
		var _g = intf.length;
		while(_g1 < _g) {
			var i = _g1++;
			var i1 = intf[i];
			if(i1 == cl || js_Boot.__interfLoop(i1,cl)) {
				return true;
			}
		}
	}
	return js_Boot.__interfLoop(cc.__super__,cl);
};
js_Boot.__instanceof = function(o,cl) {
	if(cl == null) {
		return false;
	}
	switch(cl) {
	case Array:
		if((o instanceof Array)) {
			return o.__enum__ == null;
		} else {
			return false;
		}
		break;
	case Bool:
		return typeof(o) == "boolean";
	case Dynamic:
		return true;
	case Float:
		return typeof(o) == "number";
	case Int:
		if(typeof(o) == "number") {
			return (o|0) === o;
		} else {
			return false;
		}
		break;
	case String:
		return typeof(o) == "string";
	default:
		if(o != null) {
			if(typeof(cl) == "function") {
				if(o instanceof cl) {
					return true;
				}
				if(js_Boot.__interfLoop(js_Boot.getClass(o),cl)) {
					return true;
				}
			} else if(typeof(cl) == "object" && js_Boot.__isNativeObj(cl)) {
				if(o instanceof cl) {
					return true;
				}
			}
		} else {
			return false;
		}
		if(cl == Class ? o.__name__ != null : false) {
			return true;
		}
		if(cl == Enum ? o.__ename__ != null : false) {
			return true;
		}
		return o.__enum__ == cl;
	}
};
js_Boot.__cast = function(o,t) {
	if(js_Boot.__instanceof(o,t)) {
		return o;
	} else {
		throw new js__$Boot_HaxeError("Cannot cast " + Std.string(o) + " to " + Std.string(t));
	}
};
js_Boot.__nativeClassName = function(o) {
	var name = js_Boot.__toStr.call(o).slice(8,-1);
	if(name == "Object" || name == "Function" || name == "Math" || name == "JSON") {
		return null;
	}
	return name;
};
js_Boot.__isNativeObj = function(o) {
	return js_Boot.__nativeClassName(o) != null;
};
js_Boot.__resolveNativeClass = function(name) {
	return $global[name];
};
var flixel_math_FlxRandom = function(InitialSeed) {
	this.internalSeed = 1;
	this._floatNormalRho = 0;
	this._twoPI = Math.PI * 2;
	this._floatNormalRand2 = 0;
	this._floatNormalRand1 = 0;
	this._hasFloatNormalSpare = false;
	this.initialSeed = 1;
	if(InitialSeed != null) {
		var lowerBound = InitialSeed < 1 ? 1 : InitialSeed;
		var NewSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
		var lowerBound1 = NewSeed < 1 ? 1 : NewSeed;
		this.initialSeed = (this.internalSeed = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0) | 0;
	} else {
		var Value = Math.random() * 2147483647 | 0;
		var lowerBound2 = Value < 1 ? 1 : Value;
		var NewSeed1 = (lowerBound2 > 2147483646 ? 2147483646 : lowerBound2) | 0;
		var lowerBound3 = NewSeed1 < 1 ? 1 : NewSeed1;
		var NewSeed2 = (lowerBound3 > 2147483646 ? 2147483646 : lowerBound3) | 0;
		var lowerBound4 = NewSeed2 < 1 ? 1 : NewSeed2;
		this.initialSeed = (this.internalSeed = (lowerBound4 > 2147483646 ? 2147483646 : lowerBound4) | 0) | 0;
	}
};
$hxClasses["flixel.math.FlxRandom"] = flixel_math_FlxRandom;
flixel_math_FlxRandom.__name__ = ["flixel","math","FlxRandom"];
flixel_math_FlxRandom.rangeBound = function(Value) {
	var lowerBound = Value < 1 ? 1 : Value;
	return (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
};
flixel_math_FlxRandom.prototype = {
	getObject_flixel_group_FlxTypedGroup_T: function(Objects,WeightsArray,StartIndex,EndIndex) {
		if(StartIndex == null) {
			StartIndex = 0;
		}
		var selected = null;
		if(Objects.length != 0) {
			if(WeightsArray == null) {
				var _g = [];
				var _g2 = 0;
				var _g1 = Objects.length;
				while(_g2 < _g1) {
					var i = _g2++;
					_g.push(1);
				}
				WeightsArray = _g;
			}
			if(EndIndex == null) {
				EndIndex = Objects.length - 1;
			}
			var Max = Objects.length - 1;
			var lowerBound = StartIndex < 0 ? 0 : StartIndex;
			StartIndex = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
			var Max1 = Objects.length - 1;
			var lowerBound1 = EndIndex < 0 ? 0 : EndIndex;
			EndIndex = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
			if(EndIndex < StartIndex) {
				StartIndex += EndIndex;
				EndIndex = StartIndex - EndIndex;
				StartIndex -= EndIndex;
			}
			if(EndIndex > WeightsArray.length - 1) {
				EndIndex = WeightsArray.length - 1;
			}
			var _g3 = [];
			var _g21 = StartIndex;
			var _g11 = EndIndex + 1;
			while(_g21 < _g11) {
				var i1 = _g21++;
				_g3.push(WeightsArray[i1]);
			}
			flixel_math_FlxRandom._arrayFloatHelper = _g3;
			selected = Objects[StartIndex + this.weightedPick(flixel_math_FlxRandom._arrayFloatHelper)];
		}
		return selected;
	}
	,resetInitialSeed: function() {
		var Value = Math.random() * 2147483647 | 0;
		var lowerBound = Value < 1 ? 1 : Value;
		var NewSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
		var lowerBound1 = NewSeed < 1 ? 1 : NewSeed;
		var NewSeed1 = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0;
		var lowerBound2 = NewSeed1 < 1 ? 1 : NewSeed1;
		return this.initialSeed = (this.internalSeed = (lowerBound2 > 2147483646 ? 2147483646 : lowerBound2) | 0) | 0;
	}
	,'int': function(Min,Max,Excludes) {
		if(Max == null) {
			Max = 2147483647;
		}
		if(Min == null) {
			Min = 0;
		}
		if(Min == 0 && Max == 2147483647 && Excludes == null) {
			return (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) | 0;
		} else if(Min == Max) {
			return Min;
		} else {
			if(Min > Max) {
				Min += Max;
				Max = Min - Max;
				Min -= Max;
			}
			if(Excludes == null) {
				return Math.floor(Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min + 1));
			} else {
				var result = 0;
				while(true) {
					result = Math.floor(Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min + 1));
					if(!(Excludes.indexOf(result) >= 0)) {
						break;
					}
				}
				return result;
			}
		}
	}
	,'float': function(Min,Max,Excludes) {
		if(Max == null) {
			Max = 1;
		}
		if(Min == null) {
			Min = 0;
		}
		var result = 0;
		if(Min == 0 && Max == 1 && Excludes == null) {
			return (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647;
		} else if(Min == Max) {
			result = Min;
		} else {
			if(Min > Max) {
				Min += Max;
				Max = Min - Max;
				Min -= Max;
			}
			if(Excludes == null) {
				result = Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min);
			} else {
				while(true) {
					result = Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min);
					if(!(Excludes.indexOf(result) >= 0)) {
						break;
					}
				}
			}
		}
		return result;
	}
	,floatNormal: function(Mean,StdDev) {
		if(StdDev == null) {
			StdDev = 1;
		}
		if(Mean == null) {
			Mean = 0;
		}
		if(this._hasFloatNormalSpare) {
			this._hasFloatNormalSpare = false;
			var scale = StdDev * this._floatNormalRho;
			return Mean + scale * this._floatNormalRand2;
		}
		this._hasFloatNormalSpare = true;
		var theta = this._twoPI * ((this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647);
		this._floatNormalRho = Math.sqrt(-2 * Math.log(1 - (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647));
		var scale1 = StdDev * this._floatNormalRho;
		this._floatNormalRand1 = Math.cos(theta);
		this._floatNormalRand2 = Math.sin(theta);
		return Mean + scale1 * this._floatNormalRand1;
	}
	,bool: function(Chance) {
		if(Chance == null) {
			Chance = 50;
		}
		return this["float"](0,100) < Chance;
	}
	,sign: function(Chance) {
		if(Chance == null) {
			Chance = 50;
		}
		if(this["float"](0,100) < Chance) {
			return 1;
		} else {
			return -1;
		}
	}
	,weightedPick: function(WeightsArray) {
		var totalWeight = 0;
		var pick = 0;
		var _g = 0;
		while(_g < WeightsArray.length) {
			var i = WeightsArray[_g];
			++_g;
			totalWeight += i;
		}
		totalWeight = this["float"](0,totalWeight);
		var _g1 = 0;
		var _g2 = WeightsArray.length;
		while(_g1 < _g2) {
			var i1 = _g1++;
			if(totalWeight < WeightsArray[i1]) {
				pick = i1;
				break;
			}
			totalWeight -= WeightsArray[i1];
		}
		return pick;
	}
	,color: function(Min,Max,Alpha,GreyScale) {
		if(GreyScale == null) {
			GreyScale = false;
		}
		var red;
		var green;
		var blue;
		var alpha;
		if(Min == null && Max == null) {
			red = this["int"](0,255);
			green = this["int"](0,255);
			blue = this["int"](0,255);
			if(Alpha == null) {
				alpha = this["int"](0,255);
			} else {
				alpha = Alpha;
			}
		} else if(Max == null) {
			red = this["int"](Min >> 16 & 255,255);
			if(GreyScale) {
				green = red;
			} else {
				green = this["int"](Min >> 8 & 255,255);
			}
			if(GreyScale) {
				blue = red;
			} else {
				blue = this["int"](Min & 255,255);
			}
			if(Alpha == null) {
				alpha = this["int"](Min >> 24 & 255,255);
			} else {
				alpha = Alpha;
			}
		} else if(Min == null) {
			red = this["int"](0,Max >> 16 & 255);
			if(GreyScale) {
				green = red;
			} else {
				green = this["int"](0,Max >> 8 & 255);
			}
			if(GreyScale) {
				blue = red;
			} else {
				blue = this["int"](0,Max & 255);
			}
			if(Alpha == null) {
				alpha = this["int"](0,Max >> 24 & 255);
			} else {
				alpha = Alpha;
			}
		} else {
			red = this["int"](Min >> 16 & 255,Max >> 16 & 255);
			if(GreyScale) {
				green = red;
			} else {
				green = this["int"](Min >> 8 & 255,Max >> 8 & 255);
			}
			if(GreyScale) {
				blue = red;
			} else {
				blue = this["int"](Min & 255,Max & 255);
			}
			if(Alpha == null) {
				alpha = this["int"](Min >> 24 & 255,Max >> 24 & 255);
			} else {
				alpha = Alpha;
			}
		}
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		color &= -16711681;
		color |= (red > 255 ? 255 : red < 0 ? 0 : red) << 16;
		color &= -65281;
		color |= (green > 255 ? 255 : green < 0 ? 0 : green) << 8;
		color &= -256;
		color |= blue > 255 ? 255 : blue < 0 ? 0 : blue;
		color &= 16777215;
		color |= (alpha > 255 ? 255 : alpha < 0 ? 0 : alpha) << 24;
		return color;
	}
	,generate: function() {
		return this.internalSeed = this.internalSeed * 48271.0 % 2147483647;
	}
	,set_initialSeed: function(NewSeed) {
		var lowerBound = NewSeed < 1 ? 1 : NewSeed;
		var NewSeed1 = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
		var lowerBound1 = NewSeed1 < 1 ? 1 : NewSeed1;
		return this.initialSeed = (this.internalSeed = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0) | 0;
	}
	,get_currentSeed: function() {
		return this.internalSeed | 0;
	}
	,set_currentSeed: function(NewSeed) {
		var lowerBound = NewSeed < 1 ? 1 : NewSeed;
		return (this.internalSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0) | 0;
	}
	,__class__: flixel_math_FlxRandom
	,__properties__: {set_currentSeed:"set_currentSeed",get_currentSeed:"get_currentSeed",set_initialSeed:"set_initialSeed"}
};
var flixel_util_FlxSave = function() {
	this._closeRequested = false;
};
$hxClasses["flixel.util.FlxSave"] = flixel_util_FlxSave;
flixel_util_FlxSave.__name__ = ["flixel","util","FlxSave"];
flixel_util_FlxSave.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_FlxSave.prototype = {
	destroy: function() {
		this._sharedObject = null;
		this.name = null;
		this.data = null;
		this._onComplete = null;
		this._closeRequested = false;
	}
	,bind: function(Name) {
		this.destroy();
		this.name = Name;
		try {
			this._sharedObject = openfl_net_SharedObject.getLocal(this.name);
		} catch( e ) {
			haxe_CallStack.lastException = e;
			if (e instanceof js__$Boot_HaxeError) e = e.val;
			if( js_Boot.__instanceof(e,openfl_errors_Error) ) {
				var _this = flixel_FlxG.log;
				this.destroy();
				return false;
			} else throw(e);
		}
		this.data = this._sharedObject.data;
		return true;
	}
	,close: function(MinFileSize,OnComplete) {
		if(MinFileSize == null) {
			MinFileSize = 0;
		}
		this._closeRequested = true;
		return this.flush(MinFileSize,OnComplete);
	}
	,flush: function(MinFileSize,OnComplete) {
		if(MinFileSize == null) {
			MinFileSize = 0;
		}
		if(!this.checkBinding()) {
			return false;
		}
		this._onComplete = OnComplete;
		var result = null;
		try {
			result = this._sharedObject.flush();
		} catch( _ ) {
			haxe_CallStack.lastException = _;
			if (_ instanceof js__$Boot_HaxeError) _ = _.val;
			if( js_Boot.__instanceof(_,openfl_errors_Error) ) {
				return this.onDone(flixel_util_FlxSaveStatus.ERROR);
			} else throw(_);
		}
		return this.onDone(result == 0 ? flixel_util_FlxSaveStatus.SUCCESS : flixel_util_FlxSaveStatus.PENDING);
	}
	,erase: function() {
		if(!this.checkBinding()) {
			return false;
		}
		this._sharedObject.clear();
		this.data = { };
		return true;
	}
	,onDone: function(Result) {
		switch(Result[1]) {
		case 1:
			var _this = flixel_FlxG.log;
			break;
		case 2:
			var _this1 = flixel_FlxG.log;
			break;
		default:
		}
		if(this._onComplete != null) {
			this._onComplete(Result == flixel_util_FlxSaveStatus.SUCCESS);
		}
		if(this._closeRequested) {
			this.destroy();
		}
		return Result == flixel_util_FlxSaveStatus.SUCCESS;
	}
	,checkBinding: function() {
		if(this._sharedObject == null) {
			var _this = flixel_FlxG.log;
			return false;
		}
		return true;
	}
	,__class__: flixel_util_FlxSave
};
var flixel_system_scaleModes_BaseScaleMode = function() {
	this.verticalAlign = flixel_util_FlxVerticalAlign.CENTER;
	this.horizontalAlign = flixel_util_FlxHorizontalAlign.CENTER;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.deviceSize = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this.gameSize = point1;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
	point2._inPool = false;
	this.scale = point2;
	var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
	point3._inPool = false;
	this.offset = point3;
};
$hxClasses["flixel.system.scaleModes.BaseScaleMode"] = flixel_system_scaleModes_BaseScaleMode;
flixel_system_scaleModes_BaseScaleMode.__name__ = ["flixel","system","scaleModes","BaseScaleMode"];
flixel_system_scaleModes_BaseScaleMode.prototype = {
	onMeasure: function(Width,Height) {
		flixel_FlxG.width = flixel_FlxG.initialWidth;
		flixel_FlxG.height = flixel_FlxG.initialHeight;
		this.updateGameSize(Width,Height);
		this.updateDeviceSize(Width,Height);
		this.updateScaleOffset();
		this.updateGamePosition();
	}
	,updateGameSize: function(Width,Height) {
		this.gameSize.set(Width,Height);
	}
	,updateDeviceSize: function(Width,Height) {
		this.deviceSize.set(Width,Height);
	}
	,updateScaleOffset: function() {
		this.scale.set_x(this.gameSize.x / (flixel_FlxG.width * flixel_FlxG.initialZoom));
		this.scale.set_y(this.gameSize.y / (flixel_FlxG.height * flixel_FlxG.initialZoom));
		this.updateOffsetX();
		this.updateOffsetY();
	}
	,updateOffsetX: function() {
		var _g = this.horizontalAlign;
		var tmp;
		switch(_g[1]) {
		case 0:
			tmp = 0;
			break;
		case 1:
			tmp = Math.ceil((this.deviceSize.x - this.gameSize.x) * 0.5);
			break;
		case 2:
			tmp = this.deviceSize.x - this.gameSize.x;
			break;
		}
		this.offset.set_x(tmp);
	}
	,updateOffsetY: function() {
		var _g = this.verticalAlign;
		var tmp;
		switch(_g[1]) {
		case 0:
			tmp = 0;
			break;
		case 1:
			tmp = Math.ceil((this.deviceSize.y - this.gameSize.y) * 0.5);
			break;
		case 2:
			tmp = this.deviceSize.y - this.gameSize.y;
			break;
		}
		this.offset.set_y(tmp);
	}
	,updateGamePosition: function() {
		if(flixel_FlxG.game == null) {
			return;
		}
		flixel_FlxG.game.set_x(this.offset.x);
		flixel_FlxG.game.set_y(this.offset.y);
	}
	,set_horizontalAlign: function(value) {
		this.horizontalAlign = value;
		if(this.offset != null) {
			this.updateOffsetX();
			this.updateGamePosition();
		}
		return value;
	}
	,set_verticalAlign: function(value) {
		this.verticalAlign = value;
		if(this.offset != null) {
			this.updateOffsetY();
			this.updateGamePosition();
		}
		return value;
	}
	,__class__: flixel_system_scaleModes_BaseScaleMode
	,__properties__: {set_verticalAlign:"set_verticalAlign",set_horizontalAlign:"set_horizontalAlign"}
};
var flixel_system_scaleModes_RatioScaleMode = function(fillScreen) {
	if(fillScreen == null) {
		fillScreen = false;
	}
	flixel_system_scaleModes_BaseScaleMode.call(this);
	this.fillScreen = fillScreen;
};
$hxClasses["flixel.system.scaleModes.RatioScaleMode"] = flixel_system_scaleModes_RatioScaleMode;
flixel_system_scaleModes_RatioScaleMode.__name__ = ["flixel","system","scaleModes","RatioScaleMode"];
flixel_system_scaleModes_RatioScaleMode.__super__ = flixel_system_scaleModes_BaseScaleMode;
flixel_system_scaleModes_RatioScaleMode.prototype = $extend(flixel_system_scaleModes_BaseScaleMode.prototype,{
	updateGameSize: function(Width,Height) {
		var ratio = flixel_FlxG.width / flixel_FlxG.height;
		var realRatio = Width / Height;
		var scaleY = realRatio < ratio;
		if(this.fillScreen) {
			scaleY = !scaleY;
		}
		if(scaleY) {
			this.gameSize.set_x(Width);
			this.gameSize.set_y(Math.floor(this.gameSize.x / ratio));
		} else {
			this.gameSize.set_y(Height);
			this.gameSize.set_x(Math.floor(this.gameSize.y * ratio));
		}
	}
	,__class__: flixel_system_scaleModes_RatioScaleMode
});
var flixel_system_frontEnds_SignalFrontEnd = function() {
	this.focusLost = new flixel_util__$FlxSignal_FlxSignal0();
	this.focusGained = new flixel_util__$FlxSignal_FlxSignal0();
	this.postDraw = new flixel_util__$FlxSignal_FlxSignal0();
	this.preDraw = new flixel_util__$FlxSignal_FlxSignal0();
	this.postUpdate = new flixel_util__$FlxSignal_FlxSignal0();
	this.preUpdate = new flixel_util__$FlxSignal_FlxSignal0();
	this.gameStarted = new flixel_util__$FlxSignal_FlxSignal0();
	this.postGameReset = new flixel_util__$FlxSignal_FlxSignal0();
	this.preGameReset = new flixel_util__$FlxSignal_FlxSignal0();
	this.gameResized = new flixel_util__$FlxSignal_FlxSignal2();
	this.preStateCreate = new flixel_util__$FlxSignal_FlxSignal1();
	this.stateSwitched = new flixel_util__$FlxSignal_FlxSignal0();
};
$hxClasses["flixel.system.frontEnds.SignalFrontEnd"] = flixel_system_frontEnds_SignalFrontEnd;
flixel_system_frontEnds_SignalFrontEnd.__name__ = ["flixel","system","frontEnds","SignalFrontEnd"];
flixel_system_frontEnds_SignalFrontEnd.prototype = {
	__class__: flixel_system_frontEnds_SignalFrontEnd
};
var flixel_system_frontEnds_WatchFrontEnd = function() {
};
$hxClasses["flixel.system.frontEnds.WatchFrontEnd"] = flixel_system_frontEnds_WatchFrontEnd;
flixel_system_frontEnds_WatchFrontEnd.__name__ = ["flixel","system","frontEnds","WatchFrontEnd"];
flixel_system_frontEnds_WatchFrontEnd.prototype = {
	add: function(object,field,displayName) {
	}
	,remove: function(object,field) {
	}
	,addQuick: function(displayName,value) {
	}
	,removeQuick: function(displayName) {
	}
	,addExpression: function(expression,displayName) {
	}
	,removeExpression: function(displayName) {
	}
	,addMouse: function() {
	}
	,removeMouse: function() {
	}
	,__class__: flixel_system_frontEnds_WatchFrontEnd
};
var flixel_FlxG = function() { };
$hxClasses["flixel.FlxG"] = flixel_FlxG;
flixel_FlxG.__name__ = ["flixel","FlxG"];
flixel_FlxG.__properties__ = {set_mouse:"set_mouse",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_scaleMode:"set_scaleMode",get_onMobile:"get_onMobile",set_drawFramerate:"set_drawFramerate",set_updateFramerate:"set_updateFramerate",get_state:"get_state",get_stage:"get_stage"};
flixel_FlxG.camera = null;
flixel_FlxG.game = null;
flixel_FlxG.updateFramerate = null;
flixel_FlxG.drawFramerate = null;
flixel_FlxG.renderMethod = null;
flixel_FlxG.renderBlit = null;
flixel_FlxG.renderTile = null;
flixel_FlxG.width = null;
flixel_FlxG.height = null;
flixel_FlxG.mouse = null;
flixel_FlxG.touches = null;
flixel_FlxG.keys = null;
flixel_FlxG.gamepads = null;
flixel_FlxG.vcr = null;
flixel_FlxG.plugins = null;
flixel_FlxG.sound = null;
flixel_FlxG.resizeGame = function(Width,Height) {
	flixel_FlxG.scaleMode.onMeasure(Width,Height);
};
flixel_FlxG.resizeWindow = function(Width,Height) {
};
flixel_FlxG.resetGame = function() {
	flixel_FlxG.game._resetGame = true;
};
flixel_FlxG.switchState = function(nextState) {
	if(flixel_FlxG.game._state.switchTo(nextState)) {
		flixel_FlxG.game._requestedState = nextState;
	}
};
flixel_FlxG.resetState = function() {
	var o = flixel_FlxG.game._state;
	var nextState = Type.createInstance(o == null ? null : js_Boot.getClass(o),[]);
	if(flixel_FlxG.game._state.switchTo(nextState)) {
		flixel_FlxG.game._requestedState = nextState;
	}
};
flixel_FlxG.overlap = function(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,ProcessCallback) {
	if(ObjectOrGroup1 == null) {
		ObjectOrGroup1 = flixel_FlxG.game._state;
	}
	if(ObjectOrGroup2 == ObjectOrGroup1) {
		ObjectOrGroup2 = null;
	}
	flixel_system_FlxQuadTree.divisions = flixel_FlxG.worldDivisions;
	var quadTree = flixel_system_FlxQuadTree.recycle(flixel_FlxG.worldBounds.x,flixel_FlxG.worldBounds.y,flixel_FlxG.worldBounds.width,flixel_FlxG.worldBounds.height);
	quadTree.load(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,ProcessCallback);
	var result = quadTree.execute();
	quadTree.destroy();
	return result;
};
flixel_FlxG.pixelPerfectOverlap = function(Sprite1,Sprite2,AlphaTolerance,Camera) {
	if(AlphaTolerance == null) {
		AlphaTolerance = 255;
	}
	return flixel_util_FlxCollision.pixelPerfectCheck(Sprite1,Sprite2,AlphaTolerance,Camera);
};
flixel_FlxG.collide = function(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback) {
	return flixel_FlxG.overlap(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,flixel_FlxObject.separate);
};
flixel_FlxG.addPostProcess = function(postProcess) {
	return postProcess;
};
flixel_FlxG.removePostProcess = function(postProcess) {
};
flixel_FlxG.openURL = function(URL,Target) {
	if(Target == null) {
		Target = "_blank";
	}
	var prefix = "";
	if(!new EReg("^https?://","").match(URL)) {
		prefix = "http://";
	}
	openfl_Lib.getURL(new openfl_net_URLRequest(prefix + URL),Target);
};
flixel_FlxG.init = function(Game,Width,Height,Zoom) {
	flixel_FlxG.game = Game;
	flixel_FlxG.width = Math.abs(Width) | 0;
	flixel_FlxG.height = Math.abs(Height) | 0;
	flixel_FlxG.initRenderMethod();
	flixel_FlxG.initialWidth = flixel_FlxG.width;
	flixel_FlxG.initialHeight = flixel_FlxG.height;
	flixel_FlxG.initialZoom = flixel_FlxCamera.defaultZoom = Zoom;
	flixel_FlxG.scaleMode.onMeasure(openfl_Lib.current.stage.stageWidth,openfl_Lib.current.stage.stageHeight);
	flixel_FlxG.keys = flixel_FlxG.inputs.add_flixel_input_keyboard_FlxKeyboard(new flixel_input_keyboard_FlxKeyboard());
	flixel_FlxG.set_mouse(flixel_FlxG.inputs.add_flixel_input_mouse_FlxMouse(new flixel_input_mouse_FlxMouse(flixel_FlxG.game._inputContainer)));
	flixel_FlxG.touches = flixel_FlxG.inputs.add_flixel_input_touch_FlxTouchManager(new flixel_input_touch_FlxTouchManager());
	flixel_FlxG.gamepads = flixel_FlxG.inputs.add_flixel_input_gamepad_FlxGamepadManager(new flixel_input_gamepad_FlxGamepadManager());
	flixel_FlxG.save.bind("flixel");
	flixel_FlxG.plugins = new flixel_system_frontEnds_PluginFrontEnd();
	flixel_FlxG.vcr = new flixel_system_frontEnds_VCRFrontEnd();
	flixel_FlxG.sound = new flixel_system_frontEnds_SoundFrontEnd();
};
flixel_FlxG.initRenderMethod = function() {
	flixel_FlxG.renderMethod = flixel_FlxRenderMethod.BLITTING;
	if(!openfl_Lib.application.config.windows[0].hardware) {
		flixel_FlxG.renderMethod = flixel_FlxRenderMethod.BLITTING;
	} else {
		var _g = openfl_Lib.current.stage.window.renderer.type;
		var tmp;
		switch(_g[1]) {
		case 1:case 3:case 4:
			tmp = flixel_FlxRenderMethod.BLITTING;
			break;
		case 0:case 5:
			tmp = flixel_FlxRenderMethod.DRAW_TILES;
			break;
		default:
			tmp = flixel_FlxRenderMethod.BLITTING;
		}
		flixel_FlxG.renderMethod = tmp;
	}
	flixel_FlxG.renderBlit = flixel_FlxG.renderMethod == flixel_FlxRenderMethod.BLITTING;
	flixel_FlxG.renderTile = flixel_FlxG.renderMethod == flixel_FlxRenderMethod.DRAW_TILES;
	flixel_FlxObject.defaultPixelPerfectPosition = flixel_FlxG.renderBlit;
};
flixel_FlxG.reset = function() {
	var _this = flixel_FlxG.random;
	var Value = Math.random() * 2147483647 | 0;
	var lowerBound = Value < 1 ? 1 : Value;
	var NewSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
	var lowerBound1 = NewSeed < 1 ? 1 : NewSeed;
	var NewSeed1 = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0;
	var lowerBound2 = NewSeed1 < 1 ? 1 : NewSeed1;
	_this.initialSeed = (_this.internalSeed = (lowerBound2 > 2147483646 ? 2147483646 : lowerBound2) | 0) | 0;
	flixel_FlxG.bitmap.reset();
	flixel_FlxG.inputs.reset();
	flixel_FlxG.sound.destroy(true);
	flixel_FlxG.autoPause = true;
	flixel_FlxG.fixedTimestep = true;
	flixel_FlxG.timeScale = 1.0;
	flixel_FlxG.elapsed = 0;
	flixel_FlxG.maxElapsed = 0.1;
	var _this1 = flixel_FlxG.worldBounds;
	_this1.x = -10;
	_this1.y = -10;
	_this1.width = flixel_FlxG.width + 20;
	_this1.height = flixel_FlxG.height + 20;
	flixel_FlxG.worldDivisions = 6;
};
flixel_FlxG.set_scaleMode = function(ScaleMode) {
	flixel_FlxG.scaleMode = ScaleMode;
	flixel_FlxG.game.onResize(null);
	return ScaleMode;
};
flixel_FlxG.set_mouse = function(NewMouse) {
	if(flixel_FlxG.mouse == null) {
		flixel_FlxG.mouse = flixel_FlxG.inputs.add_flixel_input_mouse_FlxMouse(NewMouse);
		return flixel_FlxG.mouse;
	}
	var oldMouse = flixel_FlxG.mouse;
	var result = flixel_FlxG.inputs.replace_flixel_input_mouse_FlxMouse(oldMouse,NewMouse);
	if(result != null) {
		flixel_FlxG.mouse = result;
		oldMouse.destroy();
		return NewMouse;
	}
	return oldMouse;
};
flixel_FlxG.set_updateFramerate = function(Framerate) {
	if(Framerate < flixel_FlxG.drawFramerate) {
		var _this = flixel_FlxG.log;
	}
	flixel_FlxG.updateFramerate = Framerate;
	flixel_FlxG.game._stepMS = Math.abs(1000 / Framerate);
	flixel_FlxG.game._stepSeconds = flixel_FlxG.game._stepMS / 1000;
	if(flixel_FlxG.game._maxAccumulation < flixel_FlxG.game._stepMS) {
		flixel_FlxG.game._maxAccumulation = flixel_FlxG.game._stepMS;
	}
	return Framerate;
};
flixel_FlxG.set_drawFramerate = function(Framerate) {
	if(Framerate > flixel_FlxG.updateFramerate) {
		var _this = flixel_FlxG.log;
	}
	flixel_FlxG.drawFramerate = Math.abs(Framerate) | 0;
	if(flixel_FlxG.game.stage != null) {
		flixel_FlxG.game.stage.set_frameRate(flixel_FlxG.drawFramerate);
	}
	flixel_FlxG.game._maxAccumulation = 2000 / flixel_FlxG.drawFramerate - 1;
	if(flixel_FlxG.game._maxAccumulation < flixel_FlxG.game._stepMS) {
		flixel_FlxG.game._maxAccumulation = flixel_FlxG.game._stepMS;
	}
	return Framerate;
};
flixel_FlxG.get_fullscreen = function() {
	if(openfl_Lib.current.stage.get_displayState() != 0) {
		return openfl_Lib.current.stage.get_displayState() == 1;
	} else {
		return true;
	}
};
flixel_FlxG.set_fullscreen = function(Value) {
	openfl_Lib.current.stage.set_displayState(Value ? 0 : 2);
	return Value;
};
flixel_FlxG.get_stage = function() {
	return openfl_Lib.current.stage;
};
flixel_FlxG.get_state = function() {
	return flixel_FlxG.game._state;
};
flixel_FlxG.get_onMobile = function() {
	return flixel_FlxG.html5.onMobile;
};
var flixel_FlxRenderMethod = $hxClasses["flixel.FlxRenderMethod"] = { __ename__ : ["flixel","FlxRenderMethod"], __constructs__ : ["DRAW_TILES","BLITTING"] };
flixel_FlxRenderMethod.DRAW_TILES = ["DRAW_TILES",0];
flixel_FlxRenderMethod.DRAW_TILES.toString = $estr;
flixel_FlxRenderMethod.DRAW_TILES.__enum__ = flixel_FlxRenderMethod;
flixel_FlxRenderMethod.BLITTING = ["BLITTING",1];
flixel_FlxRenderMethod.BLITTING.toString = $estr;
flixel_FlxRenderMethod.BLITTING.__enum__ = flixel_FlxRenderMethod;
var flixel_FlxGame = function(GameWidth,GameHeight,InitialState,Zoom,UpdateFramerate,DrawFramerate,SkipSplash,StartFullscreen) {
	if(StartFullscreen == null) {
		StartFullscreen = false;
	}
	if(SkipSplash == null) {
		SkipSplash = false;
	}
	if(DrawFramerate == null) {
		DrawFramerate = 60;
	}
	if(UpdateFramerate == null) {
		UpdateFramerate = 60;
	}
	if(Zoom == null) {
		Zoom = 1;
	}
	if(GameHeight == null) {
		GameHeight = 0;
	}
	if(GameWidth == null) {
		GameWidth = 0;
	}
	this._resetGame = false;
	this._skipSplash = false;
	this._customFocusLostScreen = flixel_system_ui_FlxFocusLostScreen;
	this._customSoundTray = flixel_system_ui_FlxSoundTray;
	this._lostFocus = false;
	this._startTime = 0;
	this._total = 0;
	this._gameJustStarted = false;
	this.filtersEnabled = true;
	this.ticks = 0;
	this.focusLostFramerate = 10;
	openfl_display_Sprite.call(this);
	this._inputContainer = new openfl_display_Sprite();
	if(GameWidth == 0) {
		GameWidth = openfl_Lib.current.stage.stageWidth;
	}
	if(GameHeight == 0) {
		GameHeight = openfl_Lib.current.stage.stageHeight;
	}
	flixel_FlxG.init(this,GameWidth,GameHeight,Zoom);
	flixel_FlxG.set_updateFramerate(UpdateFramerate);
	flixel_FlxG.set_drawFramerate(DrawFramerate);
	this._accumulator = this._stepMS;
	this._skipSplash = SkipSplash;
	this._initialState = InitialState == null ? flixel_FlxState : InitialState;
	this.addEventListener("addedToStage",$bind(this,this.create));
};
$hxClasses["flixel.FlxGame"] = flixel_FlxGame;
flixel_FlxGame.__name__ = ["flixel","FlxGame"];
flixel_FlxGame.__super__ = openfl_display_Sprite;
flixel_FlxGame.prototype = $extend(openfl_display_Sprite.prototype,{
	setFilters: function(filters) {
		this._filters = filters;
	}
	,create: function(_) {
		if(this.stage == null) {
			return;
		}
		this.removeEventListener("addedToStage",$bind(this,this.create));
		this._startTime = this.getTimer();
		this._total = this.getTimer() - this._startTime;
		this.stage.scaleMode = 2;
		this.stage.align = 6;
		this.stage.set_frameRate(flixel_FlxG.drawFramerate);
		this.addChild(this._inputContainer);
		this.soundTray = Type.createInstance(this._customSoundTray,[]);
		this.addChild(this.soundTray);
		this._focusLostScreen = Type.createInstance(this._customFocusLostScreen,[]);
		this.addChild(this._focusLostScreen);
		this.stage.addEventListener("deactivate",$bind(this,this.onFocusLost));
		this.stage.addEventListener("activate",$bind(this,this.onFocus));
		flixel_FlxG.signals.preGameReset.dispatch();
		if(this._skipSplash || flixel_system_FlxSplash.nextState != null) {
			this._requestedState = Type.createInstance(this._initialState,[]);
			if(flixel_system_FlxSplash.nextState == null) {
				this._gameJustStarted = true;
			}
		} else {
			flixel_system_FlxSplash.nextState = this._initialState;
			this._requestedState = new flixel_system_FlxSplash();
			this._skipSplash = true;
		}
		flixel_FlxG.reset();
		flixel_FlxG.signals.postGameReset.dispatch();
		this.switchState();
		if(flixel_FlxG.updateFramerate < flixel_FlxG.drawFramerate) {
			var _this = flixel_FlxG.log;
		}
		this.stage.addEventListener("enterFrame",$bind(this,this.onEnterFrame));
		this.stage.addEventListener("resize",$bind(this,this.onResize));
		this.resizeGame(openfl_Lib.current.stage.stageWidth,openfl_Lib.current.stage.stageHeight);
		openfl_Assets.addEventListener("change",($_=flixel_FlxG.bitmap,$bind($_,$_.onAssetsReload)));
	}
	,onFocus: function(_) {
		this._lostFocus = false;
		flixel_FlxG.signals.focusGained.dispatch();
		this._state.onFocus();
		if(!flixel_FlxG.autoPause) {
			return;
		}
		if(this._focusLostScreen != null) {
			this._focusLostScreen.set_visible(false);
		}
		this.stage.set_frameRate(flixel_FlxG.drawFramerate);
		flixel_FlxG.sound.onFocus();
		var _g = 0;
		var _g1 = flixel_FlxG.inputs.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocus();
		}
	}
	,onFocusLost: function(event) {
		this._lostFocus = true;
		flixel_FlxG.signals.focusLost.dispatch();
		this._state.onFocusLost();
		if(!flixel_FlxG.autoPause) {
			return;
		}
		if(this._focusLostScreen != null) {
			this._focusLostScreen.set_visible(true);
		}
		this.stage.set_frameRate(this.focusLostFramerate);
		flixel_FlxG.sound.onFocusLost();
		var _g = 0;
		var _g1 = flixel_FlxG.inputs.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocusLost();
		}
	}
	,onResize: function(_) {
		var width = openfl_Lib.current.stage.stageWidth;
		var height = openfl_Lib.current.stage.stageHeight;
		if(flixel_FlxG.renderTile) {
			flixel_FlxG.bitmap.onContext();
		}
		this.resizeGame(width,height);
	}
	,resizeGame: function(width,height) {
		flixel_FlxG.scaleMode.onMeasure(width,height);
		this._state.onResize(width,height);
		flixel_FlxG.cameras.resize();
		flixel_FlxG.signals.gameResized.dispatch(width,height);
		if(this._focusLostScreen != null) {
			this._focusLostScreen.draw();
		}
		if(this.soundTray != null) {
			this.soundTray.screenCenter();
		}
	}
	,onEnterFrame: function(_) {
		this.ticks = this.getTimer() - this._startTime;
		this._elapsedMS = this.ticks - this._total;
		this._total = this.ticks;
		if(this.soundTray != null && this.soundTray.active) {
			this.soundTray.update(this._elapsedMS);
		}
		if(!this._lostFocus || !flixel_FlxG.autoPause) {
			if(flixel_FlxG.vcr.paused) {
				if(flixel_FlxG.vcr.stepRequested) {
					flixel_FlxG.vcr.stepRequested = false;
				} else if(this._state == this._requestedState) {
					return;
				}
			}
			if(flixel_FlxG.fixedTimestep) {
				this._accumulator += this._elapsedMS;
				this._accumulator = this._accumulator > this._maxAccumulation ? this._maxAccumulation : this._accumulator;
				while(this._accumulator >= this._stepMS) {
					this.step();
					this._accumulator -= this._stepMS;
				}
			} else {
				this.step();
			}
			this.draw();
		}
	}
	,resetGame: function() {
		flixel_FlxG.signals.preGameReset.dispatch();
		if(this._skipSplash || flixel_system_FlxSplash.nextState != null) {
			this._requestedState = Type.createInstance(this._initialState,[]);
			if(flixel_system_FlxSplash.nextState == null) {
				this._gameJustStarted = true;
			}
		} else {
			flixel_system_FlxSplash.nextState = this._initialState;
			this._requestedState = new flixel_system_FlxSplash();
			this._skipSplash = true;
		}
		flixel_FlxG.reset();
		flixel_FlxG.signals.postGameReset.dispatch();
	}
	,switchState: function() {
		flixel_FlxG.cameras.reset();
		flixel_FlxG.inputs.onStateSwitch();
		flixel_FlxG.sound.destroy();
		flixel_FlxG.signals.stateSwitched.dispatch();
		if(this._state != null) {
			this._state.destroy();
		}
		flixel_FlxG.bitmap.clearCache();
		this._state = this._requestedState;
		flixel_FlxG.signals.preStateCreate.dispatch(this._state);
		this._state.create();
		if(this._gameJustStarted) {
			this.gameStart();
		}
	}
	,gameStart: function() {
		flixel_FlxG.signals.gameStarted.dispatch();
		this._gameJustStarted = false;
	}
	,step: function() {
		if(this._resetGame) {
			flixel_FlxG.signals.preGameReset.dispatch();
			if(this._skipSplash || flixel_system_FlxSplash.nextState != null) {
				this._requestedState = Type.createInstance(this._initialState,[]);
				if(flixel_system_FlxSplash.nextState == null) {
					this._gameJustStarted = true;
				}
			} else {
				flixel_system_FlxSplash.nextState = this._initialState;
				this._requestedState = new flixel_system_FlxSplash();
				this._skipSplash = true;
			}
			flixel_FlxG.reset();
			flixel_FlxG.signals.postGameReset.dispatch();
			this._resetGame = false;
		}
		this.handleReplayRequests();
		this.update();
	}
	,handleReplayRequests: function() {
	}
	,update: function() {
		if(!this._state.active || !this._state.exists) {
			return;
		}
		if(this._state != this._requestedState) {
			this.switchState();
		}
		this.updateElapsed();
		flixel_FlxG.signals.preUpdate.dispatch();
		this.updateInput();
		flixel_FlxG.sound.update(flixel_FlxG.elapsed);
		var elapsed = flixel_FlxG.elapsed;
		var _g = 0;
		var _g1 = flixel_FlxG.plugins.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(plugin.exists && plugin.active) {
				plugin.update(elapsed);
			}
		}
		this._state.tryUpdate(flixel_FlxG.elapsed);
		var elapsed1 = flixel_FlxG.elapsed;
		var _g2 = 0;
		var _g11 = flixel_FlxG.cameras.list;
		while(_g2 < _g11.length) {
			var camera = _g11[_g2];
			++_g2;
			if(camera != null && camera.exists && camera.active) {
				camera.update(elapsed1);
			}
		}
		flixel_FlxG.signals.postUpdate.dispatch();
		flixel_util_FlxArrayUtil.clearArray(flixel_FlxG.swipes);
		this.set_filters(this.filtersEnabled ? this._filters : null);
	}
	,updateElapsed: function() {
		if(flixel_FlxG.fixedTimestep) {
			flixel_FlxG.elapsed = flixel_FlxG.timeScale * this._stepSeconds;
		} else {
			flixel_FlxG.elapsed = flixel_FlxG.timeScale * (this._elapsedMS / 1000);
			var max = flixel_FlxG.maxElapsed * flixel_FlxG.timeScale;
			if(flixel_FlxG.elapsed > max) {
				flixel_FlxG.elapsed = max;
			}
		}
	}
	,updateInput: function() {
		var _g = 0;
		var _g1 = flixel_FlxG.inputs.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.update();
		}
	}
	,draw: function() {
		if(!this._state.visible || !this._state.exists) {
			return;
		}
		flixel_FlxG.signals.preDraw.dispatch();
		if(flixel_FlxG.renderTile) {
			flixel_graphics_tile_FlxTilesheet._DRAWCALLS = 0;
		}
		var _this = flixel_FlxG.cameras;
		var _g = 0;
		var _g1 = _this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera == null || !camera.exists || !camera.visible) {
				continue;
			}
			if(flixel_FlxG.renderBlit) {
				camera.checkResize();
				if(_this.useBufferLocking) {
					camera.buffer.lock();
				}
			}
			if(flixel_FlxG.renderTile) {
				camera.clearDrawStack();
				camera.canvas.get_graphics().clear();
			}
			if(flixel_FlxG.renderBlit) {
				camera.fill(camera.bgColor,camera.useBgAlphaBlending);
				camera.screen.dirty = true;
			} else {
				camera.fill(camera.bgColor & 16777215,camera.useBgAlphaBlending,(camera.bgColor >> 24 & 255) / 255);
			}
		}
		var _g2 = 0;
		var _g11 = flixel_FlxG.plugins.list;
		while(_g2 < _g11.length) {
			var plugin = _g11[_g2];
			++_g2;
			if(plugin.exists && plugin.visible) {
				plugin.draw();
			}
		}
		this._state.draw();
		if(flixel_FlxG.renderTile) {
			if(flixel_FlxG.renderTile) {
				var _g3 = 0;
				var _g12 = flixel_FlxG.cameras.list;
				while(_g3 < _g12.length) {
					var camera1 = _g12[_g3];
					++_g3;
					if(camera1 != null && camera1.exists && camera1.visible) {
						camera1.render();
					}
				}
			}
		}
		var _this1 = flixel_FlxG.cameras;
		var _g4 = 0;
		var _g13 = _this1.list;
		while(_g4 < _g13.length) {
			var camera2 = _g13[_g4];
			++_g4;
			if(camera2 == null || !camera2.exists || !camera2.visible) {
				continue;
			}
			camera2.drawFX();
			if(flixel_FlxG.renderBlit) {
				if(_this1.useBufferLocking) {
					camera2.buffer.unlock();
				}
				camera2.screen.dirty = true;
			}
		}
		flixel_FlxG.signals.postDraw.dispatch();
	}
	,getTicks: function() {
		return this.getTimer() - this._startTime;
	}
	,getTimer: function() {
		return openfl_Lib.getTimer();
	}
	,__class__: flixel_FlxGame
});
var flixel_IFlxSprite = function() { };
$hxClasses["flixel.IFlxSprite"] = flixel_IFlxSprite;
flixel_IFlxSprite.__name__ = ["flixel","IFlxSprite"];
flixel_IFlxSprite.__interfaces__ = [flixel_IFlxBasic];
flixel_IFlxSprite.prototype = {
	__class__: flixel_IFlxSprite
	,__properties__: {set_immovable:"set_immovable",set_moves:"set_moves",set_facing:"set_facing",set_angle:"set_angle",set_alpha:"set_alpha",set_y:"set_y",set_x:"set_x"}
};
var flixel_FlxSubState = function(BGColor) {
	if(BGColor == null) {
		BGColor = 0;
	}
	this._created = false;
	flixel_FlxState.call(this);
	this.closeCallback = null;
	this.openCallback = null;
	if(flixel_FlxG.renderTile) {
		this._bgSprite = new flixel_system_FlxBGSprite();
	}
	this.set_bgColor(BGColor);
};
$hxClasses["flixel.FlxSubState"] = flixel_FlxSubState;
flixel_FlxSubState.__name__ = ["flixel","FlxSubState"];
flixel_FlxSubState.__super__ = flixel_FlxState;
flixel_FlxSubState.prototype = $extend(flixel_FlxState.prototype,{
	draw: function() {
		if(flixel_FlxG.renderBlit) {
			var _g = 0;
			var _g1 = this.get_cameras();
			while(_g < _g1.length) {
				var camera = _g1[_g];
				++_g;
				camera.fill(this._bgColor);
			}
		} else {
			this._bgSprite.draw();
		}
		flixel_FlxState.prototype.draw.call(this);
	}
	,destroy: function() {
		flixel_FlxState.prototype.destroy.call(this);
		this.closeCallback = null;
		this.openCallback = null;
		this._parentState = null;
		this._bgSprite = null;
	}
	,close: function() {
		if(this._parentState != null && this._parentState.subState == this) {
			this._parentState.closeSubState();
		}
	}
	,get_bgColor: function() {
		return this._bgColor;
	}
	,set_bgColor: function(Value) {
		if(flixel_FlxG.renderTile && this._bgSprite != null) {
			this._bgSprite.get_pixels().setPixel32(0,0,Value);
		}
		return this._bgColor = Value;
	}
	,__class__: flixel_FlxSubState
});
var flixel_addons_display_FlxBackdrop = function(Graphic,ScrollX,ScrollY,RepeatX,RepeatY,SpaceX,SpaceY) {
	if(SpaceY == null) {
		SpaceY = 0;
	}
	if(SpaceX == null) {
		SpaceX = 0;
	}
	if(RepeatY == null) {
		RepeatY = true;
	}
	if(RepeatX == null) {
		RepeatX = true;
	}
	if(ScrollY == null) {
		ScrollY = 1;
	}
	if(ScrollX == null) {
		ScrollX = 1;
	}
	this.useScaleHack = true;
	this._numTiles = 0;
	this._spaceY = 0;
	this._spaceX = 0;
	this._repeatY = false;
	this._repeatX = false;
	this._scrollH = 0;
	this._scrollW = 0;
	flixel_FlxSprite.call(this);
	this.scale = new flixel_math_FlxCallbackPoint($bind(this,this.scaleCallback));
	this.scale.set(1,1);
	this._repeatX = RepeatX;
	this._repeatY = RepeatY;
	this._spaceX = SpaceX;
	this._spaceY = SpaceY;
	this._ppoint = new openfl_geom_Point();
	this.scrollFactor.set_x(ScrollX);
	this.scrollFactor.set_y(ScrollY);
	if(Graphic != null) {
		this.loadGraphic(Graphic);
	}
	flixel_FlxG.signals.gameResized.add($bind(this,this.onGameResize));
};
$hxClasses["flixel.addons.display.FlxBackdrop"] = flixel_addons_display_FlxBackdrop;
flixel_addons_display_FlxBackdrop.__name__ = ["flixel","addons","display","FlxBackdrop"];
flixel_addons_display_FlxBackdrop.__super__ = flixel_FlxSprite;
flixel_addons_display_FlxBackdrop.prototype = $extend(flixel_FlxSprite.prototype,{
	destroy: function() {
		this._tileInfo = null;
		this._ppoint = null;
		this.scale = flixel_util_FlxDestroyUtil.destroy(this.scale);
		this.setTileFrame(null);
		flixel_FlxG.signals.gameResized.remove($bind(this,this.onGameResize));
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,loadGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		var tileGraphic = flixel_FlxG.bitmap.add(Graphic);
		this.setTileFrame(tileGraphic.get_imageFrame().get_frame());
		var w = this._tileFrame.sourceSize.x + this._spaceX | 0;
		var h = this._tileFrame.sourceSize.y + this._spaceY | 0;
		this._scrollW = w;
		this._scrollH = h;
		this.regenGraphic();
		return this;
	}
	,loadFrame: function(Frame) {
		this.setTileFrame(Frame);
		var w = this._tileFrame.sourceSize.x + this._spaceX | 0;
		var h = this._tileFrame.sourceSize.y + this._spaceY | 0;
		this._scrollW = w;
		this._scrollH = h;
		this.regenGraphic();
		return this;
	}
	,draw: function() {
		var isColored = this.alpha != 1 || this.color != 16777215;
		var hasColorOffsets = this.colorTransform != null && flixel_util_FlxColorTransformUtil.hasRGBAOffsets(this.colorTransform);
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(!camera.visible || !camera.exists) {
				continue;
			}
			var ssw = this._scrollW * Math.abs(this.scale.x);
			var ssh = this._scrollH * Math.abs(this.scale.y);
			if(this._repeatX) {
				this._ppoint.x = (this.x - this.offset.x - camera.scroll.x * this.scrollFactor.x) % ssw;
				if(this._ppoint.x > 0) {
					this._ppoint.x -= ssw;
				}
			} else {
				this._ppoint.x = this.x - this.offset.x - camera.scroll.x * this.scrollFactor.x;
			}
			if(this._repeatY) {
				this._ppoint.y = (this.y - this.offset.y - camera.scroll.y * this.scrollFactor.y) % ssh;
				if(this._ppoint.y > 0) {
					this._ppoint.y -= ssh;
				}
			} else {
				this._ppoint.y = this.y - this.offset.y - camera.scroll.y * this.scrollFactor.y;
			}
			if(flixel_FlxG.renderBlit) {
				if(this.graphic == null) {
					return;
				}
				if(this.dirty) {
					this.calcFrame(this.useFramePixels);
				}
				this._flashRect2.setTo(0,0,this.graphic.width,this.graphic.height);
				camera.copyPixels(this.frame,this.framePixels,this._flashRect2,this._ppoint);
			} else {
				if(this._tileFrame == null) {
					return;
				}
				var drawItem = camera.startQuadBatch(this._tileFrame.parent,isColored,hasColorOffsets);
				this._tileFrame.prepareMatrix(this._matrix);
				var scaleX = this.scale.x;
				var scaleY = this.scale.y;
				if(this.useScaleHack) {
					scaleX += 1 / (this._tileFrame.sourceSize.x * camera.totalScaleX);
					scaleY += 1 / (this._tileFrame.sourceSize.y * camera.totalScaleY);
				}
				this._matrix.scale(scaleX,scaleY);
				var tx = this._matrix.tx;
				var ty = this._matrix.ty;
				var _g3 = 0;
				var _g2 = this._numTiles;
				while(_g3 < _g2) {
					var j = _g3++;
					var currTileX = this._tileInfo[j * 2];
					var currTileY = this._tileInfo[j * 2 + 1];
					this._matrix.tx = tx + (this._ppoint.x + currTileX);
					this._matrix.ty = ty + (this._ppoint.y + currTileY);
					drawItem.addQuad(this._tileFrame,this._matrix,this.colorTransform);
				}
			}
		}
	}
	,regenGraphic: function() {
		var sx = Math.abs(this.scale.x);
		var sy = Math.abs(this.scale.y);
		var ssw = this._scrollW * sx | 0;
		var ssh = this._scrollH * sy | 0;
		var w = ssw;
		var h = ssh;
		var frameBitmap = null;
		if(this._repeatX) {
			w += flixel_FlxG.width;
		}
		if(this._repeatY) {
			h += flixel_FlxG.height;
		}
		if(flixel_FlxG.renderBlit) {
			if(this.graphic == null || (this.graphic.width != w || this.graphic.height != h)) {
				this.makeGraphic(w,h,0,true);
			}
		} else {
			this._tileInfo = [];
			this._numTiles = 0;
			this.set_width(this.frameWidth = w);
			this.set_height(this.frameHeight = h);
		}
		this._ppoint.x = this._ppoint.y = 0;
		if(flixel_FlxG.renderBlit) {
			this.get_pixels().lock();
			this._flashRect2.setTo(0,0,this.graphic.width,this.graphic.height);
			this.get_pixels().fillRect(this._flashRect2,0);
			this._matrix.identity();
			this._matrix.scale(sx,sy);
			frameBitmap = this._tileFrame.paint();
		}
		while(this._ppoint.y < h) {
			while(this._ppoint.x < w) {
				if(flixel_FlxG.renderBlit) {
					this.get_pixels().draw(frameBitmap,this._matrix);
					this._matrix.tx += ssw;
				} else {
					this._tileInfo.push(this._ppoint.x);
					this._tileInfo.push(this._ppoint.y);
					this._numTiles++;
				}
				this._ppoint.x += ssw;
			}
			if(flixel_FlxG.renderBlit) {
				this._matrix.tx = 0;
				this._matrix.ty += ssh;
			}
			this._ppoint.x = 0;
			this._ppoint.y += ssh;
		}
		if(flixel_FlxG.renderBlit) {
			frameBitmap.dispose();
			this.get_pixels().unlock();
			this.dirty = true;
			this.calcFrame();
		}
	}
	,onGameResize: function(_,_1) {
		if(this._tileFrame != null) {
			this.regenGraphic();
		}
	}
	,scaleCallback: function(Scale) {
		if(this._tileFrame != null) {
			this.regenGraphic();
		}
	}
	,setTileFrame: function(Frame) {
		if(Frame != this._tileFrame) {
			if(this._tileFrame != null) {
				var _g = this._tileFrame.parent;
				var _g1 = _g.get_useCount();
				_g.set_useCount(_g1 - 1);
			}
			if(Frame != null) {
				var _g2 = Frame.parent;
				var _g11 = _g2.get_useCount();
				_g2.set_useCount(_g11 + 1);
			}
		}
		return this._tileFrame = Frame;
	}
	,__class__: flixel_addons_display_FlxBackdrop
});
var flixel_animation_FlxBaseAnimation = function(Parent,Name) {
	this.curIndex = 0;
	this.parent = Parent;
	this.name = Name;
};
$hxClasses["flixel.animation.FlxBaseAnimation"] = flixel_animation_FlxBaseAnimation;
flixel_animation_FlxBaseAnimation.__name__ = ["flixel","animation","FlxBaseAnimation"];
flixel_animation_FlxBaseAnimation.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_animation_FlxBaseAnimation.prototype = {
	set_curIndex: function(Value) {
		this.curIndex = Value;
		if(this.parent != null && this.parent._curAnim == this) {
			this.parent.set_frameIndex(Value);
		}
		return Value;
	}
	,destroy: function() {
		this.parent = null;
		this.name = null;
	}
	,update: function(elapsed) {
	}
	,clone: function(Parent) {
		return null;
	}
	,__class__: flixel_animation_FlxBaseAnimation
	,__properties__: {set_curIndex:"set_curIndex"}
};
var flixel_animation_FlxAnimation = function(Parent,Name,Frames,FrameRate,Looped,FlipX,FlipY) {
	if(FlipY == null) {
		FlipY = false;
	}
	if(FlipX == null) {
		FlipX = false;
	}
	if(Looped == null) {
		Looped = true;
	}
	if(FrameRate == null) {
		FrameRate = 0;
	}
	this._frameTimer = 0;
	this.flipY = false;
	this.flipX = false;
	this.reversed = false;
	this.looped = true;
	this.paused = true;
	this.finished = true;
	this.delay = 0;
	this.curFrame = 0;
	flixel_animation_FlxBaseAnimation.call(this,Parent,Name);
	this.set_frameRate(FrameRate);
	this.frames = Frames;
	this.looped = Looped;
	this.flipX = FlipX;
	this.flipY = FlipY;
};
$hxClasses["flixel.animation.FlxAnimation"] = flixel_animation_FlxAnimation;
flixel_animation_FlxAnimation.__name__ = ["flixel","animation","FlxAnimation"];
flixel_animation_FlxAnimation.__super__ = flixel_animation_FlxBaseAnimation;
flixel_animation_FlxAnimation.prototype = $extend(flixel_animation_FlxBaseAnimation.prototype,{
	destroy: function() {
		this.frames = null;
		this.name = null;
		flixel_animation_FlxBaseAnimation.prototype.destroy.call(this);
	}
	,play: function(Force,Reversed,Frame) {
		if(Frame == null) {
			Frame = 0;
		}
		if(Reversed == null) {
			Reversed = false;
		}
		if(Force == null) {
			Force = false;
		}
		if(!Force && !this.finished && this.reversed == Reversed) {
			this.paused = false;
			this.finished = false;
			return;
		}
		this.reversed = Reversed;
		this.paused = false;
		this._frameTimer = 0;
		this.finished = this.delay == 0;
		var maxFrameIndex = this.frames.length - 1;
		if(Frame < 0) {
			this.set_curFrame(flixel_FlxG.random["int"](0,maxFrameIndex));
		} else {
			if(Frame > maxFrameIndex) {
				Frame = maxFrameIndex;
			}
			if(this.reversed) {
				Frame = maxFrameIndex - Frame;
			}
			this.set_curFrame(Frame);
		}
		if(this.finished) {
			var _this = this.parent;
			if(_this.finishCallback != null) {
				_this.finishCallback(this.name);
			}
		}
	}
	,restart: function() {
		this.play(true,this.reversed);
	}
	,stop: function() {
		this.finished = true;
		this.paused = true;
	}
	,reset: function() {
		this.stop();
		this.set_curFrame(this.reversed ? this.frames.length - 1 : 0);
	}
	,finish: function() {
		this.stop();
		this.set_curFrame(this.reversed ? 0 : this.frames.length - 1);
	}
	,pause: function() {
		this.paused = true;
	}
	,resume: function() {
		this.paused = false;
	}
	,reverse: function() {
		this.reversed = !this.reversed;
		if(this.finished) {
			this.play(false,this.reversed);
		}
	}
	,update: function(elapsed) {
		if(this.delay == 0 || this.finished || this.paused) {
			return;
		}
		this._frameTimer += elapsed;
		while(this._frameTimer > this.delay && !this.finished) {
			this._frameTimer -= this.delay;
			if(this.reversed) {
				if(this.looped && this.curFrame == 0) {
					this.set_curFrame(this.frames.length - 1);
				} else {
					var _g = this;
					var _g1 = _g.curFrame;
					_g.set_curFrame(_g1 - 1);
				}
			} else if(this.looped && this.curFrame == this.frames.length - 1) {
				this.set_curFrame(0);
			} else {
				var _g2 = this;
				var _g11 = _g2.curFrame;
				_g2.set_curFrame(_g11 + 1);
			}
		}
	}
	,clone: function(Parent) {
		return new flixel_animation_FlxAnimation(Parent,this.name,this.frames,this.frameRate,this.looped,this.flipX,this.flipY);
	}
	,set_frameRate: function(value) {
		this.delay = 0;
		this.frameRate = value;
		if(value > 0) {
			this.delay = 1.0 / value;
		}
		return value;
	}
	,set_curFrame: function(Frame) {
		var maxFrameIndex = this.frames.length - 1;
		var tempFrame = this.reversed ? maxFrameIndex - Frame : Frame;
		if(tempFrame >= 0) {
			if(!this.looped && Frame > maxFrameIndex) {
				this.finished = true;
				this.curFrame = this.reversed ? 0 : maxFrameIndex;
			} else {
				this.curFrame = Frame;
			}
		} else {
			this.curFrame = flixel_FlxG.random["int"](0,maxFrameIndex);
		}
		this.set_curIndex(this.frames[this.curFrame]);
		if(this.finished && this.parent != null) {
			var _this = this.parent;
			if(_this.finishCallback != null) {
				_this.finishCallback(this.name);
			}
		}
		return Frame;
	}
	,get_numFrames: function() {
		return this.frames.length;
	}
	,__class__: flixel_animation_FlxAnimation
	,__properties__: $extend(flixel_animation_FlxBaseAnimation.prototype.__properties__,{get_numFrames:"get_numFrames",set_curFrame:"set_curFrame",set_frameRate:"set_frameRate"})
});
var flixel_animation_FlxAnimationController = function(Sprite) {
	this.frameIndex = -1;
	this._sprite = Sprite;
	this._animations = new haxe_ds_StringMap();
};
$hxClasses["flixel.animation.FlxAnimationController"] = flixel_animation_FlxAnimationController;
flixel_animation_FlxAnimationController.__name__ = ["flixel","animation","FlxAnimationController"];
flixel_animation_FlxAnimationController.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_animation_FlxAnimationController.prototype = {
	update: function(elapsed) {
		if(this._curAnim != null) {
			this._curAnim.update(elapsed);
		} else if(this._prerotated != null) {
			this._prerotated.set_angle(this._sprite.angle);
		}
	}
	,copyFrom: function(controller) {
		this.destroyAnimations();
		var _this = controller._animations;
		var anim = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(anim.hasNext()) {
			var anim1 = anim.next();
			this.add(anim1.name,anim1.frames,anim1.frameRate,anim1.looped,anim1.flipX,anim1.flipY);
		}
		if(controller._prerotated != null) {
			this.createPrerotated();
		}
		if(controller.get_name() != null) {
			this.set_name(controller.get_name());
		}
		this.set_frameIndex(controller.frameIndex);
		return this;
	}
	,createPrerotated: function(Controller) {
		this.destroyAnimations();
		if(Controller != null) {
			Controller = Controller;
		} else {
			Controller = this;
		}
		this._prerotated = new flixel_animation_FlxPrerotatedAnimation(Controller,Controller._sprite.bakedRotationAngle);
		this._prerotated.set_angle(this._sprite.angle);
	}
	,destroyAnimations: function() {
		this.clearAnimations();
		this.clearPrerotated();
	}
	,destroy: function() {
		this.destroyAnimations();
		this._animations = null;
		this.callback = null;
		this._sprite = null;
	}
	,clearPrerotated: function() {
		if(this._prerotated != null) {
			this._prerotated.destroy();
		}
		this._prerotated = null;
	}
	,clearAnimations: function() {
		if(this._animations != null) {
			var anim;
			var key = this._animations.keys();
			while(key.hasNext()) {
				var key1 = key.next();
				var _this = this._animations;
				if(__map_reserved[key1] != null) {
					anim = _this.getReserved(key1);
				} else {
					anim = _this.h[key1];
				}
				if(anim != null) {
					anim.destroy();
				}
			}
		}
		this._animations = new haxe_ds_StringMap();
		this._curAnim = null;
	}
	,add: function(Name,Frames,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		var framesToAdd = Frames;
		var numFrames = framesToAdd.length - 1;
		var i = numFrames;
		while(i >= 0) {
			if(framesToAdd[i] >= this._sprite.numFrames) {
				if(framesToAdd == Frames) {
					framesToAdd = Frames.slice();
				}
				framesToAdd.splice(i,1);
			}
			--i;
		}
		if(framesToAdd.length > 0) {
			var anim = new flixel_animation_FlxAnimation(this,Name,framesToAdd,FrameRate,Looped,FlipX,FlipY);
			var _this = this._animations;
			if(__map_reserved[Name] != null) {
				_this.setReserved(Name,anim);
			} else {
				_this.h[Name] = anim;
			}
		}
	}
	,remove: function(Name) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim != null) {
			this._animations.remove(Name);
			anim.destroy();
		}
	}
	,append: function(Name,Frames) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			var _this1 = flixel_FlxG.log;
			return;
		}
		var numFrames = Frames.length - 1;
		var i = numFrames;
		while(i >= 0) {
			if(Frames[numFrames - i] < this._sprite.numFrames) {
				anim.frames.push(Frames[numFrames - i]);
			}
			--i;
		}
	}
	,addByNames: function(Name,FrameNames,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var indices = [];
			this.byNamesHelper(indices,FrameNames);
			if(indices.length > 0) {
				var anim = new flixel_animation_FlxAnimation(this,Name,indices,FrameRate,Looped,FlipX,FlipY);
				var _this = this._animations;
				if(__map_reserved[Name] != null) {
					_this.setReserved(Name,anim);
				} else {
					_this.h[Name] = anim;
				}
			}
		}
	}
	,appendByNames: function(Name,FrameNames) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			var _this1 = flixel_FlxG.log;
			return;
		}
		if(this._sprite.frames != null) {
			this.byNamesHelper(anim.frames,FrameNames);
		}
	}
	,addByStringIndices: function(Name,Prefix,Indices,Postfix,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var frameIndices = [];
			this.byStringIndicesHelper(frameIndices,Prefix,Indices,Postfix);
			if(frameIndices.length > 0) {
				var anim = new flixel_animation_FlxAnimation(this,Name,frameIndices,FrameRate,Looped,FlipX,FlipY);
				var _this = this._animations;
				if(__map_reserved[Name] != null) {
					_this.setReserved(Name,anim);
				} else {
					_this.h[Name] = anim;
				}
			}
		}
	}
	,appendByStringIndices: function(Name,Prefix,Indices,Postfix) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			var _this1 = flixel_FlxG.log;
			return;
		}
		if(this._sprite.frames != null) {
			this.byStringIndicesHelper(anim.frames,Prefix,Indices,Postfix);
		}
	}
	,addByIndices: function(Name,Prefix,Indices,Postfix,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var frameIndices = [];
			this.byIndicesHelper(frameIndices,Prefix,Indices,Postfix);
			if(frameIndices.length > 0) {
				var anim = new flixel_animation_FlxAnimation(this,Name,frameIndices,FrameRate,Looped,FlipX,FlipY);
				var _this = this._animations;
				if(__map_reserved[Name] != null) {
					_this.setReserved(Name,anim);
				} else {
					_this.h[Name] = anim;
				}
			}
		}
	}
	,appendByIndices: function(Name,Prefix,Indices,Postfix) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			var _this1 = flixel_FlxG.log;
			return;
		}
		if(this._sprite.frames != null) {
			this.byIndicesHelper(anim.frames,Prefix,Indices,Postfix);
		}
	}
	,findSpriteFrame: function(Prefix,Index,Postfix) {
		var numFrames = this._sprite.numFrames;
		var flxFrames = this._sprite.frames.frames;
		var _g1 = 0;
		var _g = numFrames;
		while(_g1 < _g) {
			var i = _g1++;
			var name = flxFrames[i].name;
			if(StringTools.startsWith(name,Prefix) && StringTools.endsWith(name,Postfix)) {
				var index = Std.parseInt(name.substring(Prefix.length,name.length - Postfix.length));
				if(index != null && index == Index) {
					return i;
				}
			}
		}
		return -1;
	}
	,addByPrefix: function(Name,Prefix,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var animFrames = [];
			this.findByPrefix(animFrames,Prefix);
			if(animFrames.length > 0) {
				var frameIndices = [];
				this.byPrefixHelper(frameIndices,animFrames,Prefix);
				if(frameIndices.length > 0) {
					var anim = new flixel_animation_FlxAnimation(this,Name,frameIndices,FrameRate,Looped,FlipX,FlipY);
					var _this = this._animations;
					if(__map_reserved[Name] != null) {
						_this.setReserved(Name,anim);
					} else {
						_this.h[Name] = anim;
					}
				}
			}
		}
	}
	,appendByPrefix: function(Name,Prefix) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			var _this1 = flixel_FlxG.log;
			return;
		}
		if(this._sprite.frames != null) {
			var animFrames = [];
			this.findByPrefix(animFrames,Prefix);
			if(animFrames.length > 0) {
				this.byPrefixHelper(anim.frames,animFrames,Prefix);
			}
		}
	}
	,play: function(AnimName,Force,Reversed,Frame) {
		if(Frame == null) {
			Frame = 0;
		}
		if(Reversed == null) {
			Reversed = false;
		}
		if(Force == null) {
			Force = false;
		}
		if(AnimName == null) {
			if(this._curAnim != null) {
				this._curAnim.stop();
			}
			this._curAnim = null;
		}
		var tmp;
		if(AnimName != null) {
			var _this = this._animations;
			tmp = (__map_reserved[AnimName] != null ? _this.getReserved(AnimName) : _this.h[AnimName]) == null;
		} else {
			tmp = true;
		}
		if(tmp) {
			var _this1 = flixel_FlxG.log;
			return;
		}
		var oldFlipX = false;
		var oldFlipY = false;
		if(this._curAnim != null && AnimName != this._curAnim.name) {
			oldFlipX = this._curAnim.flipX;
			oldFlipY = this._curAnim.flipY;
			this._curAnim.stop();
		}
		var _this2 = this._animations;
		this._curAnim = __map_reserved[AnimName] != null ? _this2.getReserved(AnimName) : _this2.h[AnimName];
		this._curAnim.play(Force,Reversed,Frame);
		if(oldFlipX != this._curAnim.flipX || oldFlipY != this._curAnim.flipY) {
			this._sprite.dirty = true;
		}
	}
	,reset: function() {
		if(this._curAnim != null) {
			this._curAnim.reset();
		}
	}
	,finish: function() {
		if(this._curAnim != null) {
			this._curAnim.finish();
		}
	}
	,stop: function() {
		if(this._curAnim != null) {
			this._curAnim.stop();
		}
	}
	,pause: function() {
		if(this._curAnim != null) {
			this._curAnim.pause();
		}
	}
	,resume: function() {
		if(this._curAnim != null) {
			this._curAnim.paused = false;
		}
	}
	,reverse: function() {
		if(this._curAnim != null) {
			this._curAnim.reverse();
		}
	}
	,getByName: function(Name) {
		var _this = this._animations;
		if(__map_reserved[Name] != null) {
			return _this.getReserved(Name);
		} else {
			return _this.h[Name];
		}
	}
	,randomFrame: function() {
		if(this._curAnim != null) {
			this._curAnim.stop();
			this._curAnim = null;
		}
		this.set_frameIndex(flixel_FlxG.random["int"](0,this._sprite.numFrames - 1));
	}
	,fireCallback: function() {
		if(this.callback != null) {
			var name = this._curAnim != null ? this._curAnim.name : null;
			var number = this._curAnim != null ? this._curAnim.curFrame : this.frameIndex;
			this.callback(name,number,this.frameIndex);
		}
	}
	,fireFinishCallback: function(name) {
		if(this.finishCallback != null) {
			this.finishCallback(name);
		}
	}
	,byNamesHelper: function(AddTo,FrameNames) {
		var _g = 0;
		while(_g < FrameNames.length) {
			var frameName = FrameNames[_g];
			++_g;
			var _this = this._sprite.frames.framesHash;
			if(__map_reserved[frameName] != null ? _this.existsReserved(frameName) : _this.h.hasOwnProperty(frameName)) {
				var _this1 = this._sprite.frames.framesHash;
				var frameToAdd = __map_reserved[frameName] != null ? _this1.getReserved(frameName) : _this1.h[frameName];
				AddTo.push(this._sprite.frames.frames.indexOf(frameToAdd));
			}
		}
	}
	,byStringIndicesHelper: function(AddTo,Prefix,Indices,Postfix) {
		var _g = 0;
		while(_g < Indices.length) {
			var index = Indices[_g];
			++_g;
			var name = Prefix + index + Postfix;
			var _this = this._sprite.frames.framesHash;
			if(__map_reserved[name] != null ? _this.existsReserved(name) : _this.h.hasOwnProperty(name)) {
				var _this1 = this._sprite.frames.framesHash;
				var frameToAdd = __map_reserved[name] != null ? _this1.getReserved(name) : _this1.h[name];
				AddTo.push(this._sprite.frames.frames.indexOf(frameToAdd));
			}
		}
	}
	,byIndicesHelper: function(AddTo,Prefix,Indices,Postfix) {
		var _g = 0;
		while(_g < Indices.length) {
			var index = Indices[_g];
			++_g;
			var indexToAdd = this.findSpriteFrame(Prefix,index,Postfix);
			if(indexToAdd != -1) {
				AddTo.push(indexToAdd);
			}
		}
	}
	,byPrefixHelper: function(AddTo,AnimFrames,Prefix) {
		var name = AnimFrames[0].name;
		var postIndex = name.indexOf(".",Prefix.length);
		var postFix = name.substring(postIndex == -1 ? name.length : postIndex,name.length);
		flixel_graphics_frames_FlxFrame.sort(AnimFrames,Prefix.length,postFix.length);
		var _g = 0;
		while(_g < AnimFrames.length) {
			var animFrame = AnimFrames[_g];
			++_g;
			AddTo.push(this._sprite.frames.frames.indexOf(animFrame));
		}
	}
	,findByPrefix: function(AnimFrames,Prefix) {
		var _g = 0;
		var _g1 = this._sprite.frames.frames;
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			if(frame.name != null && StringTools.startsWith(frame.name,Prefix)) {
				AnimFrames.push(frame);
			}
		}
	}
	,set_frameIndex: function(Frame) {
		if(this._sprite.frames != null && this._sprite.numFrames > 0) {
			Frame %= this._sprite.numFrames;
			this._sprite.set_frame(this._sprite.frames.frames[Frame]);
			this.frameIndex = Frame;
			if(this.callback != null) {
				var name = this._curAnim != null ? this._curAnim.name : null;
				var number = this._curAnim != null ? this._curAnim.curFrame : this.frameIndex;
				this.callback(name,number,this.frameIndex);
			}
		}
		return this.frameIndex;
	}
	,get_frameName: function() {
		return this._sprite.frame.name;
	}
	,set_frameName: function(Value) {
		var tmp;
		if(this._sprite.frames != null) {
			var _this = this._sprite.frames.framesHash;
			if(__map_reserved[Value] != null) {
				tmp = _this.existsReserved(Value);
			} else {
				tmp = _this.h.hasOwnProperty(Value);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			if(this._curAnim != null) {
				this._curAnim.stop();
				this._curAnim = null;
			}
			var _this1 = this._sprite.frames.framesHash;
			var frame = __map_reserved[Value] != null ? _this1.getReserved(Value) : _this1.h[Value];
			if(frame != null) {
				this.set_frameIndex(this._sprite.frames.frames.indexOf(frame));
			}
		}
		return Value;
	}
	,get_name: function() {
		var animName = null;
		if(this._curAnim != null) {
			animName = this._curAnim.name;
		}
		return animName;
	}
	,set_name: function(AnimName) {
		this.play(AnimName);
		return AnimName;
	}
	,get_curAnim: function() {
		return this._curAnim;
	}
	,set_curAnim: function(Anim) {
		if(Anim != this._curAnim) {
			if(this._curAnim != null) {
				this._curAnim.stop();
			}
			if(Anim != null) {
				Anim.play();
			}
		}
		return this._curAnim = Anim;
	}
	,get_paused: function() {
		var paused = false;
		if(this._curAnim != null) {
			paused = this._curAnim.paused;
		}
		return paused;
	}
	,set_paused: function(Value) {
		if(this._curAnim != null) {
			if(Value) {
				this._curAnim.pause();
			} else {
				this._curAnim.paused = false;
			}
		}
		return Value;
	}
	,get_finished: function() {
		var finished = true;
		if(this._curAnim != null) {
			finished = this._curAnim.finished;
		}
		return finished;
	}
	,set_finished: function(Value) {
		if(Value && this._curAnim != null) {
			this._curAnim.finish();
		}
		return Value;
	}
	,get_frames: function() {
		return this._sprite.numFrames;
	}
	,getFrameIndex: function(Frame) {
		return this._sprite.frames.frames.indexOf(Frame);
	}
	,__class__: flixel_animation_FlxAnimationController
	,__properties__: {get_frames:"get_frames",set_finished:"set_finished",get_finished:"get_finished",set_paused:"set_paused",get_paused:"get_paused",set_name:"set_name",get_name:"get_name",set_frameName:"set_frameName",get_frameName:"get_frameName",set_frameIndex:"set_frameIndex",set_curAnim:"set_curAnim",get_curAnim:"get_curAnim"}
};
var flixel_animation_FlxPrerotatedAnimation = function(Parent,Baked) {
	this.angle = 0;
	flixel_animation_FlxBaseAnimation.call(this,Parent,"prerotated_animation");
	this.baked = Baked;
	this.rotations = Math.round(360 / Baked);
};
$hxClasses["flixel.animation.FlxPrerotatedAnimation"] = flixel_animation_FlxPrerotatedAnimation;
flixel_animation_FlxPrerotatedAnimation.__name__ = ["flixel","animation","FlxPrerotatedAnimation"];
flixel_animation_FlxPrerotatedAnimation.__super__ = flixel_animation_FlxBaseAnimation;
flixel_animation_FlxPrerotatedAnimation.prototype = $extend(flixel_animation_FlxBaseAnimation.prototype,{
	set_angle: function(Value) {
		var oldIndex = this.curIndex;
		var angleHelper = Math.floor(Value % 360);
		while(angleHelper < 0) angleHelper += 360;
		var newIndex = Math.floor(angleHelper / this.baked + 0.5);
		newIndex = newIndex % this.rotations | 0;
		if(oldIndex != newIndex) {
			this.set_curIndex(newIndex);
		}
		return this.angle = Value;
	}
	,set_curIndex: function(Value) {
		this.curIndex = Value;
		if(this.parent != null) {
			this.parent.set_frameIndex(Value);
		}
		return Value;
	}
	,clone: function(Parent) {
		return new flixel_animation_FlxPrerotatedAnimation(Parent,this.baked);
	}
	,__class__: flixel_animation_FlxPrerotatedAnimation
	,__properties__: $extend(flixel_animation_FlxBaseAnimation.prototype.__properties__,{set_angle:"set_angle"})
});
var flixel_util_FlxPool_$flixel_$effects_$FlxFlicker = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_effects_FlxFlicker"] = flixel_util_FlxPool_$flixel_$effects_$FlxFlicker;
flixel_util_FlxPool_$flixel_$effects_$FlxFlicker.__name__ = ["flixel","util","FlxPool_flixel_effects_FlxFlicker"];
flixel_util_FlxPool_$flixel_$effects_$FlxFlicker.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$effects_$FlxFlicker.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$effects_$FlxFlicker
	,__properties__: {get_length:"get_length"}
};
var flixel_effects_FlxFlicker = function() {
};
$hxClasses["flixel.effects.FlxFlicker"] = flixel_effects_FlxFlicker;
flixel_effects_FlxFlicker.__name__ = ["flixel","effects","FlxFlicker"];
flixel_effects_FlxFlicker.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_effects_FlxFlicker.flicker = function(Object,Duration,Interval,EndVisibility,ForceRestart,CompletionCallback,ProgressCallback) {
	if(ForceRestart == null) {
		ForceRestart = true;
	}
	if(EndVisibility == null) {
		EndVisibility = true;
	}
	if(Interval == null) {
		Interval = 0.04;
	}
	if(Duration == null) {
		Duration = 1;
	}
	if(flixel_effects_FlxFlicker.isFlickering(Object)) {
		if(ForceRestart) {
			flixel_effects_FlxFlicker.stopFlickering(Object);
		} else {
			return flixel_effects_FlxFlicker._boundObjects.h[Object.__id__];
		}
	}
	if(Interval <= 0) {
		Interval = flixel_FlxG.elapsed;
	}
	var flicker = flixel_effects_FlxFlicker._pool.get();
	flicker.start(Object,Duration,Interval,EndVisibility,CompletionCallback,ProgressCallback);
	flixel_effects_FlxFlicker._boundObjects.set(Object,flicker);
	return flicker;
};
flixel_effects_FlxFlicker.isFlickering = function(Object) {
	return flixel_effects_FlxFlicker._boundObjects.h.__keys__[Object.__id__] != null;
};
flixel_effects_FlxFlicker.stopFlickering = function(Object) {
	var boundFlicker = flixel_effects_FlxFlicker._boundObjects.h[Object.__id__];
	if(boundFlicker != null) {
		boundFlicker.stop();
	}
};
flixel_effects_FlxFlicker.prototype = {
	destroy: function() {
		this.object = null;
		this.timer = null;
		this.completionCallback = null;
		this.progressCallback = null;
	}
	,start: function(Object,Duration,Interval,EndVisibility,CompletionCallback,ProgressCallback) {
		this.object = Object;
		this.duration = Duration;
		this.interval = Interval;
		this.completionCallback = CompletionCallback;
		this.progressCallback = ProgressCallback;
		this.endVisibility = EndVisibility;
		var tmp = this.duration / this.interval | 0;
		this.timer = new flixel_util_FlxTimer().start(this.interval,$bind(this,this.flickerProgress),tmp);
	}
	,stop: function() {
		this.timer.cancel();
		this.object.set_visible(true);
		this.release();
	}
	,release: function() {
		flixel_effects_FlxFlicker._boundObjects.remove(this.object);
		flixel_effects_FlxFlicker._pool.put(this);
	}
	,flickerProgress: function(Timer) {
		this.object.set_visible(!this.object.visible);
		if(this.progressCallback != null) {
			this.progressCallback(this);
		}
		if(Timer.loops > 0 && Timer.loops - Timer._loopsCounter == 0) {
			this.object.set_visible(this.endVisibility);
			if(this.completionCallback != null) {
				this.completionCallback(this);
			}
			this.release();
		}
	}
	,__class__: flixel_effects_FlxFlicker
};
var flixel_effects_postprocess_PostProcess = function(shader) {
	var _this = flixel_FlxG.log;
};
$hxClasses["flixel.effects.postprocess.PostProcess"] = flixel_effects_postprocess_PostProcess;
flixel_effects_postprocess_PostProcess.__name__ = ["flixel","effects","postprocess","PostProcess"];
flixel_effects_postprocess_PostProcess.prototype = {
	enable: function(to) {
	}
	,capture: function() {
	}
	,rebuild: function() {
	}
	,update: function(elapsed) {
	}
	,render: function(rect) {
	}
	,setUniform: function(uniform,value) {
	}
	,set_to: function(value) {
		return null;
	}
	,__class__: flixel_effects_postprocess_PostProcess
	,__properties__: {set_to:"set_to"}
};
var flixel_graphics_FlxGraphic = function(Key,Bitmap,Persist) {
	this._destroyOnNoUse = true;
	this._useCount = 0;
	this.unique = false;
	this.isDumped = false;
	this.persist = false;
	this.height = 0;
	this.width = 0;
	this.key = Key;
	this.persist = Persist != null ? Persist : flixel_graphics_FlxGraphic.defaultPersist;
	this.frameCollections = new haxe_ds_EnumValueMap();
	this.frameCollectionTypes = [];
	this.set_bitmap(Bitmap);
};
$hxClasses["flixel.graphics.FlxGraphic"] = flixel_graphics_FlxGraphic;
flixel_graphics_FlxGraphic.__name__ = ["flixel","graphics","FlxGraphic"];
flixel_graphics_FlxGraphic.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_FlxGraphic.fromAssetKey = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	var bitmap = null;
	if(!Cache) {
		if(openfl_Assets.exists(Source)) {
			bitmap = openfl_Assets.getBitmapData(Source,false);
		} else {
			var _this = flixel_FlxG.log;
			bitmap = null;
		}
		if(bitmap == null) {
			return null;
		}
		return flixel_graphics_FlxGraphic.createGraphic(bitmap,Key,Unique,Cache);
	}
	var key = flixel_FlxG.bitmap.generateKey(Source,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	if(openfl_Assets.exists(Source)) {
		bitmap = openfl_Assets.getBitmapData(Source,false);
	} else {
		var _this1 = flixel_FlxG.log;
		bitmap = null;
	}
	if(bitmap == null) {
		return null;
	}
	graphic = flixel_graphics_FlxGraphic.createGraphic(bitmap,key,Unique);
	graphic.assetsKey = Source;
	return graphic;
};
flixel_graphics_FlxGraphic.fromClass = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	var bitmap = null;
	if(!Cache) {
		bitmap = Type.createInstance(Source,[0,0]);
		return flixel_graphics_FlxGraphic.createGraphic(bitmap,Key,Unique,Cache);
	}
	var _this = flixel_FlxG.bitmap;
	var key = Type.getClassName(Source);
	key = flixel_FlxG.bitmap.generateKey(key,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	bitmap = Type.createInstance(Source,[0,0]);
	graphic = flixel_graphics_FlxGraphic.createGraphic(bitmap,key,Unique);
	graphic.assetsClass = Source;
	return graphic;
};
flixel_graphics_FlxGraphic.fromBitmapData = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	if(!Cache) {
		return flixel_graphics_FlxGraphic.createGraphic(Source,Key,Unique,Cache);
	}
	var key = flixel_FlxG.bitmap.findKeyForBitmap(Source);
	var assetKey = null;
	var assetClass = null;
	var graphic = null;
	if(key != null) {
		graphic = flixel_FlxG.bitmap._cache.get(key);
		assetKey = graphic.assetsKey;
		assetClass = graphic.assetsClass;
	}
	key = flixel_FlxG.bitmap.generateKey(key,Key,Unique);
	graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	graphic = flixel_graphics_FlxGraphic.createGraphic(Source,key,Unique);
	graphic.assetsKey = assetKey;
	graphic.assetsClass = assetClass;
	return graphic;
};
flixel_graphics_FlxGraphic.fromFrame = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	var key = Source.name;
	if(key == null) {
		var _this = Source.frame;
		var value = _this.x;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "x";
		_this1.value = value;
		var value1 = _this.y;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "y";
		_this2.value = value1;
		var value2 = _this.width;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "w";
		_this3.value = value2;
		var value3 = _this.height;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "h";
		_this4.value = value3;
		key = flixel_util_FlxStringUtil.getDebugString([_this1,_this2,_this3,_this4]);
	}
	key = Source.parent.key + ":" + key;
	key = flixel_FlxG.bitmap.generateKey(key,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	var bitmap = Source.paint();
	graphic = flixel_graphics_FlxGraphic.createGraphic(bitmap,key,Unique,Cache);
	var image = flixel_graphics_frames_FlxImageFrame.fromGraphic(graphic);
	image.frames[0].name = Source.name;
	return graphic;
};
flixel_graphics_FlxGraphic.fromFrames = function(Source,Unique,Key) {
	if(Unique == null) {
		Unique = false;
	}
	return flixel_graphics_FlxGraphic.fromGraphic(Source.parent,Unique,Key);
};
flixel_graphics_FlxGraphic.fromGraphic = function(Source,Unique,Key) {
	if(Unique == null) {
		Unique = false;
	}
	if(!Unique) {
		return Source;
	}
	var key = flixel_FlxG.bitmap.generateKey(Source.key,Key,Unique);
	var graphic = flixel_graphics_FlxGraphic.createGraphic(Source.bitmap,key,Unique);
	graphic.unique = Unique;
	graphic.assetsClass = Source.assetsClass;
	graphic.assetsKey = Source.assetsKey;
	flixel_FlxG.bitmap._cache.set(graphic.key,graphic);
	return graphic;
};
flixel_graphics_FlxGraphic.fromRectangle = function(Width,Height,Color,Unique,Key) {
	if(Unique == null) {
		Unique = false;
	}
	var systemKey = Width + "x" + Height + ":" + Color;
	var key = flixel_FlxG.bitmap.generateKey(systemKey,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	var bitmap = new openfl_display_BitmapData(Width,Height,true,Color);
	return flixel_graphics_FlxGraphic.createGraphic(bitmap,key);
};
flixel_graphics_FlxGraphic.getBitmap = function(Bitmap,Unique) {
	if(Unique == null) {
		Unique = false;
	}
	if(Unique) {
		return Bitmap.clone();
	} else {
		return Bitmap;
	}
};
flixel_graphics_FlxGraphic.createGraphic = function(Bitmap,Key,Unique,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	if(Unique) {
		Bitmap = Bitmap.clone();
	} else {
		Bitmap = Bitmap;
	}
	var graphic = null;
	if(Cache) {
		graphic = new flixel_graphics_FlxGraphic(Key,Bitmap);
		graphic.unique = Unique;
		flixel_FlxG.bitmap._cache.set(graphic.key,graphic);
	} else {
		graphic = new flixel_graphics_FlxGraphic(null,Bitmap);
	}
	return graphic;
};
flixel_graphics_FlxGraphic.prototype = {
	dump: function() {
	}
	,undump: function() {
		var newBitmap = this.getBitmapFromSystem();
		if(newBitmap != null) {
			this.set_bitmap(newBitmap);
		}
		this.isDumped = false;
	}
	,onContext: function() {
		if(this.isDumped) {
			this.undump();
			this.dump();
		}
	}
	,onAssetsReload: function() {
		if(!(this.assetsClass != null || this.assetsKey != null)) {
			return;
		}
		var dumped = this.isDumped;
		this.undump();
		if(dumped) {
			this.dump();
		}
	}
	,destroy: function() {
		this.set_bitmap(flixel_util_FlxDestroyUtil.dispose(this.bitmap));
		if(flixel_FlxG.renderTile) {
			this._tilesheet = null;
		}
		this.key = null;
		this.assetsKey = null;
		this.assetsClass = null;
		this._imageFrame = null;
		if(this.frameCollections == null) {
			return;
		}
		var collections;
		var _g = 0;
		var _g1 = this.frameCollectionTypes;
		while(_g < _g1.length) {
			var collectionType = _g1[_g];
			++_g;
			collections = this.frameCollections.get(collectionType);
			flixel_util_FlxDestroyUtil.destroyArray(collections);
		}
		this.frameCollections = null;
		this.frameCollectionTypes = null;
	}
	,addFrameCollection: function(collection) {
		if(collection.type != null) {
			var type = collection.type;
			var collections = this.frameCollections.get(type);
			if(collections == null) {
				collections = [];
				this.frameCollections.set(type,collections);
			}
			var collections1 = collections;
			collections1.push(collection);
		}
	}
	,getFramesCollections: function(type) {
		var collections = this.frameCollections.get(type);
		if(collections == null) {
			collections = [];
			this.frameCollections.set(type,collections);
		}
		return collections;
	}
	,getEmptyFrame: function(size) {
		var frame = new flixel_graphics_frames_FlxFrame(this);
		frame.type = 2;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		var rect = _this;
		rect._inPool = false;
		frame.set_frame(rect);
		var _this1 = frame.sourceSize;
		_this1.set_x(size.x);
		_this1.set_y(size.y);
		if(size._weak) {
			size.put();
		}
		return frame;
	}
	,get_tilesheet: function() {
		if(this._tilesheet == null) {
			var dumped = this.isDumped;
			if(dumped) {
				this.undump();
			}
			this._tilesheet = new openfl_display_Tilesheet(this.bitmap);
			if(dumped) {
				this.dump();
			}
		}
		return this._tilesheet;
	}
	,getBitmapFromSystem: function() {
		var newBitmap = null;
		if(this.assetsClass != null) {
			newBitmap = Type.createInstance(this.assetsClass,[0,0]);
		} else if(this.assetsKey != null) {
			var id = this.assetsKey;
			if(openfl_Assets.exists(id)) {
				newBitmap = openfl_Assets.getBitmapData(id,false);
			} else {
				var _this = flixel_FlxG.log;
				newBitmap = null;
			}
		}
		if(newBitmap != null) {
			if(this.unique) {
				return newBitmap.clone();
			} else {
				return newBitmap;
			}
		}
		return null;
	}
	,get_canBeDumped: function() {
		if(this.assetsClass == null) {
			return this.assetsKey != null;
		} else {
			return true;
		}
	}
	,get_useCount: function() {
		return this._useCount;
	}
	,set_useCount: function(Value) {
		if(Value <= 0 && this._destroyOnNoUse && !this.persist) {
			flixel_FlxG.bitmap.remove(this);
		}
		return this._useCount = Value;
	}
	,get_destroyOnNoUse: function() {
		return this._destroyOnNoUse;
	}
	,set_destroyOnNoUse: function(Value) {
		if(Value && this._useCount <= 0 && this.key != null && !this.persist) {
			flixel_FlxG.bitmap.remove(this);
		}
		return this._destroyOnNoUse = Value;
	}
	,get_imageFrame: function() {
		if(this._imageFrame == null) {
			var Width = this.bitmap.width;
			var Height = this.bitmap.height;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = Width;
			_this.height = Height;
			var rect = _this;
			rect._inPool = false;
			this._imageFrame = flixel_graphics_frames_FlxImageFrame.fromRectangle(this,rect);
		}
		return this._imageFrame;
	}
	,get_atlasFrames: function() {
		return flixel_graphics_frames_FlxAtlasFrames.findFrame(this,null);
	}
	,set_bitmap: function(value) {
		if(value != null) {
			this.bitmap = value;
			this.width = this.bitmap.width;
			this.height = this.bitmap.height;
			if(flixel_FlxG.renderTile && this._tilesheet != null) {
				this._tilesheet = new openfl_display_Tilesheet(this.bitmap);
			}
		}
		return value;
	}
	,__class__: flixel_graphics_FlxGraphic
	,__properties__: {get_atlasFrames:"get_atlasFrames",get_imageFrame:"get_imageFrame",set_useCount:"set_useCount",get_useCount:"get_useCount",get_tilesheet:"get_tilesheet",get_canBeDumped:"get_canBeDumped",set_destroyOnNoUse:"set_destroyOnNoUse",get_destroyOnNoUse:"get_destroyOnNoUse",set_bitmap:"set_bitmap"}
};
var flixel_graphics_atlas_FlxAtlas = function(name,powerOfTwo,border,rotate,minSize,maxSize) {
	if(rotate == null) {
		rotate = false;
	}
	if(border == null) {
		border = 1;
	}
	if(powerOfTwo == null) {
		powerOfTwo = false;
	}
	this.powerOfTwo = false;
	this.allowRotation = false;
	this.maxHeight = 1024;
	this.maxWidth = 1024;
	this.minHeight = 128;
	this.minWidth = 128;
	this.border = 1;
	this.persist = false;
	this.nodes = new haxe_ds_StringMap();
	this.name = name;
	this.set_powerOfTwo(powerOfTwo);
	this.border = border;
	if(minSize != null) {
		minSize = minSize;
	} else {
		minSize = flixel_graphics_atlas_FlxAtlas.defaultMinSize;
	}
	if(maxSize != null) {
		maxSize = maxSize;
	} else {
		maxSize = flixel_graphics_atlas_FlxAtlas.defaultMaxSize;
	}
	this.set_minWidth(minSize.x | 0);
	this.set_minHeight(minSize.y | 0);
	this.set_maxWidth(maxSize.x > minSize.x ? maxSize.x | 0 : this.minWidth);
	this.set_maxHeight(maxSize.y > minSize.x ? maxSize.y | 0 : this.minHeight);
	this.allowRotation = rotate;
	this.initRoot();
	flixel_FlxG.signals.preStateCreate.add($bind(this,this.onClear));
};
$hxClasses["flixel.graphics.atlas.FlxAtlas"] = flixel_graphics_atlas_FlxAtlas;
flixel_graphics_atlas_FlxAtlas.__name__ = ["flixel","graphics","atlas","FlxAtlas"];
flixel_graphics_atlas_FlxAtlas.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_atlas_FlxAtlas.prototype = {
	initRoot: function() {
		var rootWidth = this.minWidth;
		var rootHeight = this.minHeight;
		if(this.powerOfTwo) {
			rootWidth = this.getNextPowerOfTwo(rootWidth);
			rootHeight = this.getNextPowerOfTwo(rootHeight);
		}
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = rootWidth;
		_this.height = rootHeight;
		var rect = _this;
		rect._inPool = false;
		this.root = new flixel_graphics_atlas_FlxNode(rect,this);
	}
	,addNode: function(Graphic,Key) {
		var key = flixel_system_FlxAssets.resolveKey(Graphic,Key);
		if(key == null) {
			return null;
		}
		if(this.hasNodeWithName(key)) {
			var _this = this.nodes;
			if(__map_reserved[key] != null) {
				return _this.getReserved(key);
			} else {
				return _this.h[key];
			}
		}
		var data = flixel_system_FlxAssets.resolveBitmapData(Graphic);
		if(data == null) {
			return null;
		}
		if(this.root.left == null) {
			return this.insertFirstNodeInRoot(data,key);
		}
		if(this.root.right == null) {
			return this.expand(data,key);
		}
		var inserted = this.tryInsert(data,key);
		if(inserted != null) {
			return inserted;
		}
		this.wrapRoot();
		return this.expand(data,key);
	}
	,wrapRoot: function() {
		var temp = this.root;
		var Width = temp.rect.width | 0;
		var Height = temp.rect.height | 0;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		this.root = new flixel_graphics_atlas_FlxNode(rect,this);
		this.root.left = temp;
	}
	,tryInsert: function(data,key) {
		var insertWidth = data.width + this.border;
		var insertHeight = data.height + this.border;
		var rotateNode = false;
		var nodeToInsert = this.findNodeToInsert(insertWidth,insertHeight);
		if(this.allowRotation) {
			var nodeToInsertWithRotation = this.findNodeToInsert(insertHeight,insertWidth);
			if(nodeToInsertWithRotation != null) {
				var nodeWithRotationArea = (nodeToInsertWithRotation.rect.width | 0) * (nodeToInsertWithRotation.rect.height | 0);
				if(nodeToInsert == null || nodeToInsert != null && (nodeToInsert.rect.width | 0) * (nodeToInsert.rect.height | 0) > nodeWithRotationArea) {
					nodeToInsert = nodeToInsertWithRotation;
					rotateNode = true;
					var temp = insertWidth;
					insertWidth = insertHeight;
					insertHeight = temp;
				}
			}
		}
		if(nodeToInsert != null) {
			var horizontally = this.needToDivideHorizontally(nodeToInsert,insertWidth,insertHeight);
			return this.divideNode(nodeToInsert,insertWidth,insertHeight,horizontally,data,key,rotateNode);
		}
		return null;
	}
	,needToDivideHorizontally: function(nodeToDivide,insertWidth,insertHeight) {
		var dw = (nodeToDivide.rect.width | 0) - insertWidth;
		var dh = (nodeToDivide.rect.height | 0) - insertHeight;
		return dw > dh;
	}
	,divideNode: function(nodeToDivide,insertWidth,insertHeight,divideHorizontally,firstGrandChildData,firstGrandChildKey,firstGrandChildRotated) {
		if(firstGrandChildRotated == null) {
			firstGrandChildRotated = false;
		}
		if(nodeToDivide != null) {
			var firstChild = null;
			var secondChild = null;
			var firstGrandChild = null;
			var secondGrandChild = null;
			var firstGrandChildFilled = firstGrandChildKey != null;
			if(divideHorizontally) {
				var X = nodeToDivide.rect.x | 0;
				var Y = nodeToDivide.rect.y | 0;
				var Height = nodeToDivide.rect.height | 0;
				var _this = flixel_math_FlxRect._pool.get();
				_this.x = X;
				_this.y = Y;
				_this.width = insertWidth;
				_this.height = Height;
				var rect = _this;
				rect._inPool = false;
				firstChild = new flixel_graphics_atlas_FlxNode(rect,this);
				if((nodeToDivide.rect.width | 0) - insertWidth > 0) {
					var X1 = (nodeToDivide.rect.x | 0) + insertWidth;
					var Y1 = nodeToDivide.rect.y | 0;
					var Width = (nodeToDivide.rect.width | 0) - insertWidth;
					var Height1 = nodeToDivide.rect.height | 0;
					var _this1 = flixel_math_FlxRect._pool.get();
					_this1.x = X1;
					_this1.y = Y1;
					_this1.width = Width;
					_this1.height = Height1;
					var rect1 = _this1;
					rect1._inPool = false;
					secondChild = new flixel_graphics_atlas_FlxNode(rect1,this);
				}
				var X2 = firstChild.rect.x | 0;
				var Y2 = firstChild.rect.y | 0;
				var _this2 = flixel_math_FlxRect._pool.get();
				_this2.x = X2;
				_this2.y = Y2;
				_this2.width = insertWidth;
				_this2.height = insertHeight;
				var rect2 = _this2;
				rect2._inPool = false;
				firstGrandChild = new flixel_graphics_atlas_FlxNode(rect2,this,firstGrandChildFilled,firstGrandChildKey,firstGrandChildRotated);
				if((firstChild.rect.height | 0) - insertHeight > 0) {
					var X3 = firstChild.rect.x | 0;
					var Y3 = (firstChild.rect.y | 0) + insertHeight;
					var Height2 = (firstChild.rect.height | 0) - insertHeight;
					var _this3 = flixel_math_FlxRect._pool.get();
					_this3.x = X3;
					_this3.y = Y3;
					_this3.width = insertWidth;
					_this3.height = Height2;
					var rect3 = _this3;
					rect3._inPool = false;
					secondGrandChild = new flixel_graphics_atlas_FlxNode(rect3,this);
				}
			} else {
				var X4 = nodeToDivide.rect.x | 0;
				var Y4 = nodeToDivide.rect.y | 0;
				var Width1 = nodeToDivide.rect.width | 0;
				var _this4 = flixel_math_FlxRect._pool.get();
				_this4.x = X4;
				_this4.y = Y4;
				_this4.width = Width1;
				_this4.height = insertHeight;
				var rect4 = _this4;
				rect4._inPool = false;
				firstChild = new flixel_graphics_atlas_FlxNode(rect4,this);
				if((nodeToDivide.rect.height | 0) - insertHeight > 0) {
					var X5 = nodeToDivide.rect.x | 0;
					var Y5 = (nodeToDivide.rect.y | 0) + insertHeight;
					var Width2 = nodeToDivide.rect.width | 0;
					var Height3 = (nodeToDivide.rect.height | 0) - insertHeight;
					var _this5 = flixel_math_FlxRect._pool.get();
					_this5.x = X5;
					_this5.y = Y5;
					_this5.width = Width2;
					_this5.height = Height3;
					var rect5 = _this5;
					rect5._inPool = false;
					secondChild = new flixel_graphics_atlas_FlxNode(rect5,this);
				}
				var X6 = firstChild.rect.x | 0;
				var Y6 = firstChild.rect.y | 0;
				var _this6 = flixel_math_FlxRect._pool.get();
				_this6.x = X6;
				_this6.y = Y6;
				_this6.width = insertWidth;
				_this6.height = insertHeight;
				var rect6 = _this6;
				rect6._inPool = false;
				firstGrandChild = new flixel_graphics_atlas_FlxNode(rect6,this,firstGrandChildFilled,firstGrandChildKey,firstGrandChildRotated);
				if((firstChild.rect.width | 0) - insertWidth > 0) {
					var X7 = (firstChild.rect.x | 0) + insertWidth;
					var Y7 = firstChild.rect.y | 0;
					var Width3 = (firstChild.rect.width | 0) - insertWidth;
					var _this7 = flixel_math_FlxRect._pool.get();
					_this7.x = X7;
					_this7.y = Y7;
					_this7.width = Width3;
					_this7.height = insertHeight;
					var rect7 = _this7;
					rect7._inPool = false;
					secondGrandChild = new flixel_graphics_atlas_FlxNode(rect7,this);
				}
			}
			firstChild.left = firstGrandChild;
			firstChild.right = secondGrandChild;
			nodeToDivide.left = firstChild;
			nodeToDivide.right = secondChild;
			if(firstGrandChildKey != null && firstGrandChildData != null) {
				this.expandBitmapData();
				if(firstGrandChildRotated) {
					flixel_graphics_atlas_FlxAtlas.matrix.identity();
					flixel_graphics_atlas_FlxAtlas.matrix.rotate(Math.PI / 2);
					flixel_graphics_atlas_FlxAtlas.matrix.translate(firstGrandChildData.height + (firstGrandChild.rect.x | 0),firstGrandChild.rect.y | 0);
					this.bitmapData.draw(firstGrandChildData,flixel_graphics_atlas_FlxAtlas.matrix);
				} else {
					flixel_graphics_atlas_FlxAtlas.point.setTo(firstGrandChild.rect.x | 0,firstGrandChild.rect.y | 0);
					this.bitmapData.copyPixels(firstGrandChildData,firstGrandChildData.rect,flixel_graphics_atlas_FlxAtlas.point);
				}
				this.addNodeToAtlasFrames(firstGrandChild);
				var _this8 = this.nodes;
				if(__map_reserved[firstGrandChildKey] != null) {
					_this8.setReserved(firstGrandChildKey,firstGrandChild);
				} else {
					_this8.h[firstGrandChildKey] = firstGrandChild;
				}
			}
			return firstGrandChild;
		}
		return null;
	}
	,insertFirstNodeInRoot: function(data,key) {
		if(this.root.left == null) {
			var insertWidth = data.width + this.border;
			var insertHeight = data.height + this.border;
			var rootWidth = insertWidth;
			var rootHeight = insertHeight;
			if(this.powerOfTwo) {
				rootWidth = this.getNextPowerOfTwo(rootWidth);
				rootHeight = this.getNextPowerOfTwo(rootHeight);
			}
			if(this.minWidth > rootWidth) {
				rootWidth = this.minWidth;
			} else {
				rootWidth = rootWidth;
			}
			if(this.minHeight > rootHeight) {
				rootHeight = this.minHeight;
			} else {
				rootHeight = rootHeight;
			}
			if(this.powerOfTwo) {
				rootWidth = this.getNextPowerOfTwo(rootWidth);
				rootHeight = this.getNextPowerOfTwo(rootHeight);
			}
			if(this.maxWidth > 0 && rootWidth > this.maxWidth || this.maxHeight > 0 && rootHeight > this.maxHeight) {
				return null;
			}
			this.root.set_width(rootWidth);
			this.root.set_height(rootHeight);
			var horizontally = this.needToDivideHorizontally(this.root,insertWidth,insertHeight);
			return this.divideNode(this.root,insertWidth,insertHeight,horizontally,data,key);
		}
		return null;
	}
	,expand: function(data,key) {
		if(this.root.right == null) {
			var insertWidth = data.width + this.border;
			var insertHeight = data.height + this.border;
			var addRightWidth = (this.root.rect.width | 0) + insertWidth;
			var addRightHeight = Math.max(this.root.rect.height | 0,insertHeight) | 0;
			var addBottomWidth = Math.max(this.root.rect.width | 0,insertWidth) | 0;
			var addBottomHeight = (this.root.rect.height | 0) + insertHeight;
			var addRightWidthRotate = addRightWidth;
			var addRightHeightRotate = addRightHeight;
			var addBottomWidthRotate = addBottomWidth;
			var addBottomHeightRotate = addBottomHeight;
			if(this.allowRotation) {
				addRightWidthRotate = (this.root.rect.width | 0) + insertHeight;
				addRightHeightRotate = Math.max(this.root.rect.height | 0,insertWidth) | 0;
				addBottomWidthRotate = Math.max(this.root.rect.width | 0,insertHeight) | 0;
				addBottomHeightRotate = (this.root.rect.height | 0) + insertWidth;
			}
			if(this.powerOfTwo) {
				addRightWidth = this.getNextPowerOfTwo(addRightWidth);
				addRightWidthRotate = addRightWidth;
				addRightHeight = this.getNextPowerOfTwo(addRightHeight);
				addRightHeightRotate = addRightHeight;
				addBottomWidth = this.getNextPowerOfTwo(addBottomWidth);
				addBottomWidthRotate = addBottomWidth;
				addBottomHeight = this.getNextPowerOfTwo(addBottomHeight);
				addBottomHeightRotate = addBottomHeight;
				if(this.allowRotation) {
					addRightWidthRotate = this.getNextPowerOfTwo(addRightWidthRotate);
					addRightHeightRotate = this.getNextPowerOfTwo(addRightHeightRotate);
					addBottomWidthRotate = this.getNextPowerOfTwo(addBottomWidthRotate);
					addBottomHeightRotate = this.getNextPowerOfTwo(addBottomHeightRotate);
				}
			}
			var canExpandRight = true;
			var canExpandBottom = true;
			var canExpandRightRotate = this.allowRotation;
			var canExpandBottomRotate = this.allowRotation;
			if(this.maxWidth > 0 && addRightWidth > this.maxWidth || this.maxHeight > 0 && addRightHeight > this.maxHeight) {
				canExpandRight = false;
			}
			if(this.maxWidth > 0 && addBottomWidth > this.maxWidth || this.maxHeight > 0 && addBottomHeight > this.maxHeight) {
				canExpandBottom = false;
			}
			if(this.maxWidth > 0 && addRightWidthRotate > this.maxWidth || this.maxHeight > 0 && addRightHeightRotate > this.maxHeight) {
				canExpandRightRotate = false;
			}
			if(this.maxWidth > 0 && addBottomWidthRotate > this.maxWidth || this.maxHeight > 0 && addBottomHeightRotate > this.maxHeight) {
				canExpandBottomRotate = false;
			}
			if(!canExpandRight && !canExpandBottom && !canExpandRightRotate && !canExpandBottomRotate) {
				return null;
			}
			var addRightArea = addRightWidth * addRightHeight;
			var addBottomArea = addBottomWidth * addBottomHeight;
			var addRightAreaRotate = addRightWidthRotate * addRightHeightRotate;
			var addBottomAreaRotate = addBottomWidthRotate * addBottomHeightRotate;
			var rotateRight = false;
			var rotateBottom = false;
			var rotateNode = false;
			if(canExpandRight && canExpandRightRotate && addRightArea > addRightAreaRotate || !canExpandRight && canExpandRightRotate) {
				addRightArea = addBottomAreaRotate;
				addRightWidth = addRightWidthRotate;
				addRightHeight = addRightHeightRotate;
				canExpandRight = true;
				rotateRight = true;
			}
			if(canExpandBottom && canExpandBottomRotate && addBottomArea > addBottomAreaRotate || !canExpandBottom && canExpandBottomRotate) {
				addBottomArea = addBottomAreaRotate;
				addBottomWidth = addBottomWidthRotate;
				addBottomHeight = addBottomHeightRotate;
				canExpandBottom = true;
				rotateBottom = true;
			}
			if(!canExpandRight && canExpandBottom) {
				addRightArea = addBottomArea + 1;
				rotateNode = rotateRight;
			} else if(canExpandRight && !canExpandBottom) {
				addBottomArea = addRightArea + 1;
				rotateNode = rotateBottom;
			}
			var dataNode = null;
			var temp = this.root;
			var insertNodeWidth = insertWidth;
			var insertNodeHeight = insertHeight;
			if(addBottomArea >= addRightArea) {
				if(rotateRight) {
					insertNodeWidth = insertHeight;
					insertNodeHeight = insertWidth;
				}
				this.expandRoot((temp.rect.width | 0) + insertNodeWidth,Math.max(temp.rect.height | 0,insertNodeHeight),true);
				dataNode = this.divideNode(this.root.right,insertNodeWidth,insertNodeHeight,true,data,key,rotateRight);
				this.expandRoot(addRightWidth,addRightHeight,false,true);
			} else {
				if(rotateBottom) {
					insertNodeWidth = insertHeight;
					insertNodeHeight = insertWidth;
				}
				this.expandRoot(Math.max(temp.rect.width | 0,insertNodeWidth),(temp.rect.height | 0) + insertNodeHeight,false);
				dataNode = this.divideNode(this.root.right,insertNodeWidth,insertNodeHeight,true,data,key,rotateBottom);
				this.expandRoot(addBottomWidth,addBottomHeight,false,true);
			}
			return dataNode;
		}
		return null;
	}
	,expandRoot: function(newWidth,newHeight,divideHorizontally,decideHowToDivide) {
		if(decideHowToDivide == null) {
			decideHowToDivide = false;
		}
		if(newWidth > (this.root.rect.width | 0) || newHeight > (this.root.rect.height | 0)) {
			var temp = this.root;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = newWidth;
			_this.height = newHeight;
			var rect = _this;
			rect._inPool = false;
			this.root = new flixel_graphics_atlas_FlxNode(rect,this);
			if(decideHowToDivide) {
				divideHorizontally = this.needToDivideHorizontally(this.root,temp.rect.width | 0,temp.rect.height | 0);
			} else {
				divideHorizontally = divideHorizontally;
			}
			this.divideNode(this.root,temp.rect.width | 0,temp.rect.height | 0,divideHorizontally);
			this.root.left.left = temp;
		}
	}
	,expandBitmapData: function() {
		if(this.bitmapData != null && this.bitmapData.width == (this.root.rect.width | 0) && this.bitmapData.height == (this.root.rect.height | 0)) {
			return;
		}
		var newBitmapData = new openfl_display_BitmapData(this.root.rect.width | 0,this.root.rect.height | 0,true,0);
		if(this.bitmapData != null) {
			flixel_graphics_atlas_FlxAtlas.point.setTo(0,0);
			newBitmapData.copyPixels(this.bitmapData,this.bitmapData.rect,flixel_graphics_atlas_FlxAtlas.point);
		}
		this.set_bitmapData(flixel_util_FlxDestroyUtil.dispose(this.bitmapData));
		this.set_bitmapData(newBitmapData);
	}
	,getNextPowerOfTwo: function(number) {
		var n = number | 0;
		if(n > 0 && (n & n - 1) == 0) {
			return n;
		}
		var result = 1;
		while(result < n) result <<= 1;
		return result;
	}
	,addNodeWithSpacesAndBorders: function(Graphic,Key,tileSize,tileSpacing,tileBorder,region) {
		var key = flixel_system_FlxAssets.resolveKey(Graphic,Key);
		if(key == null) {
			return null;
		}
		key = flixel_FlxG.bitmap.getKeyWithSpacesAndBorders(key,tileSize,tileSpacing,tileBorder,region);
		if(this.hasNodeWithName(key)) {
			var _this = this.nodes;
			return (__map_reserved[key] != null ? _this.getReserved(key) : _this.h[key]).getTileFrames(tileSize,tileSpacing,tileBorder);
		}
		var data = flixel_system_FlxAssets.resolveBitmapData(Graphic);
		if(data == null) {
			return null;
		}
		var nodeData = flixel_util_FlxBitmapDataUtil.addSpacesAndBorders(data,tileSize,tileSpacing,tileBorder,region);
		var node = this.addNode(nodeData,key);
		if(node == null) {
			return null;
		}
		if(tileBorder != null) {
			var Y = 2 * tileBorder.y;
			var _g = tileSize;
			_g.set_x(_g.x + 2 * tileBorder.x);
			var _g1 = tileSize;
			_g1.set_y(_g1.y + Y);
		}
		return node.getTileFrames(tileSize,tileSpacing,tileBorder);
	}
	,getAtlasFrames: function() {
		var graph = this.get_graphic();
		var atlasFrames = graph.get_atlasFrames();
		if(graph.get_atlasFrames() == null) {
			atlasFrames = new flixel_graphics_frames_FlxAtlasFrames(graph);
		}
		var _this = this.nodes;
		var node = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(node.hasNext()) {
			var node1 = node.next();
			this.addNodeToAtlasFrames(node1);
		}
		return atlasFrames;
	}
	,addNodeToAtlasFrames: function(node) {
		if(this._graphic == null || this._graphic.get_atlasFrames() == null || node == null) {
			return;
		}
		var atlasFrames = this._graphic.get_atlasFrames();
		var tmp;
		if(node.filled) {
			var key = node.key;
			var _this = atlasFrames.framesHash;
			tmp = !(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key));
		} else {
			tmp = false;
		}
		if(tmp) {
			var X = node.rect.x | 0;
			var Y = node.rect.y | 0;
			var Width = (node.rect.width | 0) - this.border;
			var Height = (node.rect.height | 0) - this.border;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X;
			_this1.y = Y;
			_this1.width = Width;
			_this1.height = Height;
			var rect = _this1;
			rect._inPool = false;
			var frame = rect;
			var sourceSize;
			if(node.rotated) {
				var X1 = (node.rect.height | 0) - this.border;
				var Y1 = (node.rect.width | 0) - this.border;
				var point = flixel_math_FlxPoint._pool.get().set(X1,Y1);
				point._inPool = false;
				sourceSize = point;
			} else {
				var X2 = (node.rect.width | 0) - this.border;
				var Y2 = (node.rect.height | 0) - this.border;
				var point1 = flixel_math_FlxPoint._pool.get().set(X2,Y2);
				point1._inPool = false;
				sourceSize = point1;
			}
			var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
			point2._inPool = false;
			var offset = point2;
			var angle = node.rotated ? -90 : 0;
			atlasFrames.addAtlasFrame(frame,sourceSize,offset,node.key,angle);
		}
	}
	,hasNodeWithName: function(nodeName) {
		var _this = this.nodes;
		if(__map_reserved[nodeName] != null) {
			return _this.existsReserved(nodeName);
		} else {
			return _this.h.hasOwnProperty(nodeName);
		}
	}
	,getNode: function(key) {
		var _this = this.nodes;
		if(__map_reserved[key] != null) {
			return _this.getReserved(key);
		} else {
			return _this.h[key];
		}
	}
	,addNodes: function(bitmaps,keys) {
		var numKeys = keys.length;
		var numBitmaps = bitmaps.length;
		if(numBitmaps != numKeys) {
			return null;
		}
		this._tempStorage = [];
		var _g1 = 0;
		var _g = numBitmaps;
		while(_g1 < _g) {
			var i = _g1++;
			this._tempStorage.push({ bmd : bitmaps[i], keyStr : keys[i]});
		}
		this.addFromAtlasObjects(this._tempStorage);
		return this;
	}
	,addFromAtlasObjects: function(objects) {
		objects.sort($bind(this,this.bitmapSorter));
		var numBitmaps = objects.length;
		var _g1 = 0;
		var _g = numBitmaps;
		while(_g1 < _g) {
			var i = _g1++;
			this.addNode(objects[i].bmd,objects[i].keyStr);
		}
		this._tempStorage = null;
	}
	,bitmapSorter: function(obj1,obj2) {
		if(this.allowRotation) {
			var area1 = obj1.bmd.width * obj1.bmd.height;
			var area2 = obj2.bmd.width * obj2.bmd.height;
			return area2 - area1;
		}
		if(obj2.bmd.width == obj1.bmd.width) {
			return obj2.bmd.height - obj1.bmd.height;
		}
		return obj2.bmd.width - obj1.bmd.width;
	}
	,createQueue: function() {
		this._tempStorage = [];
		return this;
	}
	,addToQueue: function(data,key) {
		if(this._tempStorage == null) {
			this._tempStorage = [];
		}
		this._tempStorage.push({ bmd : data, keyStr : key});
		return this;
	}
	,generateFromQueue: function() {
		if(this._tempStorage != null) {
			this.addFromAtlasObjects(this._tempStorage);
		}
		return this;
	}
	,onClear: function(_) {
		if(!this.persist || this._graphic != null && this._graphic.get_useCount() <= 0) {
			this.destroy();
		}
	}
	,destroy: function() {
		this._tempStorage = null;
		this.deleteSubtree(this.root);
		this.root = null;
		flixel_FlxG.bitmap.removeByKey(this.name);
		this.set_bitmapData(null);
		this.nodes = null;
		this._graphic = null;
		flixel_FlxG.signals.preStateCreate.remove($bind(this,this.onClear));
	}
	,clear: function() {
		this.deleteSubtree(this.root);
		this.initRoot();
		flixel_FlxG.bitmap.removeByKey(this.name);
		this.set_bitmapData(null);
		this.nodes = new haxe_ds_StringMap();
		this._graphic = null;
	}
	,getLibGdxData: function() {
		var data = "\n";
		data += this.name + "\n";
		data += "format: RGBA8888\n";
		data += "filter: Linear,Linear\n";
		data += "repeat: none\n";
		var _this = this.nodes;
		var node = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(node.hasNext()) {
			var node1 = node.next();
			data += node1.key + "\n";
			data += "  rotate: " + (node1.rotated == null ? "null" : "" + node1.rotated) + "\n";
			data += "  xy: " + (node1.rect.x | 0) + ", " + (node1.rect.y | 0) + "\n";
			if(this.allowRotation) {
				data += "size: " + (node1.rect.height | 0) + ", " + (node1.rect.width | 0) + "\n";
				data += "orig: " + (node1.rect.height | 0) + ", " + (node1.rect.width | 0) + "\n";
			} else {
				data += "size: " + (node1.rect.width | 0) + ", " + (node1.rect.height | 0) + "\n";
				data += "orig: " + (node1.rect.width | 0) + ", " + (node1.rect.height | 0) + "\n";
			}
			data += "  offset: 0, 0\n";
			data += "  index: -1\n";
		}
		return data;
	}
	,deleteSubtree: function(node) {
		if(node != null) {
			if(node.left != null) {
				this.deleteSubtree(node.left);
			}
			if(node.right != null) {
				this.deleteSubtree(node.right);
			}
			node.key = null;
			node.left = null;
			node.right = null;
			node.rect = null;
			node.atlas = null;
		}
	}
	,findNodeToInsert: function(insertWidth,insertHeight) {
		var stack = [];
		var current = this.root;
		var emptyNodes = [];
		var canPlaceRight = false;
		var canPlaceLeft = false;
		var looping = true;
		var result = null;
		var minArea = this.maxWidth * this.maxHeight + 1;
		var nodeArea;
		while(looping) {
			if(!current.filled && current.left == null && current.right == null && (current.rect.width >= insertWidth && current.rect.height >= insertHeight)) {
				nodeArea = (current.rect.width | 0) * (current.rect.height | 0);
				if(nodeArea < minArea) {
					minArea = nodeArea;
					result = current;
				}
			}
			if(current.right != null) {
				var _this = current.right;
				if(_this.rect.width >= insertWidth) {
					canPlaceRight = _this.rect.height >= insertHeight;
				} else {
					canPlaceRight = false;
				}
			} else {
				canPlaceRight = false;
			}
			if(current.left != null) {
				var _this1 = current.left;
				if(_this1.rect.width >= insertWidth) {
					canPlaceLeft = _this1.rect.height >= insertHeight;
				} else {
					canPlaceLeft = false;
				}
			} else {
				canPlaceLeft = false;
			}
			if(canPlaceRight && canPlaceLeft) {
				stack.push(current.right);
				current = current.left;
			} else if(canPlaceLeft) {
				current = current.left;
			} else if(canPlaceRight) {
				current = current.right;
			} else if(stack.length > 0) {
				current = stack.pop();
			} else {
				looping = false;
			}
		}
		return result;
	}
	,set_bitmapData: function(value) {
		if(value != null && this._graphic != null) {
			this._graphic.set_bitmap(value);
		}
		return this.bitmapData = value;
	}
	,get_graphic: function() {
		if(this._graphic != null) {
			return this._graphic;
		}
		this._graphic = flixel_FlxG.bitmap.add(this.bitmapData,false,this.name);
		this._graphic.persist = this.persist;
		return this._graphic;
	}
	,set_persist: function(value) {
		if(this._graphic != null) {
			this._graphic.persist = value;
		}
		return this.persist = value;
	}
	,set_minWidth: function(value) {
		if(value <= this.maxWidth) {
			this.minWidth = value;
			if(value > this.get_width()) {
				this.set_width(value);
			}
		}
		return this.minWidth;
	}
	,set_minHeight: function(value) {
		if(value <= this.maxHeight) {
			this.minHeight = value;
			if(value > this.get_height()) {
				this.set_height(value);
			}
		}
		return this.minHeight;
	}
	,get_width: function() {
		if(this.root != null) {
			return this.root.rect.width | 0;
		}
		return 0;
	}
	,set_width: function(value) {
		if(value > this.get_width()) {
			if(this.powerOfTwo) {
				value = this.getNextPowerOfTwo(value);
			}
			if(value <= this.maxWidth) {
				if(this.root != null && (this.root.rect.width | 0) < value) {
					this.expandRoot(value,this.root.rect.height | 0,this.needToDivideHorizontally(this.root,this.root.rect.width | 0,this.root.rect.height | 0));
				}
			}
		}
		return value;
	}
	,get_height: function() {
		if(this.root != null) {
			return this.root.rect.height | 0;
		}
		return 0;
	}
	,set_height: function(value) {
		if(value > this.get_height()) {
			if(this.powerOfTwo) {
				value = this.getNextPowerOfTwo(value);
			}
			if(value <= this.maxHeight) {
				if(this.root != null && (this.root.rect.height | 0) < value) {
					this.expandRoot(this.root.rect.width | 0,value,this.needToDivideHorizontally(this.root,this.root.rect.width | 0,this.root.rect.height | 0));
				}
			}
		}
		return value;
	}
	,set_maxWidth: function(value) {
		if(value >= this.minWidth && (this.root == null || value >= this.get_width())) {
			this.maxWidth = value;
		}
		return this.maxWidth;
	}
	,set_maxHeight: function(value) {
		if(value >= this.minHeight && (this.root == null || value >= this.get_height())) {
			this.maxHeight = value;
		}
		return this.maxHeight;
	}
	,set_powerOfTwo: function(value) {
		if(value != this.powerOfTwo && value && this.root != null) {
			var nextWidth = this.getNextPowerOfTwo(this.root.rect.width | 0);
			var nextHeight = this.getNextPowerOfTwo(this.root.rect.height | 0);
			if(nextWidth != (this.root.rect.width | 0) || nextHeight != (this.root.rect.height | 0)) {
				if(this.maxWidth > 0 && nextWidth > this.maxWidth || this.maxHeight > 0 && nextHeight > this.maxHeight) {
					return false;
				}
				var temp = this.root;
				var _this = flixel_math_FlxRect._pool.get();
				_this.x = 0;
				_this.y = 0;
				_this.width = nextWidth;
				_this.height = nextHeight;
				var rect = _this;
				rect._inPool = false;
				this.root = new flixel_graphics_atlas_FlxNode(rect,this);
				if(temp.left != null) {
					this.divideNode(this.root,temp.rect.width | 0,temp.rect.height | 0,this.needToDivideHorizontally(this.root,temp.rect.width | 0,temp.rect.height | 0));
					this.root.left.left = temp;
				}
			}
		}
		return this.powerOfTwo = value;
	}
	,__class__: flixel_graphics_atlas_FlxAtlas
	,__properties__: {set_powerOfTwo:"set_powerOfTwo",set_maxHeight:"set_maxHeight",set_maxWidth:"set_maxWidth",set_minHeight:"set_minHeight",set_minWidth:"set_minWidth",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_persist:"set_persist",get_graphic:"get_graphic",set_bitmapData:"set_bitmapData"}
};
var flixel_graphics_atlas_FlxNode = function(rect,atlas,filled,key,rotated) {
	if(rotated == null) {
		rotated = false;
	}
	if(key == null) {
		key = "";
	}
	if(filled == null) {
		filled = false;
	}
	this.filled = filled;
	this.left = null;
	this.right = null;
	this.rect = rect;
	this.key = key;
	this.atlas = atlas;
	this.rotated = rotated;
};
$hxClasses["flixel.graphics.atlas.FlxNode"] = flixel_graphics_atlas_FlxNode;
flixel_graphics_atlas_FlxNode.__name__ = ["flixel","graphics","atlas","FlxNode"];
flixel_graphics_atlas_FlxNode.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_atlas_FlxNode.prototype = {
	destroy: function() {
		this.key = null;
		this.left = null;
		this.right = null;
		this.rect = null;
		this.atlas = null;
	}
	,canPlace: function(width,height) {
		if(this.rect.width >= width) {
			return this.rect.height >= height;
		} else {
			return false;
		}
	}
	,getTileFrames: function(tileSize,tileSpacing,tileBorder) {
		flixel_FlxG.bitmap.add(this.atlas.bitmapData,false,this.atlas.name);
		var frame = this.atlas.getAtlasFrames().framesHash.get(this.key);
		if(frame != null) {
			var tileFrames = flixel_graphics_frames_FlxTileFrames.fromFrame(frame,tileSize,tileSpacing);
			if(tileBorder != null) {
				tileFrames = tileFrames.addBorder(tileBorder);
			}
			return tileFrames;
		}
		return null;
	}
	,getImageFrame: function() {
		flixel_FlxG.bitmap.add(this.atlas.bitmapData,false,this.atlas.name);
		var frame = this.atlas.getAtlasFrames().framesHash.get(this.key);
		if(frame != null) {
			return flixel_graphics_frames_FlxImageFrame.fromFrame(frame);
		}
		return null;
	}
	,get_isEmpty: function() {
		if(!this.filled && this.left == null) {
			return this.right == null;
		} else {
			return false;
		}
	}
	,get_x: function() {
		return this.rect.x | 0;
	}
	,get_y: function() {
		return this.rect.y | 0;
	}
	,get_width: function() {
		return this.rect.width | 0;
	}
	,set_width: function(value) {
		this.rect.width = value;
		return value;
	}
	,get_height: function() {
		return this.rect.height | 0;
	}
	,set_height: function(value) {
		this.rect.height = value;
		return value;
	}
	,__class__: flixel_graphics_atlas_FlxNode
	,__properties__: {get_isEmpty:"get_isEmpty",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
};
var flixel_graphics_frames_FlxFramesCollection = function(parent,type,border) {
	this.parent = parent;
	this.type = type;
	var tmp;
	if(border == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		tmp = point;
	} else {
		tmp = border;
	}
	this.border = tmp;
	this.frames = [];
	this.framesHash = new haxe_ds_StringMap();
	if(parent != null) {
		parent.addFrameCollection(this);
	}
};
$hxClasses["flixel.graphics.frames.FlxFramesCollection"] = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxFramesCollection.__name__ = ["flixel","graphics","frames","FlxFramesCollection"];
flixel_graphics_frames_FlxFramesCollection.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_frames_FlxFramesCollection.prototype = {
	getByName: function(name) {
		var _this = this.framesHash;
		if(__map_reserved[name] != null) {
			return _this.getReserved(name);
		} else {
			return _this.h[name];
		}
	}
	,getByIndex: function(index) {
		return this.frames[index];
	}
	,getIndexByName: function(name) {
		var _g1 = 0;
		var _g = this.frames.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.frames[i].name == name) {
				return i;
			}
		}
		return -1;
	}
	,getFrameIndex: function(frame) {
		return this.frames.indexOf(frame);
	}
	,destroy: function() {
		this.frames = flixel_util_FlxDestroyUtil.destroyArray(this.frames);
		this.border = flixel_util_FlxDestroyUtil.put(this.border);
		this.framesHash = null;
		this.parent = null;
		this.type = null;
	}
	,addEmptyFrame: function(size) {
		var frame = new flixel_graphics_frames_FlxFrame(this.parent);
		frame.type = 2;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		var rect = _this;
		rect._inPool = false;
		frame.set_frame(rect);
		frame.sourceSize.set(size.width,size.height);
		this.frames.push(frame);
		return frame;
	}
	,addSpriteSheetFrame: function(region) {
		var frame = new flixel_graphics_frames_FlxFrame(this.parent);
		frame.set_frame(this.checkFrame(region));
		frame.sourceSize.set(region.width,region.height);
		frame.offset.set(0,0);
		return this.pushFrame(frame);
	}
	,addAtlasFrame: function(frame,sourceSize,offset,name,angle,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(angle == null) {
			angle = 0;
		}
		var tmp;
		if(name != null) {
			var _this = this.framesHash;
			if(__map_reserved[name] != null) {
				tmp = _this.existsReserved(name);
			} else {
				tmp = _this.h.hasOwnProperty(name);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = this.framesHash;
			if(__map_reserved[name] != null) {
				return _this1.getReserved(name);
			} else {
				return _this1.h[name];
			}
		}
		var texFrame = new flixel_graphics_frames_FlxFrame(this.parent,angle,flipX,flipY);
		texFrame.name = name;
		texFrame.sourceSize.set(sourceSize.x,sourceSize.y);
		texFrame.offset.set(offset.x,offset.y);
		texFrame.set_frame(this.checkFrame(frame,name));
		sourceSize = flixel_util_FlxDestroyUtil.put(sourceSize);
		offset = flixel_util_FlxDestroyUtil.put(offset);
		return this.pushFrame(texFrame);
	}
	,checkFrame: function(frame,name) {
		var Value = frame.x;
		var Max = this.parent.width;
		var lowerBound = Value < 0 ? 0 : Value;
		var x = Max != null && lowerBound > Max ? Max : lowerBound;
		var Value1 = frame.y;
		var Max1 = this.parent.height;
		var lowerBound1 = Value1 < 0 ? 0 : Value1;
		var y = Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1;
		var Value2 = frame.x + frame.width;
		var Max2 = this.parent.width;
		var lowerBound2 = Value2 < 0 ? 0 : Value2;
		var r = Max2 != null && lowerBound2 > Max2 ? Max2 : lowerBound2;
		var Value3 = frame.y + frame.height;
		var Max3 = this.parent.height;
		var lowerBound3 = Value3 < 0 ? 0 : Value3;
		var b = Max3 != null && lowerBound3 > Max3 ? Max3 : lowerBound3;
		frame.x = x;
		frame.y = y;
		frame.width = r - x;
		frame.height = b - y;
		if(frame.width <= 0 || frame.height <= 0) {
			var _this = flixel_FlxG.log;
		}
		return frame;
	}
	,pushFrame: function(frameObj) {
		var name = frameObj.name;
		var tmp;
		if(name != null) {
			var _this = this.framesHash;
			if(__map_reserved[name] != null) {
				tmp = _this.existsReserved(name);
			} else {
				tmp = _this.h.hasOwnProperty(name);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = this.framesHash;
			if(__map_reserved[name] != null) {
				return _this1.getReserved(name);
			} else {
				return _this1.h[name];
			}
		}
		this.frames.push(frameObj);
		frameObj.cacheFrameMatrix();
		if(name != null) {
			var _this2 = this.framesHash;
			if(__map_reserved[name] != null) {
				_this2.setReserved(name,frameObj);
			} else {
				_this2.h[name] = frameObj;
			}
		}
		return frameObj;
	}
	,addBorder: function(border) {
		throw new js__$Boot_HaxeError("To be overriden in subclasses");
	}
	,toString: function() {
		var value = this.frames;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "frames";
		_this.value = value;
		var value1 = this.type;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "type";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,get_numFrames: function() {
		return this.frames.length;
	}
	,__class__: flixel_graphics_frames_FlxFramesCollection
	,__properties__: {get_numFrames:"get_numFrames"}
};
var flixel_graphics_frames_FlxAtlasFrames = function(parent,border) {
	flixel_graphics_frames_FlxFramesCollection.call(this,parent,flixel_graphics_frames_FlxFrameCollectionType.ATLAS,border);
};
$hxClasses["flixel.graphics.frames.FlxAtlasFrames"] = flixel_graphics_frames_FlxAtlasFrames;
flixel_graphics_frames_FlxAtlasFrames.__name__ = ["flixel","graphics","frames","FlxAtlasFrames"];
flixel_graphics_frames_FlxAtlasFrames.fromTexturePackerJson = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source,false);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	var data;
	if(typeof(Description) == "string") {
		var json = Description;
		if(openfl_Assets.exists(json)) {
			json = openfl_Assets.getText(json);
		}
		data = JSON.parse(json);
	} else {
		data = Description;
	}
	if((data.frames instanceof Array) && data.frames.__enum__ == null) {
		var _g = 0;
		var _g1 = Lambda.array(data.frames);
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			flixel_graphics_frames_FlxAtlasFrames.texturePackerHelper(frame.filename,frame,frames);
		}
	} else {
		var _g2 = 0;
		var _g11 = Reflect.fields(data.frames);
		while(_g2 < _g11.length) {
			var frameName = _g11[_g2];
			++_g2;
			flixel_graphics_frames_FlxAtlasFrames.texturePackerHelper(frameName,Reflect.field(data.frames,frameName),frames);
		}
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.texturePackerHelper = function(FrameName,FrameData,Frames) {
	var rotated = FrameData.rotated;
	var name = FrameName;
	var X = FrameData.sourceSize.w;
	var Y = FrameData.sourceSize.h;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	var sourceSize = point;
	var X1 = FrameData.spriteSourceSize.x;
	var Y1 = FrameData.spriteSourceSize.y;
	var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
	point1._inPool = false;
	var offset = point1;
	var angle = 0;
	var frameRect = null;
	if(rotated) {
		var X2 = FrameData.frame.x;
		var Y2 = FrameData.frame.y;
		var Width = FrameData.frame.h;
		var Height = FrameData.frame.w;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X2;
		_this.y = Y2;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		frameRect = rect;
		angle = -90;
	} else {
		var X3 = FrameData.frame.x;
		var Y3 = FrameData.frame.y;
		var Width1 = FrameData.frame.w;
		var Height1 = FrameData.frame.h;
		var _this1 = flixel_math_FlxRect._pool.get();
		_this1.x = X3;
		_this1.y = Y3;
		_this1.width = Width1;
		_this1.height = Height1;
		var rect1 = _this1;
		rect1._inPool = false;
		frameRect = rect1;
	}
	Frames.addAtlasFrame(frameRect,sourceSize,offset,name,angle);
};
flixel_graphics_frames_FlxAtlasFrames.fromLibGdx = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var pack = StringTools.trim(Description);
	var lines = pack.split("\n");
	var repeatLine = lines[3].indexOf("repeat:") > -1 ? 3 : 4;
	lines.splice(0,repeatLine + 1);
	var numElementsPerImage = 7;
	var numImages = lines.length / numElementsPerImage | 0;
	var size = [];
	var _g1 = 0;
	var _g = numImages;
	while(_g1 < _g) {
		var i = _g1++;
		var curIndex = i * numElementsPerImage;
		var name = lines[curIndex++];
		var rotated = lines[curIndex++].indexOf("true") >= 0;
		var angle = 0;
		var tempString = lines[curIndex++];
		var size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size);
		var imageX = size1[0];
		var imageY = size1[1];
		tempString = lines[curIndex++];
		size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size1);
		var imageWidth = size1[0];
		var imageHeight = size1[1];
		var rect = null;
		if(rotated) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = imageX;
			_this.y = imageY;
			_this.width = imageHeight;
			_this.height = imageWidth;
			var rect1 = _this;
			rect1._inPool = false;
			rect = rect1;
			angle = 90;
		} else {
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = imageX;
			_this1.y = imageY;
			_this1.width = imageWidth;
			_this1.height = imageHeight;
			var rect2 = _this1;
			rect2._inPool = false;
			rect = rect2;
		}
		tempString = lines[curIndex++];
		size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size1);
		var point = flixel_math_FlxPoint._pool.get().set(size1[0],size1[1]);
		point._inPool = false;
		var sourceSize = point;
		tempString = lines[curIndex++];
		size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size1);
		var Y = sourceSize.y - size1[1] - imageHeight;
		var point1 = flixel_math_FlxPoint._pool.get().set(size1[0],Y);
		point1._inPool = false;
		var offset = point1;
		frames.addAtlasFrame(rect,sourceSize,offset,name,angle);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.getDimensions = function(line,size) {
	var colonPosition = line.indexOf(":");
	var comaPosition = line.indexOf(",");
	size[0] = Std.parseInt(line.substring(colonPosition + 1,comaPosition));
	size[1] = Std.parseInt(line.substring(comaPosition + 1,line.length));
	return size;
};
flixel_graphics_frames_FlxAtlasFrames.fromSparrow = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var data = new haxe_xml_Fast(Xml.parse(Description).firstElement());
	var _g_head = data.nodes.resolve("SubTexture").h;
	while(_g_head != null) {
		var val = _g_head.item;
		_g_head = _g_head.next;
		var texture = val;
		var name = texture.att.resolve("name");
		var trimmed = texture.has.resolve("frameX");
		var rotated = texture.has.resolve("rotated") && texture.att.resolve("rotated") == "true";
		var flipX = texture.has.resolve("flipX") && texture.att.resolve("flipX") == "true";
		var flipY = texture.has.resolve("flipY") && texture.att.resolve("flipY") == "true";
		var X = parseFloat(texture.att.resolve("x"));
		var Y = parseFloat(texture.att.resolve("y"));
		var Width = parseFloat(texture.att.resolve("width"));
		var Height = parseFloat(texture.att.resolve("height"));
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		var rect1 = rect;
		var size = trimmed ? new openfl_geom_Rectangle(Std.parseInt(texture.att.resolve("frameX")),Std.parseInt(texture.att.resolve("frameY")),Std.parseInt(texture.att.resolve("frameWidth")),Std.parseInt(texture.att.resolve("frameHeight"))) : new openfl_geom_Rectangle(0,0,rect1.width,rect1.height);
		var angle = rotated ? -90 : 0;
		var X1 = -size.get_left();
		var Y1 = -size.get_top();
		var point = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point._inPool = false;
		var offset = point;
		var X2 = size.width;
		var Y2 = size.height;
		var point1 = flixel_math_FlxPoint._pool.get().set(X2,Y2);
		point1._inPool = false;
		var sourceSize = point1;
		if(rotated && !trimmed) {
			sourceSize.set(size.height,size.width);
		}
		frames.addAtlasFrame(rect1,sourceSize,offset,name,angle,flipX,flipY);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.fromTexturePackerXml = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source,false);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var xml = Xml.parse(Description);
	var sprite = xml.firstElement().elements();
	while(sprite.hasNext()) {
		var sprite1 = sprite.next();
		var trimmed = sprite1.exists("oX") || sprite1.exists("oY");
		var rotated = sprite1.exists("r") && sprite1.get("r") == "y";
		var angle = rotated ? -90 : 0;
		var name = sprite1.get("n");
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var offset = point;
		var X = Std.parseInt(sprite1.get("x"));
		var Y = Std.parseInt(sprite1.get("y"));
		var Width = Std.parseInt(sprite1.get("w"));
		var Height = Std.parseInt(sprite1.get("h"));
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		var rect1 = rect;
		var X1 = rect1.width;
		var Y1 = rect1.height;
		var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point1._inPool = false;
		var sourceSize = point1;
		if(trimmed) {
			offset.set(Std.parseInt(sprite1.get("oX")),Std.parseInt(sprite1.get("oY")));
			sourceSize.set(Std.parseInt(sprite1.get("oW")),Std.parseInt(sprite1.get("oH")));
		}
		frames.addAtlasFrame(rect1,sourceSize,offset,name,angle);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.fromSpriteSheetPacker = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var pack = StringTools.trim(Description);
	var lines = pack.split("\n");
	var _g1 = 0;
	var _g = lines.length;
	while(_g1 < _g) {
		var i = _g1++;
		var currImageData = lines[i].split("=");
		var name = StringTools.trim(currImageData[0]);
		var currImageRegion = StringTools.trim(currImageData[1]).split(" ");
		var X = Std.parseInt(currImageRegion[0]);
		var Y = Std.parseInt(currImageRegion[1]);
		var Width = Std.parseInt(currImageRegion[2]);
		var Height = Std.parseInt(currImageRegion[3]);
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		var rect1 = rect;
		var X1 = rect1.width;
		var Y1 = rect1.height;
		var point = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point._inPool = false;
		var sourceSize = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		var offset = point1;
		frames.addAtlasFrame(rect1,sourceSize,offset,name,0);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.findFrame = function(graphic,border) {
	if(border == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = point;
		point1._weak = true;
		border = point1;
	}
	var type = flixel_graphics_frames_FlxFrameCollectionType.ATLAS;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var atlasFrames = collections;
	var _g = 0;
	while(_g < atlasFrames.length) {
		var atlas = atlasFrames[_g];
		++_g;
		var _this = atlas.border;
		var result = Math.abs(_this.x - border.x) <= 0.0000001 && Math.abs(_this.y - border.y) <= 0.0000001;
		if(border._weak) {
			border.put();
		}
		if(result) {
			return atlas;
		}
	}
	return null;
};
flixel_graphics_frames_FlxAtlasFrames.__super__ = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxAtlasFrames.prototype = $extend(flixel_graphics_frames_FlxFramesCollection.prototype,{
	addBorder: function(border) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = point;
		point1._weak = true;
		var resultBorder = point1.addPoint(this.border).addPoint(border);
		var atlasFrames = flixel_graphics_frames_FlxAtlasFrames.findFrame(this.parent,resultBorder);
		if(atlasFrames != null) {
			return atlasFrames;
		}
		atlasFrames = new flixel_graphics_frames_FlxAtlasFrames(this.parent,resultBorder);
		var _g = 0;
		var _g1 = this.frames;
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			atlasFrames.pushFrame(frame.setBorderTo(border));
		}
		return atlasFrames;
	}
	,__class__: flixel_graphics_frames_FlxAtlasFrames
});
var flixel_graphics_frames_FlxFrame = function(parent,angle,flipX,flipY) {
	if(flipY == null) {
		flipY = false;
	}
	if(flipX == null) {
		flipX = false;
	}
	if(angle == null) {
		angle = 0;
	}
	this.matrix = new flixel_math_FlxMatrix();
	this.rect = new openfl_geom_Rectangle();
	this.point2 = new openfl_geom_Point();
	this.point1 = new openfl_geom_Point();
	this.parent = parent;
	this.angle = angle;
	this.flipX = flipX;
	this.flipY = flipY;
	this.type = 0;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.sourceSize = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this.offset = point1;
	var this1 = new Array(6);
	this.blitMatrix = this1;
	if(flixel_FlxG.renderTile) {
		var this2 = new Array(6);
		this.tileMatrix = this2;
	}
};
$hxClasses["flixel.graphics.frames.FlxFrame"] = flixel_graphics_frames_FlxFrame;
flixel_graphics_frames_FlxFrame.__name__ = ["flixel","graphics","frames","FlxFrame"];
flixel_graphics_frames_FlxFrame.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_frames_FlxFrame.sort = function(frames,prefixLength,postfixLength) {
	var a3 = prefixLength;
	var a4 = postfixLength;
	haxe_ds_ArraySort.sort(frames,function(a1,a2) {
		return flixel_graphics_frames_FlxFrame.sortByName(a1,a2,a3,a4);
	});
};
flixel_graphics_frames_FlxFrame.sortByName = function(frame1,frame2,prefixLength,postfixLength) {
	var name1 = frame1.name;
	var name2 = frame2.name;
	var num1 = Std.parseInt(name1.substring(prefixLength,name1.length - postfixLength));
	var num2 = Std.parseInt(name2.substring(prefixLength,name2.length - postfixLength));
	if(num1 == null) {
		num1 = 0;
	}
	if(num2 == null) {
		num2 = 0;
	}
	return num1 - num2;
};
flixel_graphics_frames_FlxFrame.prototype = {
	cacheFrameMatrix: function() {
		var mat = this.matrix;
		mat.identity();
		mat.translate(-this.frame.x,-this.frame.y);
		if(this.angle == 90) {
			mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
			mat.translate(this.frame.height,0);
		} else if(this.angle == -90) {
			mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
			mat.translate(0,this.frame.width);
		}
		mat.translate(this.offset.x,this.offset.y);
		this.blitMatrix[0] = this.matrix.a;
		this.blitMatrix[1] = this.matrix.b;
		this.blitMatrix[2] = this.matrix.c;
		this.blitMatrix[3] = this.matrix.d;
		this.blitMatrix[4] = this.matrix.tx;
		this.blitMatrix[5] = this.matrix.ty;
		if(flixel_FlxG.renderTile) {
			var mat1 = this.matrix;
			mat1.identity();
			if(this.angle == 90) {
				mat1.setTo(-mat1.b,mat1.a,-mat1.d,mat1.c,-mat1.ty,mat1.tx);
				mat1.translate(this.frame.height,0);
			} else if(this.angle == -90) {
				mat1.setTo(mat1.b,-mat1.a,mat1.d,-mat1.c,mat1.ty,-mat1.tx);
				mat1.translate(0,this.frame.width);
			}
			mat1.translate(this.offset.x,this.offset.y);
			this.tileMatrix[0] = this.matrix.a;
			this.tileMatrix[1] = this.matrix.b;
			this.tileMatrix[2] = this.matrix.c;
			this.tileMatrix[3] = this.matrix.d;
			this.tileMatrix[4] = this.matrix.tx;
			this.tileMatrix[5] = this.matrix.ty;
		}
	}
	,prepareBlitMatrix: function(mat,blit) {
		if(blit == null) {
			blit = true;
		}
		mat.identity();
		if(blit) {
			mat.translate(-this.frame.x,-this.frame.y);
		}
		if(this.angle == 90) {
			mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
			mat.translate(this.frame.height,0);
		} else if(this.angle == -90) {
			mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
			mat.translate(0,this.frame.width);
		}
		mat.translate(this.offset.x,this.offset.y);
		return mat;
	}
	,rotateAndFlip: function(mat,rotation,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
			if(rotation == 90) {
				mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
				mat.translate(this.sourceSize.y,0);
			} else if(rotation == -90 || rotation == -90) {
				mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
				mat.translate(0,this.sourceSize.x);
			}
		}
		if(flipX) {
			mat.scale(-1,1);
			mat.translate(w,0);
		}
		if(flipY) {
			mat.scale(1,-1);
			mat.translate(0,h);
		}
		return mat;
	}
	,prepareTransformedBlitMatrix: function(mat,rotation,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		mat.a = this.blitMatrix[0];
		mat.b = this.blitMatrix[1];
		mat.c = this.blitMatrix[2];
		mat.d = this.blitMatrix[3];
		mat.tx = this.blitMatrix[4];
		mat.ty = this.blitMatrix[5];
		mat = mat;
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
			if(rotation == 90) {
				mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
				mat.translate(this.sourceSize.y,0);
			} else if(rotation == -90 || rotation == -90) {
				mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
				mat.translate(0,this.sourceSize.x);
			}
		}
		if(flipX) {
			mat.scale(-1,1);
			mat.translate(w,0);
		}
		if(flipY) {
			mat.scale(1,-1);
			mat.translate(0,h);
		}
		return mat;
	}
	,prepareMatrix: function(mat,rotation,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		if(flixel_FlxG.renderBlit) {
			mat.identity();
			return mat;
		}
		mat.a = this.tileMatrix[0];
		mat.b = this.tileMatrix[1];
		mat.c = this.tileMatrix[2];
		mat.d = this.tileMatrix[3];
		mat.tx = this.tileMatrix[4];
		mat.ty = this.tileMatrix[5];
		var doFlipX = flipX != this.flipX;
		var doFlipY = flipY != this.flipY;
		if(rotation == 0 && !doFlipX && !doFlipY) {
			return mat;
		}
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
			if(rotation == 90) {
				mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
				mat.translate(this.sourceSize.y,0);
			} else if(rotation == -90 || rotation == -90) {
				mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
				mat.translate(0,this.sourceSize.x);
			}
		}
		if(doFlipX) {
			mat.scale(-1,1);
			mat.translate(w,0);
		}
		if(doFlipY) {
			mat.scale(1,-1);
			mat.translate(0,h);
		}
		return mat;
	}
	,fillBlitMatrix: function(mat) {
		mat.a = this.blitMatrix[0];
		mat.b = this.blitMatrix[1];
		mat.c = this.blitMatrix[2];
		mat.d = this.blitMatrix[3];
		mat.tx = this.blitMatrix[4];
		mat.ty = this.blitMatrix[5];
		return mat;
	}
	,paint: function(bmd,point,mergeAlpha,disposeIfNotEqual) {
		if(disposeIfNotEqual == null) {
			disposeIfNotEqual = false;
		}
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(point == null) {
			point = this.point1;
			point.setTo(0,0);
		}
		var bmd1 = bmd;
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(0 != 0) {
			var t = w;
			w = h;
			h = t;
		}
		if(bmd1 != null && disposeIfNotEqual) {
			bmd1 = flixel_util_FlxDestroyUtil.disposeIfNotEqual(bmd1,w,h);
		}
		if(bmd1 != null && !mergeAlpha) {
			this.rect.setTo(point.x,point.y,w,h);
			bmd1.fillRect(this.rect,0);
		} else if(bmd1 == null) {
			bmd1 = new openfl_display_BitmapData(w,h,true,0);
		}
		bmd = bmd1;
		if(this.type == 2) {
			return bmd;
		}
		if(this.angle == 0) {
			var _this = this.offset;
			var FlashPoint = this.point2;
			if(FlashPoint == null) {
				FlashPoint = new openfl_geom_Point();
			}
			FlashPoint.x = _this.x;
			FlashPoint.y = _this.y;
			this.point2.x += point.x;
			this.point2.y += point.y;
			var tmp = this.parent.bitmap;
			var _this1 = this.frame;
			var FlashRect = this.rect;
			if(FlashRect == null) {
				FlashRect = new openfl_geom_Rectangle();
			}
			FlashRect.x = _this1.x;
			FlashRect.y = _this1.y;
			FlashRect.width = _this1.width;
			FlashRect.height = _this1.height;
			bmd.copyPixels(tmp,FlashRect,this.point2,null,null,mergeAlpha);
		} else {
			var mat = this.matrix;
			mat.a = this.blitMatrix[0];
			mat.b = this.blitMatrix[1];
			mat.c = this.blitMatrix[2];
			mat.d = this.blitMatrix[3];
			mat.tx = this.blitMatrix[4];
			mat.ty = this.blitMatrix[5];
			this.matrix.translate(point.x,point.y);
			var mat1 = this.matrix;
			var X = this.frame.x;
			var Y = this.frame.y;
			var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
			point1._inPool = false;
			var point2 = point1;
			point2._weak = true;
			var p1 = point2;
			var _this2 = this.frame;
			var X1 = _this2.x + _this2.width;
			var _this3 = this.frame;
			var Y1 = _this3.y + _this3.height;
			var point3 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
			point3._inPool = false;
			var point4 = point3;
			point4._weak = true;
			var p2 = point4;
			var x1 = p1.x * mat1.a + p1.y * mat1.c + mat1.tx;
			var y1 = p1.x * mat1.b + p1.y * mat1.d + mat1.ty;
			p1.set(x1,y1);
			var x11 = p2.x * mat1.a + p2.y * mat1.c + mat1.tx;
			var y11 = p2.x * mat1.b + p2.y * mat1.d + mat1.ty;
			p2.set(x11,y11);
			var _this4 = flixel_math_FlxRect._pool.get();
			_this4.x = 0;
			_this4.y = 0;
			_this4.width = 0;
			_this4.height = 0;
			var rect = _this4;
			rect._inPool = false;
			var _this5 = rect;
			var minX = Math.min(p1.x,p2.x);
			var minY = Math.min(p1.y,p2.y);
			var maxX = Math.max(p1.x,p2.x);
			var maxY = Math.max(p1.y,p2.y);
			if(p1._weak) {
				p1.put();
			}
			if(p2._weak) {
				p2.put();
			}
			_this5.x = minX;
			_this5.y = minY;
			_this5.width = maxX - minX;
			_this5.height = maxY - minY;
			var flxRect = _this5;
			var FlashRect1 = this.rect;
			if(FlashRect1 == null) {
				FlashRect1 = new openfl_geom_Rectangle();
			}
			FlashRect1.x = flxRect.x;
			FlashRect1.y = flxRect.y;
			FlashRect1.width = flxRect.width;
			FlashRect1.height = flxRect.height;
			if(!flxRect._inPool) {
				flxRect._inPool = true;
				flxRect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(flxRect);
			}
			var rect1 = this.rect;
			bmd.draw(this.parent.bitmap,this.matrix,null,null,rect1);
		}
		return bmd;
	}
	,paintRotatedAndFlipped: function(bmd,point,rotation,flipX,flipY,mergeAlpha,disposeIfNotEqual) {
		if(disposeIfNotEqual == null) {
			disposeIfNotEqual = false;
		}
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		if(this.type == 2 && rotation == 0) {
			return this.paint(bmd,point,mergeAlpha,disposeIfNotEqual);
		}
		if(point == null) {
			point = this.point2;
			point.setTo(0,0);
		}
		var bmd1 = bmd;
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
		}
		if(bmd1 != null && disposeIfNotEqual) {
			bmd1 = flixel_util_FlxDestroyUtil.disposeIfNotEqual(bmd1,w,h);
		}
		if(bmd1 != null && !mergeAlpha) {
			this.rect.setTo(point.x,point.y,w,h);
			bmd1.fillRect(this.rect,0);
		} else if(bmd1 == null) {
			bmd1 = new openfl_display_BitmapData(w,h,true,0);
		}
		bmd = bmd1;
		if(this.type == 2) {
			return bmd;
		}
		var doFlipX = flipX != this.flipX;
		var doFlipY = flipY != this.flipY;
		this.prepareTransformedBlitMatrix(this.matrix,rotation,doFlipX,doFlipY);
		this.matrix.translate(point.x,point.y);
		var mat = this.matrix;
		var X = this.frame.x;
		var Y = this.frame.y;
		var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
		point1._inPool = false;
		var point2 = point1;
		point2._weak = true;
		var p1 = point2;
		var _this = this.frame;
		var X1 = _this.x + _this.width;
		var _this1 = this.frame;
		var Y1 = _this1.y + _this1.height;
		var point3 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point3._inPool = false;
		var point4 = point3;
		point4._weak = true;
		var p2 = point4;
		var x1 = p1.x * mat.a + p1.y * mat.c + mat.tx;
		var y1 = p1.x * mat.b + p1.y * mat.d + mat.ty;
		p1.set(x1,y1);
		var x11 = p2.x * mat.a + p2.y * mat.c + mat.tx;
		var y11 = p2.x * mat.b + p2.y * mat.d + mat.ty;
		p2.set(x11,y11);
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		var rect = _this2;
		rect._inPool = false;
		var _this3 = rect;
		var minX = Math.min(p1.x,p2.x);
		var minY = Math.min(p1.y,p2.y);
		var maxX = Math.max(p1.x,p2.x);
		var maxY = Math.max(p1.y,p2.y);
		if(p1._weak) {
			p1.put();
		}
		if(p2._weak) {
			p2.put();
		}
		_this3.x = minX;
		_this3.y = minY;
		_this3.width = maxX - minX;
		_this3.height = maxY - minY;
		var flxRect = _this3;
		var FlashRect = this.rect;
		if(FlashRect == null) {
			FlashRect = new openfl_geom_Rectangle();
		}
		FlashRect.x = flxRect.x;
		FlashRect.y = flxRect.y;
		FlashRect.width = flxRect.width;
		FlashRect.height = flxRect.height;
		if(!flxRect._inPool) {
			flxRect._inPool = true;
			flxRect._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(flxRect);
		}
		var rect1 = this.rect;
		bmd.draw(this.parent.bitmap,this.matrix,null,null,rect1);
		return bmd;
	}
	,checkInputBitmap: function(bmd,point,rotation,mergeAlpha,disposeIfNotEqual) {
		if(disposeIfNotEqual == null) {
			disposeIfNotEqual = false;
		}
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
		}
		if(bmd != null && disposeIfNotEqual) {
			bmd = flixel_util_FlxDestroyUtil.disposeIfNotEqual(bmd,w,h);
		}
		if(bmd != null && !mergeAlpha) {
			this.rect.setTo(point.x,point.y,w,h);
			bmd.fillRect(this.rect,0);
		} else if(bmd == null) {
			bmd = new openfl_display_BitmapData(w,h,true,0);
		}
		return bmd;
	}
	,getDrawFrameRect: function(mat) {
		var X = this.frame.x;
		var Y = this.frame.y;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		var point1 = point;
		point1._weak = true;
		var p1 = point1;
		var _this = this.frame;
		var X1 = _this.x + _this.width;
		var _this1 = this.frame;
		var Y1 = _this1.y + _this1.height;
		var point2 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point2._inPool = false;
		var point3 = point2;
		point3._weak = true;
		var p2 = point3;
		var x1 = p1.x * mat.a + p1.y * mat.c + mat.tx;
		var y1 = p1.x * mat.b + p1.y * mat.d + mat.ty;
		p1.set(x1,y1);
		var x11 = p2.x * mat.a + p2.y * mat.c + mat.tx;
		var y11 = p2.x * mat.b + p2.y * mat.d + mat.ty;
		p2.set(x11,y11);
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		var rect = _this2;
		rect._inPool = false;
		var _this3 = rect;
		var minX = Math.min(p1.x,p2.x);
		var minY = Math.min(p1.y,p2.y);
		var maxX = Math.max(p1.x,p2.x);
		var maxY = Math.max(p1.y,p2.y);
		if(p1._weak) {
			p1.put();
		}
		if(p2._weak) {
			p2.put();
		}
		_this3.x = minX;
		_this3.y = minY;
		_this3.width = maxX - minX;
		_this3.height = maxY - minY;
		var flxRect = _this3;
		var FlashRect = this.rect;
		if(FlashRect == null) {
			FlashRect = new openfl_geom_Rectangle();
		}
		FlashRect.x = flxRect.x;
		FlashRect.y = flxRect.y;
		FlashRect.width = flxRect.width;
		FlashRect.height = flxRect.height;
		if(!flxRect._inPool) {
			flxRect._inPool = true;
			flxRect._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(flxRect);
		}
		return this.rect;
	}
	,subFrameTo: function(rect,frameToFill) {
		if(frameToFill == null) {
			frameToFill = new flixel_graphics_frames_FlxFrame(this.parent,this.angle);
		} else {
			frameToFill.parent = this.parent;
			frameToFill.angle = this.angle;
			frameToFill.set_frame(flixel_util_FlxDestroyUtil.put(frameToFill.frame));
		}
		frameToFill.sourceSize.set(rect.width,rect.height);
		if(this.type == 2) {
			frameToFill.type = 2;
			frameToFill.offset.set(0,0);
			return frameToFill;
		}
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		var rect1 = _this;
		rect1._inPool = false;
		var _this1 = rect1;
		_this1.width = this.frame.width;
		_this1.height = this.frame.height;
		var clippedRect = _this1;
		if(this.angle != 0) {
			clippedRect.width = this.frame.height;
			clippedRect.height = this.frame.width;
		}
		var ox = Math.max(this.offset.x,0);
		var oy = Math.max(this.offset.y,0);
		rect.x += -ox;
		rect.y += -oy;
		var frameRect = clippedRect.intersection(rect);
		clippedRect = flixel_util_FlxDestroyUtil.put(clippedRect);
		rect.x += ox;
		rect.y += oy;
		if(frameRect.width == 0 || frameRect.height == 0) {
			frameToFill.type = 2;
			frameRect.x = 0;
			frameRect.y = 0;
			frameRect.width = 0;
			frameRect.height = 0;
			frameToFill.set_frame(frameRect);
			frameToFill.offset.set(0,0);
		} else {
			frameToFill.type = 0;
			var _this2 = frameToFill.offset.set(frameRect.x,frameRect.y);
			var Y = rect.y;
			var _g = _this2;
			_g.set_x(_g.x - rect.x);
			var _g1 = _this2;
			_g1.set_y(_g1.y - Y);
			_this2.addPoint(this.offset);
			var X = frameRect.x;
			var Y1 = frameRect.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y1);
			point._inPool = false;
			var point1 = point;
			point1._weak = true;
			var p1 = point1;
			var X1 = frameRect.x + frameRect.width;
			var Y2 = frameRect.y + frameRect.height;
			var point2 = flixel_math_FlxPoint._pool.get().set(X1,Y2);
			point2._inPool = false;
			var point3 = point2;
			point3._weak = true;
			var p2 = point3;
			this.matrix.identity();
			if(this.angle == -90) {
				var _this3 = this.matrix;
				_this3.setTo(-_this3.b,_this3.a,-_this3.d,_this3.c,-_this3.ty,_this3.tx);
				this.matrix.translate(this.frame.width,0);
			} else if(this.angle == 90) {
				var _this4 = this.matrix;
				_this4.setTo(_this4.b,-_this4.a,_this4.d,-_this4.c,_this4.ty,-_this4.tx);
				this.matrix.translate(0,this.frame.height);
			}
			if(this.angle != 0) {
				var matrix = this.matrix;
				var x1 = p1.x * matrix.a + p1.y * matrix.c + matrix.tx;
				var y1 = p1.x * matrix.b + p1.y * matrix.d + matrix.ty;
				p1.set(x1,y1);
				var matrix1 = this.matrix;
				var x11 = p2.x * matrix1.a + p2.y * matrix1.c + matrix1.tx;
				var y11 = p2.x * matrix1.b + p2.y * matrix1.d + matrix1.ty;
				p2.set(x11,y11);
			}
			var minX = Math.min(p1.x,p2.x);
			var minY = Math.min(p1.y,p2.y);
			var maxX = Math.max(p1.x,p2.x);
			var maxY = Math.max(p1.y,p2.y);
			if(p1._weak) {
				p1.put();
			}
			if(p2._weak) {
				p2.put();
			}
			frameRect.x = minX;
			frameRect.y = minY;
			frameRect.width = maxX - minX;
			frameRect.height = maxY - minY;
			frameRect.x += this.frame.x;
			frameRect.y += this.frame.y;
			frameToFill.set_frame(frameRect);
			frameToFill.cacheFrameMatrix();
		}
		return frameToFill;
	}
	,setBorderTo: function(border,frameToFill) {
		var X = border.x;
		var Y = border.y;
		var Width = this.sourceSize.x - 2 * border.x;
		var Height = this.sourceSize.y - 2 * border.y;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		var rect1 = rect;
		frameToFill = this.subFrameTo(rect1,frameToFill);
		frameToFill.name = this.name;
		rect1 = flixel_util_FlxDestroyUtil.put(rect1);
		return frameToFill;
	}
	,clipTo: function(clip,clippedFrame) {
		if(clippedFrame == null) {
			clippedFrame = new flixel_graphics_frames_FlxFrame(this.parent,this.angle);
		} else {
			clippedFrame.parent = this.parent;
			clippedFrame.angle = this.angle;
			clippedFrame.set_frame(flixel_util_FlxDestroyUtil.put(clippedFrame.frame));
		}
		var _this = clippedFrame.sourceSize;
		var point = this.sourceSize;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		clippedFrame.name = this.name;
		if(this.type == 2) {
			clippedFrame.type = 2;
			clippedFrame.offset.set(0,0);
			return clippedFrame;
		}
		var _this1 = flixel_math_FlxRect._pool.get();
		_this1.x = 0;
		_this1.y = 0;
		_this1.width = 0;
		_this1.height = 0;
		var rect = _this1;
		rect._inPool = false;
		var _this2 = rect;
		_this2.width = this.frame.width;
		_this2.height = this.frame.height;
		var clippedRect = _this2;
		if(this.angle != 0) {
			clippedRect.width = this.frame.height;
			clippedRect.height = this.frame.width;
		}
		clip.x += -this.offset.x;
		clip.y += -this.offset.y;
		var frameRect = clippedRect.intersection(clip);
		clippedRect = flixel_util_FlxDestroyUtil.put(clippedRect);
		if(frameRect.width == 0 || frameRect.height == 0) {
			clippedFrame.type = 2;
			frameRect.x = 0;
			frameRect.y = 0;
			frameRect.width = 0;
			frameRect.height = 0;
			clippedFrame.set_frame(frameRect);
			clippedFrame.offset.set(0,0);
		} else {
			clippedFrame.type = 0;
			clippedFrame.offset.set(frameRect.x,frameRect.y).addPoint(this.offset);
			var X = frameRect.x;
			var Y = frameRect.y;
			var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
			point1._inPool = false;
			var point2 = point1;
			point2._weak = true;
			var p1 = point2;
			var X1 = frameRect.x + frameRect.width;
			var Y1 = frameRect.y + frameRect.height;
			var point3 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
			point3._inPool = false;
			var point4 = point3;
			point4._weak = true;
			var p2 = point4;
			this.matrix.identity();
			if(this.angle == -90) {
				var _this3 = this.matrix;
				_this3.setTo(-_this3.b,_this3.a,-_this3.d,_this3.c,-_this3.ty,_this3.tx);
				this.matrix.translate(this.frame.width,0);
			} else if(this.angle == 90) {
				var _this4 = this.matrix;
				_this4.setTo(_this4.b,-_this4.a,_this4.d,-_this4.c,_this4.ty,-_this4.tx);
				this.matrix.translate(0,this.frame.height);
			}
			if(this.angle != 0) {
				var matrix = this.matrix;
				var x1 = p1.x * matrix.a + p1.y * matrix.c + matrix.tx;
				var y1 = p1.x * matrix.b + p1.y * matrix.d + matrix.ty;
				p1.set(x1,y1);
				var matrix1 = this.matrix;
				var x11 = p2.x * matrix1.a + p2.y * matrix1.c + matrix1.tx;
				var y11 = p2.x * matrix1.b + p2.y * matrix1.d + matrix1.ty;
				p2.set(x11,y11);
			}
			var minX = Math.min(p1.x,p2.x);
			var minY = Math.min(p1.y,p2.y);
			var maxX = Math.max(p1.x,p2.x);
			var maxY = Math.max(p1.y,p2.y);
			if(p1._weak) {
				p1.put();
			}
			if(p2._weak) {
				p2.put();
			}
			frameRect.x = minX;
			frameRect.y = minY;
			frameRect.width = maxX - minX;
			frameRect.height = maxY - minY;
			frameRect.x += this.frame.x;
			frameRect.y += this.frame.y;
			clippedFrame.set_frame(frameRect);
			clippedFrame.cacheFrameMatrix();
		}
		clip.x += this.offset.x;
		clip.y += this.offset.y;
		return clippedFrame;
	}
	,copyTo: function(clone) {
		if(clone == null) {
			clone = new flixel_graphics_frames_FlxFrame(this.parent,this.angle);
		} else {
			clone.parent = this.parent;
			clone.angle = this.angle;
			clone.set_frame(flixel_util_FlxDestroyUtil.put(clone.frame));
		}
		var _this = clone.offset;
		var point = this.offset;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		clone.flipX = this.flipX;
		clone.flipY = this.flipY;
		var _this1 = clone.sourceSize;
		var point1 = this.sourceSize;
		_this1.set_x(point1.x);
		_this1.set_y(point1.y);
		if(point1._weak) {
			point1.put();
		}
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		var rect = _this2;
		rect._inPool = false;
		var _this3 = rect;
		var Rect = this.frame;
		_this3.x = Rect.x;
		_this3.y = Rect.y;
		_this3.width = Rect.width;
		_this3.height = Rect.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		clone.set_frame(_this3);
		clone.type = this.type;
		clone.name = this.name;
		clone.cacheFrameMatrix();
		return clone;
	}
	,destroy: function() {
		this.name = null;
		this.parent = null;
		this.sourceSize = flixel_util_FlxDestroyUtil.put(this.sourceSize);
		this.offset = flixel_util_FlxDestroyUtil.put(this.offset);
		this.set_frame(flixel_util_FlxDestroyUtil.put(this.frame));
		this.uv = flixel_util_FlxDestroyUtil.put(this.uv);
		this.blitMatrix = null;
		this.tileMatrix = null;
	}
	,toString: function() {
		var value = this.name;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "name";
		_this.value = value;
		return flixel_util_FlxStringUtil.getDebugString([_this]);
	}
	,set_frame: function(value) {
		if(value != null) {
			if(this.uv == null) {
				var _this = flixel_math_FlxRect._pool.get();
				_this.x = 0;
				_this.y = 0;
				_this.width = 0;
				_this.height = 0;
				var rect = _this;
				rect._inPool = false;
				this.uv = rect;
			}
			var _this1 = this.uv;
			var Width = (value.x + value.width) / this.parent.width;
			var Height = (value.y + value.height) / this.parent.height;
			_this1.x = value.x / this.parent.width;
			_this1.y = value.y / this.parent.height;
			_this1.width = Width;
			_this1.height = Height;
		}
		return this.frame = value;
	}
	,__class__: flixel_graphics_frames_FlxFrame
	,__properties__: {set_frame:"set_frame"}
};
var flixel_graphics_frames_FlxFrameCollectionType = $hxClasses["flixel.graphics.frames.FlxFrameCollectionType"] = { __ename__ : ["flixel","graphics","frames","FlxFrameCollectionType"], __constructs__ : ["IMAGE","TILES","ATLAS","FONT","USER","FILTER"] };
flixel_graphics_frames_FlxFrameCollectionType.IMAGE = ["IMAGE",0];
flixel_graphics_frames_FlxFrameCollectionType.IMAGE.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.IMAGE.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.TILES = ["TILES",1];
flixel_graphics_frames_FlxFrameCollectionType.TILES.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.TILES.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.ATLAS = ["ATLAS",2];
flixel_graphics_frames_FlxFrameCollectionType.ATLAS.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.ATLAS.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.FONT = ["FONT",3];
flixel_graphics_frames_FlxFrameCollectionType.FONT.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.FONT.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.USER = function(type) { var $x = ["USER",4,type]; $x.__enum__ = flixel_graphics_frames_FlxFrameCollectionType; $x.toString = $estr; return $x; };
flixel_graphics_frames_FlxFrameCollectionType.FILTER = ["FILTER",5];
flixel_graphics_frames_FlxFrameCollectionType.FILTER.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.FILTER.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
var flixel_graphics_frames_FlxImageFrame = function(parent,border) {
	flixel_graphics_frames_FlxFramesCollection.call(this,parent,flixel_graphics_frames_FlxFrameCollectionType.IMAGE,border);
};
$hxClasses["flixel.graphics.frames.FlxImageFrame"] = flixel_graphics_frames_FlxImageFrame;
flixel_graphics_frames_FlxImageFrame.__name__ = ["flixel","graphics","frames","FlxImageFrame"];
flixel_graphics_frames_FlxImageFrame.fromEmptyFrame = function(graphic,frameRect) {
	if(graphic == null || frameRect == null) {
		return null;
	}
	var imageFrame = flixel_graphics_frames_FlxImageFrame.findEmptyFrame(graphic,frameRect);
	if(imageFrame != null) {
		return imageFrame;
	}
	imageFrame = new flixel_graphics_frames_FlxImageFrame(graphic);
	imageFrame.addEmptyFrame(frameRect);
	return imageFrame;
};
flixel_graphics_frames_FlxImageFrame.fromFrame = function(source) {
	var graphic = source.parent;
	var rect = source.frame;
	var imageFrame = flixel_graphics_frames_FlxImageFrame.findFrame(graphic,rect);
	if(imageFrame != null) {
		return imageFrame;
	}
	imageFrame = new flixel_graphics_frames_FlxImageFrame(graphic);
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect1 = _this;
	rect1._inPool = false;
	var Rect = rect1;
	Rect.x = rect.x;
	Rect.y = rect.y;
	Rect.width = rect.width;
	Rect.height = rect.height;
	if(Rect._weak) {
		if(!Rect._inPool) {
			Rect._inPool = true;
			Rect._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(Rect);
		}
	}
	imageFrame.addSpriteSheetFrame(Rect);
	return imageFrame;
};
flixel_graphics_frames_FlxImageFrame.fromImage = function(source) {
	return flixel_graphics_frames_FlxImageFrame.fromRectangle(source,null);
};
flixel_graphics_frames_FlxImageFrame.fromGraphic = function(graphic,region) {
	if(graphic == null) {
		return null;
	}
	var checkRegion = region;
	if(checkRegion == null) {
		var Width = graphic.width;
		var Height = graphic.height;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		var rect1 = rect;
		rect1._weak = true;
		checkRegion = rect1;
	}
	var imageFrame = flixel_graphics_frames_FlxImageFrame.findFrame(graphic,checkRegion);
	if(imageFrame != null) {
		return imageFrame;
	}
	imageFrame = new flixel_graphics_frames_FlxImageFrame(graphic);
	if(region == null) {
		var Width1 = graphic.width;
		var Height1 = graphic.height;
		var _this1 = flixel_math_FlxRect._pool.get();
		_this1.x = 0;
		_this1.y = 0;
		_this1.width = Width1;
		_this1.height = Height1;
		var rect2 = _this1;
		rect2._inPool = false;
		region = rect2;
	} else {
		if(region.width == 0) {
			region.width = graphic.width - region.x;
		}
		if(region.height == 0) {
			region.height = graphic.height - region.y;
		}
	}
	imageFrame.addSpriteSheetFrame(region);
	return imageFrame;
};
flixel_graphics_frames_FlxImageFrame.fromRectangle = function(source,region) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	return flixel_graphics_frames_FlxImageFrame.fromGraphic(graphic,region);
};
flixel_graphics_frames_FlxImageFrame.fromBitmapAddSpacesAndBorders = function(source,border,region) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	if(graphic == null) {
		return null;
	}
	var key = flixel_FlxG.bitmap.getKeyWithSpacesAndBorders(graphic.key,null,null,border,region);
	var result = flixel_FlxG.bitmap._cache.get(key);
	if(result == null) {
		var bitmap = flixel_util_FlxBitmapDataUtil.addSpacesAndBorders(graphic.bitmap,null,null,border,region);
		result = flixel_FlxG.bitmap.add(bitmap,false,key);
	}
	var imageFrame = flixel_graphics_frames_FlxImageFrame.fromGraphic(graphic);
	return imageFrame.addBorder(border);
};
flixel_graphics_frames_FlxImageFrame.fromFrameAddSpacesAndBorders = function(frame,border) {
	var bitmap = frame.paint();
	return flixel_graphics_frames_FlxImageFrame.fromBitmapAddSpacesAndBorders(bitmap,border);
};
flixel_graphics_frames_FlxImageFrame.findFrame = function(graphic,frameRect,frameBorder) {
	if(frameBorder == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = point;
		point1._weak = true;
		frameBorder = point1;
	}
	var type = flixel_graphics_frames_FlxFrameCollectionType.IMAGE;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var imageFrames = collections;
	var _g = 0;
	while(_g < imageFrames.length) {
		var imageFrame = imageFrames[_g];
		++_g;
		var tmp;
		var tmp1;
		var rect = imageFrame.get_frame().frame;
		var result = Math.abs(frameRect.x - rect.x) <= 0.0000001 && Math.abs(frameRect.y - rect.y) <= 0.0000001 && Math.abs(frameRect.width - rect.width) <= 0.0000001 && Math.abs(frameRect.height - rect.height) <= 0.0000001;
		if(rect._weak) {
			if(!rect._inPool) {
				rect._inPool = true;
				rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect);
			}
		}
		if(result) {
			var point2 = imageFrame.border;
			var result1 = Math.abs(frameBorder.x - point2.x) <= 0.0000001 && Math.abs(frameBorder.y - point2.y) <= 0.0000001;
			if(point2._weak) {
				point2.put();
			}
			tmp1 = result1;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = imageFrame.get_frame().type != 2;
		} else {
			tmp = false;
		}
		if(tmp) {
			return imageFrame;
		}
	}
	return null;
};
flixel_graphics_frames_FlxImageFrame.findEmptyFrame = function(graphic,frameRect) {
	var type = flixel_graphics_frames_FlxFrameCollectionType.IMAGE;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var imageFrames = collections;
	var _g = 0;
	while(_g < imageFrames.length) {
		var imageFrame = imageFrames[_g];
		++_g;
		var frame = imageFrame.get_frame();
		if(frame.sourceSize.x == frameRect.width && frame.sourceSize.y == frameRect.height && frame.type == 2) {
			return imageFrame;
		}
	}
	return null;
};
flixel_graphics_frames_FlxImageFrame.__super__ = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxImageFrame.prototype = $extend(flixel_graphics_frames_FlxFramesCollection.prototype,{
	equals: function(rect,border) {
		var rect1 = this.get_frame().frame;
		var result = Math.abs(rect.x - rect1.x) <= 0.0000001 && Math.abs(rect.y - rect1.y) <= 0.0000001 && Math.abs(rect.width - rect1.width) <= 0.0000001 && Math.abs(rect.height - rect1.height) <= 0.0000001;
		if(rect1._weak) {
			if(!rect1._inPool) {
				rect1._inPool = true;
				rect1._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect1);
			}
		}
		if(result) {
			var point = this.border;
			var result1 = Math.abs(border.x - point.x) <= 0.0000001 && Math.abs(border.y - point.y) <= 0.0000001;
			if(point._weak) {
				point.put();
			}
			return result1;
		} else {
			return false;
		}
	}
	,addBorder: function(border) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = point;
		point1._weak = true;
		var resultBorder = point1.addPoint(this.border).addPoint(border);
		var imageFrame = flixel_graphics_frames_FlxImageFrame.findFrame(this.parent,this.get_frame().frame,resultBorder);
		if(imageFrame != null) {
			return imageFrame;
		}
		imageFrame = new flixel_graphics_frames_FlxImageFrame(this.parent,resultBorder);
		imageFrame.pushFrame(this.get_frame().setBorderTo(border));
		return imageFrame;
	}
	,destroy: function() {
		flixel_graphics_frames_FlxFramesCollection.prototype.destroy.call(this);
		this.frame = flixel_util_FlxDestroyUtil.destroy(this.get_frame());
	}
	,get_frame: function() {
		return this.frames[0];
	}
	,__class__: flixel_graphics_frames_FlxImageFrame
	,__properties__: $extend(flixel_graphics_frames_FlxFramesCollection.prototype.__properties__,{get_frame:"get_frame"})
});
var flixel_graphics_frames_FlxTileFrames = function(parent,border) {
	this.numCols = 0;
	this.numRows = 0;
	flixel_graphics_frames_FlxFramesCollection.call(this,parent,flixel_graphics_frames_FlxFrameCollectionType.TILES,border);
};
$hxClasses["flixel.graphics.frames.FlxTileFrames"] = flixel_graphics_frames_FlxTileFrames;
flixel_graphics_frames_FlxTileFrames.__name__ = ["flixel","graphics","frames","FlxTileFrames"];
flixel_graphics_frames_FlxTileFrames.fromBitmapAddSpacesAndBorders = function(source,tileSize,tileSpacing,tileBorder,region) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	if(graphic == null) {
		return null;
	}
	var key = flixel_FlxG.bitmap.getKeyWithSpacesAndBorders(graphic.key,tileSize,tileSpacing,tileBorder,region);
	var result = flixel_FlxG.bitmap._cache.get(key);
	if(result == null) {
		var bitmap = flixel_util_FlxBitmapDataUtil.addSpacesAndBorders(graphic.bitmap,tileSize,tileSpacing,tileBorder,region);
		result = flixel_FlxG.bitmap.add(bitmap,false,key);
	}
	var borderX = 0;
	var borderY = 0;
	if(tileBorder != null) {
		borderX = tileBorder.x | 0;
		borderY = tileBorder.y | 0;
	}
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	var _this = point.addPoint(tileSize);
	var _g = _this;
	_g.set_x(_g.x + 2 * borderX);
	var _g1 = _this;
	_g1.set_y(_g1.y + 2 * borderY);
	var tileFrames = flixel_graphics_frames_FlxTileFrames.fromGraphic(result,_this,null,tileSpacing);
	if(tileBorder == null) {
		return tileFrames;
	}
	return tileFrames.addBorder(tileBorder);
};
flixel_graphics_frames_FlxTileFrames.fromFrameAddSpacesAndBorders = function(frame,tileSize,tileSpacing,tileBorder) {
	var bitmap = frame.paint();
	return flixel_graphics_frames_FlxTileFrames.fromBitmapAddSpacesAndBorders(bitmap,tileSize,tileSpacing,tileBorder);
};
flixel_graphics_frames_FlxTileFrames.fromFrame = function(frame,tileSize,tileSpacing) {
	var graphic = frame.parent;
	var tileFrames = flixel_graphics_frames_FlxTileFrames.findFrame(graphic,tileSize,null,frame,tileSpacing);
	if(tileFrames != null) {
		return tileFrames;
	}
	if(tileSpacing != null) {
		tileSpacing = tileSpacing;
	} else {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		tileSpacing = point;
	}
	tileFrames = new flixel_graphics_frames_FlxTileFrames(graphic);
	tileFrames.atlasFrame = frame;
	tileFrames.region = frame.frame;
	tileFrames.tileSize = tileSize;
	tileFrames.tileSpacing = tileSpacing;
	tileSpacing.set_x(Math.floor(tileSpacing.x));
	tileSpacing.set_y(Math.floor(tileSpacing.y));
	tileSize.set_x(Math.floor(tileSize.x));
	tileSize.set_y(Math.floor(tileSize.y));
	var spacedWidth = tileSize.x + tileSpacing.x;
	var spacedHeight = tileSize.y + tileSpacing.y;
	var numRows = tileSize.y == 0 ? 1 : (frame.sourceSize.y + tileSpacing.y) / spacedHeight | 0;
	var numCols = tileSize.x == 0 ? 1 : (frame.sourceSize.x + tileSpacing.x) / spacedWidth | 0;
	var Width = tileSize.x;
	var Height = tileSize.y;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = Width;
	_this.height = Height;
	var rect = _this;
	rect._inPool = false;
	var helperRect = rect;
	var _g1 = 0;
	var _g = numRows;
	while(_g1 < _g) {
		var j = _g1++;
		var _g3 = 0;
		var _g2 = numCols;
		while(_g3 < _g2) {
			var i = _g3++;
			helperRect.x = spacedWidth * i;
			helperRect.y = spacedHeight * j;
			tileFrames.pushFrame(frame.subFrameTo(helperRect));
		}
	}
	helperRect = flixel_util_FlxDestroyUtil.put(helperRect);
	tileFrames.numCols = numCols;
	tileFrames.numRows = numRows;
	return tileFrames;
};
flixel_graphics_frames_FlxTileFrames.fromFrames = function(Frames) {
	var firstFrame = Frames[0];
	var graphic = firstFrame.parent;
	var _g = 0;
	while(_g < Frames.length) {
		var frame = Frames[_g];
		++_g;
		var tmp;
		if(frame.parent == firstFrame.parent) {
			var _this = frame.sourceSize;
			var point = firstFrame.sourceSize;
			var result = Math.abs(_this.x - point.x) <= 0.0000001 && Math.abs(_this.y - point.y) <= 0.0000001;
			if(point._weak) {
				point.put();
			}
			tmp = !result;
		} else {
			tmp = true;
		}
		if(tmp) {
			return null;
		}
	}
	var tileFrames = new flixel_graphics_frames_FlxTileFrames(graphic);
	tileFrames.region = null;
	tileFrames.atlasFrame = null;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	var _this1 = point1;
	var point2 = firstFrame.sourceSize;
	_this1.set_x(point2.x);
	_this1.set_y(point2.y);
	if(point2._weak) {
		point2.put();
	}
	tileFrames.tileSize = _this1;
	var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
	point3._inPool = false;
	tileFrames.tileSpacing = point3;
	tileFrames.numCols = Frames.length;
	tileFrames.numRows = 1;
	var _g1 = 0;
	while(_g1 < Frames.length) {
		var frame1 = Frames[_g1];
		++_g1;
		tileFrames.frames.push(frame1);
		if(frame1.name != null) {
			var key = frame1.name;
			var _this2 = tileFrames.framesHash;
			if(__map_reserved[key] != null) {
				_this2.setReserved(key,frame1);
			} else {
				_this2.h[key] = frame1;
			}
		}
	}
	return tileFrames;
};
flixel_graphics_frames_FlxTileFrames.fromAtlasByPrefix = function(Frames,Prefix) {
	var framesToAdd = [];
	var _g = 0;
	var _g1 = Frames.frames;
	while(_g < _g1.length) {
		var frame = _g1[_g];
		++_g;
		if(StringTools.startsWith(frame.name,Prefix)) {
			framesToAdd.push(frame);
		}
	}
	if(framesToAdd.length > 0) {
		var name = framesToAdd[0].name;
		var postIndex = name.indexOf(".",Prefix.length);
		var postFix = name.substring(postIndex == -1 ? name.length : postIndex,name.length);
		flixel_graphics_frames_FlxFrame.sort(framesToAdd,Prefix.length,postFix.length);
		return flixel_graphics_frames_FlxTileFrames.fromFrames(framesToAdd);
	}
	return null;
};
flixel_graphics_frames_FlxTileFrames.fromGraphic = function(graphic,tileSize,region,tileSpacing) {
	var tileFrames = flixel_graphics_frames_FlxTileFrames.findFrame(graphic,tileSize,region,null,tileSpacing);
	if(tileFrames != null) {
		return tileFrames;
	}
	if(region == null) {
		var Width = graphic.width;
		var Height = graphic.height;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		region = rect;
	} else {
		if(region.width == 0) {
			region.width = graphic.width - region.x;
		}
		if(region.height == 0) {
			region.height = graphic.height - region.y;
		}
	}
	if(tileSpacing != null) {
		tileSpacing = tileSpacing;
	} else {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		tileSpacing = point;
	}
	tileFrames = new flixel_graphics_frames_FlxTileFrames(graphic);
	tileFrames.region = region;
	tileFrames.atlasFrame = null;
	tileFrames.tileSize = tileSize;
	tileFrames.tileSpacing = tileSpacing;
	region.x = Math.floor(region.x);
	region.y = Math.floor(region.y);
	region.width = Math.floor(region.width);
	region.height = Math.floor(region.height);
	tileSpacing.set_x(Math.floor(tileSpacing.x));
	tileSpacing.set_y(Math.floor(tileSpacing.y));
	tileSize.set_x(Math.floor(tileSize.x));
	tileSize.set_y(Math.floor(tileSize.y));
	var spacedWidth = tileSize.x + tileSpacing.x;
	var spacedHeight = tileSize.y + tileSpacing.y;
	var numRows = tileSize.y == 0 ? 1 : (region.height + tileSpacing.y) / spacedHeight | 0;
	var numCols = tileSize.x == 0 ? 1 : (region.width + tileSpacing.x) / spacedWidth | 0;
	var tileRect;
	var _g1 = 0;
	var _g = numRows;
	while(_g1 < _g) {
		var j = _g1++;
		var _g3 = 0;
		var _g2 = numCols;
		while(_g3 < _g2) {
			var i = _g3++;
			var X = region.x + i * spacedWidth;
			var Y = region.y + j * spacedHeight;
			var Width1 = tileSize.x;
			var Height1 = tileSize.y;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X;
			_this1.y = Y;
			_this1.width = Width1;
			_this1.height = Height1;
			var rect1 = _this1;
			rect1._inPool = false;
			tileRect = rect1;
			tileFrames.addSpriteSheetFrame(tileRect);
		}
	}
	tileFrames.numCols = numCols;
	tileFrames.numRows = numRows;
	return tileFrames;
};
flixel_graphics_frames_FlxTileFrames.fromRectangle = function(source,tileSize,region,tileSpacing) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	if(graphic == null) {
		return null;
	}
	return flixel_graphics_frames_FlxTileFrames.fromGraphic(graphic,tileSize,region,tileSpacing);
};
flixel_graphics_frames_FlxTileFrames.combineTileSets = function(bitmaps,tileSize,spacing,border) {
	var framesCollections = [];
	var _g = 0;
	while(_g < bitmaps.length) {
		var bitmap = bitmaps[_g];
		++_g;
		framesCollections.push(flixel_graphics_frames_FlxTileFrames.fromRectangle(bitmap,tileSize));
	}
	return flixel_graphics_frames_FlxTileFrames.combineTileFrames(framesCollections,spacing,border);
};
flixel_graphics_frames_FlxTileFrames.combineTileFrames = function(tileframes,spacing,border) {
	var totalArea = 0;
	var rows = 0;
	var cols = 0;
	var tileWidth = tileframes[0].frames[0].sourceSize.x | 0;
	var tileHeight = tileframes[0].frames[0].sourceSize.y | 0;
	var spaceX = 0;
	var spaceY = 0;
	if(spacing != null) {
		spaceX = spacing.x | 0;
		spaceY = spacing.y | 0;
	}
	var borderX = 0;
	var borderY = 0;
	if(border != null) {
		borderX = border.x | 0;
		borderY = border.y | 0;
	}
	var _g = 0;
	while(_g < tileframes.length) {
		var collection = tileframes[_g];
		++_g;
		cols = collection.numCols;
		rows = collection.numRows;
		totalArea += cols * (tileWidth + 2 * borderX) * rows * (tileHeight + 2 * borderY) | 0;
	}
	var side = Math.sqrt(totalArea);
	cols = side / (tileWidth + 2 * borderX) | 0;
	rows = Math.ceil(totalArea / (cols * (tileWidth + 2 * borderX) * (tileHeight + 2 * borderY)));
	var width = (cols * (tileWidth + 2 * borderX) | 0) + (cols - 1) * spaceX;
	var height = (rows * (tileHeight + 2 * borderY) | 0) + (rows - 1) * spaceY;
	var combined = new openfl_display_BitmapData(width,height,true,0);
	var graphic = flixel_FlxG.bitmap.add(combined);
	var result = new flixel_graphics_frames_FlxTileFrames(graphic);
	var destPoint = new openfl_geom_Point(borderX,borderY);
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = width;
	_this.height = height;
	var rect = _this;
	rect._inPool = false;
	result.region = rect;
	result.atlasFrame = null;
	var point = flixel_math_FlxPoint._pool.get().set(tileWidth,tileHeight);
	point._inPool = false;
	result.tileSize = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(spaceX,spaceY);
	point1._inPool = false;
	result.tileSpacing = point1;
	result.numCols = cols;
	result.numRows = rows;
	var _g1 = 0;
	while(_g1 < tileframes.length) {
		var collection1 = tileframes[_g1];
		++_g1;
		var _g11 = 0;
		var _g2 = collection1.frames;
		while(_g11 < _g2.length) {
			var frame = _g2[_g11];
			++_g11;
			frame.paint(combined,destPoint,true);
			var X = destPoint.x;
			var Y = destPoint.y;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X;
			_this1.y = Y;
			_this1.width = tileWidth;
			_this1.height = tileHeight;
			var rect1 = _this1;
			rect1._inPool = false;
			var point2 = flixel_math_FlxPoint._pool.get().set(tileWidth,tileHeight);
			point2._inPool = false;
			var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
			point3._inPool = false;
			result.addAtlasFrame(rect1,point2,point3);
			destPoint.x += tileWidth + 2 * borderX + spaceX;
			if(destPoint.x >= combined.width) {
				destPoint.x = borderX;
				destPoint.y += tileHeight + 2 * borderY + spaceY;
			}
		}
	}
	flixel_util_FlxBitmapDataUtil.copyBorderPixels(combined,tileWidth,tileHeight,spaceX,spaceY,borderX,borderY,cols,rows);
	return result;
};
flixel_graphics_frames_FlxTileFrames.findFrame = function(graphic,tileSize,region,atlasFrame,tileSpacing,border) {
	var type = flixel_graphics_frames_FlxFrameCollectionType.TILES;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var tileFrames = collections;
	var _g = 0;
	while(_g < tileFrames.length) {
		var sheet = tileFrames[_g];
		++_g;
		if(sheet.equals(tileSize,region,null,tileSpacing,border)) {
			return sheet;
		}
	}
	return null;
};
flixel_graphics_frames_FlxTileFrames.__super__ = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxTileFrames.prototype = $extend(flixel_graphics_frames_FlxFramesCollection.prototype,{
	getByTilePosition: function(column,row) {
		return this.frames[row * this.numCols + column];
	}
	,equals: function(tileSize,region,atlasFrame,tileSpacing,border) {
		if(this.region == null && this.atlasFrame == null) {
			return false;
		}
		if(atlasFrame != null) {
			region = atlasFrame.frame;
		}
		if(region == null) {
			var Width = this.parent.width;
			var Height = this.parent.height;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = Width;
			_this.height = Height;
			var rect = _this;
			rect._inPool = false;
			var rect1 = rect;
			rect1._weak = true;
			region = rect1;
		}
		if(tileSpacing == null) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			var point1 = point;
			point1._weak = true;
			tileSpacing = point1;
		}
		if(border == null) {
			var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
			point2._inPool = false;
			var point3 = point2;
			point3._weak = true;
			border = point3;
		}
		var tmp;
		var tmp1;
		var tmp2;
		if(this.atlasFrame == atlasFrame) {
			var _this1 = this.region;
			var result = Math.abs(_this1.x - region.x) <= 0.0000001 && Math.abs(_this1.y - region.y) <= 0.0000001 && Math.abs(_this1.width - region.width) <= 0.0000001 && Math.abs(_this1.height - region.height) <= 0.0000001;
			if(region._weak) {
				if(!region._inPool) {
					region._inPool = true;
					region._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(region);
				}
			}
			tmp2 = result;
		} else {
			tmp2 = false;
		}
		if(tmp2) {
			var _this2 = this.tileSize;
			var result1 = Math.abs(_this2.x - tileSize.x) <= 0.0000001 && Math.abs(_this2.y - tileSize.y) <= 0.0000001;
			if(tileSize._weak) {
				tileSize.put();
			}
			tmp1 = result1;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			var _this3 = this.tileSpacing;
			var result2 = Math.abs(_this3.x - tileSpacing.x) <= 0.0000001 && Math.abs(_this3.y - tileSpacing.y) <= 0.0000001;
			if(tileSpacing._weak) {
				tileSpacing.put();
			}
			tmp = result2;
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this4 = this.border;
			var result3 = Math.abs(_this4.x - border.x) <= 0.0000001 && Math.abs(_this4.y - border.y) <= 0.0000001;
			if(border._weak) {
				border.put();
			}
			return result3;
		} else {
			return false;
		}
	}
	,addBorder: function(border) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var resultBorder = point.addPoint(this.border).addPoint(border);
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		var _this = point1;
		var point2 = this.tileSize;
		_this.set_x(point2.x);
		_this.set_y(point2.y);
		if(point2._weak) {
			point2.put();
		}
		var _this1 = _this;
		var Y = 2 * border.y;
		var _g = _this1;
		_g.set_x(_g.x - 2 * border.x);
		var _g1 = _this1;
		_g1.set_y(_g1.y - Y);
		var resultSize = _this1;
		var tileFrames = flixel_graphics_frames_FlxTileFrames.findFrame(this.parent,resultSize,this.region,this.atlasFrame,this.tileSpacing,resultBorder);
		if(tileFrames != null) {
			resultSize = flixel_util_FlxDestroyUtil.put(resultSize);
			return tileFrames;
		}
		tileFrames = new flixel_graphics_frames_FlxTileFrames(this.parent,resultBorder);
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		var rect = _this2;
		rect._inPool = false;
		var _this3 = rect;
		var Rect = this.region;
		_this3.x = Rect.x;
		_this3.y = Rect.y;
		_this3.width = Rect.width;
		_this3.height = Rect.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		tileFrames.region = _this3;
		tileFrames.atlasFrame = this.atlasFrame;
		tileFrames.tileSize = resultSize;
		var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
		point3._inPool = false;
		var _this4 = point3;
		var point4 = this.tileSpacing;
		_this4.set_x(point4.x);
		_this4.set_y(point4.y);
		if(point4._weak) {
			point4.put();
		}
		tileFrames.tileSpacing = _this4;
		var _g2 = 0;
		var _g11 = this.frames;
		while(_g2 < _g11.length) {
			var frame = _g11[_g2];
			++_g2;
			tileFrames.pushFrame(frame.setBorderTo(border));
		}
		return tileFrames;
	}
	,destroy: function() {
		flixel_graphics_frames_FlxFramesCollection.prototype.destroy.call(this);
		this.atlasFrame = null;
		this.region = flixel_util_FlxDestroyUtil.put(this.region);
		this.tileSize = flixel_util_FlxDestroyUtil.put(this.tileSize);
		this.tileSpacing = flixel_util_FlxDestroyUtil.put(this.tileSpacing);
	}
	,__class__: flixel_graphics_frames_FlxTileFrames
});
var flixel_graphics_tile_FlxDrawBaseItem = function() {
	this.blending = 0;
	this.hasColorOffsets = false;
	this.colored = false;
	this.antialiasing = false;
};
$hxClasses["flixel.graphics.tile.FlxDrawBaseItem"] = flixel_graphics_tile_FlxDrawBaseItem;
flixel_graphics_tile_FlxDrawBaseItem.__name__ = ["flixel","graphics","tile","FlxDrawBaseItem"];
flixel_graphics_tile_FlxDrawBaseItem.blendToInt = function(blend) {
	if(blend == null) {
		return 0;
	}
	switch(blend) {
	case 0:
		return 65536;
	case 2:
		return 1048576;
	case 3:
		return 16777216;
	case 5:
		return 8388608;
	case 6:
		return 33554432;
	case 8:
		return 2097152;
	case 9:
		return 131072;
	case 11:
		return 4194304;
	case 12:
		return 262144;
	case 14:
		return 524288;
	default:
		return 0;
	}
};
flixel_graphics_tile_FlxDrawBaseItem.prototype = {
	reset: function() {
		this.graphics = null;
		this.antialiasing = false;
		this.nextTyped = null;
		this.next = null;
	}
	,dispose: function() {
		this.graphics = null;
		this.next = null;
		this.type = null;
		this.nextTyped = null;
	}
	,render: function(camera) {
	}
	,addQuad: function(frame,matrix,transform) {
	}
	,get_numVertices: function() {
		return 0;
	}
	,get_numTriangles: function() {
		return 0;
	}
	,__class__: flixel_graphics_tile_FlxDrawBaseItem
	,__properties__: {get_numTriangles:"get_numTriangles",get_numVertices:"get_numVertices"}
};
var flixel_graphics_tile_FlxDrawItemType = $hxClasses["flixel.graphics.tile.FlxDrawItemType"] = { __ename__ : ["flixel","graphics","tile","FlxDrawItemType"], __constructs__ : ["TILES","TRIANGLES"] };
flixel_graphics_tile_FlxDrawItemType.TILES = ["TILES",0];
flixel_graphics_tile_FlxDrawItemType.TILES.toString = $estr;
flixel_graphics_tile_FlxDrawItemType.TILES.__enum__ = flixel_graphics_tile_FlxDrawItemType;
flixel_graphics_tile_FlxDrawItemType.TRIANGLES = ["TRIANGLES",1];
flixel_graphics_tile_FlxDrawItemType.TRIANGLES.toString = $estr;
flixel_graphics_tile_FlxDrawItemType.TRIANGLES.__enum__ = flixel_graphics_tile_FlxDrawItemType;
var flixel_graphics_tile_FlxDrawTilesItem = function() {
	this.position = 0;
	this.drawData = [];
	flixel_graphics_tile_FlxDrawBaseItem.call(this);
	this.type = flixel_graphics_tile_FlxDrawItemType.TILES;
};
$hxClasses["flixel.graphics.tile.FlxDrawTilesItem"] = flixel_graphics_tile_FlxDrawTilesItem;
flixel_graphics_tile_FlxDrawTilesItem.__name__ = ["flixel","graphics","tile","FlxDrawTilesItem"];
flixel_graphics_tile_FlxDrawTilesItem.__super__ = flixel_graphics_tile_FlxDrawBaseItem;
flixel_graphics_tile_FlxDrawTilesItem.prototype = $extend(flixel_graphics_tile_FlxDrawBaseItem.prototype,{
	reset: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.reset.call(this);
		this.position = 0;
		this.shader = null;
	}
	,dispose: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.dispose.call(this);
		this.drawData = null;
		this.shader = null;
	}
	,addQuad: function(frame,matrix,transform) {
		this.drawData[this.position++] = matrix.tx;
		this.drawData[this.position++] = matrix.ty;
		var rect = frame.frame;
		this.drawData[this.position++] = rect.x;
		this.drawData[this.position++] = rect.y;
		this.drawData[this.position++] = rect.width;
		this.drawData[this.position++] = rect.height;
		this.drawData[this.position++] = matrix.a;
		this.drawData[this.position++] = matrix.b;
		this.drawData[this.position++] = matrix.c;
		this.drawData[this.position++] = matrix.d;
		if(this.colored && transform != null) {
			this.drawData[this.position++] = transform.redMultiplier;
			this.drawData[this.position++] = transform.greenMultiplier;
			this.drawData[this.position++] = transform.blueMultiplier;
		}
		this.drawData[this.position++] = transform != null ? transform.alphaMultiplier : 1.0;
	}
	,setNext: function(f) {
		this.drawData[this.position++] = f;
	}
	,render: function(camera) {
		if(!flixel_FlxG.renderTile || this.position <= 0) {
			return;
		}
		var flags = 56;
		if(this.colored) {
			flags |= 4;
		}
		flags |= this.blending;
		camera.canvas.get_graphics().drawTiles(this.graphics.get_tilesheet(),this.drawData,camera.antialiasing || this.antialiasing,flags,this.shader,this.position);
		flixel_graphics_tile_FlxTilesheet._DRAWCALLS++;
	}
	,get_numTiles: function() {
		var elementsPerTile = 8;
		if(this.colored) {
			elementsPerTile += 3;
		}
		return this.position / elementsPerTile | 0;
	}
	,get_numVertices: function() {
		return 4 * this.get_numTiles();
	}
	,get_numTriangles: function() {
		return 2 * this.get_numTiles();
	}
	,__class__: flixel_graphics_tile_FlxDrawTilesItem
	,__properties__: $extend(flixel_graphics_tile_FlxDrawBaseItem.prototype.__properties__,{get_numTiles:"get_numTiles"})
});
var flixel_graphics_tile_FlxDrawTrianglesItem = function() {
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	this.bounds = rect;
	this.colorsPosition = 0;
	this.indicesPosition = 0;
	this.verticesPosition = 0;
	this.colors = [];
	this.uvtData = [];
	this.indices = [];
	this.vertices = [];
	flixel_graphics_tile_FlxDrawBaseItem.call(this);
	this.type = flixel_graphics_tile_FlxDrawItemType.TRIANGLES;
};
$hxClasses["flixel.graphics.tile.FlxDrawTrianglesItem"] = flixel_graphics_tile_FlxDrawTrianglesItem;
flixel_graphics_tile_FlxDrawTrianglesItem.__name__ = ["flixel","graphics","tile","FlxDrawTrianglesItem"];
flixel_graphics_tile_FlxDrawTrianglesItem.inflateBounds = function(bounds,x,y) {
	if(x < bounds.x) {
		bounds.width += bounds.x - x;
		bounds.x = x;
	}
	if(y < bounds.y) {
		bounds.height += bounds.y - y;
		bounds.y = y;
	}
	if(x > bounds.x + bounds.width) {
		bounds.width = x - bounds.x;
	}
	if(y > bounds.y + bounds.height) {
		bounds.height = y - bounds.y;
	}
	return bounds;
};
flixel_graphics_tile_FlxDrawTrianglesItem.__super__ = flixel_graphics_tile_FlxDrawBaseItem;
flixel_graphics_tile_FlxDrawTrianglesItem.prototype = $extend(flixel_graphics_tile_FlxDrawBaseItem.prototype,{
	render: function(camera) {
		if(!flixel_FlxG.renderTile) {
			return;
		}
		if(this.get_numTriangles() <= 0) {
			return;
		}
		var tmp = camera.antialiasing || this.antialiasing;
		camera.canvas.get_graphics().beginBitmapFill(this.graphics.bitmap,null,true,tmp);
		var tmp1 = camera.canvas.get_graphics();
		var value = this.vertices;
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		var value1 = this.indices;
		var vectorData1 = new openfl_VectorData();
		vectorData1.length = value1.length;
		vectorData1.fixed = true;
		vectorData1.data = value1.slice(0);
		var value2 = this.uvtData;
		var vectorData2 = new openfl_VectorData();
		vectorData2.length = value2.length;
		vectorData2.fixed = true;
		vectorData2.data = value2.slice(0);
		tmp1.drawTriangles(vectorData,vectorData1,vectorData2,1);
		camera.canvas.get_graphics().endFill();
		flixel_graphics_tile_FlxTilesheet._DRAWCALLS++;
	}
	,reset: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.reset.call(this);
		this.vertices.splice(0,this.vertices.length);
		this.indices.splice(0,this.indices.length);
		this.uvtData.splice(0,this.uvtData.length);
		this.colors.splice(0,this.colors.length);
		this.verticesPosition = 0;
		this.indicesPosition = 0;
		this.colorsPosition = 0;
	}
	,dispose: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.dispose.call(this);
		this.vertices = null;
		this.indices = null;
		this.uvtData = null;
		this.colors = null;
		this.bounds = null;
	}
	,addTriangles: function(vertices,indices,uvtData,colors,position,cameraBounds) {
		if(position == null) {
			position = flixel_graphics_tile_FlxDrawTrianglesItem.point.set();
		}
		if(cameraBounds == null) {
			var _this = flixel_graphics_tile_FlxDrawTrianglesItem.rect;
			_this.x = 0;
			_this.y = 0;
			_this.width = flixel_FlxG.width;
			_this.height = flixel_FlxG.height;
			cameraBounds = _this;
		}
		var verticesLength = vertices.length;
		var prevVerticesLength = this.vertices.length;
		var numberOfVertices = verticesLength / 2 | 0;
		var prevIndicesLength = this.indices.length;
		var prevUVTDataLength = this.uvtData.length;
		var prevColorsLength = this.colors.length;
		var prevNumberOfVertices = this.get_numVertices();
		var tempX;
		var tempY;
		var i = 0;
		var currentVertexPosition = prevVerticesLength;
		while(i < verticesLength) {
			tempX = position.x + vertices[i];
			tempY = position.y + vertices[i + 1];
			this.vertices[currentVertexPosition++] = tempX;
			this.vertices[currentVertexPosition++] = tempY;
			if(i == 0) {
				var _this1 = this.bounds;
				_this1.x = tempX;
				_this1.y = tempY;
				_this1.width = 0;
				_this1.height = 0;
			} else {
				var bounds = this.bounds;
				if(tempX < bounds.x) {
					bounds.width += bounds.x - tempX;
					bounds.x = tempX;
				}
				if(tempY < bounds.y) {
					bounds.height += bounds.y - tempY;
					bounds.y = tempY;
				}
				if(tempX > bounds.x + bounds.width) {
					bounds.width = tempX - bounds.x;
				}
				if(tempY > bounds.y + bounds.height) {
					bounds.height = tempY - bounds.y;
				}
			}
			i += 2;
		}
		var Rect = this.bounds;
		var result = Rect.x + Rect.width > cameraBounds.x && Rect.x < cameraBounds.x + cameraBounds.width && Rect.y + Rect.height > cameraBounds.y && Rect.y < cameraBounds.y + cameraBounds.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		if(!result) {
			this.vertices.splice(this.vertices.length - verticesLength,verticesLength);
		} else {
			var uvtDataLength = uvtData.length;
			var _g1 = 0;
			var _g = uvtDataLength;
			while(_g1 < _g) {
				var i1 = _g1++;
				this.uvtData[prevUVTDataLength + i1] = uvtData[i1];
			}
			var indicesLength = indices.length;
			var _g11 = 0;
			var _g2 = indicesLength;
			while(_g11 < _g2) {
				var i2 = _g11++;
				this.indices[prevIndicesLength + i2] = indices[i2] + prevNumberOfVertices;
			}
			if(this.colored) {
				var _g12 = 0;
				var _g3 = numberOfVertices;
				while(_g12 < _g3) {
					var i3 = _g12++;
					this.colors[prevColorsLength + i3] = colors[i3];
				}
				this.colorsPosition += numberOfVertices;
			}
			this.verticesPosition += verticesLength;
			this.indicesPosition += indicesLength;
		}
		if(position._weak) {
			position.put();
		}
		if(cameraBounds._weak) {
			if(!cameraBounds._inPool) {
				cameraBounds._inPool = true;
				cameraBounds._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(cameraBounds);
			}
		}
	}
	,addQuad: function(frame,matrix,transform) {
		var prevVerticesPos = this.verticesPosition;
		var prevIndicesPos = this.indicesPosition;
		var prevColorsPos = this.colorsPosition;
		var prevNumberOfVertices = this.get_numVertices();
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = point;
		var x1 = point1.x * matrix.a + point1.y * matrix.c + matrix.tx;
		var y1 = point1.x * matrix.b + point1.y * matrix.d + matrix.ty;
		point1.set(x1,y1);
		this.vertices[prevVerticesPos] = point1.x;
		this.vertices[prevVerticesPos + 1] = point1.y;
		this.uvtData[prevVerticesPos] = frame.uv.x;
		this.uvtData[prevVerticesPos + 1] = frame.uv.y;
		point1.set(frame.frame.width,0);
		var x11 = point1.x * matrix.a + point1.y * matrix.c + matrix.tx;
		var y11 = point1.x * matrix.b + point1.y * matrix.d + matrix.ty;
		point1.set(x11,y11);
		this.vertices[prevVerticesPos + 2] = point1.x;
		this.vertices[prevVerticesPos + 3] = point1.y;
		this.uvtData[prevVerticesPos + 2] = frame.uv.width;
		this.uvtData[prevVerticesPos + 3] = frame.uv.y;
		point1.set(frame.frame.width,frame.frame.height);
		var x12 = point1.x * matrix.a + point1.y * matrix.c + matrix.tx;
		var y12 = point1.x * matrix.b + point1.y * matrix.d + matrix.ty;
		point1.set(x12,y12);
		this.vertices[prevVerticesPos + 4] = point1.x;
		this.vertices[prevVerticesPos + 5] = point1.y;
		this.uvtData[prevVerticesPos + 4] = frame.uv.width;
		this.uvtData[prevVerticesPos + 5] = frame.uv.height;
		point1.set(0,frame.frame.height);
		var x13 = point1.x * matrix.a + point1.y * matrix.c + matrix.tx;
		var y13 = point1.x * matrix.b + point1.y * matrix.d + matrix.ty;
		point1.set(x13,y13);
		this.vertices[prevVerticesPos + 6] = point1.x;
		this.vertices[prevVerticesPos + 7] = point1.y;
		point1.put();
		this.uvtData[prevVerticesPos + 6] = frame.uv.x;
		this.uvtData[prevVerticesPos + 7] = frame.uv.height;
		this.indices[prevIndicesPos] = prevNumberOfVertices;
		this.indices[prevIndicesPos + 1] = prevNumberOfVertices + 1;
		this.indices[prevIndicesPos + 2] = prevNumberOfVertices + 2;
		this.indices[prevIndicesPos + 3] = prevNumberOfVertices + 2;
		this.indices[prevIndicesPos + 4] = prevNumberOfVertices + 3;
		this.indices[prevIndicesPos + 5] = prevNumberOfVertices;
		if(this.colored) {
			var red = 1.0;
			var green = 1.0;
			var blue = 1.0;
			var alpha = 1.0;
			if(transform != null) {
				red = transform.redMultiplier;
				green = transform.greenMultiplier;
				blue = transform.blueMultiplier;
				alpha = transform.alphaMultiplier;
			}
			var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
			var Value = Math.round(red * 255);
			color &= -16711681;
			color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
			var Value1 = Math.round(green * 255);
			color &= -65281;
			color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
			var Value2 = Math.round(blue * 255);
			color &= -256;
			color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
			var Value3 = Math.round(alpha * 255);
			color &= 16777215;
			color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
			var color1 = color;
			this.colors[prevColorsPos] = color1;
			this.colors[prevColorsPos + 1] = color1;
			this.colors[prevColorsPos + 2] = color1;
			this.colors[prevColorsPos + 3] = color1;
			this.colorsPosition += 4;
		}
		this.verticesPosition += 8;
		this.indicesPosition += 6;
	}
	,get_numVertices: function() {
		return this.vertices.length / 2 | 0;
	}
	,get_numTriangles: function() {
		return this.indices.length / 3 | 0;
	}
	,__class__: flixel_graphics_tile_FlxDrawTrianglesItem
});
var openfl_display_Tilesheet = function(image) {
	this.__bitmap = image;
	this.__centerPoints = [];
	this.__tileRects = [];
	this.__tileUVs = [];
	this.__rectTile = new openfl_geom_Rectangle();
	this.__rectUV = new openfl_geom_Rectangle();
	this.__point = new openfl_geom_Point();
};
$hxClasses["openfl.display.Tilesheet"] = openfl_display_Tilesheet;
openfl_display_Tilesheet.__name__ = ["openfl","display","Tilesheet"];
openfl_display_Tilesheet.prototype = {
	addTileRect: function(rectangle,centerPoint) {
		this.__tileRects.push(rectangle);
		if(centerPoint == null) {
			centerPoint = openfl_display_Tilesheet.__defaultPoint;
		}
		this.__centerPoints.push(centerPoint);
		this.__tileUVs.push(new openfl_geom_Rectangle(rectangle.get_left() / this.__bitmap.width,rectangle.get_top() / this.__bitmap.height,rectangle.get_right() / this.__bitmap.width,rectangle.get_bottom() / this.__bitmap.height));
		return this.__tileRects.length - 1;
	}
	,drawTiles: function(graphics,tileData,smooth,flags,count) {
		if(count == null) {
			count = -1;
		}
		if(flags == null) {
			flags = 0;
		}
		if(smooth == null) {
			smooth = false;
		}
		graphics.drawTiles(this,tileData,smooth,flags,null,count);
	}
	,getTileCenter: function(index) {
		return this.__centerPoints[index];
	}
	,getTileRect: function(index) {
		return this.__tileRects[index];
	}
	,getTileUVs: function(index) {
		return this.__tileUVs[index];
	}
	,__class__: openfl_display_Tilesheet
};
var flixel_graphics_tile_FlxTilesheet = function(image) {
	openfl_display_Tilesheet.call(this,image);
};
$hxClasses["flixel.graphics.tile.FlxTilesheet"] = flixel_graphics_tile_FlxTilesheet;
flixel_graphics_tile_FlxTilesheet.__name__ = ["flixel","graphics","tile","FlxTilesheet"];
flixel_graphics_tile_FlxTilesheet.__super__ = openfl_display_Tilesheet;
flixel_graphics_tile_FlxTilesheet.prototype = $extend(openfl_display_Tilesheet.prototype,{
	__class__: flixel_graphics_tile_FlxTilesheet
});
var flixel_group_FlxTypedGroupIterator = function(GroupMembers,filter) {
	this._groupMembers = GroupMembers;
	this._filter = filter;
	this._cursor = 0;
	this._length = this._groupMembers.length;
};
$hxClasses["flixel.group.FlxTypedGroupIterator"] = flixel_group_FlxTypedGroupIterator;
flixel_group_FlxTypedGroupIterator.__name__ = ["flixel","group","FlxTypedGroupIterator"];
flixel_group_FlxTypedGroupIterator.prototype = {
	next: function() {
		if(this.hasNext()) {
			return this._groupMembers[this._cursor++];
		} else {
			return null;
		}
	}
	,hasNext: function() {
		while(this._cursor < this._length && (this._groupMembers[this._cursor] == null || this._filter != null && !this._filter(this._groupMembers[this._cursor]))) this._cursor++;
		return this._cursor < this._length;
	}
	,__class__: flixel_group_FlxTypedGroupIterator
};
var flixel_group_FlxTypedSpriteGroup = function(X,Y,MaxSize) {
	if(MaxSize == null) {
		MaxSize = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._skipTransformChildren = false;
	flixel_FlxSprite.call(this,X,Y);
	this.group = new flixel_group_FlxTypedGroup(MaxSize);
	this._sprites = this.group.members;
};
$hxClasses["flixel.group.FlxTypedSpriteGroup"] = flixel_group_FlxTypedSpriteGroup;
flixel_group_FlxTypedSpriteGroup.__name__ = ["flixel","group","FlxTypedSpriteGroup"];
flixel_group_FlxTypedSpriteGroup.__super__ = flixel_FlxSprite;
flixel_group_FlxTypedSpriteGroup.prototype = $extend(flixel_FlxSprite.prototype,{
	transformChildren_flixel_math_FlxRect: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_openfl_display_BlendMode: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Int: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Float: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Bool: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Array_flixel_FlxCamera: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,multiTransformChildren_Float: function(FunctionArray,ValueArray) {
		if(this.group == null) {
			return;
		}
		var numProps = FunctionArray.length;
		if(numProps > ValueArray.length) {
			return;
		}
		var lambda;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists) {
				var _g3 = 0;
				var _g2 = numProps;
				while(_g3 < _g2) {
					var i = _g3++;
					lambda = FunctionArray[i];
					lambda(sprite,ValueArray[i]);
				}
			}
		}
	}
	,transformChildren_flixel_math_FlxPoint: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,initVars: function() {
		this.flixelType = 4;
		this.offset = new flixel_math_FlxCallbackPoint($bind(this,this.offsetCallback));
		this.origin = new flixel_math_FlxCallbackPoint($bind(this,this.originCallback));
		this.scale = new flixel_math_FlxCallbackPoint($bind(this,this.scaleCallback));
		this.scrollFactor = new flixel_math_FlxCallbackPoint($bind(this,this.scrollFactorCallback));
		this.scale.set(1,1);
		this.scrollFactor.set(1,1);
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.velocity = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.acceleration = point1;
		var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
		point2._inPool = false;
		this.drag = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(10000,10000);
		point3._inPool = false;
		this.maxVelocity = point3;
	}
	,destroy: function() {
		this.offset = flixel_util_FlxDestroyUtil.destroy(this.offset);
		this.origin = flixel_util_FlxDestroyUtil.destroy(this.origin);
		this.scale = flixel_util_FlxDestroyUtil.destroy(this.scale);
		this.scrollFactor = flixel_util_FlxDestroyUtil.destroy(this.scrollFactor);
		this.group = flixel_util_FlxDestroyUtil.destroy(this.group);
		this._sprites = null;
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,clone: function() {
		var newGroup = new flixel_group_FlxTypedSpriteGroup(this.x,this.y,this.group.maxSize);
		var _g = 0;
		var _g1 = this.group.members;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				newGroup.add(sprite.clone());
			}
		}
		return newGroup;
	}
	,isOnScreen: function(Camera) {
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists && sprite.visible && sprite.isOnScreen(Camera)) {
				return true;
			}
		}
		return false;
	}
	,overlapsPoint: function(point,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var result = false;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists && sprite.visible) {
				if(!result) {
					result = sprite.overlapsPoint(point,InScreenSpace,Camera);
				} else {
					result = true;
				}
			}
		}
		return result;
	}
	,pixelsOverlapPoint: function(point,Mask,Camera) {
		if(Mask == null) {
			Mask = 255;
		}
		var result = false;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists && sprite.visible) {
				if(!result) {
					result = sprite.pixelsOverlapPoint(point,Mask,Camera);
				} else {
					result = true;
				}
			}
		}
		return result;
	}
	,update: function(elapsed) {
		this.group.update(elapsed);
		if(this.moves) {
			this.updateMotion(elapsed);
		}
	}
	,draw: function() {
		this.group.draw();
	}
	,replaceColor: function(Color,NewColor,FetchPositions) {
		if(FetchPositions == null) {
			FetchPositions = false;
		}
		var positions = null;
		if(FetchPositions) {
			positions = [];
		}
		var spritePositions;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				spritePositions = sprite.replaceColor(Color,NewColor,FetchPositions);
				if(FetchPositions) {
					positions = positions.concat(spritePositions);
				}
			}
		}
		return positions;
	}
	,add: function(Sprite) {
		this.preAdd(Sprite);
		return this.group.add(Sprite);
	}
	,insert: function(Position,Sprite) {
		this.preAdd(Sprite);
		return this.group.insert(Position,Sprite);
	}
	,preAdd: function(Sprite) {
		var sprite = Sprite;
		var _g = sprite;
		_g.set_x(_g.x + this.x);
		var _g1 = sprite;
		_g1.set_y(_g1.y + this.y);
		var _g2 = sprite;
		_g2.set_alpha(_g2.alpha * this.alpha);
		var _this = sprite.scrollFactor;
		var point = this.scrollFactor;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		sprite.set_cameras(this._cameras);
		if(this.clipRect != null) {
			var ClipRect = this.clipRect;
			if(ClipRect == null) {
				sprite.set_clipRect(null);
			} else {
				var X = ClipRect.x - sprite.x + this.x;
				var Y = ClipRect.y - sprite.y + this.y;
				var Width = ClipRect.width;
				var Height = ClipRect.height;
				var _this1 = flixel_math_FlxRect._pool.get();
				_this1.x = X;
				_this1.y = Y;
				_this1.width = Width;
				_this1.height = Height;
				var rect = _this1;
				rect._inPool = false;
				sprite.set_clipRect(rect);
			}
		}
	}
	,recycle: function(ObjectClass,ObjectFactory,Force) {
		if(Force == null) {
			Force = false;
		}
		return this.group.recycle(ObjectClass,ObjectFactory,Force);
	}
	,remove: function(Sprite,Splice) {
		if(Splice == null) {
			Splice = false;
		}
		var sprite = Sprite;
		var _g = sprite;
		_g.set_x(_g.x - this.x);
		var _g1 = sprite;
		_g1.set_y(_g1.y - this.y);
		sprite.set_cameras(null);
		return this.group.remove(Sprite,Splice);
	}
	,replace: function(OldObject,NewObject) {
		return this.group.replace(OldObject,NewObject);
	}
	,sort: function(Function,Order) {
		if(Order == null) {
			Order = -1;
		}
		var f = Function;
		var a1 = Order;
		var tmp = function(a2,a3) {
			return f(a1,a2,a3);
		};
		this.group.members.sort(tmp);
	}
	,getFirstAvailable: function(ObjectClass,Force) {
		if(Force == null) {
			Force = false;
		}
		return this.group.getFirstAvailable(ObjectClass,Force);
	}
	,getFirstNull: function() {
		return this.group.getFirstNull();
	}
	,getFirstExisting: function() {
		return this.group.getFirstExisting();
	}
	,getFirstAlive: function() {
		return this.group.getFirstAlive();
	}
	,getFirstDead: function() {
		return this.group.getFirstDead();
	}
	,countLiving: function() {
		return this.group.countLiving();
	}
	,countDead: function() {
		return this.group.countDead();
	}
	,getRandom: function(StartIndex,Length) {
		if(Length == null) {
			Length = 0;
		}
		if(StartIndex == null) {
			StartIndex = 0;
		}
		return this.group.getRandom(StartIndex,Length);
	}
	,iterator: function(filter) {
		return new flixel_group_FlxTypedGroupIterator(this.group.members,filter);
	}
	,forEach: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEach(Function,Recurse);
	}
	,forEachAlive: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachAlive(Function,Recurse);
	}
	,forEachDead: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachDead(Function,Recurse);
	}
	,forEachExists: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachExists(Function,Recurse);
	}
	,forEachOfType: function(ObjectClass,Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachOfType(ObjectClass,Function,Recurse);
	}
	,clear: function() {
		this.group.clear();
	}
	,kill: function() {
		flixel_FlxSprite.prototype.kill.call(this);
		this.group.kill();
	}
	,revive: function() {
		flixel_FlxSprite.prototype.revive.call(this);
		this.group.revive();
	}
	,reset: function(X,Y) {
		this.revive();
		this.setPosition(X,Y);
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				sprite.reset(X,Y);
			}
		}
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		var dx = X - this.x;
		var dy = Y - this.y;
		this.multiTransformChildren_Float([$bind(this,this.xTransform),$bind(this,this.yTransform)],[dx,dy]);
		this._skipTransformChildren = true;
		this.set_x(X);
		this.set_y(Y);
		this._skipTransformChildren = false;
	}
	,set_cameras: function(Value) {
		if(this.get_cameras() != Value) {
			this.transformChildren_Array_flixel_FlxCamera($bind(this,this.camerasTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_cameras.call(this,Value);
	}
	,set_exists: function(Value) {
		if(this.exists != Value) {
			this.transformChildren_Bool($bind(this,this.existsTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_exists.call(this,Value);
	}
	,set_visible: function(Value) {
		if(this.exists && this.visible != Value) {
			this.transformChildren_Bool($bind(this,this.visibleTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_visible.call(this,Value);
	}
	,set_active: function(Value) {
		if(this.exists && this.active != Value) {
			this.transformChildren_Bool($bind(this,this.activeTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_active.call(this,Value);
	}
	,set_alive: function(Value) {
		if(this.alive != Value) {
			this.transformChildren_Bool($bind(this,this.aliveTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_alive.call(this,Value);
	}
	,set_x: function(Value) {
		if(!this._skipTransformChildren && this.exists && this.x != Value) {
			var offset = Value - this.x;
			this.transformChildren_Float($bind(this,this.xTransform),offset);
		}
		return this.x = Value;
	}
	,set_y: function(Value) {
		if(!this._skipTransformChildren && this.exists && this.y != Value) {
			var offset = Value - this.y;
			this.transformChildren_Float($bind(this,this.yTransform),offset);
		}
		return this.y = Value;
	}
	,set_angle: function(Value) {
		if(this.exists && this.angle != Value) {
			var offset = Value - this.angle;
			this.transformChildren_Float($bind(this,this.angleTransform),offset);
		}
		return this.angle = Value;
	}
	,set_alpha: function(Value) {
		var lowerBound = Value < 0 ? 0 : Value;
		if(lowerBound > 1) {
			Value = 1;
		} else {
			Value = lowerBound;
		}
		if(this.exists && this.alpha != Value) {
			var factor = this.alpha > 0 ? Value / this.alpha : 0;
			this.transformChildren_Float($bind(this,this.alphaTransform),factor);
		}
		return this.alpha = Value;
	}
	,set_facing: function(Value) {
		if(this.exists && this.facing != Value) {
			this.transformChildren_Int($bind(this,this.facingTransform),Value);
		}
		return this.facing = Value;
	}
	,set_flipX: function(Value) {
		if(this.exists && this.flipX != Value) {
			this.transformChildren_Bool($bind(this,this.flipXTransform),Value);
		}
		return this.flipX = Value;
	}
	,set_flipY: function(Value) {
		if(this.exists && this.flipY != Value) {
			this.transformChildren_Bool($bind(this,this.flipYTransform),Value);
		}
		return this.flipY = Value;
	}
	,set_moves: function(Value) {
		if(this.exists && this.moves != Value) {
			this.transformChildren_Bool($bind(this,this.movesTransform),Value);
		}
		return this.moves = Value;
	}
	,set_immovable: function(Value) {
		if(this.exists && this.immovable != Value) {
			this.transformChildren_Bool($bind(this,this.immovableTransform),Value);
		}
		return this.immovable = Value;
	}
	,set_solid: function(Value) {
		if(this.exists && (this.allowCollisions & 4369) > 0 != Value) {
			this.transformChildren_Bool($bind(this,this.solidTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_solid.call(this,Value);
	}
	,set_color: function(Value) {
		if(this.exists && this.color != Value) {
			this.transformChildren_Int($bind(this,this.gColorTransform),Value);
		}
		return this.color = Value;
	}
	,set_blend: function(Value) {
		if(this.exists && this.blend != Value) {
			this.transformChildren_openfl_display_BlendMode($bind(this,this.blendTransform),Value);
		}
		return this.blend = Value;
	}
	,set_clipRect: function(rect) {
		if(this.exists) {
			this.transformChildren_flixel_math_FlxRect($bind(this,this.clipRectTransform),rect);
		}
		return flixel_FlxSprite.prototype.set_clipRect.call(this,rect);
	}
	,set_pixelPerfectRender: function(Value) {
		if(this.exists && this.pixelPerfectRender != Value) {
			this.transformChildren_Bool($bind(this,this.pixelPerfectTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_pixelPerfectRender.call(this,Value);
	}
	,set_width: function(Value) {
		return Value;
	}
	,get_width: function() {
		if(this.group.length == 0) {
			return 0;
		}
		var minX = Infinity;
		var maxX = -Infinity;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			var minMemberX = member.x;
			var maxMemberX = minMemberX + member.get_width();
			if(maxMemberX > maxX) {
				maxX = maxMemberX;
			}
			if(minMemberX < minX) {
				minX = minMemberX;
			}
		}
		return maxX - minX;
	}
	,set_height: function(Value) {
		return Value;
	}
	,get_height: function() {
		if(this.group.length == 0) {
			return 0;
		}
		var minY = Infinity;
		var maxY = -Infinity;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			var minMemberY = member.y;
			var maxMemberY = minMemberY + member.get_height();
			if(maxMemberY > maxY) {
				maxY = maxMemberY;
			}
			if(minMemberY < minY) {
				minY = minMemberY;
			}
		}
		return maxY - minY;
	}
	,get_length: function() {
		return this.group.length;
	}
	,get_maxSize: function() {
		return this.group.maxSize;
	}
	,set_maxSize: function(Size) {
		return this.group.set_maxSize(Size);
	}
	,get_members: function() {
		return this.group.members;
	}
	,xTransform: function(Sprite,X) {
		var _g = Sprite;
		_g.set_x(_g.x + X);
	}
	,yTransform: function(Sprite,Y) {
		var _g = Sprite;
		_g.set_y(_g.y + Y);
	}
	,angleTransform: function(Sprite,Angle) {
		var _g = Sprite;
		_g.set_angle(_g.angle + Angle);
	}
	,alphaTransform: function(Sprite,Alpha) {
		var _g = Sprite;
		_g.set_alpha(_g.alpha * Alpha);
	}
	,facingTransform: function(Sprite,Facing) {
		Sprite.set_facing(Facing);
	}
	,flipXTransform: function(Sprite,FlipX) {
		Sprite.set_flipX(FlipX);
	}
	,flipYTransform: function(Sprite,FlipY) {
		Sprite.set_flipY(FlipY);
	}
	,movesTransform: function(Sprite,Moves) {
		Sprite.set_moves(Moves);
	}
	,pixelPerfectTransform: function(Sprite,PixelPerfect) {
		Sprite.set_pixelPerfectRender(PixelPerfect);
	}
	,gColorTransform: function(Sprite,Color) {
		Sprite.set_color(Color);
	}
	,blendTransform: function(Sprite,Blend) {
		Sprite.set_blend(Blend);
	}
	,immovableTransform: function(Sprite,Immovable) {
		Sprite.set_immovable(Immovable);
	}
	,visibleTransform: function(Sprite,Visible) {
		Sprite.set_visible(Visible);
	}
	,activeTransform: function(Sprite,Active) {
		Sprite.set_active(Active);
	}
	,solidTransform: function(Sprite,Solid) {
		Sprite.set_solid(Solid);
	}
	,aliveTransform: function(Sprite,Alive) {
		Sprite.set_alive(Alive);
	}
	,existsTransform: function(Sprite,Exists) {
		Sprite.set_exists(Exists);
	}
	,camerasTransform: function(Sprite,Cameras) {
		Sprite.set_cameras(Cameras);
	}
	,offsetTransform: function(Sprite,Offset) {
		var _this = Sprite.offset;
		_this.set_x(Offset.x);
		_this.set_y(Offset.y);
		if(Offset._weak) {
			Offset.put();
		}
	}
	,originTransform: function(Sprite,Origin) {
		var _this = Sprite.origin;
		_this.set_x(Origin.x);
		_this.set_y(Origin.y);
		if(Origin._weak) {
			Origin.put();
		}
	}
	,scaleTransform: function(Sprite,Scale) {
		var _this = Sprite.scale;
		_this.set_x(Scale.x);
		_this.set_y(Scale.y);
		if(Scale._weak) {
			Scale.put();
		}
	}
	,scrollFactorTransform: function(Sprite,ScrollFactor) {
		var _this = Sprite.scrollFactor;
		_this.set_x(ScrollFactor.x);
		_this.set_y(ScrollFactor.y);
		if(ScrollFactor._weak) {
			ScrollFactor.put();
		}
	}
	,clipRectTransform: function(Sprite,ClipRect) {
		if(ClipRect == null) {
			Sprite.set_clipRect(null);
		} else {
			var X = ClipRect.x - Sprite.x + this.x;
			var Y = ClipRect.y - Sprite.y + this.y;
			var Width = ClipRect.width;
			var Height = ClipRect.height;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = X;
			_this.y = Y;
			_this.width = Width;
			_this.height = Height;
			var rect = _this;
			rect._inPool = false;
			Sprite.set_clipRect(rect);
		}
	}
	,offsetCallback: function(Offset) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.offsetTransform),Offset);
	}
	,originCallback: function(Origin) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.originTransform),Origin);
	}
	,scaleCallback: function(Scale) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.scaleTransform),Scale);
	}
	,scrollFactorCallback: function(ScrollFactor) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.scrollFactorTransform),ScrollFactor);
	}
	,loadGraphicFromSprite: function(Sprite) {
		return this;
	}
	,loadGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		return this;
	}
	,loadRotatedGraphic: function(Graphic,Rotations,Frame,AntiAliasing,AutoBuffer,Key) {
		if(AutoBuffer == null) {
			AutoBuffer = false;
		}
		if(AntiAliasing == null) {
			AntiAliasing = false;
		}
		if(Frame == null) {
			Frame = -1;
		}
		if(Rotations == null) {
			Rotations = 16;
		}
		return this;
	}
	,makeGraphic: function(Width,Height,Color,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Color == null) {
			Color = -1;
		}
		return this;
	}
	,set_pixels: function(Value) {
		return Value;
	}
	,set_frame: function(Value) {
		return Value;
	}
	,get_pixels: function() {
		return null;
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
	}
	,resetHelpers: function() {
	}
	,stamp: function(Brush,X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
	}
	,set_frames: function(Frames) {
		return Frames;
	}
	,updateColorTransform: function() {
	}
	,__class__: flixel_group_FlxTypedSpriteGroup
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{set_maxSize:"set_maxSize",get_maxSize:"get_maxSize",get_length:"get_length",get_members:"get_members"})
});
var flixel_input_FlxBaseKeyList = function(status,keyManager) {
	this.status = status;
	this.keyManager = keyManager;
};
$hxClasses["flixel.input.FlxBaseKeyList"] = flixel_input_FlxBaseKeyList;
flixel_input_FlxBaseKeyList.__name__ = ["flixel","input","FlxBaseKeyList"];
flixel_input_FlxBaseKeyList.prototype = {
	check: function(keyCode) {
		return this.keyManager.checkStatus(keyCode,this.status);
	}
	,get_ANY: function() {
		var _g = 0;
		var _g1 = this.keyManager._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && this.keyManager.checkStatus(key.ID,this.status)) {
				return true;
			}
		}
		return false;
	}
	,__class__: flixel_input_FlxBaseKeyList
	,__properties__: {get_ANY:"get_ANY"}
};
var flixel_input_IFlxInput = function() { };
$hxClasses["flixel.input.IFlxInput"] = flixel_input_IFlxInput;
flixel_input_IFlxInput.__name__ = ["flixel","input","IFlxInput"];
flixel_input_IFlxInput.prototype = {
	__class__: flixel_input_IFlxInput
	,__properties__: {get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased"}
};
var flixel_input_FlxInput = function(ID) {
	this.last = 0;
	this.current = 0;
	this.ID = ID;
};
$hxClasses["flixel.input.FlxInput"] = flixel_input_FlxInput;
flixel_input_FlxInput.__name__ = ["flixel","input","FlxInput"];
flixel_input_FlxInput.__interfaces__ = [flixel_input_IFlxInput];
flixel_input_FlxInput.prototype = {
	press: function() {
		this.last = this.current;
		this.current = this.current == 1 || this.current == 2 ? 1 : 2;
	}
	,release: function() {
		this.last = this.current;
		this.current = this.current == 1 || this.current == 2 ? -1 : 0;
	}
	,update: function() {
		if(this.last == -1 && this.current == -1) {
			this.current = 0;
		} else if(this.last == 2 && this.current == 2) {
			this.current = 1;
		}
		this.last = this.current;
	}
	,reset: function() {
		this.current = 0;
		this.last = 0;
	}
	,hasState: function(state) {
		switch(state) {
		case -1:
			return this.current == -1;
		case 0:
			if(this.current != 0) {
				return this.current == -1;
			} else {
				return true;
			}
			break;
		case 1:
			if(this.current != 1) {
				return this.current == 2;
			} else {
				return true;
			}
			break;
		case 2:
			return this.current == 2;
		}
	}
	,get_justReleased: function() {
		return this.current == -1;
	}
	,get_released: function() {
		if(this.current != 0) {
			return this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		if(this.current != 1) {
			return this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.current == 2;
	}
	,__class__: flixel_input_FlxInput
	,__properties__: {get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased"}
};
var flixel_input_IFlxInputManager = function() { };
$hxClasses["flixel.input.IFlxInputManager"] = flixel_input_IFlxInputManager;
flixel_input_IFlxInputManager.__name__ = ["flixel","input","IFlxInputManager"];
flixel_input_IFlxInputManager.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_input_IFlxInputManager.prototype = {
	__class__: flixel_input_IFlxInputManager
};
var flixel_input_FlxKeyManager = function(keyListClass) {
	this._keyListMap = new haxe_ds_IntMap();
	this._keyListArray = [];
	this.preventDefaultKeys = [];
	this.enabled = true;
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.onKeyDown));
	openfl_Lib.current.stage.addEventListener("keyUp",$bind(this,this.onKeyUp));
	this.pressed = Type.createInstance(keyListClass,[1,this]);
	this.justPressed = Type.createInstance(keyListClass,[2,this]);
	this.justReleased = Type.createInstance(keyListClass,[-1,this]);
};
$hxClasses["flixel.input.FlxKeyManager"] = flixel_input_FlxKeyManager;
flixel_input_FlxKeyManager.__name__ = ["flixel","input","FlxKeyManager"];
flixel_input_FlxKeyManager.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_FlxKeyManager.prototype = {
	anyPressed: function(KeyArray) {
		return this.checkKeyArrayState(KeyArray,1);
	}
	,anyJustPressed: function(KeyArray) {
		return this.checkKeyArrayState(KeyArray,2);
	}
	,anyJustReleased: function(KeyArray) {
		return this.checkKeyArrayState(KeyArray,-1);
	}
	,firstPressed: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && (key.current == 1 || key.current == 2)) {
				return key.ID;
			}
		}
		return -1;
	}
	,firstJustPressed: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && key.current == 2) {
				return key.ID;
			}
		}
		return -1;
	}
	,firstJustReleased: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && key.current == -1) {
				return key.ID;
			}
		}
		return -1;
	}
	,checkStatus: function(KeyCode,Status) {
		var key = this._keyListMap.get(KeyCode);
		if(key != null) {
			if(key.hasState(Status)) {
				return true;
			}
		}
		return false;
	}
	,getIsDown: function() {
		var keysDown = [];
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && (key.current == 1 || key.current == 2)) {
				keysDown.push(key);
			}
		}
		return keysDown;
	}
	,destroy: function() {
		this._keyListArray = null;
		this._keyListMap = null;
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null) {
				key.release();
			}
		}
	}
	,update: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null) {
				key.update();
			}
		}
	}
	,checkKeyArrayState: function(KeyArray,State) {
		if(KeyArray == null) {
			return false;
		}
		var _g = 0;
		while(_g < KeyArray.length) {
			var code = KeyArray[_g];
			++_g;
			var key = this._keyListMap.get(code);
			if(key != null) {
				if(key.hasState(State)) {
					return true;
				}
			}
		}
		return false;
	}
	,onKeyUp: function(event) {
		var c = this.resolveKeyCode(event);
		this.handlePreventDefaultKeys(c,event);
		if(this.enabled) {
			var key = this._keyListMap.get(c);
			if(key != null) {
				key.release();
			}
		}
	}
	,onKeyDown: function(event) {
		var c = this.resolveKeyCode(event);
		this.handlePreventDefaultKeys(c,event);
		if(this.enabled) {
			var key = this._keyListMap.get(c);
			if(key != null) {
				key.press();
			}
		}
	}
	,handlePreventDefaultKeys: function(keyCode,event) {
		var key = this._keyListMap.get(keyCode);
		if(key != null && this.preventDefaultKeys != null && this.preventDefaultKeys.indexOf(key.ID) != -1) {
			event.stopImmediatePropagation();
			event.stopPropagation();
		}
	}
	,inKeyArray: function(KeyArray,Event) {
		if(KeyArray == null) {
			return false;
		} else {
			var code = this.resolveKeyCode(Event);
			var _g = 0;
			while(_g < KeyArray.length) {
				var key = KeyArray[_g];
				++_g;
				if(key == code || key == -2) {
					return true;
				}
			}
		}
		return false;
	}
	,resolveKeyCode: function(e) {
		return e.keyCode;
	}
	,updateKeyStates: function(KeyCode,Down) {
		var key = this._keyListMap.get(KeyCode);
		if(key != null) {
			if(Down) {
				key.press();
			} else {
				key.release();
			}
		}
	}
	,onFocus: function() {
	}
	,onFocusLost: function() {
		this.reset();
	}
	,getKey: function(KeyCode) {
		return this._keyListMap.h[KeyCode];
	}
	,__class__: flixel_input_FlxKeyManager
};
var flixel_input_FlxPointer = function() {
	this._globalScreenY = 0;
	this._globalScreenX = 0;
	this.screenY = 0;
	this.screenX = 0;
	this.y = 0;
	this.x = 0;
};
$hxClasses["flixel.input.FlxPointer"] = flixel_input_FlxPointer;
flixel_input_FlxPointer.__name__ = ["flixel","input","FlxPointer"];
flixel_input_FlxPointer.prototype = {
	getWorldPosition: function(Camera,point) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		this.getScreenPosition(Camera,flixel_input_FlxPointer._cachedPoint);
		point.set_x(flixel_input_FlxPointer._cachedPoint.x + Camera.scroll.x);
		point.set_y(flixel_input_FlxPointer._cachedPoint.y + Camera.scroll.y);
		return point;
	}
	,getScreenPosition: function(Camera,point) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		point.set_x((this._globalScreenX - Camera.x + 0.5 * Camera.width * (Camera.zoom - Camera.initialZoom)) / Camera.zoom);
		point.set_y((this._globalScreenY - Camera.y + 0.5 * Camera.height * (Camera.zoom - Camera.initialZoom)) / Camera.zoom);
		return point;
	}
	,getPositionInCameraView: function(Camera,point) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		point.set_x((this._globalScreenX - Camera.x) / Camera.zoom + Camera.viewOffsetX);
		point.set_y((this._globalScreenY - Camera.y) / Camera.zoom + Camera.viewOffsetY);
		return point;
	}
	,getPosition: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x,this.y);
	}
	,overlaps: function(ObjectOrGroup,Camera) {
		var _gthis = this;
		var result = false;
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			group.forEachExists(function(basic) {
				if(_gthis.overlaps(basic,Camera)) {
					result = true;
					return;
				}
			});
		} else {
			this.getPosition(flixel_input_FlxPointer._cachedPoint);
			var object = ObjectOrGroup;
			result = object.overlapsPoint(flixel_input_FlxPointer._cachedPoint,true,Camera);
		}
		return result;
	}
	,setGlobalScreenPositionUnsafe: function(newX,newY) {
		this._globalScreenX = newX / flixel_FlxG.scaleMode.scale.x | 0;
		this._globalScreenY = newY / flixel_FlxG.scaleMode.scale.y | 0;
		this.updatePositions();
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,updatePositions: function() {
		this.getScreenPosition(flixel_FlxG.camera,flixel_input_FlxPointer._cachedPoint);
		this.screenX = flixel_input_FlxPointer._cachedPoint.x | 0;
		this.screenY = flixel_input_FlxPointer._cachedPoint.y | 0;
		this.getWorldPosition(flixel_FlxG.camera,flixel_input_FlxPointer._cachedPoint);
		this.x = flixel_input_FlxPointer._cachedPoint.x | 0;
		this.y = flixel_input_FlxPointer._cachedPoint.y | 0;
	}
	,__class__: flixel_input_FlxPointer
};
var flixel_input_FlxSwipe = function(ID,StartPosition,EndPosition,StartTimeInTicks) {
	this.ID = ID;
	this.startPosition = StartPosition;
	this.endPosition = EndPosition;
	this._startTimeInTicks = StartTimeInTicks;
	this._endTimeInTicks = flixel_FlxG.game.ticks;
};
$hxClasses["flixel.input.FlxSwipe"] = flixel_input_FlxSwipe;
flixel_input_FlxSwipe.__name__ = ["flixel","input","FlxSwipe"];
flixel_input_FlxSwipe.prototype = {
	toString: function() {
		var value = this.ID;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "ID";
		_this.value = value;
		var value1 = this.startPosition;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "start";
		_this1.value = value1;
		var value2 = this.endPosition;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "end";
		_this2.value = value2;
		var dx = this.startPosition.x - this.endPosition.x;
		var dy = this.startPosition.y - this.endPosition.y;
		var value3 = Math.sqrt(dx * dx + dy * dy);
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "distance";
		_this3.value = value3;
		var value4 = this.startPosition.angleBetween(this.endPosition);
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "angle";
		_this4.value = value4;
		var value5 = (this._endTimeInTicks - this._startTimeInTicks) / 1000;
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "duration";
		_this5.value = value5;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5]);
	}
	,get_distance: function() {
		var dx = this.startPosition.x - this.endPosition.x;
		var dy = this.startPosition.y - this.endPosition.y;
		return Math.sqrt(dx * dx + dy * dy);
	}
	,get_angle: function() {
		return this.startPosition.angleBetween(this.endPosition);
	}
	,get_duration: function() {
		return (this._endTimeInTicks - this._startTimeInTicks) / 1000;
	}
	,__class__: flixel_input_FlxSwipe
	,__properties__: {get_duration:"get_duration",get_angle:"get_angle",get_distance:"get_distance"}
};
var flixel_input_gamepad_FlxGamepad = function(ID,Manager,Model,Attachment) {
	this.buttons = [];
	this._deadZone = 0.15;
	this.axisActive = false;
	var _g = [];
	var _g1 = 0;
	while(_g1 < 6) {
		var i = _g1++;
		_g.push(0);
	}
	this.axis = _g;
	this.deadZoneMode = flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES;
	this.connected = true;
	this.id = ID;
	this.manager = Manager;
	this.pressed = new flixel_input_gamepad_lists_FlxGamepadButtonList(1,this);
	this.justPressed = new flixel_input_gamepad_lists_FlxGamepadButtonList(2,this);
	this.justReleased = new flixel_input_gamepad_lists_FlxGamepadButtonList(-1,this);
	this.analog = new flixel_input_gamepad_lists_FlxGamepadAnalogList(this);
	this.motion = new flixel_input_gamepad_lists_FlxGamepadMotionValueList(this);
	this.pointer = new flixel_input_gamepad_lists_FlxGamepadPointerValueList(this);
	if(Model == null) {
		Model = flixel_input_gamepad_FlxGamepadModel.XINPUT;
	}
	if(Attachment == null) {
		Attachment = flixel_input_gamepad_FlxGamepadAttachment.NONE;
	}
	this.set_model(Model);
	this.detectedModel = Model;
};
$hxClasses["flixel.input.gamepad.FlxGamepad"] = flixel_input_gamepad_FlxGamepad;
flixel_input_gamepad_FlxGamepad.__name__ = ["flixel","input","gamepad","FlxGamepad"];
flixel_input_gamepad_FlxGamepad.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_input_gamepad_FlxGamepad.prototype = {
	getButton: function(RawID) {
		if(RawID == -1) {
			return null;
		}
		var gamepadButton = this.buttons[RawID];
		if(gamepadButton == null) {
			gamepadButton = new flixel_input_gamepad_FlxGamepadButton(RawID);
			this.buttons[RawID] = gamepadButton;
		}
		return gamepadButton;
	}
	,applyAxisFlip: function(axisValue,axisID) {
		if(this.mapping.isAxisFlipped(axisID)) {
			axisValue *= -1;
		}
		return axisValue;
	}
	,update: function() {
		var control;
		var button;
		if(this._device == null) {
			return;
		}
		var _g1 = 0;
		var _g = this._device.get_numControls();
		while(_g1 < _g) {
			var i = _g1++;
			control = this._device.getControlAt(i);
			button = this.getButton(i);
			if(this.isAxisForAnalogStick(i)) {
				this.handleAxisMove(i,control.value,button.value);
			}
			button.value = control.value;
			var value = Math.abs(control.value);
			if(value < this.get_deadZone()) {
				button.release();
			} else if(value > this.get_deadZone()) {
				button.press();
			}
		}
		var _g2 = 0;
		var _g11 = this.buttons;
		while(_g2 < _g11.length) {
			var button1 = _g11[_g2];
			++_g2;
			if(button1 != null) {
				button1.update();
			}
		}
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null) {
				button.reset();
			}
		}
		var numAxis = this.axis.length;
		var _g11 = 0;
		var _g2 = numAxis;
		while(_g11 < _g2) {
			var i = _g11++;
			this.axis[i] = 0;
		}
	}
	,destroy: function() {
		this.connected = false;
		this.buttons = null;
		this.axis = null;
		this.manager = null;
	}
	,checkStatus: function(ID,Status) {
		return this.checkStatusRaw(this.mapping.getRawID(ID),Status);
	}
	,checkStatusRaw: function(RawID,Status) {
		if(this.buttons[RawID] != null) {
			return this.buttons[RawID].current == Status;
		}
		return false;
	}
	,anyPressed: function(IDArray) {
		var _g = 0;
		while(_g < IDArray.length) {
			var id = IDArray[_g];
			++_g;
			var raw = this.mapping.getRawID(id);
			if(this.buttons[raw] != null) {
				var _this = this.buttons[raw];
				if(_this.current == 1 || _this.current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyPressedRaw: function(RawIDArray) {
		var _g = 0;
		while(_g < RawIDArray.length) {
			var b = RawIDArray[_g];
			++_g;
			if(this.buttons[b] != null) {
				var _this = this.buttons[b];
				if(_this.current == 1 || _this.current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustPressed: function(IDArray) {
		var _g = 0;
		while(_g < IDArray.length) {
			var b = IDArray[_g];
			++_g;
			var raw = this.mapping.getRawID(b);
			if(this.buttons[raw] != null) {
				if(this.buttons[raw].current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustPressedRaw: function(RawIDArray) {
		var _g = 0;
		while(_g < RawIDArray.length) {
			var b = RawIDArray[_g];
			++_g;
			if(this.buttons[b] != null) {
				if(this.buttons[b].current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustReleased: function(IDArray) {
		var _g = 0;
		while(_g < IDArray.length) {
			var b = IDArray[_g];
			++_g;
			var raw = this.mapping.getRawID(b);
			if(this.buttons[raw] != null) {
				if(this.buttons[raw].current == -1) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustReleasedRaw: function(RawIDArray) {
		var _g = 0;
		while(_g < RawIDArray.length) {
			var b = RawIDArray[_g];
			++_g;
			if(this.buttons[b] != null) {
				if(this.buttons[b].current == -1) {
					return true;
				}
			}
		}
		return false;
	}
	,firstPressedID: function() {
		return this.mapping.getID(this.firstPressedRawID());
	}
	,firstPressedRawID: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && (button.current == 0 || button.current == -1)) {
				return button.ID;
			}
		}
		return -1;
	}
	,firstJustPressedID: function() {
		return this.mapping.getID(this.firstJustPressedRawID());
	}
	,firstJustPressedRawID: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && button.current == 2) {
				return button.ID;
			}
		}
		return -1;
	}
	,firstJustReleasedID: function() {
		return this.mapping.getID(this.firstJustReleasedRawID());
	}
	,firstJustReleasedRawID: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && button.current == -1) {
				return button.ID;
			}
		}
		return -1;
	}
	,getAxis: function(AxisButtonID) {
		var axisValue = this.getAxisValue(this.mapping.getRawID(AxisButtonID));
		if(Math.abs(axisValue) > this.get_deadZone()) {
			return axisValue;
		} else {
			return 0;
		}
	}
	,getAxisRaw: function(RawAxisID) {
		var axisValue = this.getAxisValue(RawAxisID);
		if(Math.abs(axisValue) > this.get_deadZone()) {
			return axisValue;
		}
		return 0;
	}
	,isAxisForAnalogStick: function(AxisIndex) {
		var leftStick = this.mapping.leftStick;
		var rightStick = this.mapping.rightStick;
		if(leftStick != null) {
			if(AxisIndex == leftStick.x || AxisIndex == leftStick.y) {
				return true;
			}
		}
		if(rightStick != null) {
			if(AxisIndex == rightStick.x || AxisIndex == rightStick.y) {
				return true;
			}
		}
		return false;
	}
	,getAnalogStickByAxis: function(AxisIndex) {
		var leftStick = this.mapping.leftStick;
		var rightStick = this.mapping.rightStick;
		if(leftStick != null && AxisIndex == leftStick.x || AxisIndex == leftStick.y) {
			return leftStick;
		}
		if(rightStick != null && AxisIndex == rightStick.x || AxisIndex == rightStick.y) {
			return rightStick;
		}
		return null;
	}
	,getXAxis: function(AxesButtonID) {
		return this.getAnalogXAxisValue(this.mapping.getAnalogStick(AxesButtonID));
	}
	,getXAxisRaw: function(Stick) {
		return this.getAnalogXAxisValue(Stick);
	}
	,getYAxis: function(AxesButtonID) {
		return this.getYAxisRaw(this.mapping.getAnalogStick(AxesButtonID));
	}
	,getYAxisRaw: function(Stick) {
		return this.getAnalogYAxisValue(Stick);
	}
	,getAnalogAxes: function(AxesButtonID) {
		var X = this.getAnalogXAxisValue(this.mapping.getAnalogStick(AxesButtonID));
		var Y = this.getYAxisRaw(this.mapping.getAnalogStick(AxesButtonID));
		var vector = flixel_math_FlxVector._pool.get().set(X,Y);
		vector._inPool = false;
		return vector;
	}
	,anyButton: function(state) {
		if(state == null) {
			state = 1;
		}
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && button.hasState(state)) {
				return true;
			}
		}
		return false;
	}
	,anyInput: function() {
		if(this.anyButton()) {
			return true;
		}
		var numAxis = this.axis.length;
		var _g1 = 0;
		var _g = numAxis;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.axis[0] != 0) {
				return true;
			}
		}
		return false;
	}
	,getAxisValue: function(AxisID) {
		var axisValue = 0;
		if(AxisID == -1) {
			return 0;
		}
		var tmp;
		if(this._device != null && this._device.enabled) {
			var Max = this._device.get_numControls() - 1;
			if(AxisID >= 0) {
				if(Max != null) {
					tmp = AxisID <= Max;
				} else {
					tmp = true;
				}
			} else {
				tmp = false;
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			axisValue = this._device.getControlAt(AxisID).value;
		}
		if(this.isAxisForAnalogStick(AxisID)) {
			var axisValue1 = axisValue;
			if(this.mapping.isAxisFlipped(AxisID)) {
				axisValue1 *= -1;
			}
			axisValue = axisValue1;
		}
		return axisValue;
	}
	,getAnalogXAxisValue: function(stick) {
		if(stick == null) {
			return 0;
		}
		if(this.deadZoneMode == flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR) {
			return this.getAnalogAxisValueCircular(stick,stick.x);
		} else {
			return this.getAnalogAxisValueIndependent(stick.x);
		}
	}
	,getAnalogYAxisValue: function(stick) {
		if(stick == null) {
			return 0;
		}
		if(this.deadZoneMode == flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR) {
			return this.getAnalogAxisValueCircular(stick,stick.y);
		} else {
			return this.getAnalogAxisValueIndependent(stick.y);
		}
	}
	,getAnalogAxisValueCircular: function(stick,axisID) {
		if(stick == null) {
			return 0;
		}
		var xAxis = this.getAxisValue(stick.x);
		var yAxis = this.getAxisValue(stick.y);
		var vector = flixel_math_FlxVector._pool.get().set(xAxis,yAxis);
		vector._inPool = false;
		var vector1 = vector;
		var length = Math.sqrt(vector1.x * vector1.x + vector1.y * vector1.y);
		vector1.put();
		if(length > this.get_deadZone()) {
			return this.getAxisValue(axisID);
		}
		return 0;
	}
	,getAnalogAxisValueIndependent: function(axisID) {
		var axisValue = this.getAxisValue(axisID);
		if(Math.abs(axisValue) > this.get_deadZone()) {
			return axisValue;
		}
		return 0;
	}
	,handleAxisMove: function(axis,newValue,oldValue) {
		var axisValue = newValue;
		if(this.mapping.isAxisFlipped(axis)) {
			axisValue *= -1;
		}
		newValue = axisValue;
		var axisValue1 = oldValue;
		if(this.mapping.isAxisFlipped(axis)) {
			axisValue1 *= -1;
		}
		oldValue = axisValue1;
		var leftStick = this.mapping.leftStick;
		var rightStick = this.mapping.rightStick;
		var stick = leftStick != null && axis == leftStick.x || axis == leftStick.y ? leftStick : rightStick != null && axis == rightStick.x || axis == rightStick.y ? rightStick : null;
		if(stick.mode == flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL || stick.mode == flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH) {
			this.handleAxisMoveSub(stick,axis,newValue,oldValue,1.0);
			this.handleAxisMoveSub(stick,axis,newValue,oldValue,-1.0);
			var tmp = stick.mode == flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL;
		}
	}
	,handleAxisMoveSub: function(stick,axis,value,oldValue,sign) {
		if(sign == null) {
			sign = 1.0;
		}
		var digitalButton = -1;
		if(axis == stick.x) {
			if(sign < 0) {
				digitalButton = stick.rawLeft;
			} else {
				digitalButton = stick.rawRight;
			}
		} else if(axis == stick.y) {
			if(sign < 0) {
				digitalButton = stick.rawUp;
			} else {
				digitalButton = stick.rawDown;
			}
		}
		var threshold = stick.digitalThreshold;
		var valueSign = value * sign;
		var oldValueSign = oldValue * sign;
		if(valueSign > threshold && oldValueSign <= threshold) {
			var btn = this.getButton(digitalButton);
			if(btn != null) {
				btn.press();
			}
		} else if(valueSign <= threshold && oldValueSign > threshold) {
			var btn1 = this.getButton(digitalButton);
			if(btn1 != null) {
				btn1.release();
			}
		}
	}
	,createMappingForModel: function(model) {
		switch(model[1]) {
		case 0:
			return new flixel_input_gamepad_mappings_LogitechMapping(this.attachment);
		case 1:
			return new flixel_input_gamepad_mappings_OUYAMapping(this.attachment);
		case 2:
			return new flixel_input_gamepad_mappings_PS4Mapping(this.attachment);
		case 3:
			return new flixel_input_gamepad_mappings_PSVitaMapping(this.attachment);
		case 4:
			return new flixel_input_gamepad_mappings_XInputMapping(this.attachment);
		case 5:
			return new flixel_input_gamepad_mappings_MayflashWiiRemoteMapping(this.attachment);
		case 6:
			return new flixel_input_gamepad_mappings_WiiRemoteMapping(this.attachment);
		case 7:
			return new flixel_input_gamepad_mappings_MFiMapping(this.attachment);
		default:
			return new flixel_input_gamepad_mappings_XInputMapping(this.attachment);
		}
	}
	,get_name: function() {
		if(this._device == null) {
			return null;
		}
		return this._device.name;
	}
	,set_model: function(Model) {
		this.model = Model;
		this.mapping = this.createMappingForModel(this.model);
		return this.model;
	}
	,set_attachment: function(Attachment) {
		this.attachment = Attachment;
		this.mapping.set_attachment(Attachment);
		return this.attachment;
	}
	,get_deadZone: function() {
		if(this.manager.globalDeadZone == null) {
			return this._deadZone;
		} else {
			return this.manager.globalDeadZone;
		}
	}
	,set_deadZone: function(deadZone) {
		return this._deadZone = deadZone;
	}
	,toString: function() {
		var value = this.id;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "id";
		_this.value = value;
		var value1 = this.model;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "model";
		_this1.value = value1;
		var value2 = this.get_deadZone();
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "deadZone";
		_this2.value = value2;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2]);
	}
	,__class__: flixel_input_gamepad_FlxGamepad
	,__properties__: {set_deadZone:"set_deadZone",get_deadZone:"get_deadZone",set_attachment:"set_attachment",set_model:"set_model",get_name:"get_name"}
};
var flixel_input_gamepad_FlxGamepadDeadZoneMode = $hxClasses["flixel.input.gamepad.FlxGamepadDeadZoneMode"] = { __ename__ : ["flixel","input","gamepad","FlxGamepadDeadZoneMode"], __constructs__ : ["INDEPENDENT_AXES","CIRCULAR"] };
flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES = ["INDEPENDENT_AXES",0];
flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES.toString = $estr;
flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES.__enum__ = flixel_input_gamepad_FlxGamepadDeadZoneMode;
flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR = ["CIRCULAR",1];
flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR.toString = $estr;
flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR.__enum__ = flixel_input_gamepad_FlxGamepadDeadZoneMode;
var flixel_input_gamepad_FlxGamepadModel = $hxClasses["flixel.input.gamepad.FlxGamepadModel"] = { __ename__ : ["flixel","input","gamepad","FlxGamepadModel"], __constructs__ : ["LOGITECH","OUYA","PS4","PSVITA","XINPUT","MAYFLASH_WII_REMOTE","WII_REMOTE","MFI","UNKNOWN"] };
flixel_input_gamepad_FlxGamepadModel.LOGITECH = ["LOGITECH",0];
flixel_input_gamepad_FlxGamepadModel.LOGITECH.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.LOGITECH.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.OUYA = ["OUYA",1];
flixel_input_gamepad_FlxGamepadModel.OUYA.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.OUYA.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.PS4 = ["PS4",2];
flixel_input_gamepad_FlxGamepadModel.PS4.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.PS4.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.PSVITA = ["PSVITA",3];
flixel_input_gamepad_FlxGamepadModel.PSVITA.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.PSVITA.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.XINPUT = ["XINPUT",4];
flixel_input_gamepad_FlxGamepadModel.XINPUT.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.XINPUT.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE = ["MAYFLASH_WII_REMOTE",5];
flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.WII_REMOTE = ["WII_REMOTE",6];
flixel_input_gamepad_FlxGamepadModel.WII_REMOTE.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.WII_REMOTE.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.MFI = ["MFI",7];
flixel_input_gamepad_FlxGamepadModel.MFI.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.MFI.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.UNKNOWN = ["UNKNOWN",8];
flixel_input_gamepad_FlxGamepadModel.UNKNOWN.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.UNKNOWN.__enum__ = flixel_input_gamepad_FlxGamepadModel;
var flixel_input_gamepad_FlxGamepadAttachment = $hxClasses["flixel.input.gamepad.FlxGamepadAttachment"] = { __ename__ : ["flixel","input","gamepad","FlxGamepadAttachment"], __constructs__ : ["WII_NUNCHUCK","WII_CLASSIC_CONTROLLER","NONE"] };
flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK = ["WII_NUNCHUCK",0];
flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK.toString = $estr;
flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK.__enum__ = flixel_input_gamepad_FlxGamepadAttachment;
flixel_input_gamepad_FlxGamepadAttachment.WII_CLASSIC_CONTROLLER = ["WII_CLASSIC_CONTROLLER",1];
flixel_input_gamepad_FlxGamepadAttachment.WII_CLASSIC_CONTROLLER.toString = $estr;
flixel_input_gamepad_FlxGamepadAttachment.WII_CLASSIC_CONTROLLER.__enum__ = flixel_input_gamepad_FlxGamepadAttachment;
flixel_input_gamepad_FlxGamepadAttachment.NONE = ["NONE",2];
flixel_input_gamepad_FlxGamepadAttachment.NONE.toString = $estr;
flixel_input_gamepad_FlxGamepadAttachment.NONE.__enum__ = flixel_input_gamepad_FlxGamepadAttachment;
var flixel_input_gamepad_FlxGamepadAnalogStick = function(x,y,settings) {
	this.mode = flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH;
	this.digitalThreshold = 0.5;
	this.rawRight = -1;
	this.rawLeft = -1;
	this.rawDown = -1;
	this.rawUp = -1;
	this.x = x;
	this.y = y;
	if(settings == null) {
		return;
	}
	this.mode = settings.mode != null ? settings.mode : flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH;
	this.rawUp = settings.up != null ? settings.up : -1;
	this.rawDown = settings.down != null ? settings.down : -1;
	this.rawLeft = settings.left != null ? settings.left : -1;
	this.rawRight = settings.right != null ? settings.right : -1;
	this.digitalThreshold = settings.threshold != null ? settings.threshold : 0.5;
};
$hxClasses["flixel.input.gamepad.FlxGamepadAnalogStick"] = flixel_input_gamepad_FlxGamepadAnalogStick;
flixel_input_gamepad_FlxGamepadAnalogStick.__name__ = ["flixel","input","gamepad","FlxGamepadAnalogStick"];
flixel_input_gamepad_FlxGamepadAnalogStick.prototype = {
	toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		var value2 = this.rawUp;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "rawUp";
		_this2.value = value2;
		var value3 = this.rawDown;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "rawDown";
		_this3.value = value3;
		var value4 = this.rawLeft;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "rawLeft";
		_this4.value = value4;
		var value5 = this.rawRight;
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "rawRight";
		_this5.value = value5;
		var value6 = this.digitalThreshold;
		var _this6 = flixel_util_LabelValuePair._pool.get();
		_this6.label = "digitalThreshold";
		_this6.value = value6;
		var value7 = this.mode;
		var _this7 = flixel_util_LabelValuePair._pool.get();
		_this7.label = "mode";
		_this7.value = value7;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5,_this6,_this7]);
	}
	,__class__: flixel_input_gamepad_FlxGamepadAnalogStick
};
var flixel_input_gamepad_FlxAnalogToDigitalMode = $hxClasses["flixel.input.gamepad.FlxAnalogToDigitalMode"] = { __ename__ : ["flixel","input","gamepad","FlxAnalogToDigitalMode"], __constructs__ : ["BOTH","ONLY_DIGITAL","ONLY_ANALOG"] };
flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH = ["BOTH",0];
flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH.toString = $estr;
flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH.__enum__ = flixel_input_gamepad_FlxAnalogToDigitalMode;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL = ["ONLY_DIGITAL",1];
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL.toString = $estr;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL.__enum__ = flixel_input_gamepad_FlxAnalogToDigitalMode;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_ANALOG = ["ONLY_ANALOG",2];
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_ANALOG.toString = $estr;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_ANALOG.__enum__ = flixel_input_gamepad_FlxAnalogToDigitalMode;
var flixel_input_gamepad_FlxGamepadButton = function(ID) {
	this.value = 0;
	flixel_input_FlxInput.call(this,ID);
};
$hxClasses["flixel.input.gamepad.FlxGamepadButton"] = flixel_input_gamepad_FlxGamepadButton;
flixel_input_gamepad_FlxGamepadButton.__name__ = ["flixel","input","gamepad","FlxGamepadButton"];
flixel_input_gamepad_FlxGamepadButton.__super__ = flixel_input_FlxInput;
flixel_input_gamepad_FlxGamepadButton.prototype = $extend(flixel_input_FlxInput.prototype,{
	__class__: flixel_input_gamepad_FlxGamepadButton
});
var flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$ = {};
$hxClasses["flixel.input.gamepad._FlxGamepadInputID.FlxGamepadInputID_Impl_"] = flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.__name__ = ["flixel","input","gamepad","_FlxGamepadInputID","FlxGamepadInputID_Impl_"];
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromString = function(s) {
	s = s.toUpperCase();
	var _this = flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromStringMap;
	if(__map_reserved[s] != null ? _this.existsReserved(s) : _this.h.hasOwnProperty(s)) {
		var _this1 = flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromStringMap;
		if(__map_reserved[s] != null) {
			return _this1.getReserved(s);
		} else {
			return _this1.h[s];
		}
	} else {
		return -1;
	}
};
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.toString = function(this1) {
	return flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.toStringMap.h[this1];
};
var openfl_ui_GameInput = function() {
	openfl_events_EventDispatcher.call(this);
	openfl_ui_GameInput.__instances.push(this);
};
$hxClasses["openfl.ui.GameInput"] = openfl_ui_GameInput;
openfl_ui_GameInput.__name__ = ["openfl","ui","GameInput"];
openfl_ui_GameInput.getDeviceAt = function(index) {
	if(index >= 0 && index < openfl_ui_GameInput.__deviceList.length) {
		return openfl_ui_GameInput.__deviceList[index];
	}
	return null;
};
openfl_ui_GameInput.__getDevice = function(gamepad) {
	if(gamepad == null) {
		return null;
	}
	if(openfl_ui_GameInput.__devices.h.__keys__[gamepad.__id__] == null) {
		var devices = lime_ui_Joystick.__getDeviceData();
		var device = devices[gamepad.id].id;
		var devices1 = lime_ui_Joystick.__getDeviceData();
		var device1 = new openfl_ui_GameInputDevice(device,devices1[gamepad.id].id);
		openfl_ui_GameInput.__deviceList.push(device1);
		openfl_ui_GameInput.__devices.set(gamepad,device1);
		openfl_ui_GameInput.numDevices = openfl_ui_GameInput.__deviceList.length;
	}
	return openfl_ui_GameInput.__devices.h[gamepad.__id__];
};
openfl_ui_GameInput.__onGamepadAxisMove = function(gamepad,axis,value) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	if(device.enabled) {
		if(!device.__axis.h.hasOwnProperty(axis)) {
			var control;
			switch(axis) {
			case 0:
				control = "LEFT_X";
				break;
			case 1:
				control = "LEFT_Y";
				break;
			case 2:
				control = "RIGHT_X";
				break;
			case 3:
				control = "RIGHT_Y";
				break;
			case 4:
				control = "TRIGGER_LEFT";
				break;
			case 5:
				control = "TRIGGER_RIGHT";
				break;
			default:
				control = "UNKNOWN (" + axis + ")";
			}
			var control1 = new openfl_ui_GameInputControl(device,"AXIS_" + control,-1,1);
			device.__axis.h[axis] = control1;
			device.__controls.push(control1);
		}
		var control2 = device.__axis.h[axis];
		control2.value = value;
		control2.dispatchEvent(new openfl_events_Event("change"));
	}
};
openfl_ui_GameInput.__onGamepadButtonDown = function(gamepad,button) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	if(device.enabled) {
		if(!device.__button.h.hasOwnProperty(button)) {
			var control;
			switch(button) {
			case 0:
				control = "A";
				break;
			case 1:
				control = "B";
				break;
			case 2:
				control = "X";
				break;
			case 3:
				control = "Y";
				break;
			case 4:
				control = "BACK";
				break;
			case 5:
				control = "GUIDE";
				break;
			case 6:
				control = "START";
				break;
			case 7:
				control = "LEFT_STICK";
				break;
			case 8:
				control = "RIGHT_STICK";
				break;
			case 9:
				control = "LEFT_SHOULDER";
				break;
			case 10:
				control = "RIGHT_SHOULDER";
				break;
			case 11:
				control = "DPAD_UP";
				break;
			case 12:
				control = "DPAD_DOWN";
				break;
			case 13:
				control = "DPAD_LEFT";
				break;
			case 14:
				control = "DPAD_RIGHT";
				break;
			default:
				control = "UNKNOWN (" + button + ")";
			}
			var control1 = new openfl_ui_GameInputControl(device,"BUTTON_" + control,0,1);
			device.__button.h[button] = control1;
			device.__controls.push(control1);
		}
		var control2 = device.__button.h[button];
		control2.value = 1;
		control2.dispatchEvent(new openfl_events_Event("change"));
	}
};
openfl_ui_GameInput.__onGamepadButtonUp = function(gamepad,button) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	if(device.enabled) {
		if(!device.__button.h.hasOwnProperty(button)) {
			var control;
			switch(button) {
			case 0:
				control = "A";
				break;
			case 1:
				control = "B";
				break;
			case 2:
				control = "X";
				break;
			case 3:
				control = "Y";
				break;
			case 4:
				control = "BACK";
				break;
			case 5:
				control = "GUIDE";
				break;
			case 6:
				control = "START";
				break;
			case 7:
				control = "LEFT_STICK";
				break;
			case 8:
				control = "RIGHT_STICK";
				break;
			case 9:
				control = "LEFT_SHOULDER";
				break;
			case 10:
				control = "RIGHT_SHOULDER";
				break;
			case 11:
				control = "DPAD_UP";
				break;
			case 12:
				control = "DPAD_DOWN";
				break;
			case 13:
				control = "DPAD_LEFT";
				break;
			case 14:
				control = "DPAD_RIGHT";
				break;
			default:
				control = "UNKNOWN (" + button + ")";
			}
			var control1 = new openfl_ui_GameInputControl(device,"BUTTON_" + control,0,1);
			device.__button.h[button] = control1;
			device.__controls.push(control1);
		}
		var control2 = device.__button.h[button];
		control2.value = 0;
		control2.dispatchEvent(new openfl_events_Event("change"));
	}
};
openfl_ui_GameInput.__onGamepadConnect = function(gamepad) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	var _g = 0;
	var _g1 = openfl_ui_GameInput.__instances;
	while(_g < _g1.length) {
		var instance = _g1[_g];
		++_g;
		instance.dispatchEvent(new openfl_events_GameInputEvent("deviceAdded",null,null,device));
	}
};
openfl_ui_GameInput.__onGamepadDisconnect = function(gamepad) {
	var device = openfl_ui_GameInput.__devices.h[gamepad.__id__];
	if(device != null) {
		if(openfl_ui_GameInput.__devices.h.__keys__[gamepad.__id__] != null) {
			HxOverrides.remove(openfl_ui_GameInput.__deviceList,openfl_ui_GameInput.__devices.h[gamepad.__id__]);
			openfl_ui_GameInput.__devices.remove(gamepad);
		}
		openfl_ui_GameInput.numDevices = openfl_ui_GameInput.__deviceList.length;
		var _g = 0;
		var _g1 = openfl_ui_GameInput.__instances;
		while(_g < _g1.length) {
			var instance = _g1[_g];
			++_g;
			instance.dispatchEvent(new openfl_events_GameInputEvent("deviceRemoved",null,null,device));
		}
	}
};
openfl_ui_GameInput.__super__ = openfl_events_EventDispatcher;
openfl_ui_GameInput.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_ui_GameInput
});
var flixel_input_gamepad_FlxGamepadManager = function() {
	this._activeGamepads = [];
	this._gamepads = [];
	flixel_input_gamepad_FlxGamepadManager._gameInput.addEventListener("deviceAdded",$bind(this,this.onDeviceAdded));
	flixel_input_gamepad_FlxGamepadManager._gameInput.addEventListener("deviceRemoved",$bind(this,this.onDeviceRemoved));
	var _g1 = 0;
	var _g = openfl_ui_GameInput.numDevices;
	while(_g1 < _g) {
		var i = _g1++;
		this.addGamepad(openfl_ui_GameInput.getDeviceAt(i));
	}
};
$hxClasses["flixel.input.gamepad.FlxGamepadManager"] = flixel_input_gamepad_FlxGamepadManager;
flixel_input_gamepad_FlxGamepadManager.__name__ = ["flixel","input","gamepad","FlxGamepadManager"];
flixel_input_gamepad_FlxGamepadManager.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_gamepad_FlxGamepadManager.prototype = {
	getByID: function(GamepadID) {
		return this._activeGamepads[GamepadID];
	}
	,removeByID: function(GamepadID) {
		var gamepad = this._gamepads[GamepadID];
		if(gamepad != null) {
			flixel_util_FlxDestroyUtil.destroy(gamepad);
			this._gamepads[GamepadID] = null;
			var i = this._activeGamepads.indexOf(gamepad);
			if(i != -1) {
				this._activeGamepads[i] = null;
			}
		}
		if(this.lastActive == gamepad) {
			this.lastActive = null;
		}
		if(this.firstActive == gamepad) {
			this.firstActive = null;
		}
	}
	,createByID: function(GamepadID,Model) {
		var gamepad = this._gamepads[GamepadID];
		if(gamepad == null) {
			gamepad = new flixel_input_gamepad_FlxGamepad(GamepadID,this,Model);
			this._gamepads[GamepadID] = gamepad;
			var nullFound = false;
			var _g1 = 0;
			var _g = this._activeGamepads.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(this._activeGamepads[i] == null) {
					this._activeGamepads[i] = gamepad;
					nullFound = true;
					break;
				}
			}
			if(!nullFound) {
				this._activeGamepads.push(gamepad);
			}
		}
		this.lastActive = gamepad;
		if(this.firstActive == null) {
			this.firstActive = gamepad;
		}
		return gamepad;
	}
	,getActiveGamepadIDs: function(IDsArray) {
		if(IDsArray == null) {
			IDsArray = [];
		}
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				IDsArray.push(gamepad.id);
			}
		}
		return IDsArray;
	}
	,getActiveGamepads: function(GamepadArray) {
		if(GamepadArray == null) {
			GamepadArray = [];
		}
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				GamepadArray.push(gamepad);
			}
		}
		return GamepadArray;
	}
	,getFirstActiveGamepadID: function() {
		var firstActive = this.getFirstActiveGamepad();
		if(firstActive == null) {
			return -1;
		} else {
			return firstActive.id;
		}
	}
	,getFirstActiveGamepad: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				return gamepad;
			}
		}
		return null;
	}
	,anyButton: function(state) {
		if(state == null) {
			state = 1;
		}
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyButton(state)) {
				return true;
			}
		}
		return false;
	}
	,anyInput: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				return true;
			}
		}
		return false;
	}
	,anyPressed: function(buttonID) {
		return this.anyHasState(buttonID,1);
	}
	,anyJustPressed: function(buttonID) {
		return this.anyHasState(buttonID,2);
	}
	,anyJustReleased: function(buttonID) {
		return this.anyHasState(buttonID,-1);
	}
	,anyHasState: function(buttonID,state) {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.checkStatusRaw(gamepad.mapping.getRawID(buttonID),state)) {
				return true;
			}
		}
		return false;
	}
	,anyMovedXAxis: function(RawAxisID) {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad == null) {
				continue;
			}
			var value = gamepad.getAnalogXAxisValue(RawAxisID);
			if(value != 0) {
				return value;
			}
		}
		return 0;
	}
	,anyMovedYAxis: function(RawAxisID) {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad == null) {
				continue;
			}
			var value = gamepad.getYAxisRaw(RawAxisID);
			if(value != 0) {
				return value;
			}
		}
		return 0;
	}
	,destroy: function() {
		this._gamepads = flixel_util_FlxDestroyUtil.destroyArray(this._gamepads);
		this.firstActive = null;
		this.lastActive = null;
		this._gamepads = null;
		flixel_input_gamepad_FlxGamepadManager._gameInput.removeEventListener("deviceAdded",$bind(this,this.onDeviceAdded));
		flixel_input_gamepad_FlxGamepadManager._gameInput.removeEventListener("deviceRemoved",$bind(this,this.onDeviceRemoved));
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null) {
				gamepad.reset();
			}
		}
	}
	,onDeviceAdded: function(Event) {
		this.addGamepad(Event.device);
	}
	,onDeviceRemoved: function(Event) {
		this.removeGamepad(Event.device);
	}
	,findGamepadIndex: function(Device) {
		if(Device == null) {
			return -1;
		}
		var _g1 = 0;
		var _g = openfl_ui_GameInput.numDevices;
		while(_g1 < _g) {
			var i = _g1++;
			if(openfl_ui_GameInput.getDeviceAt(i) == Device) {
				return i;
			}
		}
		return -1;
	}
	,addGamepad: function(Device) {
		if(Device == null) {
			return;
		}
		Device.enabled = true;
		var id = this.findGamepadIndex(Device);
		if(id < 0) {
			return;
		}
		var gamepad = this.createByID(id,this.getModelFromDeviceName(Device.name));
		gamepad._device = Device;
	}
	,getModelFromDeviceName: function(name) {
		name = StringTools.replace(StringTools.replace(name.toLowerCase(),"-",""),"_","");
		if(name.indexOf("ouya") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.OUYA;
		} else if(name.indexOf("wireless controller") != -1 || name.indexOf("ps4") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.PS4;
		} else if(name.indexOf("logitech") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.LOGITECH;
		} else if(name.indexOf("xbox") != -1 && name.indexOf("360") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.XINPUT;
		} else if(name.indexOf("xinput") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.XINPUT;
		} else if(name.indexOf("nintendo rvlcnt01tr") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.WII_REMOTE;
		} else if(name.indexOf("nintendo rvlcnt01") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.WII_REMOTE;
		} else if(name.indexOf("mayflash wiimote pc adapter") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE;
		} else if(name.indexOf("mfi") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.MFI;
		} else {
			return flixel_input_gamepad_FlxGamepadModel.UNKNOWN;
		}
	}
	,removeGamepad: function(Device) {
		if(Device == null) {
			return;
		}
		var _g1 = 0;
		var _g = this._gamepads.length;
		while(_g1 < _g) {
			var i = _g1++;
			var gamepad = this._gamepads[i];
			if(gamepad != null && gamepad._device == Device) {
				this.removeByID(i);
			}
		}
	}
	,update: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null) {
				gamepad.update();
			}
		}
	}
	,onFocus: function() {
	}
	,onFocusLost: function() {
		this.reset();
	}
	,get_numActiveGamepads: function() {
		var count = 0;
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null) {
				++count;
			}
		}
		return count;
	}
	,__class__: flixel_input_gamepad_FlxGamepadManager
	,__properties__: {get_numActiveGamepads:"get_numActiveGamepads"}
};
var flixel_input_gamepad_id_LogitechID = function() { };
$hxClasses["flixel.input.gamepad.id.LogitechID"] = flixel_input_gamepad_id_LogitechID;
flixel_input_gamepad_id_LogitechID.__name__ = ["flixel","input","gamepad","id","LogitechID"];
var flixel_input_gamepad_id_MFiID = function() { };
$hxClasses["flixel.input.gamepad.id.MFiID"] = flixel_input_gamepad_id_MFiID;
flixel_input_gamepad_id_MFiID.__name__ = ["flixel","input","gamepad","id","MFiID"];
var flixel_input_gamepad_id_MayflashWiiRemoteID = function() { };
$hxClasses["flixel.input.gamepad.id.MayflashWiiRemoteID"] = flixel_input_gamepad_id_MayflashWiiRemoteID;
flixel_input_gamepad_id_MayflashWiiRemoteID.__name__ = ["flixel","input","gamepad","id","MayflashWiiRemoteID"];
var flixel_input_gamepad_id_OUYAID = function() { };
$hxClasses["flixel.input.gamepad.id.OUYAID"] = flixel_input_gamepad_id_OUYAID;
flixel_input_gamepad_id_OUYAID.__name__ = ["flixel","input","gamepad","id","OUYAID"];
var flixel_input_gamepad_id_PS4ID = function() { };
$hxClasses["flixel.input.gamepad.id.PS4ID"] = flixel_input_gamepad_id_PS4ID;
flixel_input_gamepad_id_PS4ID.__name__ = ["flixel","input","gamepad","id","PS4ID"];
var flixel_input_gamepad_id_PSVitaID = function() { };
$hxClasses["flixel.input.gamepad.id.PSVitaID"] = flixel_input_gamepad_id_PSVitaID;
flixel_input_gamepad_id_PSVitaID.__name__ = ["flixel","input","gamepad","id","PSVitaID"];
var flixel_input_gamepad_id_WiiRemoteID = function() { };
$hxClasses["flixel.input.gamepad.id.WiiRemoteID"] = flixel_input_gamepad_id_WiiRemoteID;
flixel_input_gamepad_id_WiiRemoteID.__name__ = ["flixel","input","gamepad","id","WiiRemoteID"];
var flixel_input_gamepad_id_XInputID = function() { };
$hxClasses["flixel.input.gamepad.id.XInputID"] = flixel_input_gamepad_id_XInputID;
flixel_input_gamepad_id_XInputID.__name__ = ["flixel","input","gamepad","id","XInputID"];
var flixel_input_gamepad_lists_FlxBaseGamepadList = function(status,gamepad) {
	this.status = status;
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxBaseGamepadList"] = flixel_input_gamepad_lists_FlxBaseGamepadList;
flixel_input_gamepad_lists_FlxBaseGamepadList.__name__ = ["flixel","input","gamepad","lists","FlxBaseGamepadList"];
flixel_input_gamepad_lists_FlxBaseGamepadList.prototype = {
	check: function(id) {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(id),Status);
	}
	,checkRaw: function(id) {
		return this.gamepad.checkStatusRaw(id,this.status);
	}
	,get_ANY: function() {
		var _g = 0;
		var _g1 = this.gamepad.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && this.gamepad.checkStatusRaw(button.ID,this.status)) {
				return true;
			}
		}
		return false;
	}
	,__class__: flixel_input_gamepad_lists_FlxBaseGamepadList
	,__properties__: {get_ANY:"get_ANY"}
};
var flixel_input_gamepad_lists_FlxGamepadAnalogList = function(gamepad) {
	this.value = new flixel_input_gamepad_lists_FlxGamepadAnalogValueList(gamepad);
	this.justMoved = new flixel_input_gamepad_lists_FlxGamepadAnalogStateList(2,gamepad);
	this.justReleased = new flixel_input_gamepad_lists_FlxGamepadAnalogStateList(-1,gamepad);
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadAnalogList"] = flixel_input_gamepad_lists_FlxGamepadAnalogList;
flixel_input_gamepad_lists_FlxGamepadAnalogList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadAnalogList"];
flixel_input_gamepad_lists_FlxGamepadAnalogList.prototype = {
	__class__: flixel_input_gamepad_lists_FlxGamepadAnalogList
};
var flixel_input_gamepad_lists_FlxGamepadAnalogStateList = function(status,gamepad) {
	this.status = status;
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadAnalogStateList"] = flixel_input_gamepad_lists_FlxGamepadAnalogStateList;
flixel_input_gamepad_lists_FlxGamepadAnalogStateList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadAnalogStateList"];
flixel_input_gamepad_lists_FlxGamepadAnalogStateList.prototype = {
	get_LEFT_STICK: function() {
		return this.checkXY(19);
	}
	,get_LEFT_STICK_X: function() {
		var stick = this.gamepad.mapping.getAnalogStick(19);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.x,this.status);
		}
	}
	,get_LEFT_STICK_Y: function() {
		var stick = this.gamepad.mapping.getAnalogStick(19);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.y,this.status);
		}
	}
	,get_RIGHT_STICK: function() {
		return this.checkXY(20);
	}
	,get_RIGHT_STICK_X: function() {
		var stick = this.gamepad.mapping.getAnalogStick(20);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.x,this.status);
		}
	}
	,get_RIGHT_STICK_Y: function() {
		var stick = this.gamepad.mapping.getAnalogStick(20);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.y,this.status);
		}
	}
	,checkXY: function(id) {
		var stick = this.gamepad.mapping.getAnalogStick(id);
		if(stick == null) {
			return false;
		}
		var xVal = this.gamepad.checkStatusRaw(stick.x,this.status);
		var yVal = this.gamepad.checkStatusRaw(stick.y,this.status);
		if(xVal && yVal) {
			return true;
		}
		if(xVal) {
			var yReleased = this.gamepad.checkStatusRaw(stick.y,0);
			var yJustReleased = this.gamepad.checkStatusRaw(stick.y,-1);
			if(yReleased || yJustReleased) {
				return true;
			}
		}
		if(yVal) {
			var xReleased = this.gamepad.checkStatusRaw(stick.x,0);
			var xJustReleased = this.gamepad.checkStatusRaw(stick.x,-1);
			if(xReleased || xJustReleased) {
				return true;
			}
		}
		return false;
	}
	,checkX: function(id) {
		var stick = this.gamepad.mapping.getAnalogStick(id);
		if(stick == null) {
			return false;
		}
		return this.gamepad.checkStatusRaw(stick.x,this.status);
	}
	,checkY: function(id) {
		var stick = this.gamepad.mapping.getAnalogStick(id);
		if(stick == null) {
			return false;
		}
		return this.gamepad.checkStatusRaw(stick.y,this.status);
	}
	,checkRaw: function(RawID,Status) {
		return this.gamepad.checkStatusRaw(RawID,Status);
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadAnalogStateList
	,__properties__: {get_RIGHT_STICK_Y:"get_RIGHT_STICK_Y",get_RIGHT_STICK_X:"get_RIGHT_STICK_X",get_RIGHT_STICK:"get_RIGHT_STICK",get_LEFT_STICK_Y:"get_LEFT_STICK_Y",get_LEFT_STICK_X:"get_LEFT_STICK_X",get_LEFT_STICK:"get_LEFT_STICK"}
};
var flixel_input_gamepad_lists_FlxGamepadAnalogValueList = function(gamepad) {
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadAnalogValueList"] = flixel_input_gamepad_lists_FlxGamepadAnalogValueList;
flixel_input_gamepad_lists_FlxGamepadAnalogValueList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadAnalogValueList"];
flixel_input_gamepad_lists_FlxGamepadAnalogValueList.prototype = {
	get_LEFT_STICK_X: function() {
		var _this = this.gamepad;
		return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(19));
	}
	,get_LEFT_STICK_Y: function() {
		var _this = this.gamepad;
		return _this.getYAxisRaw(_this.mapping.getAnalogStick(19));
	}
	,get_RIGHT_STICK_X: function() {
		var _this = this.gamepad;
		return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(20));
	}
	,get_RIGHT_STICK_Y: function() {
		var _this = this.gamepad;
		return _this.getYAxisRaw(_this.mapping.getAnalogStick(20));
	}
	,get_LEFT_TRIGGER: function() {
		return this.gamepad.getAxis(17);
	}
	,get_RIGHT_TRIGGER: function() {
		return this.gamepad.getAxis(18);
	}
	,get_POINTER_X: function() {
		return this.gamepad.getAxis(28);
	}
	,get_POINTER_Y: function() {
		return this.gamepad.getAxis(29);
	}
	,getAxis: function(id) {
		return this.gamepad.getAxis(id);
	}
	,getXAxis: function(id) {
		var _this = this.gamepad;
		return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(id));
	}
	,getYAxis: function(id) {
		var _this = this.gamepad;
		return _this.getYAxisRaw(_this.mapping.getAnalogStick(id));
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadAnalogValueList
	,__properties__: {get_POINTER_Y:"get_POINTER_Y",get_POINTER_X:"get_POINTER_X",get_RIGHT_TRIGGER:"get_RIGHT_TRIGGER",get_LEFT_TRIGGER:"get_LEFT_TRIGGER",get_RIGHT_STICK_Y:"get_RIGHT_STICK_Y",get_RIGHT_STICK_X:"get_RIGHT_STICK_X",get_LEFT_STICK_Y:"get_LEFT_STICK_Y",get_LEFT_STICK_X:"get_LEFT_STICK_X"}
};
var flixel_input_gamepad_lists_FlxGamepadButtonList = function(status,gamepad) {
	flixel_input_gamepad_lists_FlxBaseGamepadList.call(this,status,gamepad);
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadButtonList"] = flixel_input_gamepad_lists_FlxGamepadButtonList;
flixel_input_gamepad_lists_FlxGamepadButtonList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadButtonList"];
flixel_input_gamepad_lists_FlxGamepadButtonList.__super__ = flixel_input_gamepad_lists_FlxBaseGamepadList;
flixel_input_gamepad_lists_FlxGamepadButtonList.prototype = $extend(flixel_input_gamepad_lists_FlxBaseGamepadList.prototype,{
	get_A: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(0),Status);
	}
	,get_B: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(1),Status);
	}
	,get_X: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(2),Status);
	}
	,get_Y: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(3),Status);
	}
	,get_LEFT_SHOULDER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(4),Status);
	}
	,get_RIGHT_SHOULDER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(5),Status);
	}
	,get_BACK: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(6),Status);
	}
	,get_START: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(7),Status);
	}
	,get_LEFT_STICK_CLICK: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(8),Status);
	}
	,get_RIGHT_STICK_CLICK: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(9),Status);
	}
	,get_GUIDE: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(10),Status);
	}
	,get_DPAD_UP: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(11),Status);
	}
	,get_DPAD_DOWN: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(12),Status);
	}
	,get_DPAD_LEFT: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(13),Status);
	}
	,get_DPAD_RIGHT: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(14),Status);
	}
	,get_LEFT_TRIGGER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(17),Status);
	}
	,get_RIGHT_TRIGGER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(18),Status);
	}
	,get_EXTRA_0: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(30),Status);
	}
	,get_EXTRA_1: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(31),Status);
	}
	,get_EXTRA_2: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(32),Status);
	}
	,get_EXTRA_3: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(33),Status);
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadButtonList
	,__properties__: $extend(flixel_input_gamepad_lists_FlxBaseGamepadList.prototype.__properties__,{get_EXTRA_3:"get_EXTRA_3",get_EXTRA_2:"get_EXTRA_2",get_EXTRA_1:"get_EXTRA_1",get_EXTRA_0:"get_EXTRA_0",get_RIGHT_TRIGGER:"get_RIGHT_TRIGGER",get_LEFT_TRIGGER:"get_LEFT_TRIGGER",get_DPAD_RIGHT:"get_DPAD_RIGHT",get_DPAD_LEFT:"get_DPAD_LEFT",get_DPAD_DOWN:"get_DPAD_DOWN",get_DPAD_UP:"get_DPAD_UP",get_GUIDE:"get_GUIDE",get_RIGHT_STICK_CLICK:"get_RIGHT_STICK_CLICK",get_LEFT_STICK_CLICK:"get_LEFT_STICK_CLICK",get_START:"get_START",get_BACK:"get_BACK",get_RIGHT_SHOULDER:"get_RIGHT_SHOULDER",get_LEFT_SHOULDER:"get_LEFT_SHOULDER",get_Y:"get_Y",get_X:"get_X",get_B:"get_B",get_A:"get_A"})
});
var flixel_input_gamepad_lists_FlxGamepadMotionValueList = function(gamepad) {
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadMotionValueList"] = flixel_input_gamepad_lists_FlxGamepadMotionValueList;
flixel_input_gamepad_lists_FlxGamepadMotionValueList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadMotionValueList"];
flixel_input_gamepad_lists_FlxGamepadMotionValueList.prototype = {
	get_TILT_PITCH: function() {
		if(!this.gamepad.mapping.supportsMotion) {
			return 0;
		} else {
			return this.gamepad.getAxis(26);
		}
	}
	,get_TILT_ROLL: function() {
		if(!this.gamepad.mapping.supportsMotion) {
			return 0;
		} else {
			return this.gamepad.getAxis(27);
		}
	}
	,getAxis: function(id) {
		if(!this.gamepad.mapping.supportsMotion) {
			return 0;
		}
		return this.gamepad.getAxis(id);
	}
	,get_isSupported: function() {
		return this.gamepad.mapping.supportsMotion;
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadMotionValueList
	,__properties__: {get_TILT_ROLL:"get_TILT_ROLL",get_TILT_PITCH:"get_TILT_PITCH",get_isSupported:"get_isSupported"}
};
var flixel_input_gamepad_lists_FlxGamepadPointerValueList = function(gamepad) {
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadPointerValueList"] = flixel_input_gamepad_lists_FlxGamepadPointerValueList;
flixel_input_gamepad_lists_FlxGamepadPointerValueList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadPointerValueList"];
flixel_input_gamepad_lists_FlxGamepadPointerValueList.prototype = {
	get_X: function() {
		if(!this.gamepad.mapping.supportsPointer) {
			return 0;
		} else {
			return this.gamepad.getAxis(28);
		}
	}
	,get_Y: function() {
		if(!this.gamepad.mapping.supportsPointer) {
			return 0;
		} else {
			return this.gamepad.getAxis(29);
		}
	}
	,getAxis: function(id) {
		if(!this.gamepad.mapping.supportsPointer) {
			return 0;
		}
		return this.gamepad.getAxis(id);
	}
	,get_isSupported: function() {
		return this.gamepad.mapping.supportsPointer;
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadPointerValueList
	,__properties__: {get_Y:"get_Y",get_X:"get_X",get_isSupported:"get_isSupported"}
};
var flixel_input_gamepad_mappings_FlxGamepadMapping = function(attachment) {
	this.attachment = flixel_input_gamepad_FlxGamepadAttachment.NONE;
	this.supportsPointer = false;
	this.supportsMotion = false;
	if(attachment != null) {
		this.set_attachment(attachment);
	}
	this.initValues();
};
$hxClasses["flixel.input.gamepad.mappings.FlxGamepadMapping"] = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_FlxGamepadMapping.__name__ = ["flixel","input","gamepad","mappings","FlxGamepadMapping"];
flixel_input_gamepad_mappings_FlxGamepadMapping.prototype = {
	initValues: function() {
	}
	,getAnalogStick: function(ID) {
		switch(ID) {
		case 19:
			return this.leftStick;
		case 20:
			return this.rightStick;
		default:
			return null;
		}
	}
	,getID: function(rawID) {
		return -1;
	}
	,getRawID: function(ID) {
		return -1;
	}
	,isAxisForMotion: function(ID) {
		return false;
	}
	,isAxisFlipped: function(axisID) {
		return false;
	}
	,set_attachment: function(attachment) {
		return this.attachment = attachment;
	}
	,__class__: flixel_input_gamepad_mappings_FlxGamepadMapping
	,__properties__: {set_attachment:"set_attachment"}
};
var flixel_input_gamepad_mappings_Manufacturer = $hxClasses["flixel.input.gamepad.mappings.Manufacturer"] = { __ename__ : ["flixel","input","gamepad","mappings","Manufacturer"], __constructs__ : ["GooglePepper","AdobeWindows","Unknown"] };
flixel_input_gamepad_mappings_Manufacturer.GooglePepper = ["GooglePepper",0];
flixel_input_gamepad_mappings_Manufacturer.GooglePepper.toString = $estr;
flixel_input_gamepad_mappings_Manufacturer.GooglePepper.__enum__ = flixel_input_gamepad_mappings_Manufacturer;
flixel_input_gamepad_mappings_Manufacturer.AdobeWindows = ["AdobeWindows",1];
flixel_input_gamepad_mappings_Manufacturer.AdobeWindows.toString = $estr;
flixel_input_gamepad_mappings_Manufacturer.AdobeWindows.__enum__ = flixel_input_gamepad_mappings_Manufacturer;
flixel_input_gamepad_mappings_Manufacturer.Unknown = ["Unknown",2];
flixel_input_gamepad_mappings_Manufacturer.Unknown.toString = $estr;
flixel_input_gamepad_mappings_Manufacturer.Unknown.__enum__ = flixel_input_gamepad_mappings_Manufacturer;
flixel_input_gamepad_mappings_Manufacturer.__meta__ = { obj : { SuppressWarnings : ["checkstyle:MemberName"]}};
var flixel_input_gamepad_mappings_LogitechMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.LogitechMapping"] = flixel_input_gamepad_mappings_LogitechMapping;
flixel_input_gamepad_mappings_LogitechMapping.__name__ = ["flixel","input","gamepad","mappings","LogitechMapping"];
flixel_input_gamepad_mappings_LogitechMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_LogitechMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case -5:
			return 10;
		case 0:
			return 2;
		case 1:
			return 0;
		case 2:
			return 1;
		case 3:
			return 3;
		case 4:
			return 4;
		case 5:
			return 5;
		case 6:
			return 17;
		case 7:
			return 18;
		case 8:
			return 6;
		case 9:
			return 7;
		case 10:
			return 8;
		case 11:
			return 9;
		case 16:
			return 11;
		case 17:
			return 12;
		case 18:
			return 13;
		case 19:
			return 14;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 1;
		case 1:
			return 2;
		case 2:
			return 0;
		case 3:
			return 3;
		case 4:
			return 4;
		case 5:
			return 5;
		case 6:
			return 8;
		case 7:
			return 9;
		case 8:
			return 10;
		case 9:
			return 11;
		case 10:
			return -5;
		case 11:
			return 16;
		case 12:
			return 17;
		case 13:
			return 18;
		case 14:
			return 19;
		case 17:
			return 6;
		case 18:
			return 7;
		case 34:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_LogitechMapping
});
var flixel_input_gamepad_mappings_MFiMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.MFiMapping"] = flixel_input_gamepad_mappings_MFiMapping;
flixel_input_gamepad_mappings_MFiMapping.__name__ = ["flixel","input","gamepad","mappings","MFiMapping"];
flixel_input_gamepad_mappings_MFiMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_MFiMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 6:
			return 0;
		case 7:
			return 1;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 6;
		case 11:
			return 10;
		case 12:
			return 7;
		case 13:
			return 8;
		case 14:
			return 9;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 8:
			return 13;
		case 9:
			return 14;
		case 10:
			return 11;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 17:
			return 4;
		case 18:
			return 5;
		case 34:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_MFiMapping
});
var flixel_input_gamepad_mappings_MayflashWiiRemoteMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.MayflashWiiRemoteMapping"] = flixel_input_gamepad_mappings_MayflashWiiRemoteMapping;
flixel_input_gamepad_mappings_MayflashWiiRemoteMapping.__name__ = ["flixel","input","gamepad","mappings","MayflashWiiRemoteMapping"];
flixel_input_gamepad_mappings_MayflashWiiRemoteMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_MayflashWiiRemoteMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.supportsPointer = true;
	}
	,getID: function(rawID) {
		var _g = this.attachment;
		switch(_g[1]) {
		case 0:
			return this.getIDNunchuk(rawID);
		case 1:
			return this.getIDClassicController(rawID);
		case 2:
			return this.getIDDefault(rawID);
		}
	}
	,getIDClassicController: function(rawID) {
		switch(rawID) {
		case 4:
			return 11;
		case 5:
			return 12;
		case 6:
			return 13;
		case 7:
			return 14;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 0;
		case 11:
			return 1;
		case 12:
			return 17;
		case 13:
			return 18;
		case 14:
			return 4;
		case 15:
			return 5;
		case 16:
			return 6;
		case 17:
			return 7;
		case 19:
			return 10;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getIDNunchuk: function(rawID) {
		switch(rawID) {
		case 4:
			return 11;
		case 5:
			return 12;
		case 6:
			return 13;
		case 7:
			return 14;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 0;
		case 11:
			return 1;
		case 12:
			return 6;
		case 13:
			return 7;
		case 14:
			return 17;
		case 15:
			return 4;
		case 19:
			return 10;
		default:
			var tmp = rawID == flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawUp;
			var tmp1 = rawID == flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawDown;
			var tmp2 = rawID == flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
			var tmp3 = rawID == flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawRight;
			return -1;
		}
	}
	,getIDDefault: function(rawID) {
		switch(rawID) {
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 0;
		case 11:
			return 1;
		case 12:
			return 6;
		case 13:
			return 7;
		case 19:
			return 10;
		case 22:
			return 11;
		case 23:
			return 12;
		case 24:
			return 13;
		case 25:
			return 14;
		default:
			return -1;
		}
	}
	,getRawID: function(ID) {
		var _g = this.attachment;
		switch(_g[1]) {
		case 0:
			return this.getRawNunchuk(ID);
		case 1:
			return this.getRawClassicController(ID);
		case 2:
			return this.getRawDefault(ID);
		}
	}
	,getRawClassicController: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 11;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 14;
		case 5:
			return 15;
		case 6:
			return 16;
		case 7:
			return 17;
		case 10:
			return 19;
		case 11:
			return 4;
		case 12:
			return 5;
		case 13:
			return 6;
		case 14:
			return 7;
		case 17:
			return 12;
		case 18:
			return 13;
		case 30:
			return -1;
		case 31:
			return -1;
		case 34:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return this.getRawDefault(ID);
		}
	}
	,getRawNunchuk: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 11;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 6:
			return 12;
		case 7:
			return 13;
		case 10:
			return 19;
		case 11:
			return 4;
		case 12:
			return 5;
		case 13:
			return 6;
		case 14:
			return 7;
		case 17:
			return 14;
		case 28:
			return 2;
		case 29:
			return 3;
		case 34:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,getRawDefault: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 11;
		case 2:
			return 8;
		case 3:
			return 9;
		case 6:
			return 12;
		case 7:
			return 13;
		case 10:
			return 19;
		case 11:
			return 22;
		case 12:
			return 23;
		case 13:
			return 24;
		case 14:
			return 25;
		default:
			return -1;
		}
	}
	,set_attachment: function(attachment) {
		var tmp;
		switch(attachment[1]) {
		case 0:case 1:
			tmp = flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK;
			break;
		case 2:
			tmp = flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD;
			break;
		}
		this.leftStick = tmp;
		this.rightStick = attachment[1] == 1 ? flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK : null;
		return flixel_input_gamepad_mappings_FlxGamepadMapping.prototype.set_attachment.call(this,attachment);
	}
	,__class__: flixel_input_gamepad_mappings_MayflashWiiRemoteMapping
});
var flixel_input_gamepad_mappings_OUYAMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.OUYAMapping"] = flixel_input_gamepad_mappings_OUYAMapping;
flixel_input_gamepad_mappings_OUYAMapping.__name__ = ["flixel","input","gamepad","mappings","OUYAMapping"];
flixel_input_gamepad_mappings_OUYAMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_OUYAMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 0:
			return 0;
		case 1:
			return 1;
		case 2:
			return 10;
		case 3:
			return 2;
		case 4:
			return 3;
		case 6:
			return 4;
		case 7:
			return 5;
		case 8:
			return 17;
		case 9:
			return 18;
		case 10:
			return 8;
		case 11:
			return 9;
		case 13:
			return 13;
		case 14:
			return 14;
		case 15:
			return 12;
		case 16:
			return 11;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 0;
		case 1:
			return 1;
		case 2:
			return 3;
		case 3:
			return 4;
		case 4:
			return 6;
		case 5:
			return 7;
		case 8:
			return 10;
		case 9:
			return 11;
		case 10:
			return 2;
		case 11:
			return 16;
		case 12:
			return 15;
		case 13:
			return 13;
		case 14:
			return 14;
		case 17:
			return 8;
		case 18:
			return 9;
		case 34:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_OUYAMapping
});
var flixel_input_gamepad_mappings_PS4Mapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.PS4Mapping"] = flixel_input_gamepad_mappings_PS4Mapping;
flixel_input_gamepad_mappings_PS4Mapping.__name__ = ["flixel","input","gamepad","mappings","PS4Mapping"];
flixel_input_gamepad_mappings_PS4Mapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_PS4Mapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 6:
			return 0;
		case 7:
			return 1;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 6;
		case 11:
			return 10;
		case 12:
			return 7;
		case 13:
			return 8;
		case 14:
			return 9;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 8:
			return 13;
		case 9:
			return 14;
		case 10:
			return 11;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 17:
			return 4;
		case 18:
			return 5;
		case 34:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_PS4Mapping
});
var flixel_input_gamepad_mappings_PSVitaMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.PSVitaMapping"] = flixel_input_gamepad_mappings_PSVitaMapping;
flixel_input_gamepad_mappings_PSVitaMapping.__name__ = ["flixel","input","gamepad","mappings","PSVitaMapping"];
flixel_input_gamepad_mappings_PSVitaMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_PSVitaMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 6:
			return 0;
		case 7:
			return 1;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 6;
		case 12:
			return 7;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 34;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 34:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,isAxisFlipped: function(axisID) {
		if(axisID != flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.y) {
			return axisID == flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.y;
		} else {
			return true;
		}
	}
	,__class__: flixel_input_gamepad_mappings_PSVitaMapping
});
var flixel_input_gamepad_mappings_WiiRemoteMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.WiiRemoteMapping"] = flixel_input_gamepad_mappings_WiiRemoteMapping;
flixel_input_gamepad_mappings_WiiRemoteMapping.__name__ = ["flixel","input","gamepad","mappings","WiiRemoteMapping"];
flixel_input_gamepad_mappings_WiiRemoteMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_WiiRemoteMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.supportsMotion = true;
		this.supportsPointer = false;
	}
	,getID: function(rawID) {
		var _g = this.attachment;
		switch(_g[1]) {
		case 0:
			return this.getIDNunchuk(rawID);
		case 1:
			return this.getIDClassicController(rawID);
		case 2:
			return this.getIDDefault(rawID);
		}
	}
	,getIDClassicController: function(rawID) {
		switch(rawID) {
		case 5:
			return 11;
		case 6:
			return 12;
		case 7:
			return 13;
		case 8:
			return 14;
		case 9:
			return 1;
		case 10:
			return 0;
		case 11:
			return 2;
		case 12:
			return 3;
		case 13:
			return 17;
		case 14:
			return 18;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 7;
		case 18:
			return 6;
		case 19:
			return 10;
		case 20:
			return 30;
		case 21:
			return 31;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getIDNunchuk: function(rawID) {
		switch(rawID) {
		case 5:
			return 11;
		case 6:
			return 12;
		case 7:
			return 13;
		case 8:
			return 14;
		case 9:
			return 0;
		case 10:
			return 1;
		case 11:
			return 4;
		case 12:
			return 17;
		case 13:
			return 2;
		case 14:
			return 3;
		case 15:
			return 7;
		case 16:
			return 6;
		case 17:
			return 10;
		default:
			var tmp = rawID == flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawUp;
			var tmp1 = rawID == flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawDown;
			var tmp2 = rawID == flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
			var tmp3 = rawID == flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawRight;
			return -1;
		}
	}
	,getIDDefault: function(rawID) {
		switch(rawID) {
		case 9:
			return 2;
		case 10:
			return 3;
		case 11:
			return 0;
		case 12:
			return 1;
		case 13:
			return 7;
		case 14:
			return 6;
		case 15:
			return 10;
		case 22:
			return 11;
		case 23:
			return 12;
		case 24:
			return 13;
		case 25:
			return 14;
		default:
			return -1;
		}
	}
	,getRawID: function(ID) {
		var _g = this.attachment;
		switch(_g[1]) {
		case 0:
			return this.getRawNunchuk(ID);
		case 1:
			return this.getRawClassicController(ID);
		case 2:
			return this.getRawDefault(ID);
		}
	}
	,getRawClassicController: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 9;
		case 2:
			return 11;
		case 3:
			return 12;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 18;
		case 7:
			return 17;
		case 10:
			return 19;
		case 11:
			return 5;
		case 12:
			return 6;
		case 13:
			return 7;
		case 14:
			return 8;
		case 17:
			return 13;
		case 18:
			return 14;
		case 30:
			return 20;
		case 31:
			return 21;
		case 34:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,getRawNunchuk: function(ID) {
		switch(ID) {
		case 0:
			return 9;
		case 1:
			return 10;
		case 2:
			return 13;
		case 3:
			return 14;
		case 4:
			return 11;
		case 6:
			return 16;
		case 7:
			return 15;
		case 10:
			return 17;
		case 11:
			return 5;
		case 12:
			return 6;
		case 13:
			return 7;
		case 14:
			return 8;
		case 17:
			return 12;
		case 26:
			return 3;
		case 27:
			return 2;
		case 34:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,getRawDefault: function(ID) {
		switch(ID) {
		case 0:
			return 11;
		case 1:
			return 12;
		case 2:
			return 9;
		case 3:
			return 10;
		case 6:
			return 14;
		case 7:
			return 13;
		case 10:
			return 15;
		case 11:
			return 22;
		case 12:
			return 23;
		case 13:
			return 24;
		case 14:
			return 25;
		case 26:
			return 2;
		case 27:
			return 3;
		default:
			return -1;
		}
	}
	,isAxisForMotion: function(ID) {
		if(this.attachment == flixel_input_gamepad_FlxGamepadAttachment.NONE) {
			if(ID == 2 || ID == 3) {
				return true;
			}
		} else if(this.attachment == flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK) {
			if(ID == 3 || ID == 2) {
				return true;
			}
		}
		return false;
	}
	,isAxisFlipped: function(axisID) {
		return axisID == 4;
	}
	,set_attachment: function(attachment) {
		var tmp;
		switch(attachment[1]) {
		case 0:case 1:
			tmp = flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK;
			break;
		case 2:
			tmp = flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD;
			break;
		}
		this.leftStick = tmp;
		this.rightStick = attachment[1] == 1 ? flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK : null;
		return flixel_input_gamepad_mappings_FlxGamepadMapping.prototype.set_attachment.call(this,attachment);
	}
	,__class__: flixel_input_gamepad_mappings_WiiRemoteMapping
});
var flixel_input_gamepad_mappings_XInputMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.XInputMapping"] = flixel_input_gamepad_mappings_XInputMapping;
flixel_input_gamepad_mappings_XInputMapping.__name__ = ["flixel","input","gamepad","mappings","XInputMapping"];
flixel_input_gamepad_mappings_XInputMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_XInputMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case -1:
			return 10;
		case 4:
			return 17;
		case 5:
			return 18;
		case 6:
			return 1;
		case 7:
			return 0;
		case 8:
			return 3;
		case 9:
			return 2;
		case 10:
			return 6;
		case 12:
			return 7;
		case 13:
			return 8;
		case 14:
			return 9;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			var id = rawID;
			if(id == this.leftStick.rawUp) {
				return 34;
			} else {
				var id1 = rawID;
				if(id1 == this.leftStick.rawDown) {
					return 36;
				} else {
					var id2 = rawID;
					if(id2 == this.leftStick.rawLeft) {
						return 37;
					} else {
						var id3 = rawID;
						if(id3 == this.leftStick.rawRight) {
							return 35;
						} else {
							var id4 = rawID;
							if(id4 == this.rightStick.rawUp) {
								return 38;
							} else {
								var id5 = rawID;
								if(id5 == this.rightStick.rawDown) {
									return 40;
								} else {
									var id6 = rawID;
									if(id6 == this.rightStick.rawLeft) {
										return 41;
									} else {
										var id7 = rawID;
										if(id7 == this.rightStick.rawRight) {
											return 39;
										} else {
											return -1;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 8:
			return 13;
		case 9:
			return 14;
		case 10:
			return -1;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 17:
			return 4;
		case 18:
			return 5;
		case 34:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_XInputMapping
});
var flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$ = {};
$hxClasses["flixel.input.keyboard._FlxKey.FlxKey_Impl_"] = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.__name__ = ["flixel","input","keyboard","_FlxKey","FlxKey_Impl_"];
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromString = function(s) {
	s = s.toUpperCase();
	var _this = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap;
	if(__map_reserved[s] != null ? _this.existsReserved(s) : _this.h.hasOwnProperty(s)) {
		var _this1 = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap;
		if(__map_reserved[s] != null) {
			return _this1.getReserved(s);
		} else {
			return _this1.h[s];
		}
	} else {
		return -1;
	}
};
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.toString = function(this1) {
	return flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.toStringMap.h[this1];
};
var flixel_input_keyboard_FlxKeyList = function(status,keyManager) {
	flixel_input_FlxBaseKeyList.call(this,status,keyManager);
};
$hxClasses["flixel.input.keyboard.FlxKeyList"] = flixel_input_keyboard_FlxKeyList;
flixel_input_keyboard_FlxKeyList.__name__ = ["flixel","input","keyboard","FlxKeyList"];
flixel_input_keyboard_FlxKeyList.__super__ = flixel_input_FlxBaseKeyList;
flixel_input_keyboard_FlxKeyList.prototype = $extend(flixel_input_FlxBaseKeyList.prototype,{
	get_A: function() {
		return this.keyManager.checkStatus(65,this.status);
	}
	,get_B: function() {
		return this.keyManager.checkStatus(66,this.status);
	}
	,get_C: function() {
		return this.keyManager.checkStatus(67,this.status);
	}
	,get_D: function() {
		return this.keyManager.checkStatus(68,this.status);
	}
	,get_E: function() {
		return this.keyManager.checkStatus(69,this.status);
	}
	,get_F: function() {
		return this.keyManager.checkStatus(70,this.status);
	}
	,get_G: function() {
		return this.keyManager.checkStatus(71,this.status);
	}
	,get_H: function() {
		return this.keyManager.checkStatus(72,this.status);
	}
	,get_I: function() {
		return this.keyManager.checkStatus(73,this.status);
	}
	,get_J: function() {
		return this.keyManager.checkStatus(74,this.status);
	}
	,get_K: function() {
		return this.keyManager.checkStatus(75,this.status);
	}
	,get_L: function() {
		return this.keyManager.checkStatus(76,this.status);
	}
	,get_M: function() {
		return this.keyManager.checkStatus(77,this.status);
	}
	,get_N: function() {
		return this.keyManager.checkStatus(78,this.status);
	}
	,get_O: function() {
		return this.keyManager.checkStatus(79,this.status);
	}
	,get_P: function() {
		return this.keyManager.checkStatus(80,this.status);
	}
	,get_Q: function() {
		return this.keyManager.checkStatus(81,this.status);
	}
	,get_R: function() {
		return this.keyManager.checkStatus(82,this.status);
	}
	,get_S: function() {
		return this.keyManager.checkStatus(83,this.status);
	}
	,get_T: function() {
		return this.keyManager.checkStatus(84,this.status);
	}
	,get_U: function() {
		return this.keyManager.checkStatus(85,this.status);
	}
	,get_V: function() {
		return this.keyManager.checkStatus(86,this.status);
	}
	,get_W: function() {
		return this.keyManager.checkStatus(87,this.status);
	}
	,get_X: function() {
		return this.keyManager.checkStatus(88,this.status);
	}
	,get_Y: function() {
		return this.keyManager.checkStatus(89,this.status);
	}
	,get_Z: function() {
		return this.keyManager.checkStatus(90,this.status);
	}
	,get_ZERO: function() {
		return this.keyManager.checkStatus(48,this.status);
	}
	,get_ONE: function() {
		return this.keyManager.checkStatus(49,this.status);
	}
	,get_TWO: function() {
		return this.keyManager.checkStatus(50,this.status);
	}
	,get_THREE: function() {
		return this.keyManager.checkStatus(51,this.status);
	}
	,get_FOUR: function() {
		return this.keyManager.checkStatus(52,this.status);
	}
	,get_FIVE: function() {
		return this.keyManager.checkStatus(53,this.status);
	}
	,get_SIX: function() {
		return this.keyManager.checkStatus(54,this.status);
	}
	,get_SEVEN: function() {
		return this.keyManager.checkStatus(55,this.status);
	}
	,get_EIGHT: function() {
		return this.keyManager.checkStatus(56,this.status);
	}
	,get_NINE: function() {
		return this.keyManager.checkStatus(57,this.status);
	}
	,get_PAGEUP: function() {
		return this.keyManager.checkStatus(33,this.status);
	}
	,get_PAGEDOWN: function() {
		return this.keyManager.checkStatus(34,this.status);
	}
	,get_HOME: function() {
		return this.keyManager.checkStatus(36,this.status);
	}
	,get_END: function() {
		return this.keyManager.checkStatus(35,this.status);
	}
	,get_INSERT: function() {
		return this.keyManager.checkStatus(45,this.status);
	}
	,get_ESCAPE: function() {
		return this.keyManager.checkStatus(27,this.status);
	}
	,get_MINUS: function() {
		return this.keyManager.checkStatus(189,this.status);
	}
	,get_PLUS: function() {
		return this.keyManager.checkStatus(187,this.status);
	}
	,get_DELETE: function() {
		return this.keyManager.checkStatus(46,this.status);
	}
	,get_BACKSPACE: function() {
		return this.keyManager.checkStatus(8,this.status);
	}
	,get_LBRACKET: function() {
		return this.keyManager.checkStatus(219,this.status);
	}
	,get_RBRACKET: function() {
		return this.keyManager.checkStatus(221,this.status);
	}
	,get_BACKSLASH: function() {
		return this.keyManager.checkStatus(220,this.status);
	}
	,get_CAPSLOCK: function() {
		return this.keyManager.checkStatus(20,this.status);
	}
	,get_SEMICOLON: function() {
		return this.keyManager.checkStatus(186,this.status);
	}
	,get_QUOTE: function() {
		return this.keyManager.checkStatus(222,this.status);
	}
	,get_ENTER: function() {
		return this.keyManager.checkStatus(13,this.status);
	}
	,get_SHIFT: function() {
		return this.keyManager.checkStatus(16,this.status);
	}
	,get_COMMA: function() {
		return this.keyManager.checkStatus(188,this.status);
	}
	,get_PERIOD: function() {
		return this.keyManager.checkStatus(190,this.status);
	}
	,get_SLASH: function() {
		return this.keyManager.checkStatus(191,this.status);
	}
	,get_GRAVEACCENT: function() {
		return this.keyManager.checkStatus(192,this.status);
	}
	,get_CONTROL: function() {
		return this.keyManager.checkStatus(17,this.status);
	}
	,get_ALT: function() {
		return this.keyManager.checkStatus(18,this.status);
	}
	,get_SPACE: function() {
		return this.keyManager.checkStatus(32,this.status);
	}
	,get_UP: function() {
		return this.keyManager.checkStatus(38,this.status);
	}
	,get_DOWN: function() {
		return this.keyManager.checkStatus(40,this.status);
	}
	,get_LEFT: function() {
		return this.keyManager.checkStatus(37,this.status);
	}
	,get_RIGHT: function() {
		return this.keyManager.checkStatus(39,this.status);
	}
	,get_TAB: function() {
		return this.keyManager.checkStatus(9,this.status);
	}
	,get_PRINTSCREEN: function() {
		return this.keyManager.checkStatus(301,this.status);
	}
	,get_F1: function() {
		return this.keyManager.checkStatus(112,this.status);
	}
	,get_F2: function() {
		return this.keyManager.checkStatus(113,this.status);
	}
	,get_F3: function() {
		return this.keyManager.checkStatus(114,this.status);
	}
	,get_F4: function() {
		return this.keyManager.checkStatus(115,this.status);
	}
	,get_F5: function() {
		return this.keyManager.checkStatus(116,this.status);
	}
	,get_F6: function() {
		return this.keyManager.checkStatus(117,this.status);
	}
	,get_F7: function() {
		return this.keyManager.checkStatus(118,this.status);
	}
	,get_F8: function() {
		return this.keyManager.checkStatus(119,this.status);
	}
	,get_F9: function() {
		return this.keyManager.checkStatus(120,this.status);
	}
	,get_F10: function() {
		return this.keyManager.checkStatus(121,this.status);
	}
	,get_F11: function() {
		return this.keyManager.checkStatus(122,this.status);
	}
	,get_F12: function() {
		return this.keyManager.checkStatus(123,this.status);
	}
	,get_NUMPADONE: function() {
		return this.keyManager.checkStatus(97,this.status);
	}
	,get_NUMPADTWO: function() {
		return this.keyManager.checkStatus(98,this.status);
	}
	,get_NUMPADTHREE: function() {
		return this.keyManager.checkStatus(99,this.status);
	}
	,get_NUMPADFOUR: function() {
		return this.keyManager.checkStatus(100,this.status);
	}
	,get_NUMPADFIVE: function() {
		return this.keyManager.checkStatus(101,this.status);
	}
	,get_NUMPADSIX: function() {
		return this.keyManager.checkStatus(102,this.status);
	}
	,get_NUMPADSEVEN: function() {
		return this.keyManager.checkStatus(103,this.status);
	}
	,get_NUMPADEIGHT: function() {
		return this.keyManager.checkStatus(104,this.status);
	}
	,get_NUMPADNINE: function() {
		return this.keyManager.checkStatus(105,this.status);
	}
	,get_NUMPADZERO: function() {
		return this.keyManager.checkStatus(96,this.status);
	}
	,get_NUMPADMINUS: function() {
		return this.keyManager.checkStatus(109,this.status);
	}
	,get_NUMPADPLUS: function() {
		return this.keyManager.checkStatus(107,this.status);
	}
	,get_NUMPADPERIOD: function() {
		return this.keyManager.checkStatus(110,this.status);
	}
	,get_NUMPADMULTIPLY: function() {
		return this.keyManager.checkStatus(106,this.status);
	}
	,__class__: flixel_input_keyboard_FlxKeyList
	,__properties__: $extend(flixel_input_FlxBaseKeyList.prototype.__properties__,{get_NUMPADMULTIPLY:"get_NUMPADMULTIPLY",get_NUMPADPERIOD:"get_NUMPADPERIOD",get_NUMPADPLUS:"get_NUMPADPLUS",get_NUMPADMINUS:"get_NUMPADMINUS",get_NUMPADZERO:"get_NUMPADZERO",get_NUMPADNINE:"get_NUMPADNINE",get_NUMPADEIGHT:"get_NUMPADEIGHT",get_NUMPADSEVEN:"get_NUMPADSEVEN",get_NUMPADSIX:"get_NUMPADSIX",get_NUMPADFIVE:"get_NUMPADFIVE",get_NUMPADFOUR:"get_NUMPADFOUR",get_NUMPADTHREE:"get_NUMPADTHREE",get_NUMPADTWO:"get_NUMPADTWO",get_NUMPADONE:"get_NUMPADONE",get_F12:"get_F12",get_F11:"get_F11",get_F10:"get_F10",get_F9:"get_F9",get_F8:"get_F8",get_F7:"get_F7",get_F6:"get_F6",get_F5:"get_F5",get_F4:"get_F4",get_F3:"get_F3",get_F2:"get_F2",get_F1:"get_F1",get_PRINTSCREEN:"get_PRINTSCREEN",get_TAB:"get_TAB",get_RIGHT:"get_RIGHT",get_LEFT:"get_LEFT",get_DOWN:"get_DOWN",get_UP:"get_UP",get_SPACE:"get_SPACE",get_ALT:"get_ALT",get_CONTROL:"get_CONTROL",get_GRAVEACCENT:"get_GRAVEACCENT",get_SLASH:"get_SLASH",get_PERIOD:"get_PERIOD",get_COMMA:"get_COMMA",get_SHIFT:"get_SHIFT",get_ENTER:"get_ENTER",get_QUOTE:"get_QUOTE",get_SEMICOLON:"get_SEMICOLON",get_CAPSLOCK:"get_CAPSLOCK",get_BACKSLASH:"get_BACKSLASH",get_RBRACKET:"get_RBRACKET",get_LBRACKET:"get_LBRACKET",get_BACKSPACE:"get_BACKSPACE",get_DELETE:"get_DELETE",get_PLUS:"get_PLUS",get_MINUS:"get_MINUS",get_ESCAPE:"get_ESCAPE",get_INSERT:"get_INSERT",get_END:"get_END",get_HOME:"get_HOME",get_PAGEDOWN:"get_PAGEDOWN",get_PAGEUP:"get_PAGEUP",get_NINE:"get_NINE",get_EIGHT:"get_EIGHT",get_SEVEN:"get_SEVEN",get_SIX:"get_SIX",get_FIVE:"get_FIVE",get_FOUR:"get_FOUR",get_THREE:"get_THREE",get_TWO:"get_TWO",get_ONE:"get_ONE",get_ZERO:"get_ZERO",get_Z:"get_Z",get_Y:"get_Y",get_X:"get_X",get_W:"get_W",get_V:"get_V",get_U:"get_U",get_T:"get_T",get_S:"get_S",get_R:"get_R",get_Q:"get_Q",get_P:"get_P",get_O:"get_O",get_N:"get_N",get_M:"get_M",get_L:"get_L",get_K:"get_K",get_J:"get_J",get_I:"get_I",get_H:"get_H",get_G:"get_G",get_F:"get_F",get_E:"get_E",get_D:"get_D",get_C:"get_C",get_B:"get_B",get_A:"get_A"})
});
var flixel_input_keyboard_FlxKeyboard = function() {
	flixel_input_FlxKeyManager.call(this,flixel_input_keyboard_FlxKeyList);
	var _this = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap;
	var code = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(code.hasNext()) {
		var code1 = code.next();
		if(code1 != -2 && code1 != -1) {
			var input = new flixel_input_FlxInput(code1);
			this._keyListArray.push(input);
			this._keyListMap.h[code1] = input;
		}
	}
};
$hxClasses["flixel.input.keyboard.FlxKeyboard"] = flixel_input_keyboard_FlxKeyboard;
flixel_input_keyboard_FlxKeyboard.__name__ = ["flixel","input","keyboard","FlxKeyboard"];
flixel_input_keyboard_FlxKeyboard.__super__ = flixel_input_FlxKeyManager;
flixel_input_keyboard_FlxKeyboard.prototype = $extend(flixel_input_FlxKeyManager.prototype,{
	onKeyUp: function(event) {
		flixel_input_FlxKeyManager.prototype.onKeyUp.call(this,event);
	}
	,onKeyDown: function(event) {
		flixel_input_FlxKeyManager.prototype.onKeyDown.call(this,event);
	}
	,resolveKeyCode: function(e) {
		return e.keyCode;
	}
	,record: function() {
		var data = null;
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key == null || (key.current == 0 || key.current == -1)) {
				continue;
			}
			if(data == null) {
				data = [];
			}
			data.push(new flixel_system_replay_CodeValuePair(key.ID,key.current));
		}
		return data;
	}
	,playback: function(Record) {
		var i = 0;
		var l = Record.length;
		while(i < l) {
			var o = Record[i++];
			var o2 = this._keyListMap.get(o.code);
			o2.current = o.value;
		}
	}
	,__class__: flixel_input_keyboard_FlxKeyboard
});
var openfl_display_BitmapData = function(width,height,transparent,fillColor) {
	if(fillColor == null) {
		fillColor = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	this.__usingPingPongTexture = false;
	this.transparent = transparent;
	if(width == null) {
		width = 0;
	} else {
		width = width;
	}
	if(height == null) {
		height = 0;
	} else {
		height = height;
	}
	if(width < 0) {
		width = 0;
	} else {
		width = width;
	}
	if(height < 0) {
		height = 0;
	} else {
		height = height;
	}
	this.width = width;
	this.height = height;
	this.rect = new openfl_geom_Rectangle(0,0,width,height);
	if(width > 0 && height > 0) {
		if(transparent) {
			if((fillColor & -16777216) == 0) {
				fillColor = 0;
			}
		} else {
			fillColor = -16777216 | fillColor & 16777215;
		}
		fillColor = fillColor << 8 | fillColor >>> 24 & 255;
		this.image = new lime_graphics_Image(null,0,0,width,height,fillColor);
		this.image.set_transparent(transparent);
		this.__isValid = true;
	}
	this.__createUVs();
	this.__worldTransform = new openfl_geom_Matrix();
	this.__worldColorTransform = new openfl_geom_ColorTransform();
};
$hxClasses["openfl.display.BitmapData"] = openfl_display_BitmapData;
openfl_display_BitmapData.__name__ = ["openfl","display","BitmapData"];
openfl_display_BitmapData.__interfaces__ = [openfl_display_IBitmapDrawable];
openfl_display_BitmapData.fromBase64 = function(base64,type,onload) {
	var bitmapData = new openfl_display_BitmapData(0,0,true);
	var onload1 = onload;
	var _gthis = bitmapData;
	lime_graphics_Image.fromBase64(base64,type,function(image) {
		_gthis.__fromImage(image);
		if(onload1 != null) {
			onload1(_gthis);
		}
	});
	return bitmapData;
};
openfl_display_BitmapData.fromBytes = function(bytes,rawAlpha,onload) {
	var bitmapData = new openfl_display_BitmapData(0,0,true);
	var rawAlpha1 = rawAlpha;
	var onload1 = onload;
	var _gthis = bitmapData;
	lime_graphics_Image.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes),function(image) {
		_gthis.__fromImage(image);
		if(rawAlpha1 != null) {
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
			lime_graphics_utils_ImageCanvasUtil.createImageData(image);
			var data = image.buffer.data;
			var _g1 = 0;
			var _g = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(rawAlpha1);
			while(_g1 < _g) {
				var i = _g1++;
				data[i * 4 + 3] = rawAlpha1.readUnsignedByte();
			}
			image.dirty = true;
		}
		if(onload1 != null) {
			onload1(_gthis);
		}
	});
	return bitmapData;
};
openfl_display_BitmapData.fromCanvas = function(canvas,transparent) {
	if(transparent == null) {
		transparent = true;
	}
	if(canvas == null) {
		return null;
	}
	var bitmapData = new openfl_display_BitmapData(0,0,transparent);
	bitmapData.__fromImage(lime_graphics_Image.fromCanvas(canvas));
	bitmapData.image.set_transparent(transparent);
	return bitmapData;
};
openfl_display_BitmapData.fromFile = function(path,onload,onerror) {
	var bitmapData = new openfl_display_BitmapData(0,0,true);
	bitmapData.__fromFile(path,onload,onerror);
	return bitmapData;
};
openfl_display_BitmapData.fromImage = function(image,transparent) {
	if(transparent == null) {
		transparent = true;
	}
	if(image == null || image.buffer == null) {
		return null;
	}
	var bitmapData = new openfl_display_BitmapData(0,0,transparent);
	bitmapData.__fromImage(image);
	bitmapData.image.set_transparent(transparent);
	return bitmapData;
};
openfl_display_BitmapData.__asRenderTexture = function(width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	var b = new openfl_display_BitmapData(0,0);
	b.__resize(width,height);
	return b;
};
openfl_display_BitmapData.prototype = {
	applyFilter: function(sourceBitmapData,sourceRect,destPoint,filter) {
		if(!this.__isValid || sourceBitmapData == null || !sourceBitmapData.__isValid) {
			return;
		}
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
		lime_graphics_utils_ImageCanvasUtil.createImageData(this.image);
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceBitmapData.image);
		lime_graphics_utils_ImageCanvasUtil.createImageData(sourceBitmapData.image);
		filter.__applyFilter(this.image.buffer.__srcImageData,sourceBitmapData.image.buffer.__srcImageData,sourceRect,destPoint);
		this.image.dirty = true;
	}
	,clone: function() {
		if(!this.__isValid) {
			return new openfl_display_BitmapData(this.width,this.height,this.transparent);
		} else {
			return openfl_display_BitmapData.fromImage(this.image.clone(),this.transparent);
		}
	}
	,colorTransform: function(rect,colorTransform) {
		if(!this.__isValid) {
			return;
		}
		this.image.colorTransform(rect.__toLimeRectangle(),colorTransform.__toLimeColorMatrix());
		this.__usingPingPongTexture = false;
	}
	,compare: function(otherBitmapData) {
		if(otherBitmapData == this) {
			return 0;
		} else if(otherBitmapData == null) {
			return -1;
		} else if(this.__isValid == false || otherBitmapData.__isValid == false) {
			return -2;
		} else if(this.width != otherBitmapData.width) {
			return -3;
		} else if(this.height != otherBitmapData.height) {
			return -4;
		}
		if(this.image != null && otherBitmapData.image != null && this.image.get_format() == otherBitmapData.image.get_format()) {
			var bytes = this.image.get_data();
			var otherBytes = otherBitmapData.image.get_data();
			var equal = true;
			var _g1 = 0;
			var _g = bytes.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(bytes[i] != otherBytes[i]) {
					equal = false;
					break;
				}
			}
			if(equal) {
				return 0;
			}
		}
		var bitmapData = null;
		var foundDifference;
		var pixel;
		var otherPixel;
		var comparePixel;
		var r;
		var g;
		var b;
		var a;
		var _g11 = 0;
		var _g2 = this.height;
		while(_g11 < _g2) {
			var y = _g11++;
			var _g3 = 0;
			var _g21 = this.width;
			while(_g3 < _g21) {
				var x = _g3++;
				foundDifference = false;
				pixel = this.getPixel32(x,y);
				otherPixel = otherBitmapData.getPixel32(x,y);
				comparePixel = 0;
				if(pixel != otherPixel) {
					r = (pixel >> 16 & 255) - (otherPixel >> 16 & 255);
					g = (pixel >> 8 & 255) - (otherPixel >> 8 & 255);
					b = (pixel & 255) - (otherPixel & 255);
					if(r < 0) {
						r *= -1;
					}
					if(g < 0) {
						g *= -1;
					}
					if(b < 0) {
						b *= -1;
					}
					if(r == 0 && g == 0 && b == 0) {
						a = (pixel >> 24 & 255) - (otherPixel >> 24 & 255);
						if(a != 0) {
							comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | 16711680 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
							comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | 65280 | comparePixel & 255 & 255;
							comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | 255;
							comparePixel = (a & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
							foundDifference = true;
						}
					} else {
						comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (r & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
						comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (g & 255) << 8 | comparePixel & 255 & 255;
						comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | b & 255;
						comparePixel = -16777216 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
						foundDifference = true;
					}
				}
				if(foundDifference) {
					if(bitmapData == null) {
						bitmapData = new openfl_display_BitmapData(this.width,this.height,this.transparent || otherBitmapData.transparent,0);
					}
					bitmapData.setPixel32(x,y,comparePixel);
				}
			}
		}
		if(bitmapData == null) {
			return 0;
		}
		return bitmapData;
	}
	,copyChannel: function(sourceBitmapData,sourceRect,destPoint,sourceChannel,destChannel) {
		if(!this.__isValid) {
			return;
		}
		var sourceChannel1;
		switch(sourceChannel) {
		case 1:
			sourceChannel1 = lime_graphics_ImageChannel.RED;
			break;
		case 2:
			sourceChannel1 = lime_graphics_ImageChannel.GREEN;
			break;
		case 4:
			sourceChannel1 = lime_graphics_ImageChannel.BLUE;
			break;
		case 8:
			sourceChannel1 = lime_graphics_ImageChannel.ALPHA;
			break;
		default:
			return;
		}
		var destChannel1;
		switch(destChannel) {
		case 1:
			destChannel1 = lime_graphics_ImageChannel.RED;
			break;
		case 2:
			destChannel1 = lime_graphics_ImageChannel.GREEN;
			break;
		case 4:
			destChannel1 = lime_graphics_ImageChannel.BLUE;
			break;
		case 8:
			destChannel1 = lime_graphics_ImageChannel.ALPHA;
			break;
		default:
			return;
		}
		this.image.copyChannel(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),sourceChannel1,destChannel1);
		this.__usingPingPongTexture = false;
	}
	,copyPixels: function(sourceBitmapData,sourceRect,destPoint,alphaBitmapData,alphaPoint,mergeAlpha) {
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(!this.__isValid || sourceBitmapData == null) {
			return;
		}
		this.image.copyPixels(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),alphaBitmapData != null ? alphaBitmapData.image : null,alphaPoint != null ? alphaPoint.__toLimeVector2() : null,mergeAlpha);
		this.__usingPingPongTexture = false;
	}
	,dispose: function() {
		this.image = null;
		this.width = 0;
		this.height = 0;
		this.rect = null;
		this.__isValid = false;
		if(this.__texture != null) {
			var renderer = openfl_Lib.current.stage.__renderer;
			if(renderer != null) {
				var renderSession = renderer.renderSession;
				var gl = renderSession.gl;
				if(gl != null) {
					gl.deleteTexture(this.__texture);
					this.__texture = null;
				}
			}
		}
		if(this.__pingPongTexture != null) {
			this.__pingPongTexture.destroy();
			this.__pingPongTexture = null;
		}
	}
	,draw: function(source,matrix,colorTransform,blendMode,clipRect,smoothing) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(!this.__isValid) {
			return;
		}
		if(colorTransform != null) {
			var copy = new openfl_display_BitmapData(Reflect.getProperty(source,"width"),Reflect.getProperty(source,"height"),true,0);
			copy.draw(source);
			copy.colorTransform(copy.rect,colorTransform);
			source = copy;
		}
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
		lime_graphics_utils_ImageCanvasUtil.sync(this.image,true);
		var buffer = this.image.buffer;
		var renderSession = new openfl__$internal_renderer_RenderSession();
		renderSession.context = buffer.__srcContext;
		renderSession.roundPixels = true;
		renderSession.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(renderSession);
		if(!smoothing) {
			buffer.__srcContext.mozImageSmoothingEnabled = false;
			buffer.__srcContext.msImageSmoothingEnabled = false;
			buffer.__srcContext.imageSmoothingEnabled = false;
		}
		if(clipRect != null) {
			renderSession.maskManager.pushRect(clipRect,new openfl_geom_Matrix());
		}
		var matrixCache = source.__worldTransform;
		source.__updateTransforms(matrix != null ? matrix : new openfl_geom_Matrix());
		source.__updateChildren(false);
		source.__renderCanvas(renderSession);
		source.__updateTransforms(matrixCache);
		source.__updateChildren(true);
		if(!smoothing) {
			buffer.__srcContext.mozImageSmoothingEnabled = true;
			buffer.__srcContext.msImageSmoothingEnabled = true;
			buffer.__srcContext.imageSmoothingEnabled = true;
		}
		if(clipRect != null) {
			renderSession.maskManager.popMask();
		}
		buffer.__srcContext.setTransform(1,0,0,1,0,0);
		buffer.__srcImageData = null;
		buffer.data = null;
	}
	,encode: function(rect,compressor,byteArray) {
		if(!this.__isValid || rect == null) {
			byteArray = null;
			return byteArray;
		}
		if(js_Boot.__instanceof(compressor,openfl_display_PNGEncoderOptions)) {
			byteArray = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.encode("png"));
			return byteArray;
		} else if(js_Boot.__instanceof(compressor,openfl_display_JPEGEncoderOptions)) {
			byteArray = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.encode("jpg",(js_Boot.__cast(compressor , openfl_display_JPEGEncoderOptions)).quality));
			return byteArray;
		}
		byteArray = null;
		return byteArray;
	}
	,fillRect: function(rect,color) {
		if(!this.__isValid || rect == null) {
			return;
		}
		if(this.transparent && (color & -16777216) == 0) {
			color = 0;
		}
		this.image.fillRect(rect.__toLimeRectangle(),color,1);
		this.__usingPingPongTexture = false;
	}
	,floodFill: function(x,y,color) {
		if(!this.__isValid) {
			return;
		}
		this.image.floodFill(x,y,color,1);
		this.__usingPingPongTexture = false;
	}
	,generateFilterRect: function(sourceRect,filter) {
		return sourceRect.clone();
	}
	,getBuffer: function(gl) {
		if(this.__buffer == null) {
			var data = [this.width,this.height,0,1,1,0,this.height,0,0,1,this.width,0,0,1,0,0,0,0,0,0];
			this.__buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER,this.__buffer);
			var gl1 = gl.ARRAY_BUFFER;
			var this1;
			if(data != null) {
				this1 = new Float32Array(data);
			} else {
				this1 = null;
			}
			gl.bufferData(gl1,this1,gl.STATIC_DRAW);
			gl.bindBuffer(gl.ARRAY_BUFFER,null);
		}
		return this.__buffer;
	}
	,getColorBoundsRect: function(mask,color,findColor) {
		if(findColor == null) {
			findColor = true;
		}
		if(!this.__isValid) {
			return new openfl_geom_Rectangle(0,0,this.width,this.height);
		}
		if(!this.transparent || (mask >> 24 & 255) > 0) {
			var color1 = color;
			if((color1 >> 24 & 255) == 0) {
				color1 = 0;
			}
		}
		var rect = this.image.getColorBoundsRect(mask,color,findColor,1);
		return new openfl_geom_Rectangle(rect.x,rect.y,rect.width,rect.height);
	}
	,getPixel: function(x,y) {
		if(!this.__isValid) {
			return 0;
		}
		return this.image.getPixel(x,y,1);
	}
	,getPixel32: function(x,y) {
		if(!this.__isValid) {
			return 0;
		}
		return this.image.getPixel32(x,y,1);
	}
	,getPixels: function(rect) {
		if(!this.__isValid) {
			return null;
		}
		if(rect == null) {
			rect = this.rect;
		}
		return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.getPixels(rect.__toLimeRectangle(),1));
	}
	,getSurface: function() {
		if(!this.__isValid) {
			return null;
		}
		if(this.__surface == null) {
			this.__surface = lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.fromImage(this.image);
		}
		return this.__surface;
	}
	,getTexture: function(gl) {
		if(!this.__isValid) {
			return null;
		}
		if(this.__usingPingPongTexture && this.__pingPongTexture != null) {
			var _this = this.__pingPongTexture;
			if(_this.useOldTexture) {
				return (_this.__swapped ? _this.__texture0 : _this.__texture1).texture;
			} else {
				return (_this.__swapped ? _this.__texture1 : _this.__texture0).texture;
			}
		}
		if(this.__texture == null) {
			this.__texture = gl.createTexture();
			gl.bindTexture(gl.TEXTURE_2D,this.__texture);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);
			this.image.dirty = true;
		}
		if(this.image != null && this.image.dirty) {
			var internalFormat;
			var format;
			if(this.__surface != null) {
				lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush(this.__surface);
			}
			if(this.image.buffer.bitsPerPixel == 1) {
				internalFormat = gl.ALPHA;
				format = gl.ALPHA;
			} else {
				internalFormat = gl.RGBA;
				format = gl.RGBA;
			}
			gl.bindTexture(gl.TEXTURE_2D,this.__texture);
			var textureImage = this.image;
			if(!textureImage.get_premultiplied() && textureImage.get_transparent() || textureImage.get_format() != 0) {
				textureImage = textureImage.clone();
				textureImage.set_format(0);
				textureImage.set_premultiplied(true);
			}
			gl.texImage2D(gl.TEXTURE_2D,0,internalFormat,this.width,this.height,0,format,gl.UNSIGNED_BYTE,textureImage.get_data());
			gl.bindTexture(gl.TEXTURE_2D,null);
			this.image.dirty = false;
		}
		return this.__texture;
	}
	,getVector: function(rect) {
		var pixels = this.getPixels(rect);
		var length = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels) / 4 | 0;
		var this1 = new openfl_VectorData();
		var this2 = new Array(length);
		this1.data = this2;
		this1.length = length;
		this1.fixed = true;
		var result = this1;
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i = _g1++;
			var value = pixels.readUnsignedInt();
			if(!result.fixed) {
				if(i >= result.length) {
					result.length = i + 1;
				}
				if(result.data.length < result.length) {
					var length1 = result.data.length + 10;
					var this3 = new Array(length1);
					var data = this3;
					haxe_ds__$Vector_Vector_$Impl_$.blit(result.data,0,data,0,result.data.length);
					result.data = data;
				}
			}
			result.data[i] = value;
		}
		return result;
	}
	,histogram: function(hRect) {
		var rect = hRect != null ? hRect : new openfl_geom_Rectangle(0,0,this.width,this.height);
		var pixels = this.getPixels(rect);
		var _g = [];
		var _g1 = 0;
		while(_g1 < 4) {
			var i = _g1++;
			var _g2 = [];
			var _g3 = 0;
			while(_g3 < 256) {
				var j = _g3++;
				_g2.push(0);
			}
			_g.push(_g2);
		}
		var result = _g;
		var _g21 = 0;
		var _g11 = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels);
		while(_g21 < _g11) {
			var i1 = _g21++;
			++result[i1 % 4][pixels.readUnsignedByte()];
		}
		return result;
	}
	,hitTest: function(firstPoint,firstAlphaThreshold,secondObject,secondBitmapDataPoint,secondAlphaThreshold) {
		if(secondAlphaThreshold == null) {
			secondAlphaThreshold = 1;
		}
		if(!this.__isValid) {
			return false;
		}
		if(js_Boot.__instanceof(secondObject,openfl_display_Bitmap)) {
			secondObject = (js_Boot.__cast(secondObject , openfl_display_Bitmap)).bitmapData;
		}
		if(js_Boot.__instanceof(secondObject,openfl_geom_Point)) {
			var secondPoint = secondObject;
			var x = secondPoint.x - firstPoint.x | 0;
			var y = secondPoint.y - firstPoint.y | 0;
			if(this.rect.contains(x,y)) {
				var pixel = this.getPixel32(x,y);
				if((pixel >> 24 & 255) >= firstAlphaThreshold) {
					return true;
				}
			}
		} else if(js_Boot.__instanceof(secondObject,openfl_display_BitmapData)) {
			var secondBitmapData = secondObject;
			var x1;
			var y1;
			if(secondBitmapDataPoint == null) {
				x1 = 0;
				y1 = 0;
			} else {
				x1 = secondBitmapDataPoint.x - firstPoint.x | 0;
				y1 = secondBitmapDataPoint.y - firstPoint.y | 0;
			}
			if(this.rect.contains(x1,y1)) {
				var hitRect = openfl_geom_Rectangle.__temp;
				hitRect.setTo(x1,y1,Math.min(secondBitmapData.width,this.width - x1),Math.min(secondBitmapData.height,this.height - y1));
				var pixels = this.getPixels(hitRect);
				hitRect.offset(-x1,-y1);
				var testPixels = secondBitmapData.getPixels(hitRect);
				var length = hitRect.width * hitRect.height | 0;
				var pixel1;
				var testPixel;
				var _g1 = 0;
				var _g = length;
				while(_g1 < _g) {
					var i = _g1++;
					pixel1 = pixels.readUnsignedInt();
					testPixel = testPixels.readUnsignedInt();
					if((pixel1 >> 24 & 255) >= firstAlphaThreshold && (testPixel >> 24 & 255) >= secondAlphaThreshold) {
						return true;
					}
				}
				return false;
			}
		} else if(js_Boot.__instanceof(secondObject,openfl_geom_Rectangle)) {
			var secondRectangle = openfl_geom_Rectangle.__temp;
			secondRectangle.copyFrom(secondObject);
			secondRectangle.offset(-firstPoint.x,-firstPoint.y);
			secondRectangle.__contract(0,0,this.width,this.height);
			if(secondRectangle.width > 0 && secondRectangle.height > 0) {
				var pixels1 = this.getPixels(secondRectangle);
				var length1 = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels1) / 4 | 0;
				var pixel2;
				var _g11 = 0;
				var _g2 = length1;
				while(_g11 < _g2) {
					var i1 = _g11++;
					pixel2 = pixels1.readUnsignedInt();
					if((pixel2 >> 24 & 255) >= firstAlphaThreshold) {
						return true;
					}
				}
			}
		}
		return false;
	}
	,lock: function() {
	}
	,merge: function(sourceBitmapData,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
		if(!this.__isValid || sourceBitmapData == null || !sourceBitmapData.__isValid || sourceRect == null || destPoint == null) {
			return;
		}
		this.image.merge(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
		this.__usingPingPongTexture = false;
	}
	,noise: function(randomSeed,low,high,channelOptions,grayScale) {
		if(grayScale == null) {
			grayScale = false;
		}
		if(channelOptions == null) {
			channelOptions = 7;
		}
		if(high == null) {
			high = 255;
		}
		if(low == null) {
			low = 0;
		}
		if(!this.__isValid) {
			return;
		}
		var func = function() {
			randomSeed = randomSeed * 1103515245 + 12345;
			return (Math.abs(randomSeed / 65536) | 0) % 32768;
		};
		var rand = func;
		rand();
		var range = high - low;
		var this1 = new openfl_utils_ByteArrayData(0);
		var data = this1;
		var redChannel = (channelOptions & 1) == 1;
		var greenChannel = (channelOptions & 2) >> 1 == 1;
		var blueChannel = (channelOptions & 4) >> 2 == 1;
		var alphaChannel = (channelOptions & 8) >> 3 == 1;
		var _g1 = 0;
		var _g = this.height;
		while(_g1 < _g) {
			var y = _g1++;
			var _g3 = 0;
			var _g2 = this.width;
			while(_g3 < _g2) {
				var x = _g3++;
				var red = 0;
				var blue = 0;
				var green = 0;
				var alpha = 255;
				if(grayScale) {
					blue = low + rand() % range;
					green = blue;
					red = green;
					alpha = 255;
				} else {
					if(redChannel) {
						red = low + rand() % range;
					}
					if(greenChannel) {
						green = low + rand() % range;
					}
					if(blueChannel) {
						blue = low + rand() % range;
					}
					if(alphaChannel) {
						alpha = low + rand() % range;
					}
				}
				var rgb = alpha;
				rgb = (rgb << 8) + red;
				rgb = (rgb << 8) + green;
				rgb = (rgb << 8) + blue;
				this.setPixel32(x,y,rgb);
			}
		}
	}
	,paletteMap: function(sourceBitmapData,sourceRect,destPoint,redArray,greenArray,blueArray,alphaArray) {
		var sw = sourceRect.width | 0;
		var sh = sourceRect.height | 0;
		var pixels = this.getPixels(sourceRect);
		pixels.position = 0;
		var pixelValue;
		var r;
		var g;
		var b;
		var a;
		var color;
		var c1;
		var c2;
		var c3;
		var c4;
		var _g1 = 0;
		var _g = sh * sw;
		while(_g1 < _g) {
			var i = _g1++;
			pixelValue = pixels.readUnsignedInt();
			if(alphaArray == null) {
				c1 = pixelValue & -16777216;
			} else {
				c1 = alphaArray[pixelValue >> 24 & 255];
			}
			if(redArray == null) {
				c2 = pixelValue & 16711680;
			} else {
				c2 = redArray[pixelValue >> 16 & 255];
			}
			if(greenArray == null) {
				c3 = pixelValue & 65280;
			} else {
				c3 = greenArray[pixelValue >> 8 & 255];
			}
			if(blueArray == null) {
				c4 = pixelValue & 255;
			} else {
				c4 = blueArray[pixelValue & 255];
			}
			a = (c1 >> 24 & 255) + (c2 >> 24 & 255) + (c3 >> 24 & 255) + (c4 >> 24 & 255);
			var tmp = a > 255;
			r = (c1 >> 16 & 255) + (c2 >> 16 & 255) + (c3 >> 16 & 255) + (c4 >> 16 & 255);
			var tmp1 = r > 255;
			g = (c1 >> 8 & 255) + (c2 >> 8 & 255) + (c3 >> 8 & 255) + (c4 >> 8 & 255);
			var tmp2 = g > 255;
			b = (c1 & 255) + (c2 & 255) + (c3 & 255) + (c4 & 255);
			var tmp3 = b > 255;
			color = a << 24 | r << 16 | g << 8 | b;
			pixels.position = i * 4;
			pixels.writeUnsignedInt(color);
		}
		pixels.position = 0;
		var destRect = new openfl_geom_Rectangle(destPoint.x,destPoint.y,sw,sh);
		this.setPixels(destRect,pixels);
	}
	,perlinNoise: function(baseX,baseY,numOctaves,randomSeed,stitch,fractalNoise,channelOptions,grayScale,offsets) {
		if(grayScale == null) {
			grayScale = false;
		}
		if(channelOptions == null) {
			channelOptions = 7;
		}
		openfl_Lib.notImplemented("BitmapData.perlinNoise");
	}
	,scroll: function(x,y) {
		if(!this.__isValid) {
			return;
		}
		this.image.scroll(x,y);
		this.__usingPingPongTexture = false;
	}
	,setPixel: function(x,y,color) {
		if(!this.__isValid) {
			return;
		}
		this.image.setPixel(x,y,color,1);
		this.__usingPingPongTexture = false;
	}
	,setPixel32: function(x,y,color) {
		if(!this.__isValid) {
			return;
		}
		this.image.setPixel32(x,y,color,1);
		this.__usingPingPongTexture = false;
	}
	,setPixels: function(rect,byteArray) {
		if(!this.__isValid || rect == null) {
			return;
		}
		this.image.setPixels(rect.__toLimeRectangle(),openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(byteArray),1);
		this.__usingPingPongTexture = false;
	}
	,setVector: function(rect,inputVector) {
		var this1 = new openfl_utils_ByteArrayData(0);
		var byteArray = this1;
		openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length(byteArray,inputVector.length * 4);
		var _g = 0;
		while(_g < inputVector.length) {
			var color = inputVector.data[_g];
			++_g;
			byteArray.writeUnsignedInt(color);
		}
		byteArray.position = 0;
		this.setPixels(rect,byteArray);
	}
	,threshold: function(sourceBitmapData,sourceRect,destPoint,operation,threshold,color,mask,copySource) {
		if(copySource == null) {
			copySource = false;
		}
		if(mask == null) {
			mask = -1;
		}
		if(color == null) {
			color = 0;
		}
		if(sourceBitmapData == null || sourceRect == null || destPoint == null || sourceRect.x > sourceBitmapData.width || sourceRect.y > sourceBitmapData.height || destPoint.x > this.width || destPoint.y > this.height) {
			return 0;
		}
		return this.image.threshold(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),operation,threshold,color,mask,copySource,1);
	}
	,unlock: function(changeRect) {
	}
	,__createUVs: function(x0,y0,x1,y1,x2,y2,x3,y3) {
		if(y3 == null) {
			y3 = 1;
		}
		if(x3 == null) {
			x3 = 0;
		}
		if(y2 == null) {
			y2 = 1;
		}
		if(x2 == null) {
			x2 = 1;
		}
		if(y1 == null) {
			y1 = 0;
		}
		if(x1 == null) {
			x1 = 1;
		}
		if(y0 == null) {
			y0 = 0;
		}
		if(x0 == null) {
			x0 = 0;
		}
		if(this.__uvData == null) {
			this.__uvData = new openfl_display_TextureUvs();
		}
		this.__uvData.x0 = x0;
		this.__uvData.y0 = y0;
		this.__uvData.x1 = x1;
		this.__uvData.y1 = y1;
		this.__uvData.x2 = x2;
		this.__uvData.y2 = y2;
		this.__uvData.x3 = x3;
		this.__uvData.y3 = y3;
	}
	,__drawGL: function(renderSession,source,matrix,colorTransform,blendMode,clipRect,smoothing,drawSelf,clearBuffer,readPixels,powerOfTwo) {
		if(powerOfTwo == null) {
			powerOfTwo = true;
		}
		if(readPixels == null) {
			readPixels = false;
		}
		if(clearBuffer == null) {
			clearBuffer = false;
		}
		if(drawSelf == null) {
			drawSelf = false;
		}
		if(smoothing == null) {
			smoothing = false;
		}
		this.__pingPongTexture = openfl__$internal_renderer_opengl_GLBitmap.pushFramebuffer(renderSession,this.__pingPongTexture,this.rect,smoothing,this.transparent,clearBuffer,powerOfTwo);
		openfl__$internal_renderer_opengl_GLBitmap.drawBitmapDrawable(renderSession,drawSelf ? this : null,source,matrix,colorTransform,blendMode,clipRect);
		openfl__$internal_renderer_opengl_GLBitmap.popFramebuffer(renderSession,readPixels ? this.image : null);
		var _this = this.__pingPongTexture;
		var uv = (_this.__swapped ? _this.__texture1 : _this.__texture0).__uvData;
		this.__createUVs(uv.x0,uv.y0,uv.x1,uv.y1,uv.x2,uv.y2,uv.x3,uv.y3);
		this.__isValid = true;
		this.__usingPingPongTexture = true;
	}
	,__fromBase64: function(base64,type,onload) {
		var _gthis = this;
		lime_graphics_Image.fromBase64(base64,type,function(image) {
			_gthis.__fromImage(image);
			if(onload != null) {
				onload(_gthis);
			}
		});
	}
	,__fromBytes: function(bytes,rawAlpha,onload) {
		var _gthis = this;
		lime_graphics_Image.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes),function(image) {
			_gthis.__fromImage(image);
			if(rawAlpha != null) {
				lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
				lime_graphics_utils_ImageCanvasUtil.createImageData(image);
				var data = image.buffer.data;
				var _g1 = 0;
				var _g = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(rawAlpha);
				while(_g1 < _g) {
					var i = _g1++;
					data[i * 4 + 3] = rawAlpha.readUnsignedByte();
				}
				image.dirty = true;
			}
			if(onload != null) {
				onload(_gthis);
			}
		});
	}
	,__fromFile: function(path,onload,onerror) {
		var _gthis = this;
		lime_graphics_Image.fromFile(path,function(image) {
			_gthis.__fromImage(image);
			if(onload != null) {
				onload(_gthis);
			}
		},onerror);
	}
	,__fromImage: function(image) {
		if(image != null && image.buffer != null) {
			this.image = image;
			this.width = image.width;
			this.height = image.height;
			this.rect = new openfl_geom_Rectangle(0,0,image.width,image.height);
			this.__isValid = true;
		}
	}
	,__renderCairo: function(renderSession) {
		if(!this.__isValid) {
			return;
		}
		var cairo = renderSession.cairo;
		if(this.__worldTransform == null) {
			this.__worldTransform = new openfl_geom_Matrix();
		}
		var transform = this.__worldTransform;
		if(renderSession.roundPixels) {
			var matrix = transform.__toMatrix3();
			matrix.tx = Math.round(matrix.tx);
			matrix.ty = Math.round(matrix.ty);
			cairo.set_matrix(matrix);
		} else {
			cairo.set_matrix(transform.__toMatrix3());
		}
		var surface = this.getSurface();
		if(surface != null) {
			var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(surface);
			if(cairo.get_antialias() == 1) {
				lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter(pattern,3);
			} else {
				lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter(pattern,1);
			}
			cairo.set_source(pattern);
			cairo.paint();
		}
	}
	,__renderCairoMask: function(renderSession) {
	}
	,__renderCanvas: function(renderSession) {
		if(!this.__isValid) {
			return;
		}
		lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);
		var context = renderSession.context;
		if(this.__worldTransform == null) {
			this.__worldTransform = new openfl_geom_Matrix();
		}
		context.globalAlpha = 1;
		var transform = this.__worldTransform;
		if(renderSession.roundPixels) {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
		} else {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		}
		context.drawImage(this.image.get_src(),0,0);
	}
	,__renderCanvasMask: function(renderSession) {
	}
	,__renderGL: function(renderSession) {
		renderSession.spriteBatch.renderBitmapData(this,false,this.__worldTransform,this.__worldColorTransform,this.__worldColorTransform.alphaMultiplier,this.__blendMode,this.__shader);
	}
	,__resize: function(width,height) {
		this.width = width;
		this.height = height;
		this.rect.width = width;
		this.rect.height = height;
	}
	,__sync: function() {
		lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);
	}
	,__updateChildren: function(transformOnly) {
	}
	,__updateMask: function(maskGraphics) {
	}
	,__updateTransforms: function(overrideTransform) {
		if(overrideTransform == null) {
			this.__worldTransform.identity();
		} else {
			this.__worldTransform = overrideTransform;
		}
	}
	,__class__: openfl_display_BitmapData
};
var flixel_input_mouse__$FlxMouse_GraphicCursor = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_input_mouse__$FlxMouse_GraphicCursor.preload != null) {
		this.__fromImage(flixel_input_mouse__$FlxMouse_GraphicCursor.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_input_mouse__$FlxMouse_GraphicCursor.preload == null) {
				flixel_input_mouse__$FlxMouse_GraphicCursor.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_input_mouse__$FlxMouse_GraphicCursor.resourceName),flixel_input_mouse__$FlxMouse_GraphicCursor.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.input.mouse._FlxMouse.GraphicCursor"] = flixel_input_mouse__$FlxMouse_GraphicCursor;
flixel_input_mouse__$FlxMouse_GraphicCursor.__name__ = ["flixel","input","mouse","_FlxMouse","GraphicCursor"];
flixel_input_mouse__$FlxMouse_GraphicCursor.preload = null;
flixel_input_mouse__$FlxMouse_GraphicCursor.__super__ = openfl_display_BitmapData;
flixel_input_mouse__$FlxMouse_GraphicCursor.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_input_mouse__$FlxMouse_GraphicCursor
});
var flixel_input_mouse_FlxMouse = function(CursorContainer) {
	this._lastWheel = 0;
	this._lastY = 0;
	this._lastX = 0;
	this._visibleWhenFocusLost = true;
	this._wheelUsed = false;
	this._cursor = null;
	this.useSystemCursor = false;
	this.visible = true;
	this.wheel = 0;
	this.enabled = true;
	flixel_input_FlxPointer.call(this);
	this.cursorContainer = CursorContainer;
	this.cursorContainer.mouseChildren = false;
	this.cursorContainer.mouseEnabled = false;
	this._leftButton = new flixel_input_mouse_FlxMouseButton(-1);
	this._stage = openfl_Lib.current.stage;
	this._stage.addEventListener("mouseDown",($_=this._leftButton,$bind($_,$_.onDown)));
	this._stage.addEventListener("mouseUp",($_=this._leftButton,$bind($_,$_.onUp)));
	this._middleButton = new flixel_input_mouse_FlxMouseButton(-2);
	this._rightButton = new flixel_input_mouse_FlxMouseButton(-3);
	this._stage.addEventListener("middleMouseDown",($_=this._middleButton,$bind($_,$_.onDown)));
	this._stage.addEventListener("middleMouseUp",($_=this._middleButton,$bind($_,$_.onUp)));
	this._stage.addEventListener("rightMouseDown",($_=this._rightButton,$bind($_,$_.onDown)));
	this._stage.addEventListener("rightMouseUp",($_=this._rightButton,$bind($_,$_.onUp)));
	this._stage.addEventListener("mouseLeave",$bind(this,this.onMouseLeave));
	this._stage.addEventListener("mouseWheel",$bind(this,this.onMouseWheel));
	flixel_FlxG.signals.gameStarted.add($bind(this,this.onGameStart));
	openfl_ui_Mouse.hide();
};
$hxClasses["flixel.input.mouse.FlxMouse"] = flixel_input_mouse_FlxMouse;
flixel_input_mouse_FlxMouse.__name__ = ["flixel","input","mouse","FlxMouse"];
flixel_input_mouse_FlxMouse.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_mouse_FlxMouse.__super__ = flixel_input_FlxPointer;
flixel_input_mouse_FlxMouse.prototype = $extend(flixel_input_FlxPointer.prototype,{
	load: function(Graphic,Scale,XOffset,YOffset) {
		if(YOffset == null) {
			YOffset = 0;
		}
		if(XOffset == null) {
			XOffset = 0;
		}
		if(Scale == null) {
			Scale = 1;
		}
		if(this._cursor != null) {
			flixel_util_FlxDestroyUtil.removeChild(this.cursorContainer,this._cursor);
		}
		if(Graphic == null) {
			Graphic = new flixel_input_mouse__$FlxMouse_GraphicCursor(0,0);
		}
		if(js_Boot.__instanceof(Graphic,Class)) {
			this._cursor = Type.createInstance(Graphic,[]);
		} else if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
			this._cursor = new openfl_display_Bitmap(Graphic);
		} else if(typeof(Graphic) == "string") {
			var id = Graphic;
			var tmp;
			if(openfl_Assets.exists(id)) {
				tmp = openfl_Assets.getBitmapData(id,false);
			} else {
				var _this = flixel_FlxG.log;
				tmp = null;
			}
			this._cursor = new openfl_display_Bitmap(tmp);
		} else {
			this._cursor = new openfl_display_Bitmap(new flixel_input_mouse__$FlxMouse_GraphicCursor(0,0));
		}
		this._cursor.set_x(XOffset);
		this._cursor.set_y(YOffset);
		this._cursor.set_scaleX(Scale);
		this._cursor.set_scaleY(Scale);
		this.cursorContainer.addChild(this._cursor);
	}
	,unload: function() {
		if(this._cursor != null) {
			if(this.cursorContainer.get_visible()) {
				this.load();
			} else {
				this._cursor = flixel_util_FlxDestroyUtil.removeChild(this.cursorContainer,this._cursor);
			}
		}
	}
	,destroy: function() {
		if(this._stage != null) {
			this._stage.removeEventListener("mouseDown",($_=this._leftButton,$bind($_,$_.onDown)));
			this._stage.removeEventListener("mouseUp",($_=this._leftButton,$bind($_,$_.onUp)));
			this._stage.removeEventListener("middleMouseDown",($_=this._middleButton,$bind($_,$_.onDown)));
			this._stage.removeEventListener("middleMouseUp",($_=this._middleButton,$bind($_,$_.onUp)));
			this._stage.removeEventListener("rightMouseDown",($_=this._rightButton,$bind($_,$_.onDown)));
			this._stage.removeEventListener("rightMouseUp",($_=this._rightButton,$bind($_,$_.onUp)));
			this._stage.removeEventListener("mouseLeave",$bind(this,this.onMouseLeave));
			this._stage.removeEventListener("mouseWheel",$bind(this,this.onMouseWheel));
		}
		this.cursorContainer = null;
		this._cursor = null;
		this._leftButton = flixel_util_FlxDestroyUtil.destroy(this._leftButton);
		this._middleButton = flixel_util_FlxDestroyUtil.destroy(this._middleButton);
		this._rightButton = flixel_util_FlxDestroyUtil.destroy(this._rightButton);
		this._cursorBitmapData = flixel_util_FlxDestroyUtil.dispose(this._cursorBitmapData);
		flixel_FlxG.signals.gameStarted.remove($bind(this,this.onGameStart));
	}
	,reset: function() {
		this._leftButton.reset();
		this._middleButton.reset();
		this._rightButton.reset();
	}
	,update: function() {
		var newX = flixel_FlxG.game.get_mouseX();
		var newY = flixel_FlxG.game.get_mouseY();
		this._globalScreenX = newX / flixel_FlxG.scaleMode.scale.x | 0;
		this._globalScreenY = newY / flixel_FlxG.scaleMode.scale.y | 0;
		this.updatePositions();
		if(this.visible) {
			this.cursorContainer.set_x(flixel_FlxG.game.get_mouseX());
			this.cursorContainer.set_y(flixel_FlxG.game.get_mouseY());
		}
		this._leftButton.update();
		this._middleButton.update();
		this._rightButton.update();
		if(!this._wheelUsed) {
			this.wheel = 0;
		}
		this._wheelUsed = false;
	}
	,onFocus: function() {
		this.reset();
		this.set_useSystemCursor(this.useSystemCursor);
		this.set_visible(this._visibleWhenFocusLost);
	}
	,onFocusLost: function() {
		this._visibleWhenFocusLost = this.visible;
		if(this.visible) {
			this.set_visible(false);
		}
		openfl_ui_Mouse.show();
	}
	,onGameStart: function() {
		this.set_visible(this.visible);
	}
	,onMouseWheel: function(FlashEvent) {
		if(this.enabled) {
			this._wheelUsed = true;
			this.wheel = FlashEvent.delta;
		}
	}
	,onMouseLeave: function(_) {
		this._rightButton.onUp();
		this._middleButton.onUp();
	}
	,get_pressed: function() {
		var _this = this._leftButton;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this._leftButton.current == 2;
	}
	,get_justReleased: function() {
		return this._leftButton.current == -1;
	}
	,get_justPressedTimeInTicks: function() {
		return this._leftButton.justPressedTimeInTicks;
	}
	,get_pressedRight: function() {
		var _this = this._rightButton;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressedRight: function() {
		return this._rightButton.current == 2;
	}
	,get_justReleasedRight: function() {
		return this._rightButton.current == -1;
	}
	,get_justPressedTimeInTicksRight: function() {
		return this._rightButton.justPressedTimeInTicks;
	}
	,get_pressedMiddle: function() {
		var _this = this._middleButton;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressedMiddle: function() {
		return this._middleButton.current == 2;
	}
	,get_justReleasedMiddle: function() {
		return this._middleButton.current == -1;
	}
	,get_justPressedTimeInTicksMiddle: function() {
		return this._middleButton.justPressedTimeInTicks;
	}
	,showSystemCursor: function() {
		this.cursorContainer.set_visible(false);
		openfl_ui_Mouse.show();
	}
	,hideSystemCursor: function() {
		openfl_ui_Mouse.hide();
		if(this.visible) {
			this.cursorContainer.set_visible(true);
		}
	}
	,set_useSystemCursor: function(Value) {
		if(Value) {
			this.showSystemCursor();
		} else {
			this.hideSystemCursor();
		}
		return this.useSystemCursor = Value;
	}
	,showCursor: function() {
		if(this.useSystemCursor) {
			openfl_ui_Mouse.show();
		} else {
			if(this._cursor == null) {
				this.load();
			}
			this.cursorContainer.set_visible(true);
			openfl_ui_Mouse.hide();
		}
	}
	,hideCursor: function() {
		this.cursorContainer.set_visible(false);
		openfl_ui_Mouse.hide();
	}
	,set_visible: function(Value) {
		if(Value) {
			this.showCursor();
		} else {
			this.hideCursor();
		}
		return this.visible = Value;
	}
	,record: function() {
		if(this._lastX == this._globalScreenX && this._lastY == this._globalScreenY && this._lastLeftButtonState == this._leftButton.current && this._lastWheel == this.wheel) {
			return null;
		}
		this._lastX = this._globalScreenX;
		this._lastY = this._globalScreenY;
		this._lastLeftButtonState = this._leftButton.current;
		this._lastWheel = this.wheel;
		return new flixel_system_replay_MouseRecord(this._lastX,this._lastY,this._leftButton.current,this._lastWheel);
	}
	,playback: function(Record) {
		if((this._lastLeftButtonState == 1 || this._lastLeftButtonState == 2) && (Record.button == 0 || Record.button == -1)) {
			this._stage.dispatchEvent(new openfl_events_MouseEvent("mouseUp",true,false,Record.x,Record.y));
		}
		this._lastLeftButtonState = this._leftButton.current = Record.button;
		this.wheel = Record.wheel;
		this._globalScreenX = Record.x;
		this._globalScreenY = Record.y;
		this.updatePositions();
	}
	,__class__: flixel_input_mouse_FlxMouse
	,__properties__: {get_justPressedTimeInTicksMiddle:"get_justPressedTimeInTicksMiddle",get_justReleasedMiddle:"get_justReleasedMiddle",get_justPressedMiddle:"get_justPressedMiddle",get_pressedMiddle:"get_pressedMiddle",get_justPressedTimeInTicksRight:"get_justPressedTimeInTicksRight",get_justReleasedRight:"get_justReleasedRight",get_justPressedRight:"get_justPressedRight",get_pressedRight:"get_pressedRight",get_justPressedTimeInTicks:"get_justPressedTimeInTicks",get_justReleased:"get_justReleased",get_justPressed:"get_justPressed",get_pressed:"get_pressed",set_useSystemCursor:"set_useSystemCursor",set_visible:"set_visible"}
});
var flixel_input_mouse_FlxMouseButton = function(ID) {
	this.justPressedTimeInTicks = -1;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.justPressedPosition = point;
	flixel_input_FlxInput.call(this,ID);
};
$hxClasses["flixel.input.mouse.FlxMouseButton"] = flixel_input_mouse_FlxMouseButton;
flixel_input_mouse_FlxMouseButton.__name__ = ["flixel","input","mouse","FlxMouseButton"];
flixel_input_mouse_FlxMouseButton.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_input_mouse_FlxMouseButton.getByID = function(id) {
	switch(id) {
	case -3:
		return flixel_FlxG.mouse._rightButton;
	case -2:
		return flixel_FlxG.mouse._middleButton;
	case -1:
		return flixel_FlxG.mouse._leftButton;
	}
};
flixel_input_mouse_FlxMouseButton.__super__ = flixel_input_FlxInput;
flixel_input_mouse_FlxMouseButton.prototype = $extend(flixel_input_FlxInput.prototype,{
	update: function() {
		flixel_input_FlxInput.prototype.update.call(this);
		if(this.current == 2) {
			this.justPressedPosition.set(flixel_FlxG.mouse.screenX,flixel_FlxG.mouse.screenY);
			this.justPressedTimeInTicks = flixel_FlxG.game.ticks;
		} else if(this.current == -1) {
			flixel_FlxG.swipes.push(new flixel_input_FlxSwipe(this.ID,this.justPressedPosition,flixel_FlxG.mouse.getScreenPosition(),this.justPressedTimeInTicks));
		}
	}
	,destroy: function() {
		this.justPressedPosition = flixel_util_FlxDestroyUtil.put(this.justPressedPosition);
	}
	,onDown: function(_) {
		if(flixel_FlxG.mouse.enabled) {
			this.press();
		}
	}
	,onUp: function(_) {
		if(flixel_FlxG.mouse.enabled) {
			this.release();
		}
	}
	,__class__: flixel_input_mouse_FlxMouseButton
});
var flixel_input_touch_FlxTouch = function(x,y,pointID) {
	if(pointID == null) {
		pointID = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.justPressedTimeInTicks = -1;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.justPressedPosition = point;
	this.flashPoint = new openfl_geom_Point();
	flixel_input_FlxPointer.call(this);
	this.input = new flixel_input_FlxInput(pointID);
	this.setXY(x,y);
};
$hxClasses["flixel.input.touch.FlxTouch"] = flixel_input_touch_FlxTouch;
flixel_input_touch_FlxTouch.__name__ = ["flixel","input","touch","FlxTouch"];
flixel_input_touch_FlxTouch.__interfaces__ = [flixel_input_IFlxInput,flixel_util_IFlxDestroyable];
flixel_input_touch_FlxTouch.__super__ = flixel_input_FlxPointer;
flixel_input_touch_FlxTouch.prototype = $extend(flixel_input_FlxPointer.prototype,{
	destroy: function() {
		this.input = null;
		this.justPressedPosition = flixel_util_FlxDestroyUtil.put(this.justPressedPosition);
		this.flashPoint = null;
	}
	,recycle: function(x,y,pointID) {
		this.setXY(x,y);
		this.input.ID = pointID;
		this.input.reset();
	}
	,update: function() {
		this.input.update();
		if(this.input.current == 2) {
			this.justPressedPosition.set(this.screenX,this.screenY);
			this.justPressedTimeInTicks = flixel_FlxG.game.ticks;
		} else if(this.input.current == -1) {
			flixel_FlxG.swipes.push(new flixel_input_FlxSwipe(this.input.ID,this.justPressedPosition,this.getScreenPosition(),this.justPressedTimeInTicks));
		}
	}
	,setXY: function(X,Y) {
		this.flashPoint.setTo(X,Y);
		this.flashPoint = flixel_FlxG.game.globalToLocal(this.flashPoint);
		this._globalScreenX = this.flashPoint.x / flixel_FlxG.scaleMode.scale.x | 0;
		this._globalScreenY = this.flashPoint.y / flixel_FlxG.scaleMode.scale.y | 0;
		this.updatePositions();
	}
	,get_touchPointID: function() {
		return this.input.ID;
	}
	,get_justReleased: function() {
		return this.input.current == -1;
	}
	,get_released: function() {
		var _this = this.input;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		var _this = this.input;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.input.current == 2;
	}
	,__class__: flixel_input_touch_FlxTouch
	,__properties__: {get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",get_touchPointID:"get_touchPointID"}
});
var flixel_input_touch_FlxTouchManager = function() {
	this.list = [];
	this._inactiveTouches = [];
	this._touchesCache = new haxe_ds_IntMap();
	flixel_input_touch_FlxTouchManager.maxTouchPoints = openfl_ui_Multitouch.maxTouchPoints;
	openfl_ui_Multitouch.set_inputMode(2);
	openfl_Lib.current.stage.addEventListener("touchBegin",$bind(this,this.handleTouchBegin));
	openfl_Lib.current.stage.addEventListener("touchEnd",$bind(this,this.handleTouchEnd));
	openfl_Lib.current.stage.addEventListener("touchMove",$bind(this,this.handleTouchMove));
};
$hxClasses["flixel.input.touch.FlxTouchManager"] = flixel_input_touch_FlxTouchManager;
flixel_input_touch_FlxTouchManager.__name__ = ["flixel","input","touch","FlxTouchManager"];
flixel_input_touch_FlxTouchManager.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_touch_FlxTouchManager.prototype = {
	getByID: function(TouchPointID) {
		return this._touchesCache.h[TouchPointID];
	}
	,getFirst: function() {
		if(this.list[0] != null) {
			return this.list[0];
		} else {
			return null;
		}
	}
	,destroy: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			touch.destroy();
		}
		this.list = null;
		var _g2 = 0;
		var _g11 = this._inactiveTouches;
		while(_g2 < _g11.length) {
			var touch1 = _g11[_g2];
			++_g2;
			touch1.destroy();
		}
		this._inactiveTouches = null;
		this._touchesCache = null;
	}
	,justStarted: function(TouchArray) {
		if(TouchArray == null) {
			TouchArray = [];
		}
		var touchLen = TouchArray.length;
		if(touchLen > 0) {
			TouchArray.splice(0,touchLen);
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			if(touch.input.current == 2) {
				TouchArray.push(touch);
			}
		}
		return TouchArray;
	}
	,justReleased: function(TouchArray) {
		if(TouchArray == null) {
			TouchArray = [];
		}
		var touchLen = TouchArray.length;
		if(touchLen > 0) {
			TouchArray.splice(0,touchLen);
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			if(touch.input.current == -1) {
				TouchArray.push(touch);
			}
		}
		return TouchArray;
	}
	,reset: function() {
		var key = this._touchesCache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			this._touchesCache.remove(key1);
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			touch.input.reset();
			this._inactiveTouches.push(touch);
		}
		this.list.splice(0,this.list.length);
	}
	,handleTouchBegin: function(FlashEvent) {
		var touch = this._touchesCache.h[FlashEvent.touchPointID];
		if(touch != null) {
			touch.setXY(FlashEvent.stageX | 0,FlashEvent.stageY | 0);
		} else {
			touch = this.recycle(FlashEvent.stageX | 0,FlashEvent.stageY | 0,FlashEvent.touchPointID);
		}
		touch.input.press();
	}
	,handleTouchEnd: function(FlashEvent) {
		var touch = this._touchesCache.h[FlashEvent.touchPointID];
		if(touch != null) {
			touch.input.release();
		}
	}
	,handleTouchMove: function(FlashEvent) {
		var touch = this._touchesCache.h[FlashEvent.touchPointID];
		if(touch != null) {
			touch.setXY(FlashEvent.stageX | 0,FlashEvent.stageY | 0);
		}
	}
	,add: function(Touch) {
		this.list.push(Touch);
		this._touchesCache.h[Touch.input.ID] = Touch;
		return Touch;
	}
	,recycle: function(X,Y,PointID) {
		if(this._inactiveTouches.length > 0) {
			var touch = this._inactiveTouches.pop();
			touch.recycle(X,Y,PointID);
			return this.add(touch);
		}
		return this.add(new flixel_input_touch_FlxTouch(X,Y,PointID));
	}
	,update: function() {
		var i = this.list.length - 1;
		var touch;
		while(i >= 0) {
			touch = this.list[i];
			var tmp;
			var _this = touch.input;
			if(_this.current == 0 || _this.current == -1) {
				tmp = touch.input.current != -1;
			} else {
				tmp = false;
			}
			if(tmp) {
				touch.input.reset();
				this._touchesCache.remove(touch.input.ID);
				this.list.splice(i,1);
				this._inactiveTouches.push(touch);
			} else {
				touch.update();
			}
			--i;
		}
	}
	,onFocus: function() {
	}
	,onFocusLost: function() {
		this.reset();
	}
	,__class__: flixel_input_touch_FlxTouchManager
};
var flixel_math_FlxAngle = function() { };
$hxClasses["flixel.math.FlxAngle"] = flixel_math_FlxAngle;
flixel_math_FlxAngle.__name__ = ["flixel","math","FlxAngle"];
flixel_math_FlxAngle.__properties__ = {get_TO_RAD:"get_TO_RAD",get_TO_DEG:"get_TO_DEG"};
flixel_math_FlxAngle.wrapAngle = function(angle) {
	if(angle > 180) {
		angle = flixel_math_FlxAngle.wrapAngle(angle - 360);
	} else if(angle < -180) {
		angle = flixel_math_FlxAngle.wrapAngle(angle + 360);
	}
	return angle;
};
flixel_math_FlxAngle.asDegrees = function(radians) {
	return radians * (180 / Math.PI);
};
flixel_math_FlxAngle.asRadians = function(degrees) {
	return degrees * (Math.PI / 180);
};
flixel_math_FlxAngle.angleBetween = function(SpriteA,SpriteB,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var dx = SpriteB.x + SpriteB.origin.x - (SpriteA.x + SpriteA.origin.x);
	var dy = SpriteB.y + SpriteB.origin.y - (SpriteA.y + SpriteA.origin.y);
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleBetweenPoint = function(Sprite,Target,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var dx = Target.x - (Sprite.x + Sprite.origin.x);
	var dy = Target.y - (Sprite.y + Sprite.origin.y);
	if(Target._weak) {
		Target.put();
	}
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleBetweenMouse = function(Object,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	if(Object == null) {
		return 0;
	}
	var p = Object.getScreenPosition();
	var dx = flixel_FlxG.mouse.screenX - p.x;
	var dy = flixel_FlxG.mouse.screenY - p.y;
	p.put();
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleBetweenTouch = function(Object,Touch,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var p = Object.getScreenPosition();
	var dx = Touch.screenX - p.x;
	var dy = Touch.screenY - p.y;
	p.put();
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleFromFacing = function(FacingBitmask,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var degrees;
	switch(FacingBitmask) {
	case 1:
		degrees = 180;
		break;
	case 16:
		degrees = 0;
		break;
	case 256:
		degrees = -90;
		break;
	case 4096:
		degrees = 90;
		break;
	default:
		var f = FacingBitmask;
		if(f == 257) {
			degrees = -135;
		} else {
			var f1 = FacingBitmask;
			if(f1 == 272) {
				degrees = -45;
			} else {
				var f2 = FacingBitmask;
				if(f2 == 4097) {
					degrees = 135;
				} else {
					var f3 = FacingBitmask;
					if(f3 == 4112) {
						degrees = 45;
					} else {
						degrees = 0;
					}
				}
			}
		}
	}
	if(AsDegrees) {
		return degrees;
	} else {
		return degrees * (Math.PI / 180);
	}
};
flixel_math_FlxAngle.getCartesianCoords = function(Radius,Angle,point) {
	var p = point;
	if(p == null) {
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		p = point1;
	}
	p.set_x(Radius * Math.cos(Angle * (Math.PI / 180)));
	p.set_y(Radius * Math.sin(Angle * (Math.PI / 180)));
	return p;
};
flixel_math_FlxAngle.getPolarCoords = function(X,Y,point) {
	var p = point;
	if(p == null) {
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		p = point1;
	}
	p.set_x(Math.sqrt(X * X + Y * Y));
	p.set_y(Math.atan2(Y,X) * (180 / Math.PI));
	return p;
};
flixel_math_FlxAngle.get_TO_DEG = function() {
	return 180 / Math.PI;
};
flixel_math_FlxAngle.get_TO_RAD = function() {
	return Math.PI / 180;
};
var flixel_math_FlxMath = function() { };
$hxClasses["flixel.math.FlxMath"] = flixel_math_FlxMath;
flixel_math_FlxMath.__name__ = ["flixel","math","FlxMath"];
flixel_math_FlxMath.roundDecimal = function(Value,Precision) {
	var mult = 1;
	var _g1 = 0;
	var _g = Precision;
	while(_g1 < _g) {
		var i = _g1++;
		mult *= 10;
	}
	return Math.round(Value * mult) / mult;
};
flixel_math_FlxMath.bound = function(Value,Min,Max) {
	var lowerBound = Min != null && Value < Min ? Min : Value;
	if(Max != null && lowerBound > Max) {
		return Max;
	} else {
		return lowerBound;
	}
};
flixel_math_FlxMath.lerp = function(a,b,ratio) {
	return a + ratio * (b - a);
};
flixel_math_FlxMath.inBounds = function(Value,Min,Max) {
	if(Min == null || Value >= Min) {
		if(Max != null) {
			return Value <= Max;
		} else {
			return true;
		}
	} else {
		return false;
	}
};
flixel_math_FlxMath.isOdd = function(n) {
	return ((n | 0) & 1) != 0;
};
flixel_math_FlxMath.isEven = function(n) {
	return ((n | 0) & 1) == 0;
};
flixel_math_FlxMath.numericComparison = function(a,b) {
	if(b > a) {
		return -1;
	} else if(a > b) {
		return 1;
	}
	return 0;
};
flixel_math_FlxMath.pointInCoordinates = function(pointX,pointY,rectX,rectY,rectWidth,rectHeight) {
	if(pointX >= rectX && pointX <= rectX + rectWidth) {
		if(pointY >= rectY && pointY <= rectY + rectHeight) {
			return true;
		}
	}
	return false;
};
flixel_math_FlxMath.pointInFlxRect = function(pointX,pointY,rect) {
	if(pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y) {
		return pointY <= rect.y + rect.height;
	} else {
		return false;
	}
};
flixel_math_FlxMath.mouseInFlxRect = function(useWorldCoords,rect) {
	if(rect == null) {
		return true;
	}
	if(useWorldCoords) {
		return flixel_math_FlxMath.pointInFlxRect(Math.floor(flixel_FlxG.mouse.x),Math.floor(flixel_FlxG.mouse.y),rect);
	} else {
		return flixel_math_FlxMath.pointInFlxRect(flixel_FlxG.mouse.screenX,flixel_FlxG.mouse.screenY,rect);
	}
};
flixel_math_FlxMath.pointInRectangle = function(pointX,pointY,rect) {
	if(pointX >= rect.x && pointX <= rect.get_right() && pointY >= rect.y) {
		return pointY <= rect.get_bottom();
	} else {
		return false;
	}
};
flixel_math_FlxMath.maxAdd = function(value,amount,max,min) {
	if(min == null) {
		min = 0;
	}
	value += amount;
	if(value > max) {
		value = max;
	} else if(value <= min) {
		value = min;
	}
	return value;
};
flixel_math_FlxMath.wrap = function(value,min,max) {
	var range = max - min + 1;
	if(value < min) {
		value += range * ((min - value) / range + 1 | 0);
	}
	return min + (value - min) % range;
};
flixel_math_FlxMath.remapToRange = function(value,start1,stop1,start2,stop2) {
	return start2 + (value - start1) * ((stop2 - start2) / (stop1 - start1));
};
flixel_math_FlxMath.dotProduct = function(ax,ay,bx,by) {
	return ax * bx + ay * by;
};
flixel_math_FlxMath.vectorLength = function(dx,dy) {
	return Math.sqrt(dx * dx + dy * dy);
};
flixel_math_FlxMath.distanceBetween = function(SpriteA,SpriteB) {
	var dx = SpriteA.x + SpriteA.origin.x - (SpriteB.x + SpriteB.origin.x);
	var dy = SpriteA.y + SpriteA.origin.y - (SpriteB.y + SpriteB.origin.y);
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceWithin = function(SpriteA,SpriteB,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = SpriteA.x + SpriteA.origin.x - (SpriteB.x + SpriteB.origin.x);
	var dy = SpriteA.y + SpriteA.origin.y - (SpriteB.y + SpriteB.origin.y);
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.distanceToPoint = function(Sprite,Target) {
	var dx = Sprite.x + Sprite.origin.x - Target.x;
	var dy = Sprite.y + Sprite.origin.y - Target.y;
	if(Target._weak) {
		Target.put();
	}
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceToPointWithin = function(Sprite,Target,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = Sprite.x + Sprite.origin.x - Target.x;
	var dy = Sprite.y + Sprite.origin.y - Target.y;
	if(Target._weak) {
		Target.put();
	}
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.distanceToMouse = function(Sprite) {
	var dx = Sprite.x + Sprite.origin.x - flixel_FlxG.mouse.screenX;
	var dy = Sprite.y + Sprite.origin.y - flixel_FlxG.mouse.screenY;
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceToMouseWithin = function(Sprite,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = Sprite.x + Sprite.origin.x - flixel_FlxG.mouse.screenX;
	var dy = Sprite.y + Sprite.origin.y - flixel_FlxG.mouse.screenY;
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.distanceToTouch = function(Sprite,Touch) {
	var dx = Sprite.x + Sprite.origin.x - Touch.screenX;
	var dy = Sprite.y + Sprite.origin.y - Touch.screenY;
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceToTouchWithin = function(Sprite,Touch,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = Sprite.x + Sprite.origin.x - Touch.screenX;
	var dy = Sprite.y + Sprite.origin.y - Touch.screenY;
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.getDecimals = function(n) {
	var helperArray = (n == null ? "null" : "" + n).split(".");
	var decimals = 0;
	if(helperArray.length > 1) {
		decimals = helperArray[1].length;
	}
	return decimals;
};
flixel_math_FlxMath.equal = function(aValueA,aValueB,aDiff) {
	if(aDiff == null) {
		aDiff = 0.0000001;
	}
	return Math.abs(aValueA - aValueB) <= aDiff;
};
flixel_math_FlxMath.signOf = function(n) {
	if(n < 0) {
		return -1;
	} else {
		return 1;
	}
};
flixel_math_FlxMath.sameSign = function(a,b) {
	return (a < 0 ? -1 : 1) == (b < 0 ? -1 : 1);
};
flixel_math_FlxMath.fastSin = function(n) {
	n *= 0.3183098862;
	if(n > 1) {
		n -= Math.ceil(n) >> 1 << 1;
	} else if(n < -1) {
		n += Math.ceil(-n) >> 1 << 1;
	}
	if(n > 0) {
		return n * (3.1 + n * (0.5 + n * (-7.2 + n * 3.6)));
	} else {
		return n * (3.1 - n * (0.5 + n * (7.2 + n * 3.6)));
	}
};
flixel_math_FlxMath.fastCos = function(n) {
	var n1 = n + 1.570796327;
	n1 *= 0.3183098862;
	if(n1 > 1) {
		n1 -= Math.ceil(n1) >> 1 << 1;
	} else if(n1 < -1) {
		n1 += Math.ceil(-n1) >> 1 << 1;
	}
	if(n1 > 0) {
		return n1 * (3.1 + n1 * (0.5 + n1 * (-7.2 + n1 * 3.6)));
	} else {
		return n1 * (3.1 - n1 * (0.5 + n1 * (7.2 + n1 * 3.6)));
	}
};
flixel_math_FlxMath.sinh = function(n) {
	return (Math.exp(n) - Math.exp(-n)) / 2;
};
flixel_math_FlxMath.maxInt = function(a,b) {
	if(a > b) {
		return a;
	} else {
		return b;
	}
};
flixel_math_FlxMath.minInt = function(a,b) {
	if(a > b) {
		return b;
	} else {
		return a;
	}
};
flixel_math_FlxMath.absInt = function(n) {
	if(n > 0) {
		return n;
	} else {
		return -n;
	}
};
var flixel_math_FlxMatrix = function(a,b,c,d,tx,ty) {
	openfl_geom_Matrix.call(this,a,b,c,d,tx,ty);
};
$hxClasses["flixel.math.FlxMatrix"] = flixel_math_FlxMatrix;
flixel_math_FlxMatrix.__name__ = ["flixel","math","FlxMatrix"];
flixel_math_FlxMatrix.__super__ = openfl_geom_Matrix;
flixel_math_FlxMatrix.prototype = $extend(openfl_geom_Matrix.prototype,{
	rotateWithTrig: function(cos,sin) {
		var a1 = this.a * cos - this.b * sin;
		this.b = this.a * sin + this.b * cos;
		this.a = a1;
		var c1 = this.c * cos - this.d * sin;
		this.d = this.c * sin + this.d * cos;
		this.c = c1;
		var tx1 = this.tx * cos - this.ty * sin;
		this.ty = this.tx * sin + this.ty * cos;
		this.tx = tx1;
		return this;
	}
	,rotateBy180: function() {
		this.setTo(-this.a,-this.b,-this.c,-this.d,-this.tx,-this.ty);
		return this;
	}
	,rotateByPositive90: function() {
		this.setTo(-this.b,this.a,-this.d,this.c,-this.ty,this.tx);
		return this;
	}
	,rotateByNegative90: function() {
		this.setTo(this.b,-this.a,this.d,-this.c,this.ty,-this.tx);
		return this;
	}
	,transformX: function(px,py) {
		return px * this.a + py * this.c + this.tx;
	}
	,transformY: function(px,py) {
		return px * this.b + py * this.d + this.ty;
	}
	,__class__: flixel_math_FlxMatrix
});
var flixel_math_FlxCallbackPoint = function(setXCallback,setYCallback,setXYCallback) {
	flixel_math_FlxPoint.call(this);
	this._setXCallback = setXCallback;
	this._setYCallback = setXYCallback;
	this._setXYCallback = setXYCallback;
	if(this._setXCallback != null) {
		if(this._setYCallback == null) {
			this._setYCallback = setXCallback;
		}
		if(this._setXYCallback == null) {
			this._setXYCallback = setXCallback;
		}
	}
};
$hxClasses["flixel.math.FlxCallbackPoint"] = flixel_math_FlxCallbackPoint;
flixel_math_FlxCallbackPoint.__name__ = ["flixel","math","FlxCallbackPoint"];
flixel_math_FlxCallbackPoint.__super__ = flixel_math_FlxPoint;
flixel_math_FlxCallbackPoint.prototype = $extend(flixel_math_FlxPoint.prototype,{
	set: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		flixel_math_FlxPoint.prototype.set.call(this,X,Y);
		if(this._setXYCallback != null) {
			this._setXYCallback(this);
		}
		return this;
	}
	,set_x: function(Value) {
		flixel_math_FlxPoint.prototype.set_x.call(this,Value);
		if(this._setXCallback != null) {
			this._setXCallback(this);
		}
		return Value;
	}
	,set_y: function(Value) {
		flixel_math_FlxPoint.prototype.set_y.call(this,Value);
		if(this._setYCallback != null) {
			this._setYCallback(this);
		}
		return Value;
	}
	,destroy: function() {
		flixel_math_FlxPoint.prototype.destroy.call(this);
		this._setXCallback = null;
		this._setYCallback = null;
		this._setXYCallback = null;
	}
	,put: function() {
	}
	,__class__: flixel_math_FlxCallbackPoint
});
var flixel_util_FlxPool_$flixel_$math_$FlxVector = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_math_FlxVector"] = flixel_util_FlxPool_$flixel_$math_$FlxVector;
flixel_util_FlxPool_$flixel_$math_$FlxVector.__name__ = ["flixel","util","FlxPool_flixel_math_FlxVector"];
flixel_util_FlxPool_$flixel_$math_$FlxVector.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$math_$FlxVector.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$math_$FlxVector
	,__properties__: {get_length:"get_length"}
};
var flixel_math_FlxVector = function(X,Y) {
	flixel_math_FlxPoint.call(this,X,Y);
};
$hxClasses["flixel.math.FlxVector"] = flixel_math_FlxVector;
flixel_math_FlxVector.__name__ = ["flixel","math","FlxVector"];
flixel_math_FlxVector.get = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var vector = flixel_math_FlxVector._pool.get().set(X,Y);
	vector._inPool = false;
	return vector;
};
flixel_math_FlxVector.__super__ = flixel_math_FlxPoint;
flixel_math_FlxVector.prototype = $extend(flixel_math_FlxPoint.prototype,{
	put: function() {
		if(!this._inPool) {
			this._inPool = true;
			flixel_math_FlxVector._pool.putUnsafe(this);
		}
	}
	,set: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
		return this;
	}
	,scale: function(k) {
		flixel_math_FlxPoint.prototype.scale.call(this,k);
		return this;
	}
	,scaleNew: function(k) {
		return this.clone().scale(k);
	}
	,addNew: function(v) {
		var nv = this.clone();
		nv.addPoint(v);
		return nv;
	}
	,subtractNew: function(v) {
		var nv = this.clone();
		nv.subtractPoint(v);
		return nv;
	}
	,dotProduct: function(v) {
		return this.x * v.x + this.y * v.y;
	}
	,dotProdWithNormalizing: function(v) {
		var normalized = v.clone(flixel_math_FlxVector._vector1).normalize();
		return this.x * normalized.x + this.y * normalized.y;
	}
	,isPerpendicular: function(v) {
		return Math.abs(this.x * v.x + this.y * v.y) < 9.9999999999999984e-015;
	}
	,crossProductLength: function(v) {
		return this.x * v.y - this.y * v.x;
	}
	,isParallel: function(v) {
		return Math.abs(this.x * v.y - this.y * v.x) < 9.9999999999999984e-015;
	}
	,isZero: function() {
		if(Math.abs(this.x) < 0.0000001) {
			return Math.abs(this.y) < 0.0000001;
		} else {
			return false;
		}
	}
	,zero: function() {
		this.set_x(this.set_y(0));
		return this;
	}
	,normalize: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return this;
		}
		return this.scale(1 / Math.sqrt(this.x * this.x + this.y * this.y));
	}
	,isNormalized: function() {
		return Math.abs(this.x * this.x + this.y * this.y - 1) < 9.9999999999999984e-015;
	}
	,rotateByRadians: function(rads) {
		var s = Math.sin(rads);
		var c = Math.cos(rads);
		var tempX = this.x;
		this.set_x(tempX * c - this.y * s);
		this.set_y(tempX * s + this.y * c);
		return this;
	}
	,rotateByDegrees: function(degs) {
		var rads = degs * (Math.PI / 180);
		var s = Math.sin(rads);
		var c = Math.cos(rads);
		var tempX = this.x;
		this.set_x(tempX * c - this.y * s);
		this.set_y(tempX * s + this.y * c);
		return this;
	}
	,rotateWithTrig: function(sin,cos) {
		var tempX = this.x;
		this.set_x(tempX * cos - this.y * sin);
		this.set_y(tempX * sin + this.y * cos);
		return this;
	}
	,rightNormal: function(vec) {
		if(vec == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			vec = vector;
		}
		vec.set(-this.y,this.x);
		return vec;
	}
	,leftNormal: function(vec) {
		if(vec == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			vec = vector;
		}
		vec.set(this.y,-this.x);
		return vec;
	}
	,negate: function() {
		var _g = this;
		_g.set_x(_g.x * -1);
		var _g1 = this;
		_g1.set_y(_g1.y * -1);
		return this;
	}
	,negateNew: function() {
		var _this = this.clone();
		var _g = _this;
		_g.set_x(_g.x * -1);
		var _g1 = _this;
		_g1.set_y(_g1.y * -1);
		return _this;
	}
	,projectTo: function(v,proj) {
		var dp = this.x * v.x + this.y * v.y;
		var lenSq = v.x * v.x + v.y * v.y;
		if(proj == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			proj = vector;
		}
		return proj.set(dp * v.x / lenSq,dp * v.y / lenSq);
	}
	,projectToNormalized: function(v,proj) {
		var dp = this.x * v.x + this.y * v.y;
		if(proj == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			proj = vector;
		}
		return proj.set(dp * v.x,dp * v.y);
	}
	,perpProduct: function(v) {
		return this.y * v.x + -this.x * v.y;
	}
	,ratio: function(a,b,v) {
		if(Math.abs(this.x * v.y - this.y * v.x) < 9.9999999999999984e-015) {
			return NaN;
		}
		if(this.x * this.x + this.y * this.y < 9.9999999999999984e-015 || v.x * v.x + v.y * v.y < 9.9999999999999984e-015) {
			return NaN;
		}
		flixel_math_FlxVector._vector1 = b.clone(flixel_math_FlxVector._vector1);
		flixel_math_FlxVector._vector1.subtractPoint(a);
		var _this = flixel_math_FlxVector._vector1;
		return (_this.y * v.x + -_this.x * v.y) / (this.y * v.x + -this.x * v.y);
	}
	,findIntersection: function(a,b,v,intersection) {
		var t = this.ratio(a,b,v);
		if(intersection == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			intersection = vector;
		}
		if(isNaN(t)) {
			return intersection.set(NaN,NaN);
		}
		return intersection.set(a.x + t * this.x,a.y + t * this.y);
	}
	,findIntersectionInBounds: function(a,b,v,intersection) {
		if(intersection == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			intersection = vector;
		}
		var t1 = this.ratio(a,b,v);
		var t2 = v.ratio(b,a,this);
		if(!isNaN(t1) && !isNaN(t2) && t1 > 0 && t1 <= 1 && t2 > 0 && t2 <= 1) {
			return intersection.set(a.x + t1 * this.x,a.y + t1 * this.y);
		}
		return intersection.set(NaN,NaN);
	}
	,truncate: function(max) {
		var l = Math.min(max,Math.sqrt(this.x * this.x + this.y * this.y));
		if(!(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001)) {
			var a = this.get_radians();
			this.set_x(l * Math.cos(a));
			this.set_y(l * Math.sin(a));
		}
		return this;
	}
	,radiansBetween: function(v) {
		return Math.acos((this.x * v.x + this.y * v.y) / (Math.sqrt(this.x * this.x + this.y * this.y) * Math.sqrt(v.x * v.x + v.y * v.y)));
	}
	,degreesBetween: function(v) {
		return Math.acos((this.x * v.x + this.y * v.y) / (Math.sqrt(this.x * this.x + this.y * this.y) * Math.sqrt(v.x * v.x + v.y * v.y))) * (180 / Math.PI);
	}
	,sign: function(a,b) {
		var signFl = (a.x - this.x) * (b.y - this.y) - (a.y - this.y) * (b.x - this.x);
		if(signFl == 0) {
			return 0;
		}
		return Math.round(signFl / Math.abs(signFl));
	}
	,dist: function(v) {
		var dx = v.x - this.x;
		var dy = v.y - this.y;
		return Math.sqrt(dx * dx + dy * dy);
	}
	,distSquared: function(v) {
		var dx = v.x - this.x;
		var dy = v.y - this.y;
		return dx * dx + dy * dy;
	}
	,bounce: function(normal,bounceCoeff) {
		if(bounceCoeff == null) {
			bounceCoeff = 1;
		}
		var d = (1 + bounceCoeff) * (this.x * normal.x + this.y * normal.y);
		var _g = this;
		_g.set_x(_g.x - d * normal.x);
		var _g1 = this;
		_g1.set_y(_g1.y - d * normal.y);
		return this;
	}
	,bounceWithFriction: function(normal,bounceCoeff,friction) {
		if(friction == null) {
			friction = 0;
		}
		if(bounceCoeff == null) {
			bounceCoeff = 1;
		}
		var p1 = this.projectToNormalized(normal.rightNormal(flixel_math_FlxVector._vector3),flixel_math_FlxVector._vector1);
		var p2 = this.projectToNormalized(normal,flixel_math_FlxVector._vector2);
		var bounceX = -p2.x;
		var bounceY = -p2.y;
		var frictionX = p1.x;
		var frictionY = p1.y;
		this.set_x(bounceX * bounceCoeff + frictionX * friction);
		this.set_y(bounceY * bounceCoeff + frictionY * friction);
		return this;
	}
	,isValid: function() {
		if(!isNaN(this.x) && !isNaN(this.y) && isFinite(this.x)) {
			return isFinite(this.y);
		} else {
			return false;
		}
	}
	,clone: function(vec) {
		if(vec == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			vec = vector;
		}
		vec.set_x(this.x);
		vec.set_y(this.y);
		return vec;
	}
	,get_dx: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return 0;
		}
		return this.x / Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,get_dy: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return 0;
		}
		return this.y / Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,set_length: function(l) {
		if(!(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001)) {
			var a = this.get_radians();
			this.set_x(l * Math.cos(a));
			this.set_y(l * Math.sin(a));
		}
		return l;
	}
	,get_lengthSquared: function() {
		return this.x * this.x + this.y * this.y;
	}
	,get_degrees: function() {
		return this.get_radians() * (180 / Math.PI);
	}
	,set_degrees: function(degs) {
		var rads = degs * (Math.PI / 180);
		var len = Math.sqrt(this.x * this.x + this.y * this.y);
		this.set_x(len * Math.cos(rads));
		this.set_y(len * Math.sin(rads));
		return degs;
	}
	,get_radians: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return 0;
		}
		return Math.atan2(this.y,this.x);
	}
	,set_radians: function(rads) {
		var len = Math.sqrt(this.x * this.x + this.y * this.y);
		this.set_x(len * Math.cos(rads));
		this.set_y(len * Math.sin(rads));
		return rads;
	}
	,get_rx: function() {
		return -this.y;
	}
	,get_ry: function() {
		return this.x;
	}
	,get_lx: function() {
		return this.y;
	}
	,get_ly: function() {
		return -this.x;
	}
	,__class__: flixel_math_FlxVector
	,__properties__: $extend(flixel_math_FlxPoint.prototype.__properties__,{get_ly:"get_ly",get_lx:"get_lx",get_ry:"get_ry",get_rx:"get_rx",set_radians:"set_radians",get_radians:"get_radians",set_degrees:"set_degrees",get_degrees:"get_degrees",get_lengthSquared:"get_lengthSquared",set_length:"set_length",get_length:"get_length",get_dy:"get_dy",get_dx:"get_dx"})
});
var flixel_math_FlxVelocity = function() { };
$hxClasses["flixel.math.FlxVelocity"] = flixel_math_FlxVelocity;
flixel_math_FlxVelocity.__name__ = ["flixel","math","FlxVelocity"];
flixel_math_FlxVelocity.moveTowardsObject = function(Source,Dest,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = flixel_math_FlxAngle.angleBetween(Source,Dest);
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - (Dest.x + Dest.origin.x);
		var dy = Source.y + Source.origin.y - (Dest.y + Dest.origin.y);
		var d = Math.sqrt(dx * dx + dy * dy) | 0;
		Speed = d / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
};
flixel_math_FlxVelocity.accelerateTowardsObject = function(Source,Dest,Acceleration,MaxSpeed) {
	var a = flixel_math_FlxAngle.angleBetween(Source,Dest);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
};
flixel_math_FlxVelocity.moveTowardsMouse = function(Source,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = flixel_math_FlxAngle.angleBetweenMouse(Source);
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - flixel_FlxG.mouse.screenX;
		var dy = Source.y + Source.origin.y - flixel_FlxG.mouse.screenY;
		var d = Math.sqrt(dx * dx + dy * dy) | 0;
		Speed = d / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
};
flixel_math_FlxVelocity.moveTowardsTouch = function(Source,Touch,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = flixel_math_FlxAngle.angleBetweenTouch(Source,Touch);
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - Touch.screenX;
		var dy = Source.y + Source.origin.y - Touch.screenY;
		var d = Math.sqrt(dx * dx + dy * dy) | 0;
		Speed = d / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
};
flixel_math_FlxVelocity.accelerateTowardsMouse = function(Source,Acceleration,MaxSpeed) {
	var a = flixel_math_FlxAngle.angleBetweenMouse(Source);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
};
flixel_math_FlxVelocity.accelerateTowardsTouch = function(Source,Touch,Acceleration,MaxSpeed) {
	var a = flixel_math_FlxAngle.angleBetweenTouch(Source,Touch);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
};
flixel_math_FlxVelocity.moveTowardsPoint = function(Source,Target,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = flixel_math_FlxAngle.angleBetweenPoint(Source,Target);
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - Target.x;
		var dy = Source.y + Source.origin.y - Target.y;
		if(Target._weak) {
			Target.put();
		}
		var d = Math.sqrt(dx * dx + dy * dy) | 0;
		Speed = d / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
	if(Target._weak) {
		Target.put();
	}
};
flixel_math_FlxVelocity.accelerateTowardsPoint = function(Source,Target,Acceleration,MaxSpeed) {
	var a = flixel_math_FlxAngle.angleBetweenPoint(Source,Target);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
	if(Target._weak) {
		Target.put();
	}
};
flixel_math_FlxVelocity.velocityFromAngle = function(Angle,Speed) {
	var a = Angle * (Math.PI / 180);
	var X = Math.cos(a) * Speed;
	var Y = Math.sin(a) * Speed;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_math_FlxVelocity.velocityFromFacing = function(Parent,Speed) {
	var a = flixel_math_FlxAngle.angleFromFacing(Parent.facing);
	var X = Math.cos(a) * Speed;
	var Y = Math.sin(a) * Speed;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_math_FlxVelocity.computeVelocity = function(Velocity,Acceleration,Drag,Max,Elapsed) {
	if(Acceleration != 0) {
		Velocity += Acceleration * Elapsed;
	} else if(Drag != 0) {
		var drag = Drag * Elapsed;
		if(Velocity - drag > 0) {
			Velocity -= drag;
		} else if(Velocity + drag < 0) {
			Velocity += drag;
		} else {
			Velocity = 0;
		}
	}
	if(Velocity != 0 && Max != 0) {
		if(Velocity > Max) {
			Velocity = Max;
		} else if(Velocity < -Max) {
			Velocity = -Max;
		}
	}
	return Velocity;
};
flixel_math_FlxVelocity.accelerateFromAngle = function(source,radians,acceleration,maxSpeed,resetVelocity) {
	if(resetVelocity == null) {
		resetVelocity = true;
	}
	var sinA = Math.sin(radians);
	var cosA = Math.cos(radians);
	if(resetVelocity) {
		source.velocity.set(0,0);
	}
	source.acceleration.set(cosA * acceleration,sinA * acceleration);
	source.maxVelocity.set(Math.abs(cosA * maxSpeed),Math.abs(sinA * maxSpeed));
};
var flixel_system_GraphicLogo = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_GraphicLogo.preload != null) {
		this.__fromImage(flixel_system_GraphicLogo.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_GraphicLogo.preload == null) {
				flixel_system_GraphicLogo.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_GraphicLogo.resourceName),flixel_system_GraphicLogo.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.GraphicLogo"] = flixel_system_GraphicLogo;
flixel_system_GraphicLogo.__name__ = ["flixel","system","GraphicLogo"];
flixel_system_GraphicLogo.preload = null;
flixel_system_GraphicLogo.__super__ = openfl_display_BitmapData;
flixel_system_GraphicLogo.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_GraphicLogo
});
var flixel_system_GraphicVirtualInput = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_GraphicVirtualInput.preload != null) {
		this.__fromImage(flixel_system_GraphicVirtualInput.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_GraphicVirtualInput.preload == null) {
				flixel_system_GraphicVirtualInput.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_GraphicVirtualInput.resourceName),flixel_system_GraphicVirtualInput.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.GraphicVirtualInput"] = flixel_system_GraphicVirtualInput;
flixel_system_GraphicVirtualInput.__name__ = ["flixel","system","GraphicVirtualInput"];
flixel_system_GraphicVirtualInput.preload = null;
flixel_system_GraphicVirtualInput.__super__ = openfl_display_BitmapData;
flixel_system_GraphicVirtualInput.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_GraphicVirtualInput
});
var haxe_io_Bytes = function(data) {
	this.length = data.byteLength;
	this.b = new Uint8Array(data);
	this.b.bufferValue = data;
	data.hxBytes = this;
	data.bytes = this.b;
};
$hxClasses["haxe.io.Bytes"] = haxe_io_Bytes;
haxe_io_Bytes.__name__ = ["haxe","io","Bytes"];
haxe_io_Bytes.alloc = function(length) {
	return new haxe_io_Bytes(new ArrayBuffer(length));
};
haxe_io_Bytes.ofString = function(s) {
	var a = [];
	var i = 0;
	while(i < s.length) {
		var c = s.charCodeAt(i++);
		if(55296 <= c && c <= 56319) {
			c = c - 55232 << 10 | s.charCodeAt(i++) & 1023;
		}
		if(c <= 127) {
			a.push(c);
		} else if(c <= 2047) {
			a.push(192 | c >> 6);
			a.push(128 | c & 63);
		} else if(c <= 65535) {
			a.push(224 | c >> 12);
			a.push(128 | c >> 6 & 63);
			a.push(128 | c & 63);
		} else {
			a.push(240 | c >> 18);
			a.push(128 | c >> 12 & 63);
			a.push(128 | c >> 6 & 63);
			a.push(128 | c & 63);
		}
	}
	return new haxe_io_Bytes(new Uint8Array(a).buffer);
};
haxe_io_Bytes.ofData = function(b) {
	var hb = b.hxBytes;
	if(hb != null) {
		return hb;
	}
	return new haxe_io_Bytes(b);
};
haxe_io_Bytes.fastGet = function(b,pos) {
	return b.bytes[pos];
};
haxe_io_Bytes.prototype = {
	blit: function(pos,src,srcpos,len) {
		if(pos < 0 || srcpos < 0 || len < 0 || pos + len > this.length || srcpos + len > src.length) {
			throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
		}
		if(srcpos == 0 && len == src.b.byteLength) {
			this.b.set(src.b,pos);
		} else {
			this.b.set(src.b.subarray(srcpos,srcpos + len),pos);
		}
	}
	,getDouble: function(pos) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		return this.data.getFloat64(pos,true);
	}
	,getFloat: function(pos) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		return this.data.getFloat32(pos,true);
	}
	,setDouble: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setFloat64(pos,v,true);
	}
	,setFloat: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setFloat32(pos,v,true);
	}
	,setUInt16: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setUint16(pos,v,true);
	}
	,setInt32: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setInt32(pos,v,true);
	}
	,getString: function(pos,len) {
		if(pos < 0 || len < 0 || pos + len > this.length) {
			throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
		}
		var s = "";
		var b = this.b;
		var fcc = String.fromCharCode;
		var i = pos;
		var max = pos + len;
		while(i < max) {
			var c = b[i++];
			if(c < 128) {
				if(c == 0) {
					break;
				}
				s += fcc(c);
			} else if(c < 224) {
				s += fcc((c & 63) << 6 | b[i++] & 127);
			} else if(c < 240) {
				var c2 = b[i++];
				s += fcc((c & 31) << 12 | (c2 & 127) << 6 | b[i++] & 127);
			} else {
				var c21 = b[i++];
				var c3 = b[i++];
				var u = (c & 15) << 18 | (c21 & 127) << 12 | (c3 & 127) << 6 | b[i++] & 127;
				s += fcc((u >> 10) + 55232);
				s += fcc(u & 1023 | 56320);
			}
		}
		return s;
	}
	,toString: function() {
		return this.getString(0,this.length);
	}
	,__class__: haxe_io_Bytes
};
var openfl_utils_IDataOutput = function() { };
$hxClasses["openfl.utils.IDataOutput"] = openfl_utils_IDataOutput;
openfl_utils_IDataOutput.__name__ = ["openfl","utils","IDataOutput"];
openfl_utils_IDataOutput.prototype = {
	__class__: openfl_utils_IDataOutput
	,__properties__: {set_endian:"set_endian",get_endian:"get_endian"}
};
var openfl_utils_IDataInput = function() { };
$hxClasses["openfl.utils.IDataInput"] = openfl_utils_IDataInput;
openfl_utils_IDataInput.__name__ = ["openfl","utils","IDataInput"];
openfl_utils_IDataInput.prototype = {
	__class__: openfl_utils_IDataInput
	,__properties__: {set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}
};
var openfl_utils_ByteArrayData = function(length) {
	if(length == null) {
		length = 0;
	}
	var bytes = new haxe_io_Bytes(new ArrayBuffer(length));
	haxe_io_Bytes.call(this,bytes.b.buffer);
	this.__length = length;
	this.__endian = 0;
	this.position = 0;
};
$hxClasses["openfl.utils.ByteArrayData"] = openfl_utils_ByteArrayData;
openfl_utils_ByteArrayData.__name__ = ["openfl","utils","ByteArrayData"];
openfl_utils_ByteArrayData.__interfaces__ = [openfl_utils_IDataOutput,openfl_utils_IDataInput];
openfl_utils_ByteArrayData.fromBytes = function(bytes) {
	var result = new openfl_utils_ByteArrayData();
	result.__fromBytes(bytes);
	return result;
};
openfl_utils_ByteArrayData.__super__ = haxe_io_Bytes;
openfl_utils_ByteArrayData.prototype = $extend(haxe_io_Bytes.prototype,{
	clear: function() {
		this.__length = 0;
		this.position = 0;
	}
	,compress: function(algorithm) {
		this.__length = this.length;
		this.position = this.__length;
	}
	,deflate: function() {
		this.compress(0);
	}
	,inflate: function() {
		this.uncompress(0);
	}
	,readBoolean: function() {
		if(this.position < this.length) {
			return this.b[this.position++] != 0;
		} else {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
	}
	,readByte: function() {
		var value = this.readUnsignedByte();
		if((value & 128) != 0) {
			return value - 256;
		} else {
			return value;
		}
	}
	,readBytes: function(bytes,offset,length) {
		if(length == null) {
			length = 0;
		}
		if(offset == null) {
			offset = 0;
		}
		if(length == 0) {
			length = this.__length - this.position;
		}
		if(this.position + length > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		if(bytes.__length < offset + length) {
			bytes.__resize(offset + length);
		}
		bytes.blit(offset,this,this.position,length);
		this.position += length;
	}
	,readDouble: function() {
		if(this.position + 8 > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		this.position += 8;
		return this.getDouble(this.position - 8);
	}
	,readFloat: function() {
		if(this.position + 4 > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		this.position += 4;
		return this.getFloat(this.position - 4);
	}
	,readInt: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		var ch3 = this.readUnsignedByte();
		var ch4 = this.readUnsignedByte();
		if(this.__endian == 1) {
			return ch4 << 24 | ch3 << 16 | ch2 << 8 | ch1;
		} else {
			return ch1 << 24 | ch2 << 16 | ch3 << 8 | ch4;
		}
	}
	,readMultiByte: function(length,charSet) {
		return this.readUTFBytes(length);
	}
	,readShort: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		var value;
		if(this.__endian == 1) {
			value = ch2 << 8 | ch1;
		} else {
			value = ch1 << 8 | ch2;
		}
		if((value & 32768) != 0) {
			return value - 65536;
		} else {
			return value;
		}
	}
	,readUnsignedByte: function() {
		if(this.position < this.__length) {
			return this.b[this.position++];
		} else {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
	}
	,readUnsignedInt: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		var ch3 = this.readUnsignedByte();
		var ch4 = this.readUnsignedByte();
		if(this.__endian == 1) {
			return ch4 << 24 | ch3 << 16 | ch2 << 8 | ch1;
		} else {
			return ch1 << 24 | ch2 << 16 | ch3 << 8 | ch4;
		}
	}
	,readUnsignedShort: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		if(this.__endian == 1) {
			return (ch2 << 8) + ch1;
		} else {
			return ch1 << 8 | ch2;
		}
	}
	,readUTF: function() {
		var bytesCount = this.readUnsignedShort();
		return this.readUTFBytes(bytesCount);
	}
	,readUTFBytes: function(length) {
		if(this.position + length > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		this.position += length;
		return this.getString(this.position - length,length);
	}
	,uncompress: function(algorithm) {
		this.__length = this.length;
		this.position = 0;
	}
	,writeBoolean: function(value) {
		this.writeByte(value ? 1 : 0);
	}
	,writeByte: function(value) {
		this.__resize(this.position + 1);
		this.b[this.position++] = value & 255 & 255;
	}
	,writeBytes: function(bytes,offset,length) {
		if(length == null) {
			length = 0;
		}
		if(offset == null) {
			offset = 0;
		}
		if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes) == 0) {
			return;
		}
		if(length == 0) {
			length = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes) - offset;
		}
		this.__resize(this.position + length);
		this.blit(this.position,bytes,offset,length);
		this.position = this.position + length;
	}
	,writeDouble: function(value) {
		this.__resize(this.position + 8);
		this.setDouble(this.position,value);
		this.position += 8;
	}
	,writeFloat: function(value) {
		this.__resize(this.position + 4);
		this.setFloat(this.position,value);
		this.position += 4;
	}
	,writeInt: function(value) {
		this.__resize(this.position + 4);
		if(this.__endian == 1) {
			this.b[this.position++] = value & 255;
			this.b[this.position++] = value >> 8 & 255;
			this.b[this.position++] = value >> 16 & 255;
			this.b[this.position++] = value >> 24 & 255;
		} else {
			this.b[this.position++] = value >> 24 & 255;
			this.b[this.position++] = value >> 16 & 255;
			this.b[this.position++] = value >> 8 & 255;
			this.b[this.position++] = value & 255;
		}
	}
	,writeMultiByte: function(value,charSet) {
		this.writeUTFBytes(value);
	}
	,writeShort: function(value) {
		this.__resize(this.position + 2);
		if(this.__endian == 1) {
			this.b[this.position++] = value & 255;
			this.b[this.position++] = value >> 8 & 255;
		} else {
			this.b[this.position++] = value >> 8 & 255;
			this.b[this.position++] = value & 255;
		}
	}
	,writeUnsignedInt: function(value) {
		this.writeInt(value);
	}
	,writeUTF: function(value) {
		var bytes = haxe_io_Bytes.ofString(value);
		this.writeShort(bytes.length);
		this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes));
	}
	,writeUTFBytes: function(value) {
		var bytes = haxe_io_Bytes.ofString(value);
		this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(haxe_io_Bytes.ofString(value)));
	}
	,__fromBytes: function(bytes) {
		this.b = bytes.b;
		this.length = bytes.length;
		this.data = bytes.data;
		this.__length = bytes.length;
	}
	,__resize: function(size) {
		if(size > this.length) {
			var bytes = new haxe_io_Bytes(new ArrayBuffer((size + 1) * 3 >> 1));
			bytes.blit(0,this,0,this.length);
			this.b = bytes.b;
			this.length = bytes.length;
			this.data = bytes.data;
		}
		if(this.__length < size) {
			this.__length = size;
		}
	}
	,__setData: function(bytes) {
		this.b = bytes.b;
		this.length = bytes.length;
		this.data = bytes.data;
	}
	,get_bytesAvailable: function() {
		return this.__length - this.position;
	}
	,get_endian: function() {
		return this.__endian;
	}
	,set_endian: function(value) {
		return this.__endian = value;
	}
	,__class__: openfl_utils_ByteArrayData
	,__properties__: {set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}
});
var flixel_system_VirtualInputData = function(length) {
	if(length == null) {
		length = 0;
	}
	openfl_utils_ByteArrayData.call(this);
	var bytes = haxe_Resource.getBytes(flixel_system_VirtualInputData.resourceName);
	this.__fromBytes(bytes);
};
$hxClasses["flixel.system.VirtualInputData"] = flixel_system_VirtualInputData;
flixel_system_VirtualInputData.__name__ = ["flixel","system","VirtualInputData"];
flixel_system_VirtualInputData.__super__ = openfl_utils_ByteArrayData;
flixel_system_VirtualInputData.prototype = $extend(openfl_utils_ByteArrayData.prototype,{
	__class__: flixel_system_VirtualInputData
});
var flixel_system_FlxAssets = function() { };
$hxClasses["flixel.system.FlxAssets"] = flixel_system_FlxAssets;
flixel_system_FlxAssets.__name__ = ["flixel","system","FlxAssets"];
flixel_system_FlxAssets.drawLogo = function(graph) {
	graph.beginFill(47394);
	graph.moveTo(50,13);
	graph.lineTo(51,13);
	graph.lineTo(87,50);
	graph.lineTo(87,51);
	graph.lineTo(51,87);
	graph.lineTo(50,87);
	graph.lineTo(13,51);
	graph.lineTo(13,50);
	graph.lineTo(50,13);
	graph.endFill();
	graph.beginFill(16761138);
	graph.moveTo(0,0);
	graph.lineTo(25,0);
	graph.lineTo(50,13);
	graph.lineTo(13,50);
	graph.lineTo(0,25);
	graph.lineTo(0,0);
	graph.endFill();
	graph.beginFill(16066382);
	graph.moveTo(100,0);
	graph.lineTo(75,0);
	graph.lineTo(51,13);
	graph.lineTo(87,50);
	graph.lineTo(100,25);
	graph.lineTo(100,0);
	graph.endFill();
	graph.beginFill(3555839);
	graph.moveTo(0,100);
	graph.lineTo(25,100);
	graph.lineTo(50,87);
	graph.lineTo(13,51);
	graph.lineTo(0,75);
	graph.lineTo(0,100);
	graph.endFill();
	graph.beginFill(314875);
	graph.moveTo(100,100);
	graph.lineTo(75,100);
	graph.lineTo(51,87);
	graph.lineTo(87,51);
	graph.lineTo(100,75);
	graph.lineTo(100,100);
	graph.endFill();
};
flixel_system_FlxAssets.getBitmapData = function(id) {
	if(openfl_Assets.exists(id)) {
		return openfl_Assets.getBitmapData(id,false);
	}
	var _this = flixel_FlxG.log;
	return null;
};
flixel_system_FlxAssets.getBitmapFromClass = function(source) {
	return Type.createInstance(source,[0,0]);
};
flixel_system_FlxAssets.resolveBitmapData = function(Graphic) {
	if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
		return Graphic;
	} else if(js_Boot.__instanceof(Graphic,Class)) {
		return Type.createInstance(Graphic,[0,0]);
	} else if(typeof(Graphic) == "string") {
		if(openfl_Assets.exists(Graphic)) {
			return openfl_Assets.getBitmapData(Graphic,false);
		} else {
			var _this = flixel_FlxG.log;
			return null;
		}
	}
	return null;
};
flixel_system_FlxAssets.resolveKey = function(Graphic,Key) {
	if(Key != null) {
		return Key;
	}
	if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
		return Key;
	} else if(js_Boot.__instanceof(Graphic,Class)) {
		var _this = flixel_FlxG.bitmap;
		return Type.getClassName(Graphic);
	} else if(typeof(Graphic) == "string") {
		return Graphic;
	}
	return null;
};
flixel_system_FlxAssets.getSound = function(id) {
	var extension = "";
	extension = ".ogg";
	return openfl_Assets.getSound(id + extension);
};
flixel_system_FlxAssets.getVirtualInputFrames = function() {
	var graphic = flixel_graphics_FlxGraphic.fromClass(flixel_system_GraphicVirtualInput);
	return flixel_graphics_frames_FlxAtlasFrames.fromSpriteSheetPacker(graphic,Std.string(new flixel_system_VirtualInputData()));
};
var flixel_system_FlxBGSprite = function() {
	flixel_FlxSprite.call(this);
	this.makeGraphic(1,1,-1,true,flixel_FlxG.bitmap.getUniqueKey("bg_graphic_"));
	this.scrollFactor.set();
};
$hxClasses["flixel.system.FlxBGSprite"] = flixel_system_FlxBGSprite;
flixel_system_FlxBGSprite.__name__ = ["flixel","system","FlxBGSprite"];
flixel_system_FlxBGSprite.__super__ = flixel_FlxSprite;
flixel_system_FlxBGSprite.prototype = $extend(flixel_FlxSprite.prototype,{
	draw: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(!camera.visible || !camera.exists) {
				continue;
			}
			this._matrix.identity();
			this._matrix.scale(camera.viewWidth,camera.viewHeight);
			camera.drawPixels(this.frame,null,this._matrix,this.colorTransform);
		}
	}
	,__class__: flixel_system_FlxBGSprite
});
var flixel_system_FlxBasePreloader = function(MinDisplayTime,AllowedURLs) {
	if(MinDisplayTime == null) {
		MinDisplayTime = 0;
	}
	this._urlChecked = false;
	this._loaded = false;
	this._percent = 0;
	this.siteLockBodyText = "It appears the website you are using is hosting an unauthorized copy of this game. " + "Storage or redistribution of this content, without the express permission of the " + "developer or other copyright holder, is prohibited under copyright law.\n\n" + "Thank you for your interest in this game! Please support the developer by " + "visiting the following website to play the game:";
	this.siteLockTitleText = "Sorry.";
	this.siteLockURLIndex = 0;
	this.minDisplayTime = 0;
	NMEPreloader.call(this);
	this.removeChild(this.progress);
	this.removeChild(this.outline);
	this.minDisplayTime = MinDisplayTime;
	if(AllowedURLs != null) {
		this.allowedURLs = AllowedURLs;
	} else {
		this.allowedURLs = [];
	}
	this._startTime = new Date().getTime();
};
$hxClasses["flixel.system.FlxBasePreloader"] = flixel_system_FlxBasePreloader;
flixel_system_FlxBasePreloader.__name__ = ["flixel","system","FlxBasePreloader"];
flixel_system_FlxBasePreloader.__super__ = NMEPreloader;
flixel_system_FlxBasePreloader.prototype = $extend(NMEPreloader.prototype,{
	create: function() {
	}
	,onInit: function() {
		NMEPreloader.prototype.onInit.call(this);
		openfl_Lib.current.stage.scaleMode = 2;
		openfl_Lib.current.stage.align = 6;
		this.create();
		this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));
		this.checkSiteLock();
	}
	,onUpdate: function(bytesLoaded,bytesTotal) {
		this._percent = bytesTotal != 0 ? bytesLoaded / bytesTotal : 0;
	}
	,onEnterFrame: function(E) {
		var time = new Date().getTime() - this._startTime;
		var min = this.minDisplayTime * 1000;
		var percent = this._percent;
		if(min > 0 && this._percent > time / min) {
			percent = time / min;
		}
		this.update(percent);
		if(this._loaded && (min <= 0 || time / min >= 1)) {
			this.removeEventListener("enterFrame",$bind(this,this.onEnterFrame));
			NMEPreloader.prototype.onLoaded.call(this);
			this.destroy();
		}
	}
	,destroy: function() {
	}
	,update: function(Percent) {
	}
	,onLoaded: function() {
		this._loaded = true;
		this._percent = 1;
	}
	,createBitmap: function(bitmapDataClass,onLoad) {
		var bmp = new openfl_display_Bitmap();
		bmp.bitmapData = Type.createInstance(bitmapDataClass,[0,0,true,-1,function(_) {
			onLoad(bmp);
		}]);
		return bmp;
	}
	,loadBitmapData: function(bitmapDataClass,onLoad) {
		return Type.createInstance(bitmapDataClass,[0,0,true,-1,onLoad]);
	}
	,checkSiteLock: function() {
		if(this._urlChecked) {
			return;
		}
		if(!this.isHostUrlAllowed()) {
			this.removeChildren();
			this.removeEventListener("enterFrame",$bind(this,this.onEnterFrame));
			this.createSiteLockFailureScreen();
		} else {
			this._urlChecked = true;
		}
	}
	,createSiteLockFailureScreen: function() {
		this.addChild(this.createSiteLockFailureBackground(16777215,15066597));
		this.addChild(this.createSiteLockFailureIcon(15066597,0.9));
		this.addChild(this.createSiteLockFailureText(30));
	}
	,createSiteLockFailureBackground: function(innerColor,outerColor) {
		var shape = new openfl_display_Shape();
		var graphics = shape.get_graphics();
		graphics.clear();
		var fillMatrix = new openfl_geom_Matrix();
		fillMatrix.createGradientBox(1,1,0,-0.5,-0.5);
		var scaling = Math.max(this.stage.stageWidth,this.stage.stageHeight);
		fillMatrix.scale(scaling,scaling);
		fillMatrix.translate(0.5 * this.stage.stageWidth,0.5 * this.stage.stageHeight);
		graphics.beginGradientFill(1,[innerColor,outerColor],[1,1],[0,255],fillMatrix);
		graphics.drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight);
		graphics.endFill();
		return shape;
	}
	,createSiteLockFailureIcon: function(color,scale) {
		var shape = new openfl_display_Shape();
		var graphics = shape.get_graphics();
		graphics.clear();
		graphics.beginFill(color);
		var value = [1,6,2,2,2,6,6,2,2,2,6,1,6,2,6,2,6,2,6,1,6,6,2,2,2,6,6];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		var value1 = [120.0,0,164,0,200,35,200,79,200,130,160,130,160,79,160,57,142,40,120,40,97,40,79,57,79,79,80,130,40,130,40,79,40,35,75,0,120,0,220,140,231,140,240,148,240,160,240,300,240,311,231,320,220,320,20,320,8,320,0,311,0,300,0,160,0,148,8,140,20,140,120,190,108,190,100,198,100,210,100,217,104,223,110,227,110,270,130,270,130,227,135,223,140,217,140,210,140,198,131,190,120,190];
		var vectorData1 = new openfl_VectorData();
		vectorData1.length = value1.length;
		vectorData1.fixed = true;
		vectorData1.data = value1.slice(0);
		graphics.drawPath(vectorData,vectorData1,"nonZero");
		graphics.endFill();
		var transformMatrix = new openfl_geom_Matrix();
		transformMatrix.translate(-0.5 * shape.get_width(),-0.5 * shape.get_height());
		var scaling = scale * Math.min(this.stage.stageWidth / shape.get_width(),this.stage.stageHeight / shape.get_height());
		transformMatrix.scale(scaling,scaling);
		transformMatrix.translate(0.5 * this.stage.stageWidth,0.5 * this.stage.stageHeight);
		shape.get_transform().set_matrix(transformMatrix);
		return shape;
	}
	,createSiteLockFailureText: function(margin) {
		var sprite = new openfl_display_Sprite();
		var bounds = new openfl_geom_Rectangle(0,0,this.stage.stageWidth,this.stage.stageHeight);
		bounds.inflate(-margin,-margin);
		var titleText = new openfl_text_TextField();
		var titleTextFormat = new openfl_text_TextFormat("_sans",33,3355443,true);
		titleTextFormat.align = 3;
		titleText.set_defaultTextFormat(titleTextFormat);
		titleText.set_selectable(false);
		titleText.set_width(bounds.width);
		titleText.set_text(this.siteLockTitleText);
		var bodyText = new openfl_text_TextField();
		var bodyTextFormat = new openfl_text_TextFormat("_sans",22,3355443);
		bodyTextFormat.align = 2;
		bodyText.set_defaultTextFormat(bodyTextFormat);
		bodyText.set_multiline(true);
		bodyText.set_wordWrap(true);
		bodyText.set_selectable(false);
		bodyText.set_width(bounds.width);
		bodyText.set_text(this.siteLockBodyText);
		var hyperlinkText = new openfl_text_TextField();
		var hyperlinkTextFormat = new openfl_text_TextFormat("_sans",22,7247820,true,false,true);
		hyperlinkTextFormat.align = 0;
		hyperlinkTextFormat.url = this.allowedURLs[this.siteLockURLIndex];
		hyperlinkText.set_defaultTextFormat(hyperlinkTextFormat);
		hyperlinkText.set_selectable(true);
		hyperlinkText.set_width(bounds.width);
		hyperlinkText.set_text(this.allowedURLs[this.siteLockURLIndex]);
		this.adjustSiteLockTextFields(titleText,bodyText,hyperlinkText);
		var gutterSize = 4;
		titleText.set_height(titleText.get_textHeight() + gutterSize);
		bodyText.set_height(bodyText.get_textHeight() + gutterSize);
		hyperlinkText.set_height(hyperlinkText.get_textHeight() + gutterSize);
		titleText.set_x(bodyText.set_x(hyperlinkText.set_x(bounds.get_left())));
		titleText.set_y(bounds.get_top());
		bodyText.set_y(titleText.get_y() + 2.0 * titleText.get_height());
		hyperlinkText.set_y(bodyText.get_y() + bodyText.get_height() + hyperlinkText.get_height());
		sprite.addChild(titleText);
		sprite.addChild(bodyText);
		sprite.addChild(hyperlinkText);
		return sprite;
	}
	,adjustSiteLockTextFields: function(titleText,bodyText,hyperlinkText) {
	}
	,goToMyURL: function(e) {
		if(this.allowedURLs[this.siteLockURLIndex] != "localhost") {
			var URL = this.allowedURLs[this.siteLockURLIndex];
			var prefix = "";
			if(!new EReg("^https?://","").match(URL)) {
				prefix = "http://";
			}
			openfl_Lib.getURL(new openfl_net_URLRequest(prefix + URL),"_blank");
		} else {
			openfl_Lib.getURL(new openfl_net_URLRequest(this.allowedURLs[this.siteLockURLIndex]));
		}
	}
	,isHostUrlAllowed: function() {
		if(this.allowedURLs.length == 0) {
			return true;
		}
		var homeURL = window.location.href;
		var homeDomain = flixel_util_FlxStringUtil.getDomain(homeURL);
		var _g = 0;
		var _g1 = this.allowedURLs;
		while(_g < _g1.length) {
			var allowedURL = _g1[_g];
			++_g;
			var allowedDomain = flixel_util_FlxStringUtil.getDomain(allowedURL);
			if(allowedDomain == homeDomain) {
				return true;
			}
		}
		return false;
	}
	,__class__: flixel_system_FlxBasePreloader
});
var flixel_system_FlxLinkedList = function() {
	this.exists = true;
};
$hxClasses["flixel.system.FlxLinkedList"] = flixel_system_FlxLinkedList;
flixel_system_FlxLinkedList.__name__ = ["flixel","system","FlxLinkedList"];
flixel_system_FlxLinkedList.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_system_FlxLinkedList._cachedListsHead = null;
flixel_system_FlxLinkedList.recycle = function() {
	if(flixel_system_FlxLinkedList._cachedListsHead != null) {
		var cachedList = flixel_system_FlxLinkedList._cachedListsHead;
		flixel_system_FlxLinkedList._cachedListsHead = flixel_system_FlxLinkedList._cachedListsHead.next;
		flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST--;
		cachedList.exists = true;
		cachedList.next = null;
		return cachedList;
	} else {
		return new flixel_system_FlxLinkedList();
	}
};
flixel_system_FlxLinkedList.clearCache = function() {
	while(flixel_system_FlxLinkedList._cachedListsHead != null) {
		var node = flixel_system_FlxLinkedList._cachedListsHead;
		flixel_system_FlxLinkedList._cachedListsHead = flixel_system_FlxLinkedList._cachedListsHead.next;
		node.object = null;
		node.next = null;
	}
	flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST = 0;
};
flixel_system_FlxLinkedList.prototype = {
	destroy: function() {
		if(!this.exists) {
			return;
		}
		this.object = null;
		if(this.next != null) {
			this.next.destroy();
		}
		this.exists = false;
		this.next = flixel_system_FlxLinkedList._cachedListsHead;
		flixel_system_FlxLinkedList._cachedListsHead = this;
		flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST++;
	}
	,__class__: flixel_system_FlxLinkedList
};
var flixel_system__$FlxPreloader_GraphicLogoLight = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system__$FlxPreloader_GraphicLogoLight.preload != null) {
		this.__fromImage(flixel_system__$FlxPreloader_GraphicLogoLight.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system__$FlxPreloader_GraphicLogoLight.preload == null) {
				flixel_system__$FlxPreloader_GraphicLogoLight.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system__$FlxPreloader_GraphicLogoLight.resourceName),flixel_system__$FlxPreloader_GraphicLogoLight.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system._FlxPreloader.GraphicLogoLight"] = flixel_system__$FlxPreloader_GraphicLogoLight;
flixel_system__$FlxPreloader_GraphicLogoLight.__name__ = ["flixel","system","_FlxPreloader","GraphicLogoLight"];
flixel_system__$FlxPreloader_GraphicLogoLight.preload = null;
flixel_system__$FlxPreloader_GraphicLogoLight.__super__ = openfl_display_BitmapData;
flixel_system__$FlxPreloader_GraphicLogoLight.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system__$FlxPreloader_GraphicLogoLight
});
var flixel_system__$FlxPreloader_GraphicLogoCorners = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system__$FlxPreloader_GraphicLogoCorners.preload != null) {
		this.__fromImage(flixel_system__$FlxPreloader_GraphicLogoCorners.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system__$FlxPreloader_GraphicLogoCorners.preload == null) {
				flixel_system__$FlxPreloader_GraphicLogoCorners.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system__$FlxPreloader_GraphicLogoCorners.resourceName),flixel_system__$FlxPreloader_GraphicLogoCorners.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system._FlxPreloader.GraphicLogoCorners"] = flixel_system__$FlxPreloader_GraphicLogoCorners;
flixel_system__$FlxPreloader_GraphicLogoCorners.__name__ = ["flixel","system","_FlxPreloader","GraphicLogoCorners"];
flixel_system__$FlxPreloader_GraphicLogoCorners.preload = null;
flixel_system__$FlxPreloader_GraphicLogoCorners.__super__ = openfl_display_BitmapData;
flixel_system__$FlxPreloader_GraphicLogoCorners.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system__$FlxPreloader_GraphicLogoCorners
});
var flixel_system_FlxPreloader = function(MinDisplayTime,AllowedURLs) {
	if(MinDisplayTime == null) {
		MinDisplayTime = 0;
	}
	flixel_system_FlxBasePreloader.call(this,MinDisplayTime,AllowedURLs);
};
$hxClasses["flixel.system.FlxPreloader"] = flixel_system_FlxPreloader;
flixel_system_FlxPreloader.__name__ = ["flixel","system","FlxPreloader"];
flixel_system_FlxPreloader.__super__ = flixel_system_FlxBasePreloader;
flixel_system_FlxPreloader.prototype = $extend(flixel_system_FlxBasePreloader.prototype,{
	create: function() {
		var _gthis = this;
		this._buffer = new openfl_display_Sprite();
		this._buffer.set_scaleX(this._buffer.set_scaleY(2));
		this.addChild(this._buffer);
		this._width = openfl_Lib.current.stage.stageWidth / this._buffer.get_scaleX() | 0;
		this._height = openfl_Lib.current.stage.stageHeight / this._buffer.get_scaleY() | 0;
		this._buffer.addChild(new openfl_display_Bitmap(new openfl_display_BitmapData(this._width,this._height,false,13406)));
		var logoLight = this.createBitmap(flixel_system__$FlxPreloader_GraphicLogoLight,function(logoLight1) {
			logoLight1.set_width(logoLight1.set_height(_gthis._height));
			logoLight1.set_x((_gthis._width - logoLight1.get_width()) / 2);
		});
		logoLight.smoothing = true;
		this._buffer.addChild(logoLight);
		this._bmpBar = new openfl_display_Bitmap(new openfl_display_BitmapData(1,7,false,6253311));
		this._bmpBar.set_x(4);
		this._bmpBar.set_y(this._height - 11);
		this._buffer.addChild(this._bmpBar);
		this._text = new openfl_text_TextField();
		this._text.set_defaultTextFormat(new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEFAULT,8,6253311));
		this._text.set_embedFonts(true);
		this._text.set_selectable(false);
		this._text.set_multiline(false);
		this._text.set_x(2);
		this._text.set_y(this._bmpBar.get_y() - 11);
		this._text.set_width(200);
		this._buffer.addChild(this._text);
		this._logo = new openfl_display_Sprite();
		flixel_system_FlxAssets.drawLogo(this._logo.get_graphics());
		this._logo.set_scaleX(this._logo.set_scaleY(this._height / 8 * 0.04));
		this._logo.set_x((this._width - this._logo.get_width()) / 2);
		this._logo.set_y((this._height - this._logo.get_height()) / 2);
		this._buffer.addChild(this._logo);
		this._logoGlow = new openfl_display_Sprite();
		flixel_system_FlxAssets.drawLogo(this._logoGlow.get_graphics());
		this._logoGlow.set_blendMode(12);
		this._logoGlow.set_scaleX(this._logoGlow.set_scaleY(this._height / 8 * 0.04));
		this._logoGlow.set_x((this._width - this._logoGlow.get_width()) / 2);
		this._logoGlow.set_y((this._height - this._logoGlow.get_height()) / 2);
		this._buffer.addChild(this._logoGlow);
		var corners = this.createBitmap(flixel_system__$FlxPreloader_GraphicLogoCorners,function(corners1) {
			corners1.set_width(_gthis._width);
			corners1.set_height(_gthis.get_height());
		});
		corners.smoothing = true;
		this._buffer.addChild(corners);
		var bitmap = new openfl_display_Bitmap(new openfl_display_BitmapData(this._width,this._height,false,16777215));
		var i = 0;
		var j = 0;
		while(i < this._height) {
			j = 0;
			while(j < this._width) bitmap.bitmapData.setPixel(j++,i,0);
			i += 2;
		}
		bitmap.set_blendMode(11);
		bitmap.set_alpha(0.25);
		this._buffer.addChild(bitmap);
		flixel_system_FlxBasePreloader.prototype.create.call(this);
	}
	,destroy: function() {
		if(this._buffer != null) {
			this.removeChild(this._buffer);
		}
		this._buffer = null;
		this._bmpBar = null;
		this._text = null;
		this._logo = null;
		this._logoGlow = null;
		flixel_system_FlxBasePreloader.prototype.destroy.call(this);
	}
	,update: function(Percent) {
		this._bmpBar.set_scaleX(Percent * (this._width - 8));
		this._text.set_text(Std.string(flixel_FlxG.VERSION) + " " + (Percent * 100 | 0) + "%");
		if(Percent < 0.1) {
			this._logoGlow.set_alpha(0);
			this._logo.set_alpha(0);
		} else if(Percent < 0.15) {
			this._logoGlow.set_alpha(Math.random());
			this._logo.set_alpha(0);
		} else if(Percent < 0.2) {
			this._logoGlow.set_alpha(0);
			this._logo.set_alpha(0);
		} else if(Percent < 0.25) {
			this._logoGlow.set_alpha(0);
			this._logo.set_alpha(Math.random());
		} else if(Percent < 0.7) {
			this._logoGlow.set_alpha((Percent - 0.45) / 0.45);
			this._logo.set_alpha(1);
		} else if(Percent > 0.8 && Percent < 0.9) {
			this._logoGlow.set_alpha(1 - (Percent - 0.8) / 0.1);
			this._logo.set_alpha(0);
		} else if(Percent > 0.9) {
			this._buffer.set_alpha(1 - (Percent - 0.9) / 0.1);
		}
	}
	,__class__: flixel_system_FlxPreloader
});
var flixel_system_FlxQuadTree = function(X,Y,Width,Height,Parent) {
	flixel_math_FlxRect.call(this);
	this.x = X;
	this.y = Y;
	this.width = Width;
	this.height = Height;
	this.reset(X,Y,Width,Height,Parent);
};
$hxClasses["flixel.system.FlxQuadTree"] = flixel_system_FlxQuadTree;
flixel_system_FlxQuadTree.__name__ = ["flixel","system","FlxQuadTree"];
flixel_system_FlxQuadTree.divisions = null;
flixel_system_FlxQuadTree._min = null;
flixel_system_FlxQuadTree._object = null;
flixel_system_FlxQuadTree._objectLeftEdge = null;
flixel_system_FlxQuadTree._objectTopEdge = null;
flixel_system_FlxQuadTree._objectRightEdge = null;
flixel_system_FlxQuadTree._objectBottomEdge = null;
flixel_system_FlxQuadTree._list = null;
flixel_system_FlxQuadTree._useBothLists = null;
flixel_system_FlxQuadTree._processingCallback = null;
flixel_system_FlxQuadTree._notifyCallback = null;
flixel_system_FlxQuadTree._iterator = null;
flixel_system_FlxQuadTree._objectHullX = null;
flixel_system_FlxQuadTree._objectHullY = null;
flixel_system_FlxQuadTree._objectHullWidth = null;
flixel_system_FlxQuadTree._objectHullHeight = null;
flixel_system_FlxQuadTree._checkObjectHullX = null;
flixel_system_FlxQuadTree._checkObjectHullY = null;
flixel_system_FlxQuadTree._checkObjectHullWidth = null;
flixel_system_FlxQuadTree._checkObjectHullHeight = null;
flixel_system_FlxQuadTree._cachedTreesHead = null;
flixel_system_FlxQuadTree.recycle = function(X,Y,Width,Height,Parent) {
	if(flixel_system_FlxQuadTree._cachedTreesHead != null) {
		var cachedTree = flixel_system_FlxQuadTree._cachedTreesHead;
		flixel_system_FlxQuadTree._cachedTreesHead = flixel_system_FlxQuadTree._cachedTreesHead.next;
		flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES--;
		cachedTree.reset(X,Y,Width,Height,Parent);
		return cachedTree;
	} else {
		return new flixel_system_FlxQuadTree(X,Y,Width,Height,Parent);
	}
};
flixel_system_FlxQuadTree.clearCache = function() {
	while(flixel_system_FlxQuadTree._cachedTreesHead != null) {
		var node = flixel_system_FlxQuadTree._cachedTreesHead;
		flixel_system_FlxQuadTree._cachedTreesHead = flixel_system_FlxQuadTree._cachedTreesHead.next;
		node.next = null;
	}
	flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES = 0;
};
flixel_system_FlxQuadTree.__super__ = flixel_math_FlxRect;
flixel_system_FlxQuadTree.prototype = $extend(flixel_math_FlxRect.prototype,{
	reset: function(X,Y,Width,Height,Parent) {
		this.exists = true;
		this.x = X;
		this.y = Y;
		this.width = Width;
		this.height = Height;
		this._headA = this._tailA = flixel_system_FlxLinkedList.recycle();
		this._headB = this._tailB = flixel_system_FlxLinkedList.recycle();
		if(Parent != null) {
			var iterator;
			var ot;
			if(Parent._headA.object != null) {
				iterator = Parent._headA;
				while(iterator != null) {
					if(this._tailA.object != null) {
						ot = this._tailA;
						this._tailA = flixel_system_FlxLinkedList.recycle();
						ot.next = this._tailA;
					}
					this._tailA.object = iterator.object;
					iterator = iterator.next;
				}
			}
			if(Parent._headB.object != null) {
				iterator = Parent._headB;
				while(iterator != null) {
					if(this._tailB.object != null) {
						ot = this._tailB;
						this._tailB = flixel_system_FlxLinkedList.recycle();
						ot.next = this._tailB;
					}
					this._tailB.object = iterator.object;
					iterator = iterator.next;
				}
			}
		} else {
			flixel_system_FlxQuadTree._min = Math.floor((this.width + this.height) / (2 * flixel_system_FlxQuadTree.divisions));
		}
		this._canSubdivide = this.width > flixel_system_FlxQuadTree._min || this.height > flixel_system_FlxQuadTree._min;
		this._northWestTree = null;
		this._northEastTree = null;
		this._southEastTree = null;
		this._southWestTree = null;
		this._leftEdge = this.x;
		this._rightEdge = this.x + this.width;
		this._halfWidth = this.width / 2;
		this._midpointX = this._leftEdge + this._halfWidth;
		this._topEdge = this.y;
		this._bottomEdge = this.y + this.height;
		this._halfHeight = this.height / 2;
		this._midpointY = this._topEdge + this._halfHeight;
	}
	,destroy: function() {
		this._headA = flixel_util_FlxDestroyUtil.destroy(this._headA);
		this._headB = flixel_util_FlxDestroyUtil.destroy(this._headB);
		this._tailA = flixel_util_FlxDestroyUtil.destroy(this._tailA);
		this._tailB = flixel_util_FlxDestroyUtil.destroy(this._tailB);
		this._northWestTree = flixel_util_FlxDestroyUtil.destroy(this._northWestTree);
		this._northEastTree = flixel_util_FlxDestroyUtil.destroy(this._northEastTree);
		this._southWestTree = flixel_util_FlxDestroyUtil.destroy(this._southWestTree);
		this._southEastTree = flixel_util_FlxDestroyUtil.destroy(this._southEastTree);
		flixel_system_FlxQuadTree._object = null;
		flixel_system_FlxQuadTree._processingCallback = null;
		flixel_system_FlxQuadTree._notifyCallback = null;
		this.exists = false;
		this.next = flixel_system_FlxQuadTree._cachedTreesHead;
		flixel_system_FlxQuadTree._cachedTreesHead = this;
		flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES++;
		flixel_math_FlxRect.prototype.destroy.call(this);
	}
	,load: function(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,ProcessCallback) {
		this.add(ObjectOrGroup1,0);
		if(ObjectOrGroup2 != null) {
			this.add(ObjectOrGroup2,1);
			flixel_system_FlxQuadTree._useBothLists = true;
		} else {
			flixel_system_FlxQuadTree._useBothLists = false;
		}
		flixel_system_FlxQuadTree._notifyCallback = NotifyCallback;
		flixel_system_FlxQuadTree._processingCallback = ProcessCallback;
	}
	,add: function(ObjectOrGroup,list) {
		flixel_system_FlxQuadTree._list = list;
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			var i = 0;
			var basic;
			var members = group.members;
			var l = group.length;
			while(i < l) {
				basic = members[i++];
				if(basic != null && basic.exists) {
					group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						this.add(group,list);
					} else {
						flixel_system_FlxQuadTree._object = basic;
						if(flixel_system_FlxQuadTree._object.exists && flixel_system_FlxQuadTree._object.allowCollisions != 0) {
							flixel_system_FlxQuadTree._objectLeftEdge = flixel_system_FlxQuadTree._object.x;
							flixel_system_FlxQuadTree._objectTopEdge = flixel_system_FlxQuadTree._object.y;
							flixel_system_FlxQuadTree._objectRightEdge = flixel_system_FlxQuadTree._object.x + flixel_system_FlxQuadTree._object.get_width();
							flixel_system_FlxQuadTree._objectBottomEdge = flixel_system_FlxQuadTree._object.y + flixel_system_FlxQuadTree._object.get_height();
							this.addObject();
						}
					}
				}
			}
		} else {
			flixel_system_FlxQuadTree._object = ObjectOrGroup;
			if(flixel_system_FlxQuadTree._object.exists && flixel_system_FlxQuadTree._object.allowCollisions != 0) {
				flixel_system_FlxQuadTree._objectLeftEdge = flixel_system_FlxQuadTree._object.x;
				flixel_system_FlxQuadTree._objectTopEdge = flixel_system_FlxQuadTree._object.y;
				flixel_system_FlxQuadTree._objectRightEdge = flixel_system_FlxQuadTree._object.x + flixel_system_FlxQuadTree._object.get_width();
				flixel_system_FlxQuadTree._objectBottomEdge = flixel_system_FlxQuadTree._object.y + flixel_system_FlxQuadTree._object.get_height();
				this.addObject();
			}
		}
	}
	,addObject: function() {
		if(!this._canSubdivide || this._leftEdge >= flixel_system_FlxQuadTree._objectLeftEdge && this._rightEdge <= flixel_system_FlxQuadTree._objectRightEdge && this._topEdge >= flixel_system_FlxQuadTree._objectTopEdge && this._bottomEdge <= flixel_system_FlxQuadTree._objectBottomEdge) {
			this.addToList();
			return;
		}
		if(flixel_system_FlxQuadTree._objectLeftEdge > this._leftEdge && flixel_system_FlxQuadTree._objectRightEdge < this._midpointX) {
			if(flixel_system_FlxQuadTree._objectTopEdge > this._topEdge && flixel_system_FlxQuadTree._objectBottomEdge < this._midpointY) {
				if(this._northWestTree == null) {
					this._northWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._topEdge,this._halfWidth,this._halfHeight,this);
				}
				this._northWestTree.addObject();
				return;
			}
			if(flixel_system_FlxQuadTree._objectTopEdge > this._midpointY && flixel_system_FlxQuadTree._objectBottomEdge < this._bottomEdge) {
				if(this._southWestTree == null) {
					this._southWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._midpointY,this._halfWidth,this._halfHeight,this);
				}
				this._southWestTree.addObject();
				return;
			}
		}
		if(flixel_system_FlxQuadTree._objectLeftEdge > this._midpointX && flixel_system_FlxQuadTree._objectRightEdge < this._rightEdge) {
			if(flixel_system_FlxQuadTree._objectTopEdge > this._topEdge && flixel_system_FlxQuadTree._objectBottomEdge < this._midpointY) {
				if(this._northEastTree == null) {
					this._northEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._topEdge,this._halfWidth,this._halfHeight,this);
				}
				this._northEastTree.addObject();
				return;
			}
			if(flixel_system_FlxQuadTree._objectTopEdge > this._midpointY && flixel_system_FlxQuadTree._objectBottomEdge < this._bottomEdge) {
				if(this._southEastTree == null) {
					this._southEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._midpointY,this._halfWidth,this._halfHeight,this);
				}
				this._southEastTree.addObject();
				return;
			}
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._leftEdge && flixel_system_FlxQuadTree._objectLeftEdge < this._midpointX && flixel_system_FlxQuadTree._objectBottomEdge > this._topEdge && flixel_system_FlxQuadTree._objectTopEdge < this._midpointY) {
			if(this._northWestTree == null) {
				this._northWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._topEdge,this._halfWidth,this._halfHeight,this);
			}
			this._northWestTree.addObject();
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._midpointX && flixel_system_FlxQuadTree._objectLeftEdge < this._rightEdge && flixel_system_FlxQuadTree._objectBottomEdge > this._topEdge && flixel_system_FlxQuadTree._objectTopEdge < this._midpointY) {
			if(this._northEastTree == null) {
				this._northEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._topEdge,this._halfWidth,this._halfHeight,this);
			}
			this._northEastTree.addObject();
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._midpointX && flixel_system_FlxQuadTree._objectLeftEdge < this._rightEdge && flixel_system_FlxQuadTree._objectBottomEdge > this._midpointY && flixel_system_FlxQuadTree._objectTopEdge < this._bottomEdge) {
			if(this._southEastTree == null) {
				this._southEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._midpointY,this._halfWidth,this._halfHeight,this);
			}
			this._southEastTree.addObject();
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._leftEdge && flixel_system_FlxQuadTree._objectLeftEdge < this._midpointX && flixel_system_FlxQuadTree._objectBottomEdge > this._midpointY && flixel_system_FlxQuadTree._objectTopEdge < this._bottomEdge) {
			if(this._southWestTree == null) {
				this._southWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._midpointY,this._halfWidth,this._halfHeight,this);
			}
			this._southWestTree.addObject();
		}
	}
	,addToList: function() {
		var ot;
		if(flixel_system_FlxQuadTree._list == 0) {
			if(this._tailA.object != null) {
				ot = this._tailA;
				this._tailA = flixel_system_FlxLinkedList.recycle();
				ot.next = this._tailA;
			}
			this._tailA.object = flixel_system_FlxQuadTree._object;
		} else {
			if(this._tailB.object != null) {
				ot = this._tailB;
				this._tailB = flixel_system_FlxLinkedList.recycle();
				ot.next = this._tailB;
			}
			this._tailB.object = flixel_system_FlxQuadTree._object;
		}
		if(!this._canSubdivide) {
			return;
		}
		if(this._northWestTree != null) {
			this._northWestTree.addToList();
		}
		if(this._northEastTree != null) {
			this._northEastTree.addToList();
		}
		if(this._southEastTree != null) {
			this._southEastTree.addToList();
		}
		if(this._southWestTree != null) {
			this._southWestTree.addToList();
		}
	}
	,execute: function() {
		var overlapProcessed = false;
		if(this._headA.object != null) {
			var iterator = this._headA;
			while(iterator != null) {
				flixel_system_FlxQuadTree._object = iterator.object;
				if(flixel_system_FlxQuadTree._useBothLists) {
					flixel_system_FlxQuadTree._iterator = this._headB;
				} else {
					flixel_system_FlxQuadTree._iterator = iterator.next;
				}
				if(flixel_system_FlxQuadTree._object != null && flixel_system_FlxQuadTree._object.exists && flixel_system_FlxQuadTree._object.allowCollisions > 0 && flixel_system_FlxQuadTree._iterator != null && flixel_system_FlxQuadTree._iterator.object != null && this.overlapNode()) {
					overlapProcessed = true;
				}
				iterator = iterator.next;
			}
		}
		if(this._northWestTree != null && this._northWestTree.execute()) {
			overlapProcessed = true;
		}
		if(this._northEastTree != null && this._northEastTree.execute()) {
			overlapProcessed = true;
		}
		if(this._southEastTree != null && this._southEastTree.execute()) {
			overlapProcessed = true;
		}
		if(this._southWestTree != null && this._southWestTree.execute()) {
			overlapProcessed = true;
		}
		return overlapProcessed;
	}
	,overlapNode: function() {
		flixel_system_FlxQuadTree._objectHullX = flixel_system_FlxQuadTree._object.x < flixel_system_FlxQuadTree._object.last.x ? flixel_system_FlxQuadTree._object.x : flixel_system_FlxQuadTree._object.last.x;
		flixel_system_FlxQuadTree._objectHullY = flixel_system_FlxQuadTree._object.y < flixel_system_FlxQuadTree._object.last.y ? flixel_system_FlxQuadTree._object.y : flixel_system_FlxQuadTree._object.last.y;
		flixel_system_FlxQuadTree._objectHullWidth = flixel_system_FlxQuadTree._object.x - flixel_system_FlxQuadTree._object.last.x;
		flixel_system_FlxQuadTree._objectHullWidth = flixel_system_FlxQuadTree._object.get_width() + (flixel_system_FlxQuadTree._objectHullWidth > 0 ? flixel_system_FlxQuadTree._objectHullWidth : -flixel_system_FlxQuadTree._objectHullWidth);
		flixel_system_FlxQuadTree._objectHullHeight = flixel_system_FlxQuadTree._object.y - flixel_system_FlxQuadTree._object.last.y;
		flixel_system_FlxQuadTree._objectHullHeight = flixel_system_FlxQuadTree._object.get_height() + (flixel_system_FlxQuadTree._objectHullHeight > 0 ? flixel_system_FlxQuadTree._objectHullHeight : -flixel_system_FlxQuadTree._objectHullHeight);
		var overlapProcessed = false;
		var checkObject;
		while(flixel_system_FlxQuadTree._iterator != null) {
			checkObject = flixel_system_FlxQuadTree._iterator.object;
			if(flixel_system_FlxQuadTree._object == checkObject || !checkObject.exists || checkObject.allowCollisions <= 0) {
				flixel_system_FlxQuadTree._iterator = flixel_system_FlxQuadTree._iterator.next;
				continue;
			}
			flixel_system_FlxQuadTree._checkObjectHullX = checkObject.x < checkObject.last.x ? checkObject.x : checkObject.last.x;
			flixel_system_FlxQuadTree._checkObjectHullY = checkObject.y < checkObject.last.y ? checkObject.y : checkObject.last.y;
			flixel_system_FlxQuadTree._checkObjectHullWidth = checkObject.x - checkObject.last.x;
			flixel_system_FlxQuadTree._checkObjectHullWidth = checkObject.get_width() + (flixel_system_FlxQuadTree._checkObjectHullWidth > 0 ? flixel_system_FlxQuadTree._checkObjectHullWidth : -flixel_system_FlxQuadTree._checkObjectHullWidth);
			flixel_system_FlxQuadTree._checkObjectHullHeight = checkObject.y - checkObject.last.y;
			flixel_system_FlxQuadTree._checkObjectHullHeight = checkObject.get_height() + (flixel_system_FlxQuadTree._checkObjectHullHeight > 0 ? flixel_system_FlxQuadTree._checkObjectHullHeight : -flixel_system_FlxQuadTree._checkObjectHullHeight);
			if(flixel_system_FlxQuadTree._objectHullX + flixel_system_FlxQuadTree._objectHullWidth > flixel_system_FlxQuadTree._checkObjectHullX && flixel_system_FlxQuadTree._objectHullX < flixel_system_FlxQuadTree._checkObjectHullX + flixel_system_FlxQuadTree._checkObjectHullWidth && flixel_system_FlxQuadTree._objectHullY + flixel_system_FlxQuadTree._objectHullHeight > flixel_system_FlxQuadTree._checkObjectHullY && flixel_system_FlxQuadTree._objectHullY < flixel_system_FlxQuadTree._checkObjectHullY + flixel_system_FlxQuadTree._checkObjectHullHeight) {
				if(flixel_system_FlxQuadTree._processingCallback == null || flixel_system_FlxQuadTree._processingCallback(flixel_system_FlxQuadTree._object,checkObject)) {
					overlapProcessed = true;
					if(flixel_system_FlxQuadTree._notifyCallback != null) {
						flixel_system_FlxQuadTree._notifyCallback(flixel_system_FlxQuadTree._object,checkObject);
					}
				}
			}
			if(flixel_system_FlxQuadTree._iterator != null) {
				flixel_system_FlxQuadTree._iterator = flixel_system_FlxQuadTree._iterator.next;
			}
		}
		return overlapProcessed;
	}
	,__class__: flixel_system_FlxQuadTree
});
var flixel_system_FlxSound = function() {
	this._alreadyPaused = false;
	this._volumeAdjust = 1.0;
	this._length = 0;
	this._time = 0;
	this.loopTime = 0;
	flixel_FlxBasic.call(this);
	this.reset();
};
$hxClasses["flixel.system.FlxSound"] = flixel_system_FlxSound;
flixel_system_FlxSound.__name__ = ["flixel","system","FlxSound"];
flixel_system_FlxSound.__super__ = flixel_FlxBasic;
flixel_system_FlxSound.prototype = $extend(flixel_FlxBasic.prototype,{
	reset: function() {
		this.destroy();
		this.x = 0;
		this.y = 0;
		this._time = 0;
		this._paused = false;
		this._volume = 1.0;
		this._volumeAdjust = 1.0;
		this.looped = false;
		this.loopTime = 0.0;
		this.endTime = 0.0;
		this._target = null;
		this._radius = 0;
		this._proximityPan = false;
		this.set_visible(false);
		this.amplitude = 0;
		this.amplitudeLeft = 0;
		this.amplitudeRight = 0;
		this.autoDestroy = false;
		if(this._transform == null) {
			this._transform = new openfl_media_SoundTransform();
		}
		this._transform.pan = 0;
	}
	,destroy: function() {
		this._transform = null;
		this.set_exists(false);
		this.set_active(false);
		this._target = null;
		this.name = null;
		this.artist = null;
		if(this._channel != null) {
			this._channel.removeEventListener("soundComplete",$bind(this,this.stopped));
			this._channel.stop();
			this._channel = null;
		}
		if(this._sound != null) {
			this._sound.removeEventListener("id3",$bind(this,this.gotID3));
			this._sound = null;
		}
		this.onComplete = null;
		flixel_FlxBasic.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		if(this._channel == null) {
			return;
		}
		this._time = this._channel.get_position();
		var radialMultiplier = 1.0;
		if(this._target != null) {
			var targetPosition = this._target.getPosition();
			var X = this.x;
			var Y = this.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			var point1 = point;
			point1._weak = true;
			radialMultiplier = targetPosition.distanceTo(point1) / this._radius;
			targetPosition.put();
			var lowerBound = radialMultiplier < 0 ? 0 : radialMultiplier;
			radialMultiplier = 1 - (lowerBound > 1 ? 1 : lowerBound);
			if(this._proximityPan) {
				var d = (this.x - this._target.x) / this._radius;
				var lowerBound1 = d < -1 ? -1 : d;
				this._transform.pan = lowerBound1 > 1 ? 1 : lowerBound1;
			}
		}
		this._volumeAdjust = radialMultiplier;
		this.updateTransform();
		if(this._transform.volume > 0) {
			this.amplitudeLeft = this._channel.leftPeak / this._transform.volume;
			this.amplitudeRight = this._channel.rightPeak / this._transform.volume;
			this.amplitude = (this.amplitudeLeft + this.amplitudeRight) * 0.5;
		} else {
			this.amplitudeLeft = 0;
			this.amplitudeRight = 0;
			this.amplitude = 0;
		}
		if(this.endTime != null && this._time >= this.endTime) {
			this.stopped();
		}
	}
	,kill: function() {
		flixel_FlxBasic.prototype.kill.call(this);
		this.cleanup(false);
	}
	,loadEmbedded: function(EmbeddedSound,Looped,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(EmbeddedSound == null) {
			return this;
		}
		this.cleanup(true);
		if(js_Boot.__instanceof(EmbeddedSound,openfl_media_Sound)) {
			this._sound = EmbeddedSound;
		} else if(js_Boot.__instanceof(EmbeddedSound,Class)) {
			this._sound = Type.createInstance(EmbeddedSound,[]);
		} else if(typeof(EmbeddedSound) == "string") {
			if(openfl_Assets.exists(EmbeddedSound,"SOUND") || openfl_Assets.exists(EmbeddedSound,"MUSIC")) {
				this._sound = openfl_Assets.getSound(EmbeddedSound);
			} else {
				var _this = flixel_FlxG.log;
			}
		}
		return this.init(Looped,AutoDestroy,OnComplete);
	}
	,loadStream: function(SoundURL,Looped,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		this.cleanup(true);
		this._sound = new openfl_media_Sound();
		this._sound.addEventListener("id3",$bind(this,this.gotID3));
		this._sound.load(new openfl_net_URLRequest(SoundURL));
		return this.init(Looped,AutoDestroy,OnComplete);
	}
	,init: function(Looped,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		this.looped = Looped;
		this.autoDestroy = AutoDestroy;
		this.updateTransform();
		this.set_exists(true);
		this.onComplete = OnComplete;
		this._length = this._sound == null ? 0 : this._sound.get_length();
		this.endTime = this._length;
		return this;
	}
	,proximity: function(X,Y,TargetObject,Radius,Pan) {
		if(Pan == null) {
			Pan = true;
		}
		this.x = X;
		this.y = Y;
		this._target = TargetObject;
		this._radius = Radius;
		this._proximityPan = Pan;
		return this;
	}
	,play: function(ForceRestart,StartTime,EndTime) {
		if(StartTime == null) {
			StartTime = 0.0;
		}
		if(ForceRestart == null) {
			ForceRestart = false;
		}
		if(!this.exists) {
			return this;
		}
		if(ForceRestart) {
			this.cleanup(false,true);
		} else if(this._channel != null) {
			return this;
		}
		if(this._paused) {
			this.resume();
		} else {
			this.startSound(StartTime);
		}
		this.endTime = EndTime;
		return this;
	}
	,resume: function() {
		if(this._paused) {
			this.startSound(this._time);
		}
		return this;
	}
	,pause: function() {
		if(this._channel == null) {
			return this;
		}
		this._time = this._channel.get_position();
		this._paused = true;
		this.cleanup(false,false);
		return this;
	}
	,stop: function() {
		this.cleanup(this.autoDestroy,true);
		return this;
	}
	,fadeOut: function(Duration,To,onComplete) {
		if(To == null) {
			To = 0;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(this.fadeTween != null) {
			this.fadeTween.cancel();
		}
		this.fadeTween = flixel_tweens_FlxTween.num(this._volume,To,Duration,{ onComplete : onComplete},$bind(this,this.volumeTween));
		return this;
	}
	,fadeIn: function(Duration,From,To,onComplete) {
		if(To == null) {
			To = 1;
		}
		if(From == null) {
			From = 0;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(this._channel == null) {
			this.play();
		}
		if(this.fadeTween != null) {
			this.fadeTween.cancel();
		}
		this.fadeTween = flixel_tweens_FlxTween.num(From,To,Duration,{ onComplete : onComplete},$bind(this,this.volumeTween));
		return this;
	}
	,volumeTween: function(f) {
		this.set_volume(f);
	}
	,getActualVolume: function() {
		return this._volume * this._volumeAdjust;
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.x = X;
		this.y = Y;
	}
	,updateTransform: function() {
		this._transform.volume = (flixel_FlxG.sound.muted ? 0 : 1) * flixel_FlxG.sound.volume * (this.group != null ? this.group.volume : 1) * this._volume * this._volumeAdjust;
		if(this._channel != null) {
			this._channel.set_soundTransform(this._transform);
		}
	}
	,startSound: function(StartTime) {
		if(this._sound == null) {
			return;
		}
		this._time = StartTime;
		this._paused = false;
		this._channel = this._sound.play(this._time,0,this._transform);
		if(this._channel != null) {
			this._channel.addEventListener("soundComplete",$bind(this,this.stopped));
			this.set_active(true);
		} else {
			this.set_exists(false);
			this.set_active(false);
		}
	}
	,stopped: function(_) {
		if(this.onComplete != null) {
			this.onComplete();
		}
		if(this.looped) {
			this.cleanup(false);
			this.play(false,this.loopTime,this.endTime);
		} else {
			this.cleanup(this.autoDestroy);
		}
	}
	,cleanup: function(destroySound,resetPosition) {
		if(resetPosition == null) {
			resetPosition = true;
		}
		if(destroySound) {
			this.reset();
			return;
		}
		if(this._channel != null) {
			this._channel.removeEventListener("soundComplete",$bind(this,this.stopped));
			this._channel.stop();
			this._channel = null;
		}
		this.set_active(false);
		if(resetPosition) {
			this._time = 0;
			this._paused = false;
		}
	}
	,gotID3: function(_) {
		this.name = this._sound.get_id3().songName;
		this.artist = this._sound.get_id3().artist;
		this._sound.removeEventListener("id3",$bind(this,this.gotID3));
	}
	,onFocus: function() {
		if(!this._alreadyPaused) {
			this.resume();
		}
	}
	,onFocusLost: function() {
		this._alreadyPaused = this._paused;
		this.pause();
	}
	,set_group: function(group) {
		if(this.group != group) {
			var oldGroup = this.group;
			this.group = group;
			if(oldGroup != null) {
				oldGroup.remove(this);
			}
			if(group != null) {
				group.add(this);
			}
			this.updateTransform();
		}
		return group;
	}
	,get_playing: function() {
		return this._channel != null;
	}
	,get_volume: function() {
		return this._volume;
	}
	,set_volume: function(Volume) {
		var lowerBound = Volume < 0 ? 0 : Volume;
		this._volume = lowerBound > 1 ? 1 : lowerBound;
		this.updateTransform();
		return Volume;
	}
	,get_pan: function() {
		return this._transform.pan;
	}
	,set_pan: function(pan) {
		return this._transform.pan = pan;
	}
	,get_time: function() {
		return this._time;
	}
	,set_time: function(time) {
		if(this._channel != null) {
			this.cleanup(false,true);
			this.startSound(time);
		}
		return this._time = time;
	}
	,get_length: function() {
		return this._length;
	}
	,toString: function() {
		var value = this._channel != null;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "playing";
		_this.value = value;
		var value1 = this._time;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "time";
		_this1.value = value1;
		var value2 = this._length;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "length";
		_this2.value = value2;
		var value3 = this._volume;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "volume";
		_this3.value = value3;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
	}
	,__class__: flixel_system_FlxSound
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_group:"set_group",get_length:"get_length",set_time:"set_time",get_time:"get_time",set_volume:"set_volume",get_volume:"get_volume",get_playing:"get_playing",set_pan:"set_pan",get_pan:"get_pan"})
});
var flixel_system_FlxSoundGroup = function(volume) {
	if(volume == null) {
		volume = 1;
	}
	this.sounds = [];
	this.set_volume(volume);
};
$hxClasses["flixel.system.FlxSoundGroup"] = flixel_system_FlxSoundGroup;
flixel_system_FlxSoundGroup.__name__ = ["flixel","system","FlxSoundGroup"];
flixel_system_FlxSoundGroup.prototype = {
	add: function(sound) {
		if(this.sounds.indexOf(sound) < 0) {
			sound.set_group(this);
			this.sounds.push(sound);
			return true;
		}
		return false;
	}
	,remove: function(sound) {
		if(this.sounds.indexOf(sound) >= 0) {
			sound.set_group(null);
			return HxOverrides.remove(this.sounds,sound);
		}
		return false;
	}
	,pause: function() {
		var _g = 0;
		var _g1 = this.sounds;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			sound.pause();
		}
	}
	,resume: function() {
		var _g = 0;
		var _g1 = this.sounds;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			sound.resume();
		}
	}
	,set_volume: function(volume) {
		this.volume = volume;
		var _g = 0;
		var _g1 = this.sounds;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			sound.updateTransform();
		}
		return volume;
	}
	,__class__: flixel_system_FlxSoundGroup
	,__properties__: {set_volume:"set_volume"}
};
var flixel_system_FlxSplash = function(MaxSize) {
	this._curPart = 0;
	flixel_FlxState.call(this,MaxSize);
};
$hxClasses["flixel.system.FlxSplash"] = flixel_system_FlxSplash;
flixel_system_FlxSplash.__name__ = ["flixel","system","FlxSplash"];
flixel_system_FlxSplash.nextState = null;
flixel_system_FlxSplash.__super__ = flixel_FlxState;
flixel_system_FlxSplash.prototype = $extend(flixel_FlxState.prototype,{
	create: function() {
		this._cachedBgColor = flixel_FlxG.cameras.get_bgColor();
		flixel_FlxG.cameras.set_bgColor(-16777216);
		this._cachedTimestep = flixel_FlxG.fixedTimestep;
		flixel_FlxG.fixedTimestep = false;
		this._cachedAutoPause = flixel_FlxG.autoPause;
		flixel_FlxG.autoPause = false;
		flixel_FlxG.keys.enabled = false;
		this._times = [0.041,0.184,0.334,0.495,0.636];
		this._colors = [47394,16761138,16066382,3555839,314875];
		this._functions = [$bind(this,this.drawGreen),$bind(this,this.drawYellow),$bind(this,this.drawRed),$bind(this,this.drawBlue),$bind(this,this.drawLightBlue)];
		var _g = 0;
		var _g1 = this._times;
		while(_g < _g1.length) {
			var time = _g1[_g];
			++_g;
			new flixel_util_FlxTimer().start(time,$bind(this,this.timerCallback));
		}
		var stageWidth = openfl_Lib.current.stage.stageWidth;
		var stageHeight = openfl_Lib.current.stage.stageHeight;
		this._sprite = new openfl_display_Sprite();
		openfl_Lib.current.stage.addChild(this._sprite);
		this._gfx = this._sprite.get_graphics();
		this._text = new openfl_text_TextField();
		this._text.set_selectable(false);
		this._text.set_embedFonts(true);
		var dtf = new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEFAULT,16,16777215);
		dtf.align = 0;
		this._text.set_defaultTextFormat(dtf);
		this._text.set_text("HaxeFlixel");
		openfl_Lib.current.stage.addChild(this._text);
		this.onResize(stageWidth,stageHeight);
		var extension = "";
		extension = ".ogg";
		flixel_FlxG.sound.load(openfl_Assets.getSound("flixel/sounds/flixel" + extension)).play();
	}
	,destroy: function() {
		this._sprite = null;
		this._gfx = null;
		this._text = null;
		this._times = null;
		this._colors = null;
		this._functions = null;
		flixel_FlxState.prototype.destroy.call(this);
	}
	,onResize: function(Width,Height) {
		flixel_FlxState.prototype.onResize.call(this,Width,Height);
		this._sprite.set_x(Width / 2);
		this._sprite.set_y(Height / 2 - 20 * flixel_FlxG.game.get_scaleY());
		this._text.set_width(Width / flixel_FlxG.game.get_scaleX());
		this._text.set_x(0);
		this._text.set_y(this._sprite.get_y() + 80 * flixel_FlxG.game.get_scaleY());
		this._sprite.set_scaleX(this._text.set_scaleX(flixel_FlxG.game.get_scaleX()));
		this._sprite.set_scaleY(this._text.set_scaleY(flixel_FlxG.game.get_scaleY()));
	}
	,timerCallback: function(Timer) {
		this._functions[this._curPart]();
		this._text.set_textColor(this._colors[this._curPart]);
		this._text.set_text("HaxeFlixel");
		this._curPart++;
		if(this._curPart == 5) {
			flixel_tweens_FlxTween.tween(this._sprite,{ alpha : 0},3.0,{ ease : flixel_tweens_FlxEase.quadOut, onComplete : $bind(this,this.onComplete)});
			flixel_tweens_FlxTween.tween(this._text,{ alpha : 0},3.0,{ ease : flixel_tweens_FlxEase.quadOut});
		}
	}
	,drawGreen: function() {
		this._gfx.beginFill(47394);
		this._gfx.moveTo(0,-37);
		this._gfx.lineTo(1,-37);
		this._gfx.lineTo(37,0);
		this._gfx.lineTo(37,1);
		this._gfx.lineTo(1,37);
		this._gfx.lineTo(0,37);
		this._gfx.lineTo(-37,1);
		this._gfx.lineTo(-37,0);
		this._gfx.lineTo(0,-37);
		this._gfx.endFill();
	}
	,drawYellow: function() {
		this._gfx.beginFill(16761138);
		this._gfx.moveTo(-50,-50);
		this._gfx.lineTo(-25,-50);
		this._gfx.lineTo(0,-37);
		this._gfx.lineTo(-37,0);
		this._gfx.lineTo(-50,-25);
		this._gfx.lineTo(-50,-50);
		this._gfx.endFill();
	}
	,drawRed: function() {
		this._gfx.beginFill(16066382);
		this._gfx.moveTo(50,-50);
		this._gfx.lineTo(25,-50);
		this._gfx.lineTo(1,-37);
		this._gfx.lineTo(37,0);
		this._gfx.lineTo(50,-25);
		this._gfx.lineTo(50,-50);
		this._gfx.endFill();
	}
	,drawBlue: function() {
		this._gfx.beginFill(3555839);
		this._gfx.moveTo(-50,50);
		this._gfx.lineTo(-25,50);
		this._gfx.lineTo(0,37);
		this._gfx.lineTo(-37,1);
		this._gfx.lineTo(-50,25);
		this._gfx.lineTo(-50,50);
		this._gfx.endFill();
	}
	,drawLightBlue: function() {
		this._gfx.beginFill(314875);
		this._gfx.moveTo(50,50);
		this._gfx.lineTo(25,50);
		this._gfx.lineTo(1,37);
		this._gfx.lineTo(37,1);
		this._gfx.lineTo(50,25);
		this._gfx.lineTo(50,50);
		this._gfx.endFill();
	}
	,onComplete: function(Tween) {
		flixel_FlxG.cameras.set_bgColor(this._cachedBgColor);
		flixel_FlxG.fixedTimestep = this._cachedTimestep;
		flixel_FlxG.autoPause = this._cachedAutoPause;
		flixel_FlxG.keys.enabled = true;
		openfl_Lib.current.stage.removeChild(this._sprite);
		openfl_Lib.current.stage.removeChild(this._text);
		var nextState = Type.createInstance(flixel_system_FlxSplash.nextState,[]);
		if(flixel_FlxG.game._state.switchTo(nextState)) {
			flixel_FlxG.game._requestedState = nextState;
		}
		flixel_FlxG.game._gameJustStarted = true;
	}
	,__class__: flixel_system_FlxSplash
});
var flixel_system_debug_DebuggerUtil = function() { };
$hxClasses["flixel.system.debug.DebuggerUtil"] = flixel_system_debug_DebuggerUtil;
flixel_system_debug_DebuggerUtil.__name__ = ["flixel","system","debug","DebuggerUtil"];
flixel_system_debug_DebuggerUtil.createTextField = function(X,Y,Color,Size) {
	if(Size == null) {
		Size = 12;
	}
	if(Color == null) {
		Color = -1;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	return flixel_system_debug_DebuggerUtil.initTextField(new openfl_text_TextField(),X,Y,Color,Size);
};
flixel_system_debug_DebuggerUtil.initTextField = function(tf,X,Y,Color,Size) {
	if(Size == null) {
		Size = 12;
	}
	if(Color == null) {
		Color = -1;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	tf.set_x(X);
	tf.set_y(Y);
	tf.set_multiline(false);
	tf.set_wordWrap(false);
	tf.set_embedFonts(true);
	tf.set_selectable(false);
	tf.set_defaultTextFormat(new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEBUGGER,Size,Color & 16777215));
	tf.set_alpha((Color >> 24 & 255) / 255);
	tf.set_autoSize(1);
	return tf;
};
flixel_system_debug_DebuggerUtil.fixSize = function(bitmapData) {
	Reflect.setProperty(bitmapData,"width",11);
	Reflect.setProperty(bitmapData,"height",11);
	return bitmapData;
};
var flixel_system_debug__$FlxDebugger_GraphicFlixel = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug__$FlxDebugger_GraphicFlixel.preload != null) {
		this.__fromImage(flixel_system_debug__$FlxDebugger_GraphicFlixel.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug__$FlxDebugger_GraphicFlixel.preload == null) {
				flixel_system_debug__$FlxDebugger_GraphicFlixel.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceName),flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug._FlxDebugger.GraphicFlixel"] = flixel_system_debug__$FlxDebugger_GraphicFlixel;
flixel_system_debug__$FlxDebugger_GraphicFlixel.__name__ = ["flixel","system","debug","_FlxDebugger","GraphicFlixel"];
flixel_system_debug__$FlxDebugger_GraphicFlixel.preload = null;
flixel_system_debug__$FlxDebugger_GraphicFlixel.__super__ = openfl_display_BitmapData;
flixel_system_debug__$FlxDebugger_GraphicFlixel.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug__$FlxDebugger_GraphicFlixel
});
var flixel_system_debug__$FlxDebugger_GraphicDrawDebug = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload != null) {
		this.__fromImage(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload == null) {
				flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceName),flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug._FlxDebugger.GraphicDrawDebug"] = flixel_system_debug__$FlxDebugger_GraphicDrawDebug;
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.__name__ = ["flixel","system","debug","_FlxDebugger","GraphicDrawDebug"];
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload = null;
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.__super__ = openfl_display_BitmapData;
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug__$FlxDebugger_GraphicDrawDebug
});
var flixel_system_debug_GraphicLog = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicLog.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicLog.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicLog.preload == null) {
				flixel_system_debug_GraphicLog.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicLog.resourceName),flixel_system_debug_GraphicLog.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicLog"] = flixel_system_debug_GraphicLog;
flixel_system_debug_GraphicLog.__name__ = ["flixel","system","debug","GraphicLog"];
flixel_system_debug_GraphicLog.preload = null;
flixel_system_debug_GraphicLog.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicLog.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicLog
});
var flixel_system_debug_GraphicStats = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicStats.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicStats.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicStats.preload == null) {
				flixel_system_debug_GraphicStats.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicStats.resourceName),flixel_system_debug_GraphicStats.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicStats"] = flixel_system_debug_GraphicStats;
flixel_system_debug_GraphicStats.__name__ = ["flixel","system","debug","GraphicStats"];
flixel_system_debug_GraphicStats.preload = null;
flixel_system_debug_GraphicStats.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicStats.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicStats
});
var flixel_system_debug_GraphicWatch = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicWatch.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicWatch.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicWatch.preload == null) {
				flixel_system_debug_GraphicWatch.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicWatch.resourceName),flixel_system_debug_GraphicWatch.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicWatch"] = flixel_system_debug_GraphicWatch;
flixel_system_debug_GraphicWatch.__name__ = ["flixel","system","debug","GraphicWatch"];
flixel_system_debug_GraphicWatch.preload = null;
flixel_system_debug_GraphicWatch.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicWatch.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicWatch
});
var flixel_system_debug_GraphicBitmapLog = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicBitmapLog.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicBitmapLog.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicBitmapLog.preload == null) {
				flixel_system_debug_GraphicBitmapLog.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicBitmapLog.resourceName),flixel_system_debug_GraphicBitmapLog.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicBitmapLog"] = flixel_system_debug_GraphicBitmapLog;
flixel_system_debug_GraphicBitmapLog.__name__ = ["flixel","system","debug","GraphicBitmapLog"];
flixel_system_debug_GraphicBitmapLog.preload = null;
flixel_system_debug_GraphicBitmapLog.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicBitmapLog.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicBitmapLog
});
var flixel_system_debug_GraphicConsole = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicConsole.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicConsole.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicConsole.preload == null) {
				flixel_system_debug_GraphicConsole.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicConsole.resourceName),flixel_system_debug_GraphicConsole.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicConsole"] = flixel_system_debug_GraphicConsole;
flixel_system_debug_GraphicConsole.__name__ = ["flixel","system","debug","GraphicConsole"];
flixel_system_debug_GraphicConsole.preload = null;
flixel_system_debug_GraphicConsole.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicConsole.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicConsole
});
var flixel_system_debug_GraphicArrowLeft = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicArrowLeft.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicArrowLeft.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicArrowLeft.preload == null) {
				flixel_system_debug_GraphicArrowLeft.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicArrowLeft.resourceName),flixel_system_debug_GraphicArrowLeft.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicArrowLeft"] = flixel_system_debug_GraphicArrowLeft;
flixel_system_debug_GraphicArrowLeft.__name__ = ["flixel","system","debug","GraphicArrowLeft"];
flixel_system_debug_GraphicArrowLeft.preload = null;
flixel_system_debug_GraphicArrowLeft.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicArrowLeft.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicArrowLeft
});
var flixel_system_debug_GraphicArrowRight = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicArrowRight.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicArrowRight.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicArrowRight.preload == null) {
				flixel_system_debug_GraphicArrowRight.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicArrowRight.resourceName),flixel_system_debug_GraphicArrowRight.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicArrowRight"] = flixel_system_debug_GraphicArrowRight;
flixel_system_debug_GraphicArrowRight.__name__ = ["flixel","system","debug","GraphicArrowRight"];
flixel_system_debug_GraphicArrowRight.preload = null;
flixel_system_debug_GraphicArrowRight.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicArrowRight.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicArrowRight
});
var flixel_system_debug_GraphicCloseButton = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicCloseButton.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicCloseButton.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicCloseButton.preload == null) {
				flixel_system_debug_GraphicCloseButton.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicCloseButton.resourceName),flixel_system_debug_GraphicCloseButton.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicCloseButton"] = flixel_system_debug_GraphicCloseButton;
flixel_system_debug_GraphicCloseButton.__name__ = ["flixel","system","debug","GraphicCloseButton"];
flixel_system_debug_GraphicCloseButton.preload = null;
flixel_system_debug_GraphicCloseButton.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicCloseButton.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicCloseButton
});
var flixel_system_debug_GraphicInteractive = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicInteractive.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicInteractive.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicInteractive.preload == null) {
				flixel_system_debug_GraphicInteractive.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicInteractive.resourceName),flixel_system_debug_GraphicInteractive.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicInteractive"] = flixel_system_debug_GraphicInteractive;
flixel_system_debug_GraphicInteractive.__name__ = ["flixel","system","debug","GraphicInteractive"];
flixel_system_debug_GraphicInteractive.preload = null;
flixel_system_debug_GraphicInteractive.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicInteractive.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicInteractive
});
var flixel_system_debug_FlxDebugger = function() {
	openfl_display_Sprite.call(this);
};
$hxClasses["flixel.system.debug.FlxDebugger"] = flixel_system_debug_FlxDebugger;
flixel_system_debug_FlxDebugger.__name__ = ["flixel","system","debug","FlxDebugger"];
flixel_system_debug_FlxDebugger.__super__ = openfl_display_Sprite;
flixel_system_debug_FlxDebugger.prototype = $extend(openfl_display_Sprite.prototype,{
	__class__: flixel_system_debug_FlxDebugger
});
var flixel_system_debug_FlxDebuggerLayout = $hxClasses["flixel.system.debug.FlxDebuggerLayout"] = { __ename__ : ["flixel","system","debug","FlxDebuggerLayout"], __constructs__ : ["STANDARD","MICRO","BIG","TOP","LEFT","RIGHT"] };
flixel_system_debug_FlxDebuggerLayout.STANDARD = ["STANDARD",0];
flixel_system_debug_FlxDebuggerLayout.STANDARD.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.STANDARD.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.MICRO = ["MICRO",1];
flixel_system_debug_FlxDebuggerLayout.MICRO.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.MICRO.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.BIG = ["BIG",2];
flixel_system_debug_FlxDebuggerLayout.BIG.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.BIG.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.TOP = ["TOP",3];
flixel_system_debug_FlxDebuggerLayout.TOP.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.TOP.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.LEFT = ["LEFT",4];
flixel_system_debug_FlxDebuggerLayout.LEFT.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.LEFT.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.RIGHT = ["RIGHT",5];
flixel_system_debug_FlxDebuggerLayout.RIGHT.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.RIGHT.__enum__ = flixel_system_debug_FlxDebuggerLayout;
var flixel_system_debug_Tooltip = function() { };
$hxClasses["flixel.system.debug.Tooltip"] = flixel_system_debug_Tooltip;
flixel_system_debug_Tooltip.__name__ = ["flixel","system","debug","Tooltip"];
flixel_system_debug_Tooltip._container = null;
flixel_system_debug_Tooltip.init = function(container) {
	flixel_system_debug_Tooltip._container = container;
};
flixel_system_debug_Tooltip.add = function(element,text) {
	var tooltip = new flixel_system_debug_TooltipOverlay(element,text);
	flixel_system_debug_Tooltip._container.addChild(tooltip);
	flixel_system_debug_Tooltip._tooltips.push(tooltip);
};
flixel_system_debug_Tooltip.remove = function(element) {
	var removed = false;
	var _g1 = 0;
	var _g = flixel_system_debug_Tooltip._tooltips.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(flixel_system_debug_Tooltip._tooltips[i] != null && flixel_system_debug_Tooltip._tooltips[i].owner == element) {
			var tooltip = flixel_system_debug_Tooltip._tooltips.splice(i,1)[0];
			tooltip.destroy();
			removed = true;
			break;
		}
	}
	return removed;
};
var flixel_system_debug_TooltipOverlay = function(target,text,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	openfl_display_Sprite.call(this);
	this.owner = target;
	this.maxSize = new openfl_geom_Point(width,height);
	this._shadow = new openfl_display_Bitmap(new openfl_display_BitmapData(1,2,true,-16777216));
	this._background = new openfl_display_Bitmap(new openfl_display_BitmapData(1,1,true,-12961222));
	this._text = flixel_system_debug_DebuggerUtil.createTextField(2,1);
	this._text.set_alpha(0.8);
	this._text.set_text(text);
	this._text.set_wordWrap(true);
	this.addChild(this._shadow);
	this.addChild(this._background);
	this.addChild(this._text);
	this.updateSize();
	this.setVisible(false);
	this.owner.addEventListener("mouseOver",$bind(this,this.handleMouseEvents));
	this.owner.addEventListener("mouseOut",$bind(this,this.handleMouseEvents));
};
$hxClasses["flixel.system.debug.TooltipOverlay"] = flixel_system_debug_TooltipOverlay;
flixel_system_debug_TooltipOverlay.__name__ = ["flixel","system","debug","TooltipOverlay"];
flixel_system_debug_TooltipOverlay.__super__ = openfl_display_Sprite;
flixel_system_debug_TooltipOverlay.prototype = $extend(openfl_display_Sprite.prototype,{
	destroy: function() {
		this._shadow = flixel_util_FlxDestroyUtil.removeChild(this,this._shadow);
		this._background = flixel_util_FlxDestroyUtil.removeChild(this,this._background);
		this._text = flixel_util_FlxDestroyUtil.removeChild(this,this._text);
		this.maxSize = null;
		this.owner.removeEventListener("mouseOver",$bind(this,this.handleMouseEvents));
		this.owner.removeEventListener("mouseOut",$bind(this,this.handleMouseEvents));
		this.owner = null;
	}
	,resize: function(Width,Height) {
		this.maxSize.x = Math.abs(Width) | 0;
		this.maxSize.y = Math.abs(Height) | 0;
		this.updateSize();
	}
	,reposition: function(X,Y) {
		this.set_x(X);
		this.set_y(Y);
		this.ensureOnScreen();
	}
	,setVisible: function(Value) {
		this.set_visible(Value);
		if(this.get_visible()) {
			this.parent.addChild(this);
			this.ensureOnScreen();
		}
	}
	,toggleVisible: function() {
		this.setVisible(!this.get_visible());
	}
	,putOnTop: function() {
		this.parent.addChild(this);
	}
	,update: function() {
	}
	,updateSize: function() {
		this._width = ((this.maxSize.x <= 0 ? this._text.get_textWidth() : Math.abs(this.maxSize.x)) | 0) + 8;
		this._height = ((this.maxSize.y <= 0 ? this._text.get_textHeight() : Math.abs(this.maxSize.y)) | 0) + 8;
		this._background.set_scaleX(this._width);
		this._background.set_scaleY(this._height);
		this._shadow.set_scaleX(this._width);
		this._shadow.set_y(this._height);
		this._text.set_width(this._width);
	}
	,ensureOnScreen: function() {
		this.set_x(this.get_x() < 0 ? 0 : this.get_x());
		this.set_y(this.get_y() < 0 ? 0 : this.get_y());
		var offsetX = this.get_x() + this.get_width() >= openfl_Lib.current.stage.stageWidth ? openfl_Lib.current.stage.stageWidth - (this.get_x() + this.get_width()) : 0;
		var offsetY = this.get_y() + this.get_height() >= openfl_Lib.current.stage.stageHeight ? openfl_Lib.current.stage.stageHeight - (this.get_y() + this.get_height()) : 0;
		var _g = this;
		_g.set_x(_g.get_x() + offsetX);
		var _g1 = this;
		_g1.set_y(_g1.get_y() + offsetY);
	}
	,handleMouseEvents: function(event) {
		if(event.type == "mouseOver" && !this.get_visible()) {
			this.set_x(event.stageX + 10);
			this.set_y(event.stageY + 10);
			this.setVisible(true);
		} else if(event.type == "mouseOut") {
			this.setVisible(false);
		}
	}
	,__class__: flixel_system_debug_TooltipOverlay
});
var flixel_system_debug__$Window_GraphicWindowHandle = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug__$Window_GraphicWindowHandle.preload != null) {
		this.__fromImage(flixel_system_debug__$Window_GraphicWindowHandle.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug__$Window_GraphicWindowHandle.preload == null) {
				flixel_system_debug__$Window_GraphicWindowHandle.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug__$Window_GraphicWindowHandle.resourceName),flixel_system_debug__$Window_GraphicWindowHandle.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug._Window.GraphicWindowHandle"] = flixel_system_debug__$Window_GraphicWindowHandle;
flixel_system_debug__$Window_GraphicWindowHandle.__name__ = ["flixel","system","debug","_Window","GraphicWindowHandle"];
flixel_system_debug__$Window_GraphicWindowHandle.preload = null;
flixel_system_debug__$Window_GraphicWindowHandle.__super__ = openfl_display_BitmapData;
flixel_system_debug__$Window_GraphicWindowHandle.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug__$Window_GraphicWindowHandle
});
var flixel_system_debug_Window = function(Title,Icon,Width,Height,Resizable,Bounds,Closable) {
	if(Closable == null) {
		Closable = false;
	}
	if(Resizable == null) {
		Resizable = true;
	}
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	openfl_display_Sprite.call(this);
	this.minSize = new openfl_geom_Point(50,30);
	this._width = Math.abs(Width) | 0;
	this._height = Math.abs(Height) | 0;
	this.updateBounds(Bounds);
	this._drag = new openfl_geom_Point();
	this._resizable = Resizable;
	this._closable = Closable;
	this._shadow = new openfl_display_Bitmap(new openfl_display_BitmapData(1,2,true,-16777216));
	this._background = new openfl_display_Bitmap(new openfl_display_BitmapData(1,1,true,-580952225));
	this._header = new openfl_display_Bitmap(new openfl_display_BitmapData(1,15,true,-1157627904));
	this._background.set_y(this._header.get_height());
	this._title = flixel_system_debug_DebuggerUtil.createTextField(2,-1);
	this._title.set_alpha(0.8);
	this._title.set_text(Title);
	this.addChild(this._shadow);
	this.addChild(this._background);
	this.addChild(this._header);
	this.addChild(this._title);
	if(Icon != null) {
		flixel_system_debug_DebuggerUtil.fixSize(Icon);
		var icon = new openfl_display_Bitmap(Icon);
		icon.set_x(5);
		icon.set_y(2);
		icon.set_alpha(0.8);
		this._title.set_x(icon.get_x() + icon.get_width() + 2);
		this.addChild(icon);
	}
	if(this._resizable) {
		this._handle = new openfl_display_Bitmap(flixel_system_debug_DebuggerUtil.fixSize(new flixel_system_debug__$Window_GraphicWindowHandle(0,0)));
		this.addChild(this._handle);
	}
	if(Closable) {
		this._closeButton = new flixel_system_ui_FlxSystemButton(new flixel_system_debug_GraphicCloseButton(0,0),$bind(this,this.close));
		this._closeButton.set_alpha(0.8);
		this.addChild(this._closeButton);
	} else {
		this._id = flixel_system_debug_Window.WINDOW_AMOUNT;
		this.loadSaveData();
		flixel_system_debug_Window.WINDOW_AMOUNT++;
	}
	if(this._width != 0 || this._height != 0) {
		this.updateSize();
	}
	this.bound();
	this.addEventListener("enterFrame",$bind(this,this.init));
};
$hxClasses["flixel.system.debug.Window"] = flixel_system_debug_Window;
flixel_system_debug_Window.__name__ = ["flixel","system","debug","Window"];
flixel_system_debug_Window.__super__ = openfl_display_Sprite;
flixel_system_debug_Window.prototype = $extend(openfl_display_Sprite.prototype,{
	destroy: function() {
		this.minSize = null;
		this.maxSize = null;
		this._bounds = null;
		if(this._shadow != null) {
			this.removeChild(this._shadow);
		}
		this._shadow = null;
		if(this._background != null) {
			this.removeChild(this._background);
		}
		this._background = null;
		if(this._header != null) {
			this.removeChild(this._header);
		}
		this._header = null;
		if(this._title != null) {
			this.removeChild(this._title);
		}
		this._title = null;
		if(this._handle != null) {
			this.removeChild(this._handle);
		}
		this._handle = null;
		this._drag = null;
		this._closeButton = flixel_util_FlxDestroyUtil.destroy(this._closeButton);
		var stage = openfl_Lib.current.stage;
		if(stage.hasEventListener("mouseMove")) {
			stage.removeEventListener("mouseMove",$bind(this,this.onMouseMove));
		}
		if(this.hasEventListener("mouseDown")) {
			this.removeEventListener("mouseDown",$bind(this,this.onMouseDown));
		}
		if(stage.hasEventListener("mouseUp")) {
			stage.removeEventListener("mouseUp",$bind(this,this.onMouseUp));
		}
	}
	,resize: function(Width,Height) {
		this._width = Math.abs(Width) | 0;
		this._height = Math.abs(Height) | 0;
		this.updateSize();
	}
	,reposition: function(X,Y) {
		this.set_x(X);
		this.set_y(Y);
		this.bound();
	}
	,updateBounds: function(Bounds) {
		this._bounds = Bounds;
		if(this._bounds != null) {
			this.maxSize = new openfl_geom_Point(this._bounds.width,this._bounds.height);
		} else {
			this.maxSize = new openfl_geom_Point(1.79e+308,1.79e+308);
		}
	}
	,setVisible: function(Value) {
		this.set_visible(Value);
		if(!this._closable) {
			flixel_FlxG.save.data.windowSettings[this._id] = this.get_visible();
			flixel_FlxG.save.flush();
		}
		if(this.toggleButton != null) {
			this.toggleButton.set_toggled(!this.get_visible());
		}
		if(this.get_visible()) {
			this.parent.addChild(this);
		}
	}
	,toggleVisible: function() {
		this.setVisible(!this.get_visible());
	}
	,putOnTop: function() {
		this.parent.addChild(this);
	}
	,loadSaveData: function() {
		if(flixel_FlxG.save.data.windowSettings != null) {
			this.set_visible(flixel_FlxG.save.data.windowSettings[this._id]);
		} else {
			this.initSaveData();
			this.loadSaveData();
		}
	}
	,initSaveData: function() {
		var settings = [];
		var _g = 0;
		while(_g < 10) {
			var i = _g++;
			settings[i] = true;
		}
		flixel_FlxG.save.data.windowSettings = settings;
		flixel_FlxG.save.flush();
	}
	,update: function() {
	}
	,init: function(E) {
		if(this.stage == null) {
			return;
		}
		this.removeEventListener("enterFrame",$bind(this,this.init));
		this.stage.addEventListener("mouseMove",$bind(this,this.onMouseMove));
		this.stage.addEventListener("mouseUp",$bind(this,this.onMouseUp));
		this.addEventListener("mouseDown",$bind(this,this.onMouseDown));
	}
	,onMouseMove: function(E) {
		var mouseX = this.get_mouseX() < 0 ? 0 : this.get_mouseX();
		var mouseY = this.get_mouseY() < 0 ? 0 : this.get_mouseY();
		if(!this.parent.get_visible()) {
			this._overHandle = this._overHeader = false;
			return;
		}
		if(this._dragging) {
			this._overHeader = true;
			this.reposition(this.parent.get_mouseX() - this._drag.x,this.parent.get_mouseY() - this._drag.y);
		} else if(this._resizing) {
			this._overHandle = true;
			this.resize(mouseX - this._drag.x,mouseY - this._drag.y);
		} else if(mouseX >= 0 && mouseX <= this._width && mouseY >= 0 && mouseY <= this._height) {
			this._overHeader = mouseX <= this._header.get_width() && mouseY <= this._header.get_height();
			if(this._resizable) {
				this._overHandle = mouseX >= this._width - this._handle.get_width() && mouseY >= this._height - this._handle.get_height();
			}
		} else {
			this._overHandle = this._overHeader = false;
		}
	}
	,onMouseDown: function(E) {
		if(this._overHeader) {
			this.parent.addChild(this);
			this._dragging = true;
			this._drag.x = this.get_mouseX();
			this._drag.y = this.get_mouseY();
		} else if(this._overHandle) {
			this.parent.addChild(this);
			this._resizing = true;
			var tmp = this._width;
			var tmp1 = this.get_mouseX();
			this._drag.x = tmp - tmp1;
			var tmp2 = this._height;
			var tmp3 = this.get_mouseY();
			this._drag.y = tmp2 - tmp3;
		}
	}
	,onMouseUp: function(E) {
		this._dragging = false;
		this._resizing = false;
	}
	,bound: function() {
		if(this._bounds != null) {
			var Value = this.get_x();
			var Min = this._bounds.get_left();
			var Max = this._bounds.get_right() - this._width;
			var lowerBound = Min != null && Value < Min ? Min : Value;
			this.set_x(Max != null && lowerBound > Max ? Max : lowerBound);
			var Value1 = this.get_y();
			var Min1 = this._bounds.get_top();
			var Max1 = this._bounds.get_bottom() - this._height;
			var lowerBound1 = Min1 != null && Value1 < Min1 ? Min1 : Value1;
			this.set_y(Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1);
		}
	}
	,updateSize: function() {
		var Value = this._width;
		var Min = this.minSize.x;
		var Max = this.maxSize.x;
		var lowerBound = Min != null && Value < Min ? Min : Value;
		this._width = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
		var Value1 = this._height;
		var Min1 = this.minSize.y;
		var Max1 = this.maxSize.y;
		var lowerBound1 = Min1 != null && Value1 < Min1 ? Min1 : Value1;
		this._height = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
		this._header.set_scaleX(this._width);
		this._background.set_scaleX(this._width);
		this._background.set_scaleY(this._height - this._header.get_height());
		this._shadow.set_scaleX(this._width);
		this._shadow.set_y(this._height);
		this._title.set_width(this._width - 4);
		if(this._resizable) {
			this._handle.set_x(this._width - this._handle.get_width());
			this._handle.set_y(this._height - this._handle.get_height());
		}
		if(this._closeButton != null) {
			this._closeButton.set_x(this._width - this._closeButton.get_width() - 3);
			this._closeButton.set_y(3);
		}
	}
	,close: function() {
		this.destroy();
	}
	,__class__: flixel_system_debug_Window
});
var flixel_system_debug_completion_CompletionList = function(capacity) {
	this.upperVisibleIndex = 0;
	this.lowerVisibleIndex = 0;
	this.selectedIndex = 0;
	this.entries = [];
	openfl_display_Sprite.call(this);
	this.set_visible(false);
	this.upperVisibleIndex = capacity - 1;
	this.actualHeight = capacity * 20;
	this.createPopupEntries(capacity);
	this.createScrollBar();
	this.updateSelectedItem();
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.onKeyDown));
};
$hxClasses["flixel.system.debug.completion.CompletionList"] = flixel_system_debug_completion_CompletionList;
flixel_system_debug_completion_CompletionList.__name__ = ["flixel","system","debug","completion","CompletionList"];
flixel_system_debug_completion_CompletionList.__super__ = openfl_display_Sprite;
flixel_system_debug_completion_CompletionList.prototype = $extend(openfl_display_Sprite.prototype,{
	show: function(x,items) {
		this.set_visible(true);
		this.set_x(x);
		this.originalItems = items;
		this.set_filter("");
		this.updateEntries();
	}
	,setY: function(y) {
		this.set_y(y - this.actualHeight);
	}
	,close: function() {
		this.set_visible(false);
		this.set_filter(null);
		if(this.closed != null) {
			this.closed();
		}
	}
	,createPopupEntries: function(amount) {
		var _g1 = 0;
		var _g = amount;
		while(_g1 < _g) {
			var i = _g1++;
			var entry = new flixel_system_debug_completion_CompletionListEntry();
			this.entries.push(entry);
			this.addChild(entry);
			entry.set_y(20 * i);
		}
	}
	,createScrollBar: function() {
		this.scrollBar = new flixel_system_debug_completion_CompletionListScrollBar(150,0,5,this.actualHeight);
		this.addChild(this.scrollBar);
	}
	,onKeyDown: function(e) {
		if(!this.get_visible()) {
			return;
		}
		var _g = e.keyCode;
		switch(_g) {
		case 13:
			if(this.completed != null) {
				this.completed(this.items[this.selectedIndex]);
			}
			this.close();
			return;
		case 27:
			this.close();
			return;
		case 38:
			this.updateIndices(-1);
			break;
		case 40:
			this.updateIndices(1);
			break;
		}
		this.updateEntries();
	}
	,updateIndices: function(modifier) {
		this.selectedIndex = this.bound(this.selectedIndex + modifier);
		var Value = this.selectedIndex;
		var Min = this.lowerVisibleIndex;
		var Max = this.upperVisibleIndex;
		if((Min == null || Value >= Min) && (Max == null || Value <= Max)) {
			return;
		}
		this.lowerVisibleIndex = this.bound(this.lowerVisibleIndex + modifier);
		this.upperVisibleIndex = this.bound(this.upperVisibleIndex + modifier);
		var range = this.upperVisibleIndex - this.lowerVisibleIndex;
		if(range == this.items.length) {
			return;
		}
		if(this.lowerVisibleIndex == 0) {
			this.upperVisibleIndex = this.entries.length - 1;
		} else if(this.upperVisibleIndex == this.items.length - 1) {
			this.lowerVisibleIndex = this.items.length - this.entries.length;
		}
	}
	,bound: function(index) {
		var Max = this.items.length - 1;
		var lowerBound = index < 0 ? 0 : index;
		return (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
	}
	,updateEntries: function() {
		this.updateLabels();
		this.updateSelectedItem();
		this.scrollBar.updateHandle(this.lowerVisibleIndex,this.items.length,this.entries.length);
	}
	,updateLabels: function() {
		var _g1 = 0;
		var _g = this.entries.length;
		while(_g1 < _g) {
			var i = _g1++;
			var selectedItem = this.items[this.lowerVisibleIndex + i];
			if(selectedItem == null) {
				selectedItem = "";
			}
			this.entries[i].setItem(selectedItem);
		}
	}
	,updateSelectedItem: function() {
		var _g = 0;
		var _g1 = this.entries;
		while(_g < _g1.length) {
			var entry = _g1[_g];
			++_g;
			entry.set_selected(false);
		}
		this.entries[this.selectedIndex - this.lowerVisibleIndex].set_selected(true);
		if(this.selectionChanged != null) {
			this.selectionChanged(this.items[this.selectedIndex]);
		}
	}
	,setItems: function(items) {
		if(items == null) {
			return;
		}
		if(items.length == 0) {
			this.close();
		}
		this.items = items;
		this.selectedIndex = 0;
		this.lowerVisibleIndex = 0;
		this.upperVisibleIndex = this.entries.length - 1;
		this.updateEntries();
	}
	,filterItems: function(filter) {
		if(filter == null) {
			filter = "";
		}
		var tmp = this.originalItems.filter(function(item) {
			return item.toLowerCase().indexOf(filter.toLowerCase()) != -1;
		});
		return this.sortItems(filter,tmp);
	}
	,sortItems: function(filter,items) {
		var _gthis = this;
		if(filter == "") {
			return items;
		}
		items.sort(function(a,b) {
			var valueA = _gthis.startsWithExt(a,filter);
			var valueB = _gthis.startsWithExt(b,filter);
			if(valueA > valueB) {
				return -valueA;
			}
			if(valueB > valueA) {
				return valueB;
			}
			if(valueA == valueB) {
				return a.length - b.length | 0;
			}
			return 0;
		});
		return items;
	}
	,startsWithExt: function(s,start) {
		if(StringTools.startsWith(s,start)) {
			return 2;
		}
		var _this_r = new RegExp("^[_]+","".split("u").join(""));
		if(StringTools.startsWith(s.replace(_this_r,""),start)) {
			return 1;
		}
		return 0;
	}
	,set_filter: function(filter) {
		if(filter == this.filter) {
			return filter;
		}
		this.setItems(this.filterItems(filter));
		return this.filter = filter;
	}
	,__class__: flixel_system_debug_completion_CompletionList
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_filter:"set_filter"})
});
var flixel_system_debug_completion_CompletionListEntry = function() {
	this.selected = false;
	openfl_display_Sprite.call(this);
	this.initBitmapDatas();
	this.addChild(this.background = new openfl_display_Bitmap());
	this.background.bitmapData = flixel_system_debug_completion_CompletionListEntry.normalBitmapData;
	this.label = flixel_system_debug_DebuggerUtil.createTextField();
	this.label.set_x(4);
	this.addChild(this.label);
};
$hxClasses["flixel.system.debug.completion.CompletionListEntry"] = flixel_system_debug_completion_CompletionListEntry;
flixel_system_debug_completion_CompletionListEntry.__name__ = ["flixel","system","debug","completion","CompletionListEntry"];
flixel_system_debug_completion_CompletionListEntry.normalBitmapData = null;
flixel_system_debug_completion_CompletionListEntry.highlightBitmapData = null;
flixel_system_debug_completion_CompletionListEntry.__super__ = openfl_display_Sprite;
flixel_system_debug_completion_CompletionListEntry.prototype = $extend(openfl_display_Sprite.prototype,{
	initBitmapDatas: function() {
		if(flixel_system_debug_completion_CompletionListEntry.normalBitmapData == null) {
			flixel_system_debug_completion_CompletionListEntry.normalBitmapData = new openfl_display_BitmapData(150,20,true,-10526881);
		}
		if(flixel_system_debug_completion_CompletionListEntry.highlightBitmapData == null) {
			flixel_system_debug_completion_CompletionListEntry.highlightBitmapData = new openfl_display_BitmapData(150,20,true,-9605779);
		}
	}
	,setItem: function(item) {
		this.label.set_text(item);
		if(this.label.get_width() > 150) {
			this.label.set_width(150);
			this.label.set_autoSize(2);
		}
	}
	,set_selected: function(selected) {
		if(selected == this.selected) {
			return selected;
		}
		this.background.bitmapData = selected ? flixel_system_debug_completion_CompletionListEntry.highlightBitmapData : flixel_system_debug_completion_CompletionListEntry.normalBitmapData;
		return this.selected = selected;
	}
	,__class__: flixel_system_debug_completion_CompletionListEntry
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_selected:"set_selected"})
});
var flixel_system_debug_completion_CompletionListScrollBar = function(x,y,width,height) {
	openfl_display_Sprite.call(this);
	this.set_x(x);
	this.set_y(y);
	this.addChild(new openfl_display_Bitmap(new openfl_display_BitmapData(width,height,true,-12303292)));
	this.handle = new openfl_display_Bitmap(new openfl_display_BitmapData(width,1,true,-14540254));
	this.addChild(this.handle);
};
$hxClasses["flixel.system.debug.completion.CompletionListScrollBar"] = flixel_system_debug_completion_CompletionListScrollBar;
flixel_system_debug_completion_CompletionListScrollBar.__name__ = ["flixel","system","debug","completion","CompletionListScrollBar"];
flixel_system_debug_completion_CompletionListScrollBar.__super__ = openfl_display_Sprite;
flixel_system_debug_completion_CompletionListScrollBar.prototype = $extend(openfl_display_Sprite.prototype,{
	updateHandle: function(lower,items,entries) {
		this.handle.set_scaleY(Math.min(this.get_height() / items * entries,this.get_height()));
		this.handle.set_y(this.get_height() / items * lower);
		var tmp = this.handle;
		var Value = this.handle.get_y();
		var Max = this.get_height() - this.handle.get_scaleY();
		var lowerBound = Value < 0 ? 0 : Value;
		tmp.set_y(Max != null && lowerBound > Max ? Max : lowerBound);
	}
	,__class__: flixel_system_debug_completion_CompletionListScrollBar
});
var flixel_system_debug_interaction_Interaction = function(container) {
	this._flixelPointer = new flixel_input_FlxPointer();
	this._debuggerInteraction = false;
	this._keysUp = new haxe_ds_IntMap();
	this._keysDown = new haxe_ds_IntMap();
	this._turn = 2;
	this._tools = [];
	this.pointerPressed = false;
	this.pointerJustReleased = false;
	this.pointerJustPressed = false;
	this.flixelPointer = new flixel_math_FlxPoint();
	this.selectedItems = new flixel_group_FlxTypedGroup();
	flixel_system_debug_Window.call(this,"Tools",new flixel_system_debug_GraphicInteractive(0,0),40,25,false);
	this.reposition(2,100);
	this._container = container;
	this._customCursor = new openfl_display_Sprite();
	this._customCursor.mouseEnabled = false;
	this._container.addChild(this._customCursor);
	this.addTool(new flixel_system_debug_interaction_tools_Pointer());
	this.addTool(new flixel_system_debug_interaction_tools_Mover());
	this.addTool(new flixel_system_debug_interaction_tools_Eraser());
	flixel_FlxG.signals.postDraw.add($bind(this,this.postDraw));
	flixel_FlxG["debugger"].visibilityChanged.add($bind(this,this.handleDebuggerVisibilityChanged));
	openfl_Lib.current.stage.addEventListener("mouseMove",$bind(this,this.updateMouse));
	openfl_Lib.current.stage.addEventListener("mouseDown",$bind(this,this.handleMouseClick));
	openfl_Lib.current.stage.addEventListener("mouseUp",$bind(this,this.handleMouseClick));
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.handleKeyEvent));
	openfl_Lib.current.stage.addEventListener("keyUp",$bind(this,this.handleKeyEvent));
	this._container.addEventListener("mouseOver",$bind(this,this.handleMouseInDebugger));
	this._container.addEventListener("mouseOut",$bind(this,this.handleMouseInDebugger));
};
$hxClasses["flixel.system.debug.interaction.Interaction"] = flixel_system_debug_interaction_Interaction;
flixel_system_debug_interaction_Interaction.__name__ = ["flixel","system","debug","interaction","Interaction"];
flixel_system_debug_interaction_Interaction.__super__ = flixel_system_debug_Window;
flixel_system_debug_interaction_Interaction.prototype = $extend(flixel_system_debug_Window.prototype,{
	handleDebuggerVisibilityChanged: function() {
		if(flixel_FlxG["debugger"].visible) {
			this.saveSystemCursorInfo();
		} else {
			this.restoreSystemCursor();
		}
	}
	,updateMouse: function(event) {
		if(event.stageX == null || event.stageY == null) {
			return;
		}
		var offsetX = 0.0;
		var offsetY = 0.0;
		if(this.activeTool != null) {
			var cursorIcon = this.activeTool.cursor;
			if(cursorIcon != null) {
				offsetX = cursorIcon.width / flixel_FlxG.scaleMode.scale.x / 2;
				offsetY = cursorIcon.height / flixel_FlxG.scaleMode.scale.y / 2;
			}
		}
		this._customCursor.set_x(event.stageX + offsetX);
		this._customCursor.set_y(event.stageY + offsetY);
		var _this = this._flixelPointer;
		_this._globalScreenX = event.stageX / flixel_FlxG.scaleMode.scale.x | 0;
		_this._globalScreenY = event.stageY / flixel_FlxG.scaleMode.scale.y | 0;
		_this.updatePositions();
		this.flixelPointer.set_x(this._flixelPointer.x + offsetX);
		this.flixelPointer.set_y(this._flixelPointer.y + offsetY);
	}
	,handleMouseClick: function(event) {
		if(event.type == "mouseDown" && this.belongsToDebugger(event.target)) {
			return;
		}
		this.pointerJustPressed = event.type == "mouseDown";
		this.pointerJustReleased = event.type == "mouseUp";
		if(this.pointerJustPressed) {
			this.pointerPressed = true;
		} else if(this.pointerJustReleased) {
			this.pointerPressed = false;
		}
	}
	,belongsToDebugger: function(object) {
		if(object == null) {
			return false;
		} else if(js_Boot.__instanceof(object,flixel_system_debug_FlxDebugger)) {
			return true;
		}
		return this.belongsToDebugger(object.parent);
	}
	,handleMouseInDebugger: function(event) {
		if(!this.isActive()) {
			return;
		}
		if(event.type == "mouseOver") {
			this._debuggerInteraction = true;
		} else if(event.type == "mouseOut") {
			this._debuggerInteraction = false;
		}
		event.stopPropagation();
	}
	,handleKeyEvent: function(event) {
		if(event.type == "keyDown") {
			this._keysDown.h[event.keyCode] = true;
		} else if(event.type == "keyUp") {
			this._keysDown.h[event.keyCode] = false;
			this._keysUp.h[event.keyCode] = this._turn;
		}
	}
	,addTool: function(tool) {
		tool.init(this);
		this._tools.push(tool);
		var button = tool.button;
		if(button == null) {
			return;
		}
		button.set_x(-10 + this._tools.length * 20);
		button.set_y(20);
		this.addChild(button);
		this.resize(Math.max(this._tools.length * 20,55),35);
	}
	,destroy: function() {
		flixel_FlxG.signals.postDraw.remove($bind(this,this.postDraw));
		flixel_FlxG["debugger"].visibilityChanged.remove($bind(this,this.handleDebuggerVisibilityChanged));
		openfl_Lib.current.stage.removeEventListener("mouseMove",$bind(this,this.updateMouse));
		openfl_Lib.current.stage.removeEventListener("mouseDown",$bind(this,this.handleMouseClick));
		openfl_Lib.current.stage.removeEventListener("mouseUp",$bind(this,this.handleMouseClick));
		openfl_Lib.current.stage.removeEventListener("keyDown",$bind(this,this.handleKeyEvent));
		openfl_Lib.current.stage.removeEventListener("keyUp",$bind(this,this.handleKeyEvent));
		if(this._container != null) {
			this._container.removeEventListener("mouseOver",$bind(this,this.handleMouseInDebugger));
			this._container.removeEventListener("mouseOut",$bind(this,this.handleMouseInDebugger));
		}
		if(this._customCursor != null) {
			this._customCursor.parent.removeChild(this._customCursor);
			this._customCursor = null;
		}
		this._tools = flixel_util_FlxDestroyUtil.destroyArray(this._tools);
		this.selectedItems = flixel_util_FlxDestroyUtil.destroy(this.selectedItems);
		this.flixelPointer = flixel_util_FlxDestroyUtil.destroy(this.flixelPointer);
		this._keysDown = null;
		this._keysUp = null;
	}
	,isActive: function() {
		if(flixel_FlxG["debugger"].visible) {
			return this.get_visible();
		} else {
			return false;
		}
	}
	,update: function() {
		if(!this.isActive()) {
			return;
		}
		this.updateCustomCursors();
		var _g = 0;
		var _g1 = this._tools;
		while(_g < _g1.length) {
			var tool = _g1[_g];
			++_g;
			tool.update();
		}
		this.pointerJustPressed = false;
		this.pointerJustReleased = false;
		this._turn++;
	}
	,postDraw: function() {
		if(!this.isActive()) {
			return;
		}
		var _g = 0;
		var _g1 = this._tools;
		while(_g < _g1.length) {
			var tool = _g1[_g];
			++_g;
			tool.draw();
		}
		this.drawItemsSelection();
	}
	,getDebugGraphics: function() {
		if(flixel_FlxG.renderBlit) {
			flixel_util_FlxSpriteUtil.flashGfx.clear();
			return flixel_util_FlxSpriteUtil.flashGfx;
		}
		return null;
	}
	,drawItemsSelection: function() {
		var gfx = this.getDebugGraphics();
		if(gfx == null) {
			return;
		}
		var member = new flixel_group_FlxTypedGroupIterator(this.selectedItems.members,null);
		while(member.hasNext()) {
			var member1 = member.next();
			if(member1 != null && member1.scrollFactor != null && member1.isOnScreen()) {
				gfx.lineStyle(0.9,16711680);
				gfx.drawRect(member1.x - flixel_FlxG.camera.scroll.x,member1.y - flixel_FlxG.camera.scroll.y,member1.get_width(),member1.get_height());
			}
		}
		if(flixel_FlxG.renderBlit) {
			flixel_FlxG.camera.buffer.draw(flixel_util_FlxSpriteUtil.flashGfxSprite);
		}
	}
	,getTool: function(className) {
		var _g = 0;
		var _g1 = this._tools;
		while(_g < _g1.length) {
			var tool = _g1[_g];
			++_g;
			if(js_Boot.__instanceof(tool,className)) {
				return tool;
			}
		}
		return null;
	}
	,toggleVisible: function() {
		flixel_system_debug_Window.prototype.toggleVisible.call(this);
		if(!this.get_visible()) {
			this.setActiveTool(null);
			this.restoreSystemCursor();
		}
	}
	,registerCustomCursor: function(name,icon) {
		if(icon == null) {
			return;
		}
		var sprite = new openfl_display_Sprite();
		sprite.set_visible(false);
		sprite.set_name(name);
		sprite.addChild(new openfl_display_Bitmap(icon));
		this._customCursor.addChild(sprite);
	}
	,updateCustomCursors: function() {
		if(this.activeTool != null && !this._debuggerInteraction) {
			if(this.activeTool.cursor != null) {
				var _g1 = 0;
				var _g = this._customCursor.get_numChildren();
				while(_g1 < _g) {
					var i = _g1++;
					var sprite = this._customCursor.getChildAt(i);
					sprite.set_visible(sprite.get_name() == this.activeTool.get_name());
				}
			} else {
				flixel_FlxG.mouse.set_useSystemCursor(true);
			}
		} else {
			flixel_FlxG.mouse.set_useSystemCursor(true);
		}
	}
	,saveSystemCursorInfo: function() {
		this._wasMouseVisible = flixel_FlxG.mouse.visible;
		this._wasUsingSystemCursor = flixel_FlxG.mouse.useSystemCursor;
	}
	,restoreSystemCursor: function() {
		flixel_FlxG.mouse.set_useSystemCursor(this._wasUsingSystemCursor);
		flixel_FlxG.mouse.set_visible(this._wasMouseVisible);
		this._customCursor.set_visible(false);
	}
	,setActiveTool: function(value) {
		if(this.activeTool != null) {
			this.activeTool.deactivate();
			this.activeTool.button.set_toggled(true);
		}
		if(this.activeTool == value) {
			value = null;
		}
		this.activeTool = value;
		if(this.activeTool != null) {
			this.setToolsCursorVisibility(true);
			this.activeTool.button.set_toggled(false);
			this.activeTool.activate();
			this.updateCustomCursors();
		} else {
			this.setSystemCursorVisibility(true);
		}
	}
	,setSystemCursorVisibility: function(status) {
		flixel_FlxG.mouse.set_useSystemCursor(status);
		this._customCursor.set_visible(!status);
	}
	,setToolsCursorVisibility: function(status) {
		flixel_FlxG.mouse.set_useSystemCursor(false);
		this._customCursor.set_visible(status);
		if(status) {
			return;
		}
		var _g1 = 0;
		var _g = this._customCursor.get_numChildren();
		while(_g1 < _g) {
			var i = _g1++;
			this._customCursor.getChildAt(i).set_visible(false);
		}
	}
	,clearSelection: function() {
		this.selectedItems.clear();
	}
	,keyPressed: function(key) {
		return this._keysDown.h[key];
	}
	,keyJustPressed: function(key) {
		var value = this._keysUp.h[key] == null ? 0 : this._keysUp.h[key];
		return this._turn - value == 1;
	}
	,findItemsWithinState: function(items,state,area) {
		this.findItemsWithinArea(items,state.members,area);
		if(state.subState != null) {
			this.findItemsWithinState(items,state.subState,area);
		}
	}
	,findItemsWithinArea: function(items,members,area) {
		var i = members.length;
		while(i-- > 0) {
			var member = members[i];
			if(member == null || !member.visible || !member.exists) {
				continue;
			}
			var group = flixel_group_FlxTypedGroup.resolveGroup(member);
			if(group != null) {
				this.findItemsWithinArea(items,group.members,area);
			} else {
				var tmp;
				if(js_Boot.__instanceof(member,flixel_FlxSprite)) {
					var Rect = (js_Boot.__cast(member , flixel_FlxSprite)).getHitbox();
					var result = Rect.x + Rect.width > area.x && Rect.x < area.x + area.width && Rect.y + Rect.height > area.y && Rect.y < area.y + area.height;
					if(Rect._weak) {
						if(!Rect._inPool) {
							Rect._inPool = true;
							Rect._weak = false;
							flixel_math_FlxRect._pool.putUnsafe(Rect);
						}
					}
					tmp = result;
				} else {
					tmp = false;
				}
				if(tmp) {
					items.push(member);
				}
			}
		}
	}
	,__class__: flixel_system_debug_interaction_Interaction
});
var flixel_system_debug_interaction_tools_GraphicEraserTool = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_interaction_tools_GraphicEraserTool.preload != null) {
		this.__fromImage(flixel_system_debug_interaction_tools_GraphicEraserTool.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_interaction_tools_GraphicEraserTool.preload == null) {
				flixel_system_debug_interaction_tools_GraphicEraserTool.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_interaction_tools_GraphicEraserTool.resourceName),flixel_system_debug_interaction_tools_GraphicEraserTool.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.interaction.tools.GraphicEraserTool"] = flixel_system_debug_interaction_tools_GraphicEraserTool;
flixel_system_debug_interaction_tools_GraphicEraserTool.__name__ = ["flixel","system","debug","interaction","tools","GraphicEraserTool"];
flixel_system_debug_interaction_tools_GraphicEraserTool.preload = null;
flixel_system_debug_interaction_tools_GraphicEraserTool.__super__ = openfl_display_BitmapData;
flixel_system_debug_interaction_tools_GraphicEraserTool.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_interaction_tools_GraphicEraserTool
});
var flixel_system_debug_interaction_tools_Tool = function() {
	this._name = "(Unknown tool)";
	openfl_display_Sprite.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Tool"] = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Tool.__name__ = ["flixel","system","debug","interaction","tools","Tool"];
flixel_system_debug_interaction_tools_Tool.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_system_debug_interaction_tools_Tool.__super__ = openfl_display_Sprite;
flixel_system_debug_interaction_tools_Tool.prototype = $extend(openfl_display_Sprite.prototype,{
	init: function(brain) {
		this._brain = brain;
		return this;
	}
	,update: function() {
	}
	,draw: function() {
	}
	,activate: function() {
	}
	,deactivate: function() {
	}
	,destroy: function() {
	}
	,isActive: function() {
		if(this._brain.activeTool == this) {
			return this._brain.get_visible();
		} else {
			return false;
		}
	}
	,setButton: function(Icon) {
		this.button = new flixel_system_ui_FlxSystemButton(Type.createInstance(Icon,[0,0]),$bind(this,this.onButtonClicked),true);
		this.button.set_toggled(true);
		var tooltip = this._name;
		if(this._shortcut != null) {
			tooltip += " (" + this._shortcut + ")";
		}
		flixel_system_debug_Tooltip.add(this.button,tooltip);
	}
	,setCursor: function(Icon) {
		this.cursor = Icon;
		this._brain.registerCustomCursor(this._name,this.cursor);
	}
	,onButtonClicked: function() {
		this._brain.setActiveTool(this);
	}
	,getName: function() {
		return this._name;
	}
	,__class__: flixel_system_debug_interaction_tools_Tool
});
var flixel_system_debug_interaction_tools_Eraser = function() {
	flixel_system_debug_interaction_tools_Tool.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Eraser"] = flixel_system_debug_interaction_tools_Eraser;
flixel_system_debug_interaction_tools_Eraser.__name__ = ["flixel","system","debug","interaction","tools","Eraser"];
flixel_system_debug_interaction_tools_Eraser.__super__ = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Eraser.prototype = $extend(flixel_system_debug_interaction_tools_Tool.prototype,{
	init: function(Brain) {
		flixel_system_debug_interaction_tools_Tool.prototype.init.call(this,Brain);
		this._name = "Eraser";
		return this;
	}
	,update: function() {
		if(this._brain.keyJustPressed(46)) {
			this.doDeletion(this._brain.keyPressed(16));
		}
	}
	,activate: function() {
		this.doDeletion(this._brain.keyPressed(16));
		this._brain.setActiveTool(null);
	}
	,doDeletion: function(remove) {
		var selectedItems = this._brain.selectedItems;
		if(selectedItems != null) {
			this.findAndDelete(selectedItems,remove);
			selectedItems.clear();
		}
	}
	,findAndDelete: function(items,remove) {
		if(remove == null) {
			remove = false;
		}
		var member = new flixel_group_FlxTypedGroupIterator(items.members,null);
		while(member.hasNext()) {
			var member1 = member.next();
			if(member1 == null) {
				continue;
			}
			if(!js_Boot.__instanceof(member1,flixel_group_FlxTypedGroup)) {
				member1.kill();
				if(remove) {
					this.removeFromMemory(member1,flixel_FlxG.game._state);
				}
			}
		}
	}
	,removeFromMemory: function(item,parentGroup) {
		var _g = 0;
		var _g1 = parentGroup.members;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			if(js_Boot.__instanceof(member,flixel_group_FlxTypedGroup)) {
				this.removeFromMemory(item,member);
			} else if(member == item) {
				parentGroup.remove(member);
			}
		}
	}
	,__class__: flixel_system_debug_interaction_tools_Eraser
});
var flixel_system_debug_interaction_tools_GraphicMoverTool = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_interaction_tools_GraphicMoverTool.preload != null) {
		this.__fromImage(flixel_system_debug_interaction_tools_GraphicMoverTool.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_interaction_tools_GraphicMoverTool.preload == null) {
				flixel_system_debug_interaction_tools_GraphicMoverTool.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_interaction_tools_GraphicMoverTool.resourceName),flixel_system_debug_interaction_tools_GraphicMoverTool.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.interaction.tools.GraphicMoverTool"] = flixel_system_debug_interaction_tools_GraphicMoverTool;
flixel_system_debug_interaction_tools_GraphicMoverTool.__name__ = ["flixel","system","debug","interaction","tools","GraphicMoverTool"];
flixel_system_debug_interaction_tools_GraphicMoverTool.preload = null;
flixel_system_debug_interaction_tools_GraphicMoverTool.__super__ = openfl_display_BitmapData;
flixel_system_debug_interaction_tools_GraphicMoverTool.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_interaction_tools_GraphicMoverTool
});
var flixel_system_debug_interaction_tools_Mover = function() {
	this._dragging = false;
	flixel_system_debug_interaction_tools_Tool.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Mover"] = flixel_system_debug_interaction_tools_Mover;
flixel_system_debug_interaction_tools_Mover.__name__ = ["flixel","system","debug","interaction","tools","Mover"];
flixel_system_debug_interaction_tools_Mover.__super__ = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Mover.prototype = $extend(flixel_system_debug_interaction_tools_Tool.prototype,{
	init: function(brain) {
		flixel_system_debug_interaction_tools_Tool.prototype.init.call(this,brain);
		this._lastCursorPosition = new flixel_math_FlxPoint(brain.flixelPointer.x,brain.flixelPointer.x);
		this._name = "Mover";
		this._shortcut = "Shift";
		this.setButton(flixel_system_debug_interaction_tools_GraphicMoverTool);
		this.setCursor(new flixel_system_debug_interaction_tools_GraphicMoverTool(0,0));
		return this;
	}
	,update: function() {
		if(!this.isActive() && !this._brain.keyPressed(16)) {
			return;
		}
		if(this._brain.pointerPressed && !this._dragging) {
			this.startDragging();
		} else if(this._brain.pointerPressed && this._dragging) {
			this.doDragging();
		} else if(this._brain.pointerJustReleased) {
			this.stopDragging();
		}
		this._lastCursorPosition.set_x(this._brain.flixelPointer.x);
		this._lastCursorPosition.set_y(this._brain.flixelPointer.y);
	}
	,stopDragging: function() {
		this._dragging = false;
	}
	,startDragging: function() {
		if(this._dragging) {
			return;
		}
		this._dragging = true;
		if(!this.isActive() && js_Boot.__instanceof(this._brain.activeTool,flixel_system_debug_interaction_tools_Pointer)) {
			(js_Boot.__cast(this._brain.activeTool , flixel_system_debug_interaction_tools_Pointer)).cancelSelection();
		}
	}
	,doDragging: function() {
		var dx = this._brain.flixelPointer.x - this._lastCursorPosition.x;
		var dy = this._brain.flixelPointer.y - this._lastCursorPosition.y;
		var _g = 0;
		var _g1 = this._brain.selectedItems.members;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(!js_Boot.__instanceof(member,flixel_FlxObject)) {
				continue;
			}
			var object = member;
			if(object != null) {
				var _g2 = object;
				_g2.set_x(_g2.x + dx);
				var _g21 = object;
				_g21.set_y(_g21.y + dy);
			}
		}
	}
	,__class__: flixel_system_debug_interaction_tools_Mover
});
var flixel_system_debug_interaction_tools_GraphicCursorCross = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_interaction_tools_GraphicCursorCross.preload != null) {
		this.__fromImage(flixel_system_debug_interaction_tools_GraphicCursorCross.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_interaction_tools_GraphicCursorCross.preload == null) {
				flixel_system_debug_interaction_tools_GraphicCursorCross.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_interaction_tools_GraphicCursorCross.resourceName),flixel_system_debug_interaction_tools_GraphicCursorCross.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.interaction.tools.GraphicCursorCross"] = flixel_system_debug_interaction_tools_GraphicCursorCross;
flixel_system_debug_interaction_tools_GraphicCursorCross.__name__ = ["flixel","system","debug","interaction","tools","GraphicCursorCross"];
flixel_system_debug_interaction_tools_GraphicCursorCross.preload = null;
flixel_system_debug_interaction_tools_GraphicCursorCross.__super__ = openfl_display_BitmapData;
flixel_system_debug_interaction_tools_GraphicCursorCross.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_interaction_tools_GraphicCursorCross
});
var flixel_system_debug_interaction_tools_Pointer = function() {
	this._itemsInSelectionArea = [];
	this._selectionArea = new flixel_math_FlxRect();
	this._selectionCancelled = false;
	this._selectionHappening = false;
	this._selectionEndPoint = new flixel_math_FlxPoint();
	this._selectionStartPoint = new flixel_math_FlxPoint();
	flixel_system_debug_interaction_tools_Tool.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Pointer"] = flixel_system_debug_interaction_tools_Pointer;
flixel_system_debug_interaction_tools_Pointer.__name__ = ["flixel","system","debug","interaction","tools","Pointer"];
flixel_system_debug_interaction_tools_Pointer.__super__ = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Pointer.prototype = $extend(flixel_system_debug_interaction_tools_Tool.prototype,{
	init: function(brain) {
		flixel_system_debug_interaction_tools_Tool.prototype.init.call(this,brain);
		this._name = "Pointer";
		this.setButton(flixel_system_debug_interaction_tools_GraphicCursorCross);
		this.setCursor(new flixel_system_debug_interaction_tools_GraphicCursorCross(0,0));
		return this;
	}
	,update: function() {
		if(!this.isActive()) {
			return;
		}
		if(this._brain.pointerJustPressed && !this._selectionHappening) {
			this.startSelection();
		}
		if(this._selectionHappening) {
			this._selectionEndPoint.set(this._brain.flixelPointer.x,this._brain.flixelPointer.y);
			this.calculateSelectionArea();
		}
		if(!this._brain.pointerJustReleased) {
			return;
		}
		if(this._selectionHappening) {
			this.stopSelection();
		}
		if(this._itemsInSelectionArea.length > 0) {
			this.handleItemAddition(this._itemsInSelectionArea);
		} else if(!this._brain.keyPressed(17) && !this._selectionCancelled) {
			this._brain.clearSelection();
		}
	}
	,calculateSelectionArea: function() {
		this._selectionArea.x = this._selectionStartPoint.x;
		this._selectionArea.y = this._selectionStartPoint.y;
		this._selectionArea.width = this._selectionEndPoint.x - this._selectionArea.x;
		this._selectionArea.height = this._selectionEndPoint.y - this._selectionArea.y;
		if(this._selectionArea.width < 0) {
			this._selectionArea.width *= -1;
			this._selectionArea.x -= this._selectionArea.width;
		}
		if(this._selectionArea.height < 0) {
			this._selectionArea.height *= -1;
			this._selectionArea.y -= this._selectionArea.height;
		}
	}
	,startSelection: function() {
		this._selectionHappening = true;
		this._selectionCancelled = false;
		this._selectionStartPoint.set(this._brain.flixelPointer.x,this._brain.flixelPointer.y);
		flixel_util_FlxArrayUtil.clearArray(this._itemsInSelectionArea);
		this.updateConsoleSelection();
	}
	,cancelSelection: function() {
		if(!this._selectionHappening) {
			return;
		}
		this._selectionCancelled = true;
		this.stopSelection(false);
	}
	,stopSelection: function(findItems) {
		if(findItems == null) {
			findItems = true;
		}
		if(!this._selectionHappening) {
			return;
		}
		this._selectionEndPoint.set(this._brain.flixelPointer.x,this._brain.flixelPointer.y);
		this.calculateSelectionArea();
		if(findItems) {
			this._brain.findItemsWithinState(this._itemsInSelectionArea,flixel_FlxG.game._state,this._selectionArea);
			this.updateConsoleSelection();
		}
		this._selectionHappening = false;
		var _this = this._selectionArea;
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
	}
	,updateConsoleSelection: function() {
		var _this = flixel_FlxG.console;
		var AnyObject;
		var _g = this._itemsInSelectionArea.length;
		switch(_g) {
		case 0:
			AnyObject = null;
			break;
		case 1:
			AnyObject = this._itemsInSelectionArea[0];
			break;
		default:
			AnyObject = this._itemsInSelectionArea;
		}
	}
	,handleItemAddition: function(itemsInSelectionArea) {
		var adding = this._brain.keyPressed(17);
		var selectedItems = this._brain.selectedItems;
		if(itemsInSelectionArea.length == 0) {
			return;
		}
		if(!adding) {
			this._brain.clearSelection();
		}
		var _g = 0;
		while(_g < itemsInSelectionArea.length) {
			var item = itemsInSelectionArea[_g];
			++_g;
			if(selectedItems.members.indexOf(item) != -1 && adding) {
				selectedItems.remove(item);
			} else {
				selectedItems.add(item);
			}
		}
	}
	,draw: function() {
		var gfx = this._brain.getDebugGraphics();
		if(gfx == null) {
			return;
		}
		if(this._selectionHappening) {
			gfx.lineStyle(0.9,12255232);
			gfx.drawRect(this._selectionArea.x - flixel_FlxG.camera.scroll.x,this._selectionArea.y - flixel_FlxG.camera.scroll.y,this._selectionArea.width,this._selectionArea.height);
		}
		if(flixel_FlxG.renderBlit) {
			flixel_FlxG.camera.buffer.draw(flixel_util_FlxSpriteUtil.flashGfxSprite);
		}
	}
	,__class__: flixel_system_debug_interaction_tools_Pointer
});
var flixel_system_debug_log_LogStyle = function(Prefix,Color,Size,Bold,Italic,Underlined,ErrorSound,OpenConsole,CallbackFunction) {
	if(OpenConsole == null) {
		OpenConsole = false;
	}
	if(Underlined == null) {
		Underlined = false;
	}
	if(Italic == null) {
		Italic = false;
	}
	if(Bold == null) {
		Bold = false;
	}
	if(Size == null) {
		Size = 12;
	}
	if(Color == null) {
		Color = "FFFFFF";
	}
	if(Prefix == null) {
		Prefix = "";
	}
	this.prefix = Prefix;
	this.color = Color;
	this.size = Size;
	this.bold = Bold;
	this.italic = Italic;
	this.underlined = Underlined;
	this.errorSound = ErrorSound;
	this.openConsole = OpenConsole;
	this.callbackFunction = CallbackFunction;
};
$hxClasses["flixel.system.debug.log.LogStyle"] = flixel_system_debug_log_LogStyle;
flixel_system_debug_log_LogStyle.__name__ = ["flixel","system","debug","log","LogStyle"];
flixel_system_debug_log_LogStyle.prototype = {
	__class__: flixel_system_debug_log_LogStyle
};
var flixel_system_debug_stats__$Stats_GraphicMinimizeButton = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload != null) {
		this.__fromImage(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload == null) {
				flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceName),flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.stats._Stats.GraphicMinimizeButton"] = flixel_system_debug_stats__$Stats_GraphicMinimizeButton;
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.__name__ = ["flixel","system","debug","stats","_Stats","GraphicMinimizeButton"];
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload = null;
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.__super__ = openfl_display_BitmapData;
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_stats__$Stats_GraphicMinimizeButton
});
var flixel_system_debug_stats__$Stats_GraphicMaximizeButton = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload != null) {
		this.__fromImage(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload == null) {
				flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceName),flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.stats._Stats.GraphicMaximizeButton"] = flixel_system_debug_stats__$Stats_GraphicMaximizeButton;
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.__name__ = ["flixel","system","debug","stats","_Stats","GraphicMaximizeButton"];
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload = null;
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.__super__ = openfl_display_BitmapData;
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_stats__$Stats_GraphicMaximizeButton
});
var flixel_system_debug_watch_Watch = function(Title,Icon,Width,Height,Resizable,Bounds,Closable) {
	flixel_system_debug_Window.call(this,Title,Icon,Width,Height,Resizable,Bounds,Closable);
};
$hxClasses["flixel.system.debug.watch.Watch"] = flixel_system_debug_watch_Watch;
flixel_system_debug_watch_Watch.__name__ = ["flixel","system","debug","watch","Watch"];
flixel_system_debug_watch_Watch.__super__ = flixel_system_debug_Window;
flixel_system_debug_watch_Watch.prototype = $extend(flixel_system_debug_Window.prototype,{
	__class__: flixel_system_debug_watch_Watch
});
var flixel_system_debug_watch_Tracker = function(Title,Icon,Width,Height,Resizable,Bounds,Closable) {
	flixel_system_debug_watch_Watch.call(this,Title,Icon,Width,Height,Resizable,Bounds,Closable);
};
$hxClasses["flixel.system.debug.watch.Tracker"] = flixel_system_debug_watch_Tracker;
flixel_system_debug_watch_Tracker.__name__ = ["flixel","system","debug","watch","Tracker"];
flixel_system_debug_watch_Tracker.__super__ = flixel_system_debug_watch_Watch;
flixel_system_debug_watch_Tracker.prototype = $extend(flixel_system_debug_watch_Watch.prototype,{
	__class__: flixel_system_debug_watch_Tracker
});
var flixel_system_debug_watch_TrackerProfile = function(ObjectClass,Variables,Extensions) {
	this.objectClass = ObjectClass;
	this.variables = Variables;
	this.extensions = Extensions;
};
$hxClasses["flixel.system.debug.watch.TrackerProfile"] = flixel_system_debug_watch_TrackerProfile;
flixel_system_debug_watch_TrackerProfile.__name__ = ["flixel","system","debug","watch","TrackerProfile"];
flixel_system_debug_watch_TrackerProfile.prototype = {
	toString: function() {
		var value = this.variables;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "variables";
		_this.value = value;
		var value1 = this.extensions;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "extensions";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,__class__: flixel_system_debug_watch_TrackerProfile
};
var flixel_system_frontEnds_FlxBrowser = $hxClasses["flixel.system.frontEnds.FlxBrowser"] = { __ename__ : ["flixel","system","frontEnds","FlxBrowser"], __constructs__ : ["INTERNET_EXPLORER","CHROME","FIREFOX","SAFARI","OPERA","UNKNOWN"] };
flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER = ["INTERNET_EXPLORER",0];
flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER.toString = $estr;
flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.CHROME = ["CHROME",1];
flixel_system_frontEnds_FlxBrowser.CHROME.toString = $estr;
flixel_system_frontEnds_FlxBrowser.CHROME.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.FIREFOX = ["FIREFOX",2];
flixel_system_frontEnds_FlxBrowser.FIREFOX.toString = $estr;
flixel_system_frontEnds_FlxBrowser.FIREFOX.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.SAFARI = ["SAFARI",3];
flixel_system_frontEnds_FlxBrowser.SAFARI.toString = $estr;
flixel_system_frontEnds_FlxBrowser.SAFARI.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.OPERA = ["OPERA",4];
flixel_system_frontEnds_FlxBrowser.OPERA.toString = $estr;
flixel_system_frontEnds_FlxBrowser.OPERA.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.UNKNOWN = ["UNKNOWN",5];
flixel_system_frontEnds_FlxBrowser.UNKNOWN.toString = $estr;
flixel_system_frontEnds_FlxBrowser.UNKNOWN.__enum__ = flixel_system_frontEnds_FlxBrowser;
var flixel_system_frontEnds_FlxPlatform = $hxClasses["flixel.system.frontEnds.FlxPlatform"] = { __ename__ : ["flixel","system","frontEnds","FlxPlatform"], __constructs__ : ["WINDOWS","LINUX","MAC","ANDROID","BLACKBERRY","WINDOWS_PHONE","IOS","UNKNOWN"] };
flixel_system_frontEnds_FlxPlatform.WINDOWS = ["WINDOWS",0];
flixel_system_frontEnds_FlxPlatform.WINDOWS.toString = $estr;
flixel_system_frontEnds_FlxPlatform.WINDOWS.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.LINUX = ["LINUX",1];
flixel_system_frontEnds_FlxPlatform.LINUX.toString = $estr;
flixel_system_frontEnds_FlxPlatform.LINUX.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.MAC = ["MAC",2];
flixel_system_frontEnds_FlxPlatform.MAC.toString = $estr;
flixel_system_frontEnds_FlxPlatform.MAC.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.ANDROID = ["ANDROID",3];
flixel_system_frontEnds_FlxPlatform.ANDROID.toString = $estr;
flixel_system_frontEnds_FlxPlatform.ANDROID.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.BLACKBERRY = ["BLACKBERRY",4];
flixel_system_frontEnds_FlxPlatform.BLACKBERRY.toString = $estr;
flixel_system_frontEnds_FlxPlatform.BLACKBERRY.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE = ["WINDOWS_PHONE",5];
flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE.toString = $estr;
flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.IOS = function(device) { var $x = ["IOS",6,device]; $x.__enum__ = flixel_system_frontEnds_FlxPlatform; $x.toString = $estr; return $x; };
flixel_system_frontEnds_FlxPlatform.UNKNOWN = ["UNKNOWN",7];
flixel_system_frontEnds_FlxPlatform.UNKNOWN.toString = $estr;
flixel_system_frontEnds_FlxPlatform.UNKNOWN.__enum__ = flixel_system_frontEnds_FlxPlatform;
var flixel_system_frontEnds_FlxIOSDevice = $hxClasses["flixel.system.frontEnds.FlxIOSDevice"] = { __ename__ : ["flixel","system","frontEnds","FlxIOSDevice"], __constructs__ : ["IPHONE","IPAD","IPOD"] };
flixel_system_frontEnds_FlxIOSDevice.IPHONE = ["IPHONE",0];
flixel_system_frontEnds_FlxIOSDevice.IPHONE.toString = $estr;
flixel_system_frontEnds_FlxIOSDevice.IPHONE.__enum__ = flixel_system_frontEnds_FlxIOSDevice;
flixel_system_frontEnds_FlxIOSDevice.IPAD = ["IPAD",1];
flixel_system_frontEnds_FlxIOSDevice.IPAD.toString = $estr;
flixel_system_frontEnds_FlxIOSDevice.IPAD.__enum__ = flixel_system_frontEnds_FlxIOSDevice;
flixel_system_frontEnds_FlxIOSDevice.IPOD = ["IPOD",2];
flixel_system_frontEnds_FlxIOSDevice.IPOD.toString = $estr;
flixel_system_frontEnds_FlxIOSDevice.IPOD.__enum__ = flixel_system_frontEnds_FlxIOSDevice;
var flixel_system_frontEnds_PluginFrontEnd = function() {
	this.list = [];
	this.add_flixel_util_FlxTimerManager(flixel_util_FlxTimer.globalManager = new flixel_util_FlxTimerManager());
	this.add_flixel_tweens_FlxTweenManager(flixel_tweens_FlxTween.globalManager = new flixel_tweens_FlxTweenManager());
};
$hxClasses["flixel.system.frontEnds.PluginFrontEnd"] = flixel_system_frontEnds_PluginFrontEnd;
flixel_system_frontEnds_PluginFrontEnd.__name__ = ["flixel","system","frontEnds","PluginFrontEnd"];
flixel_system_frontEnds_PluginFrontEnd.prototype = {
	add_flixel_tweens_FlxTweenManager: function(Plugin) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Plugin,true) == flixel_util_FlxStringUtil.getClassName(plugin,true)) {
				return Plugin;
			}
		}
		this.list.push(Plugin);
		return Plugin;
	}
	,add_flixel_util_FlxTimerManager: function(Plugin) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Plugin,true) == flixel_util_FlxStringUtil.getClassName(plugin,true)) {
				return Plugin;
			}
		}
		this.list.push(Plugin);
		return Plugin;
	}
	,get: function(ClassType) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(js_Boot.__instanceof(plugin,ClassType)) {
				return plugin;
			}
		}
		return null;
	}
	,remove: function(Plugin) {
		var i = this.list.length - 1;
		while(i >= 0) {
			if(this.list[i] == Plugin) {
				this.list.splice(i,1);
				return Plugin;
			}
			--i;
		}
		return Plugin;
	}
	,removeType: function(ClassType) {
		var results = false;
		var i = this.list.length - 1;
		while(i >= 0) {
			if(js_Boot.__instanceof(this.list[i],ClassType)) {
				this.list.splice(i,1);
				results = true;
			}
			--i;
		}
		return results;
	}
	,update: function(elapsed) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(plugin.exists && plugin.active) {
				plugin.update(elapsed);
			}
		}
	}
	,draw: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(plugin.exists && plugin.visible) {
				plugin.draw();
			}
		}
	}
	,__class__: flixel_system_frontEnds_PluginFrontEnd
};
var flixel_system_frontEnds_SoundFrontEnd = function() {
	this.volume = 1;
	this.list = new flixel_group_FlxTypedGroup();
	this.defaultSoundGroup = new flixel_system_FlxSoundGroup();
	this.defaultMusicGroup = new flixel_system_FlxSoundGroup();
	this.soundTrayEnabled = true;
	this.muteKeys = [48,96];
	this.volumeDownKeys = [189,109];
	this.volumeUpKeys = [187,107];
	this.muted = false;
	this.loadSavedPrefs();
};
$hxClasses["flixel.system.frontEnds.SoundFrontEnd"] = flixel_system_frontEnds_SoundFrontEnd;
flixel_system_frontEnds_SoundFrontEnd.__name__ = ["flixel","system","frontEnds","SoundFrontEnd"];
flixel_system_frontEnds_SoundFrontEnd.prototype = {
	playMusic: function(Music,Volume,Looped,Group) {
		if(Looped == null) {
			Looped = true;
		}
		if(Volume == null) {
			Volume = 1;
		}
		if(this.music == null) {
			this.music = new flixel_system_FlxSound();
		} else if(this.music.active) {
			var _this = this.music;
			_this.cleanup(_this.autoDestroy,true);
		}
		this.music.loadEmbedded(Music,Looped);
		this.music.set_volume(Volume);
		this.music.persist = true;
		this.music.set_group(Group == null ? this.defaultMusicGroup : Group);
		this.music.play();
	}
	,load: function(EmbeddedSound,Volume,Looped,Group,AutoDestroy,AutoPlay,URL,OnComplete) {
		if(AutoPlay == null) {
			AutoPlay = false;
		}
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(Volume == null) {
			Volume = 1;
		}
		if(EmbeddedSound == null && URL == null) {
			var _this = flixel_FlxG.log;
			return null;
		}
		var sound = this.list.recycle(flixel_system_FlxSound);
		if(EmbeddedSound != null) {
			sound.loadEmbedded(EmbeddedSound,Looped,AutoDestroy,OnComplete);
		} else {
			sound.loadStream(URL,Looped,AutoDestroy,OnComplete);
		}
		sound.set_volume(Volume);
		if(AutoPlay) {
			sound.play();
		}
		sound.set_group(Group == null ? this.defaultSoundGroup : Group);
		return sound;
	}
	,cache: function(EmbeddedSound) {
		if(openfl_Assets.exists(EmbeddedSound,"SOUND") || openfl_Assets.exists(EmbeddedSound,"MUSIC")) {
			return openfl_Assets.getSound(EmbeddedSound,true);
		}
		var _this = flixel_FlxG.log;
		return null;
	}
	,cacheAll: function() {
		var _g = 0;
		var _g1 = openfl_Assets.list("SOUND");
		while(_g < _g1.length) {
			var id = _g1[_g];
			++_g;
			if(openfl_Assets.exists(id,"SOUND") || openfl_Assets.exists(id,"MUSIC")) {
				openfl_Assets.getSound(id,true);
			} else {
				var _this = flixel_FlxG.log;
			}
		}
	}
	,play: function(EmbeddedSound,Volume,Looped,Group,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = true;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(Volume == null) {
			Volume = 1;
		}
		if(typeof(EmbeddedSound) == "string") {
			if(openfl_Assets.exists(EmbeddedSound,"SOUND") || openfl_Assets.exists(EmbeddedSound,"MUSIC")) {
				EmbeddedSound = openfl_Assets.getSound(EmbeddedSound,true);
			} else {
				var _this = flixel_FlxG.log;
				EmbeddedSound = null;
			}
		}
		var sound = this.list.recycle(flixel_system_FlxSound).loadEmbedded(EmbeddedSound,Looped,AutoDestroy,OnComplete);
		sound.set_volume(Volume);
		sound.set_group(Group == null ? this.defaultSoundGroup : Group);
		return sound.play();
	}
	,stream: function(URL,Volume,Looped,Group,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = true;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(Volume == null) {
			Volume = 1;
		}
		return this.load(null,Volume,Looped,null,AutoDestroy,true,URL,OnComplete);
	}
	,pause: function() {
		if(this.music != null && this.music.exists && this.music.active) {
			this.music.pause();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null && sound.exists && sound.active) {
				sound.pause();
			}
		}
	}
	,resume: function() {
		if(this.music != null && this.music.exists) {
			this.music.resume();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null && sound.exists) {
				sound.resume();
			}
		}
	}
	,destroy: function(ForceDestroy) {
		if(ForceDestroy == null) {
			ForceDestroy = false;
		}
		if(this.music != null && (ForceDestroy || !this.music.persist)) {
			this.music.destroy();
			this.music = null;
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null && (ForceDestroy || !sound.persist)) {
				sound.destroy();
			}
		}
	}
	,toggleMuted: function() {
		this.muted = !this.muted;
		if(this.volumeHandler != null) {
			this.volumeHandler(this.muted ? 0 : this.volume);
		}
		this.showSoundTray();
	}
	,changeVolume: function(Amount) {
		this.muted = false;
		var _g = this;
		_g.set_volume(_g.volume + Amount);
		this.showSoundTray();
	}
	,showSoundTray: function() {
		if(flixel_FlxG.game.soundTray != null && this.soundTrayEnabled) {
			flixel_FlxG.game.soundTray.show();
		}
	}
	,update: function(elapsed) {
		if(this.music != null && this.music.active) {
			this.music.update(elapsed);
		}
		if(this.list != null && this.list.active) {
			this.list.update(elapsed);
		}
		if(flixel_FlxG.keys.checkKeyArrayState(this.muteKeys,-1)) {
			this.toggleMuted();
		} else if(flixel_FlxG.keys.checkKeyArrayState(this.volumeUpKeys,-1)) {
			this.changeVolume(0.1);
		} else if(flixel_FlxG.keys.checkKeyArrayState(this.volumeDownKeys,-1)) {
			this.changeVolume(-0.1);
		}
	}
	,onFocusLost: function() {
		if(this.music != null) {
			this.music.onFocusLost();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null) {
				sound.onFocusLost();
			}
		}
	}
	,onFocus: function() {
		if(this.music != null) {
			this.music.onFocus();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null) {
				sound.onFocus();
			}
		}
	}
	,loadSavedPrefs: function() {
		if(flixel_FlxG.save.data.volume != null) {
			this.set_volume(flixel_FlxG.save.data.volume);
		}
		if(flixel_FlxG.save.data.mute != null) {
			this.muted = flixel_FlxG.save.data.mute;
		}
	}
	,set_volume: function(Volume) {
		var lowerBound = Volume < 0 ? 0 : Volume;
		if(lowerBound > 1) {
			Volume = 1;
		} else {
			Volume = lowerBound;
		}
		if(this.volumeHandler != null) {
			var param = this.muted ? 0 : Volume;
			this.volumeHandler(param);
		}
		return this.volume = Volume;
	}
	,__class__: flixel_system_frontEnds_SoundFrontEnd
	,__properties__: {set_volume:"set_volume"}
};
var flixel_system_frontEnds_VCRFrontEnd = function() {
	this.stepRequested = false;
	this.paused = false;
};
$hxClasses["flixel.system.frontEnds.VCRFrontEnd"] = flixel_system_frontEnds_VCRFrontEnd;
flixel_system_frontEnds_VCRFrontEnd.__name__ = ["flixel","system","frontEnds","VCRFrontEnd"];
flixel_system_frontEnds_VCRFrontEnd.prototype = {
	pause: function() {
		if(!this.paused) {
			if(!flixel_FlxG.mouse.useSystemCursor) {
				openfl_ui_Mouse.show();
			}
			this.paused = true;
		}
	}
	,resume: function() {
		if(this.paused) {
			if(!flixel_FlxG.mouse.useSystemCursor) {
				openfl_ui_Mouse.hide();
			}
			this.paused = false;
		}
	}
	,__class__: flixel_system_frontEnds_VCRFrontEnd
};
var flixel_system_macros_FlxMacroUtil = function() { };
$hxClasses["flixel.system.macros.FlxMacroUtil"] = flixel_system_macros_FlxMacroUtil;
flixel_system_macros_FlxMacroUtil.__name__ = ["flixel","system","macros","FlxMacroUtil"];
var flixel_system_replay_CodeValuePair = function(code,value) {
	this.code = code;
	this.value = value;
};
$hxClasses["flixel.system.replay.CodeValuePair"] = flixel_system_replay_CodeValuePair;
flixel_system_replay_CodeValuePair.__name__ = ["flixel","system","replay","CodeValuePair"];
flixel_system_replay_CodeValuePair.prototype = {
	__class__: flixel_system_replay_CodeValuePair
};
var flixel_system_replay_MouseRecord = function(x,y,button,wheel) {
	this.x = x;
	this.y = y;
	this.button = button;
	this.wheel = wheel;
};
$hxClasses["flixel.system.replay.MouseRecord"] = flixel_system_replay_MouseRecord;
flixel_system_replay_MouseRecord.__name__ = ["flixel","system","replay","MouseRecord"];
flixel_system_replay_MouseRecord.prototype = {
	__class__: flixel_system_replay_MouseRecord
};
var flixel_system_ui_FlxFocusLostScreen = function() {
	openfl_display_Sprite.call(this);
	this.draw();
	var logo = new openfl_display_Sprite();
	flixel_system_FlxAssets.drawLogo(logo.get_graphics());
	logo.set_scaleX(logo.set_scaleY(0.2));
	logo.set_x(logo.set_y(5));
	logo.set_alpha(0.35);
	this.addChild(logo);
	this.set_visible(false);
};
$hxClasses["flixel.system.ui.FlxFocusLostScreen"] = flixel_system_ui_FlxFocusLostScreen;
flixel_system_ui_FlxFocusLostScreen.__name__ = ["flixel","system","ui","FlxFocusLostScreen"];
flixel_system_ui_FlxFocusLostScreen.__super__ = openfl_display_Sprite;
flixel_system_ui_FlxFocusLostScreen.prototype = $extend(openfl_display_Sprite.prototype,{
	draw: function() {
		var gfx = this.get_graphics();
		var screenWidth = openfl_Lib.current.stage.stageWidth | 0;
		var screenHeight = openfl_Lib.current.stage.stageHeight | 0;
		gfx.clear();
		gfx.moveTo(0,0);
		gfx.beginFill(0,0.5);
		gfx.drawRect(0,0,screenWidth,screenHeight);
		gfx.endFill();
		var halfWidth = screenWidth / 2 | 0;
		var halfHeight = screenHeight / 2 | 0;
		var helper = Math.min(halfWidth,halfHeight) / 3 | 0;
		gfx.moveTo(halfWidth - helper,halfHeight - helper);
		gfx.beginFill(16777215,0.65);
		gfx.lineTo(halfWidth + helper,halfHeight);
		gfx.lineTo(halfWidth - helper,halfHeight + helper);
		gfx.lineTo(halfWidth - helper,halfHeight - helper);
		gfx.endFill();
		this.set_x(-flixel_FlxG.scaleMode.offset.x);
		this.set_y(-flixel_FlxG.scaleMode.offset.y);
	}
	,__class__: flixel_system_ui_FlxFocusLostScreen
});
var flixel_system_ui_FlxSoundTray = function() {
	this._defaultScale = 2.0;
	this._width = 80;
	openfl_display_Sprite.call(this);
	this.set_visible(false);
	this.set_scaleX(this._defaultScale);
	this.set_scaleY(this._defaultScale);
	var tmp = new openfl_display_Bitmap(new openfl_display_BitmapData(this._width,30,true,2130706432));
	this.screenCenter();
	this.addChild(tmp);
	var text = new openfl_text_TextField();
	text.set_width(tmp.get_width());
	text.set_height(tmp.get_height());
	text.set_multiline(true);
	text.set_wordWrap(true);
	text.set_selectable(false);
	var dtf = new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEFAULT,10,16777215);
	dtf.align = 0;
	text.set_defaultTextFormat(dtf);
	this.addChild(text);
	text.set_text("VOLUME");
	text.set_y(16);
	var bx = 10;
	var by = 14;
	this._bars = [];
	var _g = 0;
	while(_g < 10) {
		var i = _g++;
		tmp = new openfl_display_Bitmap(new openfl_display_BitmapData(4,i + 1,false,-1));
		tmp.set_x(bx);
		tmp.set_y(by);
		this.addChild(tmp);
		this._bars.push(tmp);
		bx += 6;
		--by;
	}
	this.set_y(-this.get_height());
	this.set_visible(false);
};
$hxClasses["flixel.system.ui.FlxSoundTray"] = flixel_system_ui_FlxSoundTray;
flixel_system_ui_FlxSoundTray.__name__ = ["flixel","system","ui","FlxSoundTray"];
flixel_system_ui_FlxSoundTray.__super__ = openfl_display_Sprite;
flixel_system_ui_FlxSoundTray.prototype = $extend(openfl_display_Sprite.prototype,{
	update: function(MS) {
		if(this._timer > 0) {
			this._timer -= MS / 1000;
		} else if(this.get_y() > -this.get_height()) {
			var _g = this;
			_g.set_y(_g.get_y() - MS / 1000 * flixel_FlxG.height * 2);
			if(this.get_y() <= -this.get_height()) {
				this.set_visible(false);
				this.active = false;
				flixel_FlxG.save.data.mute = flixel_FlxG.sound.muted;
				flixel_FlxG.save.data.volume = flixel_FlxG.sound.volume;
				flixel_FlxG.save.flush();
			}
		}
	}
	,show: function(Silent) {
		if(Silent == null) {
			Silent = false;
		}
		if(!Silent) {
			var extension = "";
			extension = ".ogg";
			var sound = openfl_Assets.getSound("flixel/sounds/beep" + extension);
			if(sound != null) {
				flixel_FlxG.sound.load(sound).play();
			}
		}
		this._timer = 1;
		this.set_y(0);
		this.set_visible(true);
		this.active = true;
		var globalVolume = Math.round(flixel_FlxG.sound.volume * 10);
		if(flixel_FlxG.sound.muted) {
			globalVolume = 0;
		}
		var _g1 = 0;
		var _g = this._bars.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(i < globalVolume) {
				this._bars[i].set_alpha(1);
			} else {
				this._bars[i].set_alpha(0.5);
			}
		}
	}
	,screenCenter: function() {
		this.set_scaleX(this._defaultScale);
		this.set_scaleY(this._defaultScale);
		this.set_x(0.5 * (openfl_Lib.current.stage.stageWidth - this._width * this._defaultScale) - flixel_FlxG.game.get_x());
	}
	,__class__: flixel_system_ui_FlxSoundTray
});
var flixel_system_ui_FlxSystemButton = function(Icon,UpHandler,ToggleMode) {
	if(ToggleMode == null) {
		ToggleMode = false;
	}
	this._mouseDown = false;
	this.toggled = false;
	this.toggleMode = false;
	this.enabled = true;
	openfl_display_Sprite.call(this);
	if(Icon != null) {
		this.changeIcon(Icon);
	}
	this.upHandler = UpHandler;
	this.toggleMode = ToggleMode;
	this.addEventListener("mouseUp",$bind(this,this.onMouseUp));
	this.addEventListener("mouseDown",$bind(this,this.onMouseDown));
	this.addEventListener("mouseOut",$bind(this,this.onMouseOut));
	this.addEventListener("mouseOver",$bind(this,this.onMouseOver));
};
$hxClasses["flixel.system.ui.FlxSystemButton"] = flixel_system_ui_FlxSystemButton;
flixel_system_ui_FlxSystemButton.__name__ = ["flixel","system","ui","FlxSystemButton"];
flixel_system_ui_FlxSystemButton.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_system_ui_FlxSystemButton.__super__ = openfl_display_Sprite;
flixel_system_ui_FlxSystemButton.prototype = $extend(openfl_display_Sprite.prototype,{
	changeIcon: function(Icon) {
		if(this._icon != null) {
			this.removeChild(this._icon);
		}
		flixel_system_debug_DebuggerUtil.fixSize(Icon);
		this._icon = new openfl_display_Bitmap(Icon);
		this.addChild(this._icon);
	}
	,destroy: function() {
		this.removeEventListener("mouseUp",$bind(this,this.onMouseUp));
		this.removeEventListener("mouseDown",$bind(this,this.onMouseDown));
		this.removeEventListener("mouseOut",$bind(this,this.onMouseOut));
		this.removeEventListener("mouseOver",$bind(this,this.onMouseOver));
		this._icon = null;
		this.upHandler = null;
	}
	,onMouseUp: function(_) {
		if(this.enabled && this._mouseDown) {
			this.set_toggled(!this.toggled);
			this._mouseDown = false;
			if(this.upHandler != null) {
				this.upHandler();
			}
		}
	}
	,onMouseDown: function(_) {
		this._mouseDown = true;
	}
	,onMouseOver: function(_) {
		if(this.enabled) {
			var _g = this;
			_g.set_alpha(_g.get_alpha() - 0.2);
		}
	}
	,onMouseOut: function(_) {
		if(this.enabled) {
			var _g = this;
			_g.set_alpha(_g.get_alpha() + 0.2);
		}
	}
	,set_toggled: function(Value) {
		if(this.toggleMode) {
			this.set_alpha(Value ? 0.3 : 1);
		}
		return this.toggled = Value;
	}
	,__class__: flixel_system_ui_FlxSystemButton
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_toggled:"set_toggled"})
});
var flixel_text_FlxText = function(X,Y,FieldWidth,Text,Size,EmbeddedFont) {
	if(EmbeddedFont == null) {
		EmbeddedFont = true;
	}
	if(Size == null) {
		Size = 8;
	}
	if(FieldWidth == null) {
		FieldWidth = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._hasBorderAlpha = false;
	this._regen = true;
	this._formatRanges = [];
	this.borderQuality = 1;
	this.borderSize = 1;
	this.borderColor = 0;
	this.borderStyle = flixel_text_FlxTextBorderStyle.NONE;
	this.text = "";
	flixel_FlxSprite.call(this,X,Y);
	if(Text == null || Text == "") {
		this.set_text("");
		Text = " ";
	} else {
		this.set_text(Text);
	}
	this.textField = new openfl_text_TextField();
	this.textField.set_selectable(false);
	this.textField.set_multiline(true);
	this.textField.set_wordWrap(true);
	this._defaultFormat = new openfl_text_TextFormat(null,Size,16777215);
	this.set_font(flixel_system_FlxAssets.FONT_DEFAULT);
	this._formatAdjusted = new openfl_text_TextFormat();
	this.textField.set_defaultTextFormat(this._defaultFormat);
	this.textField.set_text(Text);
	this.set_fieldWidth(FieldWidth);
	this.textField.set_embedFonts(EmbeddedFont);
	this.textField.set_height(Text.length <= 0 ? 1 : 10);
	this.set_allowCollisions(0);
	this.set_moves(false);
	this.drawFrame();
	var point = flixel_math_FlxPoint._pool.get().set(1,1);
	point._inPool = false;
	this.shadowOffset = point;
};
$hxClasses["flixel.text.FlxText"] = flixel_text_FlxText;
flixel_text_FlxText.__name__ = ["flixel","text","FlxText"];
flixel_text_FlxText.__super__ = flixel_FlxSprite;
flixel_text_FlxText.prototype = $extend(flixel_FlxSprite.prototype,{
	destroy: function() {
		this.textField = null;
		this._font = null;
		this._defaultFormat = null;
		this._formatAdjusted = null;
		this.shadowOffset = flixel_util_FlxDestroyUtil.put(this.shadowOffset);
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,drawFrame: function(Force) {
		if(Force == null) {
			Force = false;
		}
		this._regen = this._regen || Force;
		flixel_FlxSprite.prototype.drawFrame.call(this,this._regen);
	}
	,stampOnAtlas: function(atlas) {
		this.regenGraphic();
		var node = atlas.addNode(this.graphic.bitmap,this.graphic.key);
		var result = node != null;
		if(node != null) {
			this.set_frames(node.getImageFrame());
		}
		return result;
	}
	,applyMarkup: function(input,rules) {
		if(rules == null || rules.length == 0) {
			return this;
		}
		this.clearFormats();
		var rangeStarts = [];
		var rangeEnds = [];
		var rulesToApply = [];
		var i = 0;
		var _g = 0;
		while(_g < rules.length) {
			var rule = rules[_g];
			++_g;
			if(rule.marker == null || rule.format == null) {
				continue;
			}
			var start = false;
			var markerLength = rule.marker.length;
			if(input.indexOf(rule.marker) == -1) {
				continue;
			}
			var _g2 = 0;
			var _g1 = input.length;
			while(_g2 < _g1) {
				var charIndex = _g2++;
				if(haxe_Utf8.compare(HxOverrides.substr(input,charIndex,markerLength),rule.marker) != 0) {
					continue;
				}
				if(start) {
					start = false;
					rangeEnds.push(charIndex);
				} else {
					start = true;
					rangeStarts.push(charIndex);
					rulesToApply.push(rule);
				}
			}
			if(start) {
				rangeEnds.push(-1);
			}
			++i;
		}
		var _g3 = 0;
		while(_g3 < rules.length) {
			var rule1 = rules[_g3];
			++_g3;
			input = StringTools.replace(input,rule1.marker,"");
		}
		var _g11 = 0;
		var _g4 = rangeStarts.length;
		while(_g11 < _g4) {
			var i1 = _g11++;
			var delIndex = rangeStarts[i1];
			var markerLength1 = rulesToApply[i1].marker.length;
			var _g31 = 0;
			var _g21 = rangeStarts.length;
			while(_g31 < _g21) {
				var j = _g31++;
				if(rangeStarts[j] > delIndex) {
					rangeStarts[j] -= markerLength1;
				}
				if(rangeEnds[j] > delIndex) {
					rangeEnds[j] -= markerLength1;
				}
			}
			delIndex = rangeEnds[i1];
			var _g32 = 0;
			var _g22 = rangeStarts.length;
			while(_g32 < _g22) {
				var j1 = _g32++;
				if(rangeStarts[j1] > delIndex) {
					rangeStarts[j1] -= markerLength1;
				}
				if(rangeEnds[j1] > delIndex) {
					rangeEnds[j1] -= markerLength1;
				}
			}
		}
		this.set_text(input);
		var _g12 = 0;
		var _g5 = rangeStarts.length;
		while(_g12 < _g5) {
			var i2 = _g12++;
			this.addFormat(rulesToApply[i2].format,rangeStarts[i2],rangeEnds[i2]);
		}
		return this;
	}
	,addFormat: function(Format,Start,End) {
		if(End == null) {
			End = -1;
		}
		if(Start == null) {
			Start = -1;
		}
		this._formatRanges.push(new flixel_text__$FlxText_FlxTextFormatRange(Format,Start,End));
		this._formatRanges.sort(function(left,right) {
			if(left.range.start < right.range.start) {
				return -1;
			} else {
				return 1;
			}
		});
		this._regen = true;
		return this;
	}
	,removeFormat: function(Format,Start,End) {
		var _g = 0;
		var _g1 = this._formatRanges;
		while(_g < _g1.length) {
			var formatRange = _g1[_g];
			++_g;
			if(formatRange.format != Format) {
				continue;
			}
			if(Start != null && End != null && (Start > formatRange.range.end || End < formatRange.range.start)) {
				continue;
			}
			HxOverrides.remove(this._formatRanges,formatRange);
		}
		this._regen = true;
		return this;
	}
	,clearFormats: function() {
		this._formatRanges = [];
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return this;
	}
	,setFormat: function(Font,Size,Color,Alignment,BorderStyle,BorderColor,EmbeddedFont) {
		if(EmbeddedFont == null) {
			EmbeddedFont = true;
		}
		if(BorderColor == null) {
			BorderColor = 0;
		}
		if(Color == null) {
			Color = -1;
		}
		if(Size == null) {
			Size = 8;
		}
		if(BorderStyle == null) {
			BorderStyle = flixel_text_FlxTextBorderStyle.NONE;
		} else {
			BorderStyle = BorderStyle;
		}
		if(EmbeddedFont) {
			this.set_font(Font);
		} else if(Font != null) {
			this.set_systemFont(Font);
		}
		this.set_size(Size);
		this.set_color(Color);
		if(Alignment != null) {
			this.set_alignment(Alignment);
		}
		this.set_borderStyle(BorderStyle);
		this.set_borderColor(BorderColor);
		this.set_borderSize(1);
		this.set_borderQuality(1);
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return this;
	}
	,setBorderStyle: function(Style,Color,Size,Quality) {
		if(Quality == null) {
			Quality = 1;
		}
		if(Size == null) {
			Size = 1;
		}
		if(Color == null) {
			Color = 0;
		}
		this.set_borderStyle(Style);
		this.set_borderColor(Color);
		this.set_borderSize(Size);
		this.set_borderQuality(Quality);
		return this;
	}
	,set_fieldWidth: function(value) {
		if(this.textField == null) {
			return value;
		}
		if(value <= 0) {
			this.set_wordWrap(false);
			this.set_autoSize(true);
		} else {
			this.set_autoSize(false);
			this.set_wordWrap(true);
			this.textField.set_width(value);
		}
		this._regen = true;
		return value;
	}
	,get_fieldWidth: function() {
		if(this.textField != null) {
			return this.textField.get_width();
		} else {
			return 0;
		}
	}
	,set_autoSize: function(value) {
		if(this.textField != null) {
			this.textField.set_autoSize(value ? 1 : 2);
			this._regen = true;
		}
		return value;
	}
	,get_autoSize: function() {
		if(this.textField != null) {
			return this.textField.get_autoSize() != 2;
		} else {
			return false;
		}
	}
	,set_text: function(Text) {
		this.text = Text;
		if(this.textField != null) {
			var ot = this.textField.get_text();
			this.textField.set_text(Text);
			this._regen = this.textField.get_text() != ot || this._regen;
		}
		return Text;
	}
	,get_size: function() {
		return this._defaultFormat.size | 0;
	}
	,set_size: function(Size) {
		this._defaultFormat.size = Size;
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Size;
	}
	,set_color: function(Color) {
		if(this._defaultFormat.color == (Color & 16777215)) {
			return Color;
		}
		this._defaultFormat.color = Color & 16777215;
		this.color = Color;
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Color;
	}
	,get_font: function() {
		return this._font;
	}
	,set_font: function(Font) {
		this.textField.set_embedFonts(true);
		if(Font != null) {
			var newFontName = Font;
			if(openfl_Assets.exists(Font,"FONT")) {
				newFontName = openfl_Assets.getFont(Font).name;
			}
			this._defaultFormat.font = newFontName;
		} else {
			this._defaultFormat.font = flixel_system_FlxAssets.FONT_DEFAULT;
		}
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return this._font = this._defaultFormat.font;
	}
	,get_embedded: function() {
		return this.textField.set_embedFonts(true);
	}
	,get_systemFont: function() {
		return this._defaultFormat.font;
	}
	,set_systemFont: function(Font) {
		this.textField.set_embedFonts(false);
		this._defaultFormat.font = Font;
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Font;
	}
	,get_bold: function() {
		return this._defaultFormat.bold;
	}
	,set_bold: function(value) {
		if(this._defaultFormat.bold != value) {
			this._defaultFormat.bold = value;
			this.textField.set_defaultTextFormat(this._defaultFormat);
			this.textField.setTextFormat(this._defaultFormat);
			this._regen = true;
		}
		return value;
	}
	,get_italic: function() {
		return this._defaultFormat.italic;
	}
	,set_italic: function(value) {
		if(this._defaultFormat.italic != value) {
			this._defaultFormat.italic = value;
			this.textField.set_defaultTextFormat(this._defaultFormat);
			this.textField.setTextFormat(this._defaultFormat);
			this._regen = true;
		}
		return value;
	}
	,get_wordWrap: function() {
		return this.textField.get_wordWrap();
	}
	,set_wordWrap: function(value) {
		if(this.textField.get_wordWrap() != value) {
			this.textField.set_wordWrap(value);
			this._regen = true;
		}
		return value;
	}
	,get_alignment: function() {
		return flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(this._defaultFormat.align);
	}
	,set_alignment: function(Alignment) {
		this._defaultFormat.align = flixel_text__$FlxText_FlxTextAlign_$Impl_$.toOpenFL(Alignment);
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Alignment;
	}
	,set_borderStyle: function(style) {
		if(style != this.borderStyle) {
			this._regen = true;
		}
		return this.borderStyle = style;
	}
	,set_borderColor: function(Color) {
		if(this.borderColor != Color && this.borderStyle != flixel_text_FlxTextBorderStyle.NONE) {
			this._regen = true;
		}
		this._hasBorderAlpha = (Color >> 24 & 255) / 255 < 1;
		return this.borderColor = Color;
	}
	,set_borderSize: function(Value) {
		if(Value != this.borderSize && this.borderStyle != flixel_text_FlxTextBorderStyle.NONE) {
			this._regen = true;
		}
		return this.borderSize = Value;
	}
	,set_borderQuality: function(Value) {
		var lowerBound = Value < 0 ? 0 : Value;
		if(lowerBound > 1) {
			Value = 1;
		} else {
			Value = lowerBound;
		}
		if(Value != this.borderQuality && this.borderStyle != flixel_text_FlxTextBorderStyle.NONE) {
			this._regen = true;
		}
		return this.borderQuality = Value;
	}
	,set_graphic: function(Value) {
		var oldGraphic = this.graphic;
		var graph = flixel_FlxSprite.prototype.set_graphic.call(this,Value);
		flixel_FlxG.bitmap.removeIfNoUse(oldGraphic);
		return graph;
	}
	,get_width: function() {
		this.regenGraphic();
		return flixel_FlxSprite.prototype.get_width.call(this);
	}
	,get_height: function() {
		this.regenGraphic();
		return flixel_FlxSprite.prototype.get_height.call(this);
	}
	,updateColorTransform: function() {
		if(this.colorTransform == null) {
			this.colorTransform = new openfl_geom_ColorTransform();
		}
		if(this.alpha != 1) {
			this.colorTransform.alphaMultiplier = this.alpha;
			this.useColorTransform = true;
		} else {
			this.colorTransform.alphaMultiplier = 1;
			this.useColorTransform = false;
		}
		this.dirty = true;
	}
	,regenGraphic: function() {
		if(this.textField == null || !this._regen) {
			return;
		}
		var oldWidth = 0;
		var oldHeight = 4;
		if(this.graphic != null) {
			oldWidth = this.graphic.width;
			oldHeight = this.graphic.height;
		}
		var newWidth = this.textField.get_width();
		var newHeight = this.textField.get_textHeight() + 4;
		if(this.textField.get_textHeight() == 0) {
			newHeight = oldHeight;
		}
		if(oldWidth != newWidth || oldHeight != newHeight) {
			this.set_height(newHeight);
			var key = flixel_FlxG.bitmap.getUniqueKey("text");
			this.makeGraphic(newWidth | 0,newHeight | 0,0,false,key);
			if(this._hasBorderAlpha) {
				this._borderPixels = this.graphic.bitmap.clone();
			}
			this.frameHeight = this.get_height() | 0;
			this.textField.set_height(this.get_height() * 1.2);
			this._flashRect.x = 0;
			this._flashRect.y = 0;
			this._flashRect.width = newWidth;
			this._flashRect.height = newHeight;
		} else {
			this.graphic.bitmap.fillRect(this._flashRect,0);
			if(this._hasBorderAlpha) {
				if(this._borderPixels == null) {
					this._borderPixels = new openfl_display_BitmapData(this.frameWidth,this.frameHeight,true);
				} else {
					this._borderPixels.fillRect(this._flashRect,0);
				}
			}
		}
		if(this.textField != null && this.textField.get_text() != null && this.textField.get_text().length > 0) {
			this.copyTextFormat(this._defaultFormat,this._formatAdjusted);
			this._matrix.identity();
			this.applyBorderStyle();
			if(!(!this._hasBorderAlpha)) {
				if(this._borderColorTransform == null) {
					this._borderColorTransform = new openfl_geom_ColorTransform();
				}
				this._borderColorTransform.alphaMultiplier = (this.borderColor >> 24 & 255) / 255;
				this._borderPixels.colorTransform(this._borderPixels.rect,this._borderColorTransform);
				this.graphic.bitmap.draw(this._borderPixels);
			}
			this.applyFormats(this._formatAdjusted,false);
			this.drawTextFieldTo(this.graphic.bitmap);
		}
		this._regen = false;
		this.set_frame(this.frame);
	}
	,drawTextFieldTo: function(graphic) {
		graphic.draw(this.textField,this._matrix);
	}
	,draw: function() {
		this.regenGraphic();
		flixel_FlxSprite.prototype.draw.call(this);
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
		if(this.textField == null) {
			return;
		}
		if(flixel_FlxG.renderTile && !RunOnCpp) {
			return;
		}
		this.regenGraphic();
		flixel_FlxSprite.prototype.calcFrame.call(this,RunOnCpp);
	}
	,applyBorderStyle: function() {
		var iterations = this.borderSize * this.borderQuality | 0;
		if(iterations <= 0) {
			iterations = 1;
		}
		var delta = this.borderSize / iterations;
		var _g = this.borderStyle;
		switch(_g[1]) {
		case 0:
			break;
		case 1:
			this.applyFormats(this._formatAdjusted,true);
			var _g1 = 0;
			var _g2 = iterations;
			while(_g1 < _g2) {
				var i = _g1++;
				var graphic = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(delta,delta);
				this.drawTextFieldTo(graphic);
			}
			this._matrix.translate(-this.shadowOffset.x * this.borderSize,-this.shadowOffset.y * this.borderSize);
			break;
		case 2:
			this.applyFormats(this._formatAdjusted,true);
			var curDelta = delta;
			var _g11 = 0;
			var _g3 = iterations;
			while(_g11 < _g3) {
				var i1 = _g11++;
				var graphic1 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta,-curDelta);
				this.drawTextFieldTo(graphic1);
				var graphic2 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(curDelta,0);
				this.drawTextFieldTo(graphic2);
				var graphic3 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(curDelta,0);
				this.drawTextFieldTo(graphic3);
				var graphic4 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,curDelta);
				this.drawTextFieldTo(graphic4);
				var graphic5 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,curDelta);
				this.drawTextFieldTo(graphic5);
				var graphic6 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta,0);
				this.drawTextFieldTo(graphic6);
				var graphic7 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta,0);
				this.drawTextFieldTo(graphic7);
				var graphic8 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,-curDelta);
				this.drawTextFieldTo(graphic8);
				this._matrix.translate(curDelta,0);
				curDelta += delta;
			}
			break;
		case 3:
			this.applyFormats(this._formatAdjusted,true);
			var curDelta1 = delta;
			var _g12 = 0;
			var _g4 = iterations;
			while(_g12 < _g4) {
				var i2 = _g12++;
				var graphic9 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta1,-curDelta1);
				this.drawTextFieldTo(graphic9);
				var graphic10 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(curDelta1 * 2,0);
				this.drawTextFieldTo(graphic10);
				var graphic11 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,curDelta1 * 2);
				this.drawTextFieldTo(graphic11);
				var graphic12 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta1 * 2,0);
				this.drawTextFieldTo(graphic12);
				this._matrix.translate(curDelta1,-curDelta1);
				curDelta1 += delta;
			}
			break;
		}
	}
	,applyBorderTransparency: function() {
		if(!this._hasBorderAlpha) {
			return;
		}
		if(this._borderColorTransform == null) {
			this._borderColorTransform = new openfl_geom_ColorTransform();
		}
		this._borderColorTransform.alphaMultiplier = (this.borderColor >> 24 & 255) / 255;
		this._borderPixels.colorTransform(this._borderPixels.rect,this._borderColorTransform);
		this.graphic.bitmap.draw(this._borderPixels);
	}
	,copyTextWithOffset: function(x,y) {
		var graphic = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
		this._matrix.translate(x,y);
		this.drawTextFieldTo(graphic);
	}
	,applyFormats: function(FormatAdjusted,UseBorderColor) {
		if(UseBorderColor == null) {
			UseBorderColor = false;
		}
		this.copyTextFormat(this._defaultFormat,FormatAdjusted,false);
		FormatAdjusted.color = UseBorderColor ? this.borderColor & 16777215 : this._defaultFormat.color;
		this.textField.setTextFormat(FormatAdjusted);
		var _g = 0;
		var _g1 = this._formatRanges;
		while(_g < _g1.length) {
			var formatRange = _g1[_g];
			++_g;
			if(this.textField.get_text().length - 1 < formatRange.range.start) {
				break;
			} else {
				var textFormat = formatRange.format.format;
				this.copyTextFormat(textFormat,FormatAdjusted,false);
				FormatAdjusted.color = UseBorderColor ? formatRange.format.borderColor & 16777215 : textFormat.color;
			}
			this.textField.setTextFormat(FormatAdjusted,formatRange.range.start,Math.min(formatRange.range.end,this.textField.get_text().length) | 0);
		}
	}
	,copyTextFormat: function(from,to,withAlign) {
		if(withAlign == null) {
			withAlign = true;
		}
		to.font = from.font;
		to.bold = from.bold;
		to.italic = from.italic;
		to.size = from.size;
		to.color = from.color;
		if(withAlign) {
			to.align = from.align;
		}
	}
	,dtfCopy: function() {
		var dtf = this.textField.get_defaultTextFormat();
		return new openfl_text_TextFormat(dtf.font,dtf.size,dtf.color,dtf.bold,dtf.italic,dtf.underline,dtf.url,dtf.target,dtf.align);
	}
	,updateDefaultFormat: function() {
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
	}
	,set_frames: function(Frames) {
		flixel_FlxSprite.prototype.set_frames.call(this,Frames);
		this._regen = false;
		return Frames;
	}
	,__class__: flixel_text_FlxText
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_fieldWidth:"set_fieldWidth",get_fieldWidth:"get_fieldWidth",set_borderQuality:"set_borderQuality",set_borderSize:"set_borderSize",set_borderColor:"set_borderColor",set_borderStyle:"set_borderStyle",set_alignment:"set_alignment",get_alignment:"get_alignment",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_italic:"set_italic",get_italic:"get_italic",set_bold:"set_bold",get_bold:"get_bold",set_systemFont:"set_systemFont",get_systemFont:"get_systemFont",get_embedded:"get_embedded",set_font:"set_font",get_font:"get_font",set_size:"set_size",get_size:"get_size",set_text:"set_text"})
});
var flixel_text_FlxTextFormat = function(FontColor,Bold,Italic,BorderColor) {
	this.format = new openfl_text_TextFormat(null,null,FontColor,Bold,Italic);
	this.borderColor = BorderColor == null ? 0 : BorderColor;
};
$hxClasses["flixel.text.FlxTextFormat"] = flixel_text_FlxTextFormat;
flixel_text_FlxTextFormat.__name__ = ["flixel","text","FlxTextFormat"];
flixel_text_FlxTextFormat.prototype = {
	__class__: flixel_text_FlxTextFormat
};
var flixel_text__$FlxText_FlxTextFormatRange = function(format,start,end) {
	this.range = new flixel_util_helpers_FlxRange(start,end);
	this.format = format;
};
$hxClasses["flixel.text._FlxText.FlxTextFormatRange"] = flixel_text__$FlxText_FlxTextFormatRange;
flixel_text__$FlxText_FlxTextFormatRange.__name__ = ["flixel","text","_FlxText","FlxTextFormatRange"];
flixel_text__$FlxText_FlxTextFormatRange.prototype = {
	__class__: flixel_text__$FlxText_FlxTextFormatRange
};
var flixel_text_FlxTextFormatMarkerPair = function(format,marker) {
	this.format = format;
	this.marker = marker;
};
$hxClasses["flixel.text.FlxTextFormatMarkerPair"] = flixel_text_FlxTextFormatMarkerPair;
flixel_text_FlxTextFormatMarkerPair.__name__ = ["flixel","text","FlxTextFormatMarkerPair"];
flixel_text_FlxTextFormatMarkerPair.prototype = {
	__class__: flixel_text_FlxTextFormatMarkerPair
};
var flixel_text_FlxTextBorderStyle = $hxClasses["flixel.text.FlxTextBorderStyle"] = { __ename__ : ["flixel","text","FlxTextBorderStyle"], __constructs__ : ["NONE","SHADOW","OUTLINE","OUTLINE_FAST"] };
flixel_text_FlxTextBorderStyle.NONE = ["NONE",0];
flixel_text_FlxTextBorderStyle.NONE.toString = $estr;
flixel_text_FlxTextBorderStyle.NONE.__enum__ = flixel_text_FlxTextBorderStyle;
flixel_text_FlxTextBorderStyle.SHADOW = ["SHADOW",1];
flixel_text_FlxTextBorderStyle.SHADOW.toString = $estr;
flixel_text_FlxTextBorderStyle.SHADOW.__enum__ = flixel_text_FlxTextBorderStyle;
flixel_text_FlxTextBorderStyle.OUTLINE = ["OUTLINE",2];
flixel_text_FlxTextBorderStyle.OUTLINE.toString = $estr;
flixel_text_FlxTextBorderStyle.OUTLINE.__enum__ = flixel_text_FlxTextBorderStyle;
flixel_text_FlxTextBorderStyle.OUTLINE_FAST = ["OUTLINE_FAST",3];
flixel_text_FlxTextBorderStyle.OUTLINE_FAST.toString = $estr;
flixel_text_FlxTextBorderStyle.OUTLINE_FAST.__enum__ = flixel_text_FlxTextBorderStyle;
var flixel_text__$FlxText_FlxTextAlign_$Impl_$ = {};
$hxClasses["flixel.text._FlxText.FlxTextAlign_Impl_"] = flixel_text__$FlxText_FlxTextAlign_$Impl_$;
flixel_text__$FlxText_FlxTextAlign_$Impl_$.__name__ = ["flixel","text","_FlxText","FlxTextAlign_Impl_"];
flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL = function(align) {
	switch(align) {
	case 0:
		return "center";
	case 2:
		return "justify";
	case 3:
		return "left";
	case 4:
		return "right";
	default:
		return "left";
	}
};
flixel_text__$FlxText_FlxTextAlign_$Impl_$.toOpenFL = function(align) {
	switch(align) {
	case "center":
		return 0;
	case "justify":
		return 2;
	case "left":
		return 3;
	case "right":
		return 4;
	default:
		return 3;
	}
};
var flixel_tile_FlxBaseTilemap = function() {
	this._collideIndex = 0;
	this._drawIndex = 0;
	this._startingIndex = 0;
	this._tileObjects = [];
	this.totalTiles = 0;
	this.heightInTiles = 0;
	this.widthInTiles = 0;
	this.auto = flixel_tile_FlxTilemapAutoTiling.OFF;
	flixel_FlxObject.call(this);
	this.flixelType = 3;
	this.set_immovable(true);
	this.set_moves(false);
};
$hxClasses["flixel.tile.FlxBaseTilemap"] = flixel_tile_FlxBaseTilemap;
flixel_tile_FlxBaseTilemap.__name__ = ["flixel","tile","FlxBaseTilemap"];
flixel_tile_FlxBaseTilemap.__super__ = flixel_FlxObject;
flixel_tile_FlxBaseTilemap.prototype = $extend(flixel_FlxObject.prototype,{
	updateTile: function(Index) {
		throw new js__$Boot_HaxeError("updateTile must be implemented");
	}
	,cacheGraphics: function(TileWidth,TileHeight,TileGraphic) {
		throw new js__$Boot_HaxeError("cacheGraphics must be implemented");
	}
	,initTileObjects: function() {
		throw new js__$Boot_HaxeError("initTileObjects must be implemented");
	}
	,updateMap: function() {
		throw new js__$Boot_HaxeError("updateMap must be implemented");
	}
	,computeDimensions: function() {
		throw new js__$Boot_HaxeError("computeDimensions must be implemented");
	}
	,getTileIndexByCoords: function(Coord) {
		throw new js__$Boot_HaxeError("getTileIndexByCoords must be implemented");
	}
	,getTileCoordsByIndex: function(Index,Midpoint) {
		if(Midpoint == null) {
			Midpoint = true;
		}
		throw new js__$Boot_HaxeError("getTileCoordsByIndex must be implemented");
	}
	,ray: function(Start,End,Result,Resolution) {
		if(Resolution == null) {
			Resolution = 1;
		}
		throw new js__$Boot_HaxeError("ray must be implemented");
	}
	,overlapsWithCallback: function(Object,Callback,FlipCallbackParams,Position) {
		if(FlipCallbackParams == null) {
			FlipCallbackParams = false;
		}
		throw new js__$Boot_HaxeError("overlapsWithCallback must be implemented");
	}
	,setDirty: function(Dirty) {
		if(Dirty == null) {
			Dirty = true;
		}
		throw new js__$Boot_HaxeError("setDirty must be implemented");
	}
	,destroy: function() {
		this._data = null;
		flixel_FlxObject.prototype.destroy.call(this);
	}
	,loadMapFromCSV: function(MapData,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		if(openfl_Assets.exists(MapData)) {
			MapData = openfl_Assets.getText(MapData);
		}
		this._data = [];
		var columns;
		var regex = new EReg("[ \t]*((\r\n)|\r|\n)[ \t]*","g");
		var lines = regex.split(MapData);
		var rows = lines.filter(function(line) {
			return line != "";
		});
		this.heightInTiles = rows.length;
		this.widthInTiles = 0;
		var row = 0;
		while(row < this.heightInTiles) {
			var rowString = rows[row];
			if(StringTools.endsWith(rowString,",")) {
				rowString = HxOverrides.substr(rowString,0,rowString.length - 1);
			}
			columns = rowString.split(",");
			if(columns.length == 0) {
				this.heightInTiles--;
				continue;
			}
			if(this.widthInTiles == 0) {
				this.widthInTiles = columns.length;
			}
			var column = 0;
			while(column < this.widthInTiles) {
				var columnString = columns[column];
				var curTile = Std.parseInt(columnString);
				if(curTile == null) {
					throw new js__$Boot_HaxeError("String in row " + row + ", column " + column + " is not a valid integer: \"" + columnString + "\"");
				}
				if(curTile < 0) {
					curTile = 0;
				}
				this._data.push(curTile);
				++column;
			}
			++row;
		}
		this.loadMapHelper(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
		return this;
	}
	,loadMapFromArray: function(MapData,WidthInTiles,HeightInTiles,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		this.widthInTiles = WidthInTiles;
		this.heightInTiles = HeightInTiles;
		this._data = MapData.slice();
		this.loadMapHelper(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
		return this;
	}
	,loadMapFrom2DArray: function(MapData,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		this.widthInTiles = MapData[0].length;
		this.heightInTiles = MapData.length;
		this._data = flixel_util_FlxArrayUtil.flatten2DArray_Int(MapData);
		this.loadMapHelper(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
		return this;
	}
	,loadMapFromGraphic: function(MapGraphic,Invert,Scale,ColorMap,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		if(Scale == null) {
			Scale = 1;
		}
		if(Invert == null) {
			Invert = false;
		}
		var mapBitmap = flixel_system_FlxAssets.resolveBitmapData(MapGraphic);
		var mapData = flixel_util_FlxStringUtil.bitmapToCSV(mapBitmap,Invert,Scale,ColorMap);
		return this.loadMapFromCSV(mapData,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
	}
	,loadMapHelper: function(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		this.totalTiles = this._data.length;
		this.auto = AutoTile == null ? flixel_tile_FlxTilemapAutoTiling.OFF : AutoTile;
		this._startingIndex = StartingIndex <= 0 ? 0 : StartingIndex;
		if(this.auto != flixel_tile_FlxTilemapAutoTiling.OFF) {
			this._startingIndex = 1;
			DrawIndex = 1;
			CollideIndex = 1;
		}
		this._drawIndex = DrawIndex;
		this._collideIndex = CollideIndex;
		this.applyAutoTile();
		this.applyCustomRemap();
		this.randomizeIndices();
		this.cacheGraphics(TileWidth,TileHeight,TileGraphic);
		this.postGraphicLoad();
	}
	,postGraphicLoad: function() {
		this.initTileObjects();
		this.computeDimensions();
		this.updateMap();
	}
	,applyAutoTile: function() {
		if(this.auto != flixel_tile_FlxTilemapAutoTiling.OFF) {
			var i = 0;
			while(i < this.totalTiles) this.autoTile(i++);
		}
	}
	,applyCustomRemap: function() {
		var i = 0;
		if(this.customTileRemap != null) {
			while(i < this.totalTiles) {
				var oldIndex = this._data[i];
				var newIndex = oldIndex;
				if(oldIndex < this.customTileRemap.length) {
					newIndex = this.customTileRemap[oldIndex];
				}
				this._data[i] = newIndex;
				++i;
			}
		}
	}
	,randomizeIndices: function() {
		var i = 0;
		if(this._randomIndices != null) {
			var randLambda = this._randomLambda != null ? this._randomLambda : function() {
				return flixel_FlxG.random["float"]();
			};
			while(i < this.totalTiles) {
				var oldIndex = this._data[i];
				var j = 0;
				var newIndex = oldIndex;
				var _g = 0;
				var _g1 = this._randomIndices;
				while(_g < _g1.length) {
					var rand = _g1[_g];
					++_g;
					if(oldIndex == rand) {
						var k = randLambda() * this._randomChoices[j].length | 0;
						newIndex = this._randomChoices[j][k];
					}
					++j;
				}
				this._data[i] = newIndex;
				++i;
			}
		}
	}
	,autoTile: function(Index) {
		if(this._data[Index] == 0) {
			return;
		}
		this._data[Index] = 0;
		if(Index - this.widthInTiles < 0 || this._data[Index - this.widthInTiles] > 0) {
			this._data[Index] += 1;
		}
		if(Index % this.widthInTiles >= this.widthInTiles - 1 || this._data[Index + 1] > 0) {
			this._data[Index] += 2;
		}
		if((Index + this.widthInTiles | 0) >= this.totalTiles || this._data[Index + this.widthInTiles] > 0) {
			this._data[Index] += 4;
		}
		if(Index % this.widthInTiles <= 0 || this._data[Index - 1] > 0) {
			this._data[Index] += 8;
		}
		if(this.auto == flixel_tile_FlxTilemapAutoTiling.ALT && this._data[Index] == 15) {
			if(Index % this.widthInTiles > 0 && (Index + this.widthInTiles | 0) < this.totalTiles && this._data[Index + this.widthInTiles - 1] <= 0) {
				this._data[Index] = 1;
			}
			if(Index % this.widthInTiles > 0 && Index - this.widthInTiles >= 0 && this._data[Index - this.widthInTiles - 1] <= 0) {
				this._data[Index] = 2;
			}
			if(Index % this.widthInTiles < this.widthInTiles - 1 && Index - this.widthInTiles >= 0 && this._data[Index - this.widthInTiles + 1] <= 0) {
				this._data[Index] = 4;
			}
			if(Index % this.widthInTiles < this.widthInTiles - 1 && (Index + this.widthInTiles | 0) < this.totalTiles && this._data[Index + this.widthInTiles + 1] <= 0) {
				this._data[Index] = 8;
			}
		}
		this._data[Index] += 1;
	}
	,setCustomTileMappings: function(mappings,randomIndices,randomChoices,randomLambda) {
		this.customTileRemap = mappings;
		this._randomIndices = randomIndices;
		this._randomChoices = randomChoices;
		this._randomLambda = randomLambda;
		if(this._randomIndices != null && (this._randomChoices == null || this._randomChoices.length == 0)) {
			throw new js__$Boot_HaxeError("You must provide valid 'randomChoices' if you wish to randomize tilemap indices, please read documentation of 'setCustomTileMappings' function.");
		}
	}
	,getTile: function(X,Y) {
		return this._data[Y * this.widthInTiles + X];
	}
	,getTileByIndex: function(Index) {
		return this._data[Index];
	}
	,getTileCollisions: function(Index) {
		return this._tileObjects[Index].allowCollisions;
	}
	,getTileInstances: function(Index) {
		var array = null;
		var i = 0;
		var l = this.widthInTiles * this.heightInTiles;
		while(i < l) {
			if(this._data[i] == Index) {
				if(array == null) {
					array = [];
				}
				array.push(i);
			}
			++i;
		}
		return array;
	}
	,setTile: function(X,Y,Tile,UpdateGraphics) {
		if(UpdateGraphics == null) {
			UpdateGraphics = true;
		}
		if(X >= this.widthInTiles || Y >= this.heightInTiles) {
			return false;
		}
		return this.setTileByIndex(Y * this.widthInTiles + X,Tile,UpdateGraphics);
	}
	,setTileByIndex: function(Index,Tile,UpdateGraphics) {
		if(UpdateGraphics == null) {
			UpdateGraphics = true;
		}
		if(Index >= this._data.length) {
			return false;
		}
		var ok = true;
		this._data[Index] = Tile;
		if(!UpdateGraphics) {
			return ok;
		}
		this.setDirty();
		if(this.auto == flixel_tile_FlxTilemapAutoTiling.OFF) {
			this.updateTile(this._data[Index]);
			return ok;
		}
		var i;
		var row = (Index / this.widthInTiles | 0) - 1;
		var rowLength = row + 3;
		var column = Index % this.widthInTiles - 1;
		var columnHeight = column + 3;
		while(row < rowLength) {
			column = columnHeight - 3;
			while(column < columnHeight) {
				if(row >= 0 && row < this.heightInTiles && column >= 0 && column < this.widthInTiles) {
					i = row * this.widthInTiles + column;
					this.autoTile(i);
					this.updateTile(this._data[i]);
				}
				++column;
			}
			++row;
		}
		return ok;
	}
	,setTileProperties: function(Tile,AllowCollisions,Callback,CallbackFilter,Range) {
		if(Range == null) {
			Range = 1;
		}
		if(AllowCollisions == null) {
			AllowCollisions = 4369;
		}
		if(Range <= 0) {
			Range = 1;
		}
		var tile;
		var i = Tile;
		var l = Tile + Range;
		var maxIndex = this._tileObjects.length;
		if(l > maxIndex) {
			throw new js__$Boot_HaxeError("Index " + l + " exceeds the maximum tile index of " + maxIndex + ". Please verify the Tile (" + Tile + ") and Range (" + Range + ") parameters.");
		}
		while(i < l) {
			tile = this._tileObjects[i++];
			tile.set_allowCollisions(AllowCollisions);
			tile.callbackFunction = Callback;
			tile.filter = CallbackFilter;
		}
	}
	,getData: function(Simple) {
		if(Simple == null) {
			Simple = false;
		}
		if(!Simple) {
			return this._data;
		}
		var i = 0;
		var l = this._data.length;
		var data = [];
		flixel_util_FlxArrayUtil.setLength_Int(data,l);
		while(i < l) {
			data[i] = this._tileObjects[this._data[i]].allowCollisions > 0 ? 1 : 0;
			++i;
		}
		return data;
	}
	,findPath: function(Start,End,Simplify,RaySimplify,DiagonalPolicy) {
		if(DiagonalPolicy == null) {
			DiagonalPolicy = 2;
		}
		if(RaySimplify == null) {
			RaySimplify = false;
		}
		if(Simplify == null) {
			Simplify = true;
		}
		var startIndex = this.getTileIndexByCoords(Start);
		var endIndex = this.getTileIndexByCoords(End);
		if(startIndex < 0 || endIndex < 0) {
			return null;
		}
		if(this._tileObjects[this._data[startIndex]].allowCollisions > 0 || this._tileObjects[this._data[endIndex]].allowCollisions > 0) {
			return null;
		}
		var distances = this.computePathDistance(startIndex,endIndex,DiagonalPolicy);
		if(distances == null) {
			return null;
		}
		var points = [];
		this.walkPath(distances,endIndex,points);
		var node = points[points.length - 1];
		node.set_x(Start.x);
		node.set_y(Start.y);
		if(Start._weak) {
			Start.put();
		}
		node = points[0];
		node.set_x(End.x);
		node.set_y(End.y);
		if(End._weak) {
			End.put();
		}
		if(Simplify) {
			this.simplifyPath(points);
		}
		if(RaySimplify) {
			this.raySimplifyPath(points);
		}
		var path = [];
		var i = points.length - 1;
		while(i >= 0) {
			node = points[i--];
			if(node != null) {
				path.push(node);
			}
		}
		return path;
	}
	,computePathDistance: function(StartIndex,EndIndex,DiagonalPolicy,StopOnEnd) {
		if(StopOnEnd == null) {
			StopOnEnd = true;
		}
		var mapSize = this.widthInTiles * this.heightInTiles;
		var distances = [];
		flixel_util_FlxArrayUtil.setLength_Int(distances,mapSize);
		var i = 0;
		while(i < mapSize) {
			if(this._tileObjects[this._data[i]].allowCollisions != 0) {
				distances[i] = -2;
			} else {
				distances[i] = -1;
			}
			++i;
		}
		distances[StartIndex] = 0;
		var distance = 1;
		var neighbors = [StartIndex];
		var current;
		var currentIndex;
		var left;
		var right;
		var up;
		var down;
		var currentLength;
		var foundEnd = false;
		while(neighbors.length > 0) {
			current = neighbors;
			neighbors = [];
			i = 0;
			currentLength = current.length;
			while(i < currentLength) {
				currentIndex = current[i++];
				if(currentIndex == (EndIndex | 0)) {
					foundEnd = true;
					if(StopOnEnd) {
						neighbors = [];
						break;
					}
				}
				left = currentIndex % this.widthInTiles > 0;
				right = currentIndex % this.widthInTiles < this.widthInTiles - 1;
				up = currentIndex / this.widthInTiles > 0;
				down = currentIndex / this.widthInTiles < this.heightInTiles - 1;
				var index;
				if(up) {
					index = currentIndex - this.widthInTiles;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(right) {
					index = currentIndex + 1;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(down) {
					index = currentIndex + this.widthInTiles;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(left) {
					index = currentIndex - 1;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(DiagonalPolicy != 0) {
					var wideDiagonal = DiagonalPolicy == 2;
					if(up && right) {
						index = currentIndex - this.widthInTiles + 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex - this.widthInTiles] >= -1 && distances[currentIndex + 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
					if(right && down) {
						index = currentIndex + this.widthInTiles + 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex + this.widthInTiles] >= -1 && distances[currentIndex + 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
					if(left && down) {
						index = currentIndex + this.widthInTiles - 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex + this.widthInTiles] >= -1 && distances[currentIndex - 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
					if(up && left) {
						index = currentIndex - this.widthInTiles - 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex - this.widthInTiles] >= -1 && distances[currentIndex - 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
				}
			}
			++distance;
		}
		if(!foundEnd) {
			distances = null;
		}
		return distances;
	}
	,walkPath: function(Data,Start,Points) {
		Points.push(this.getTileCoordsByIndex(Start));
		if(Data[Start] == 0) {
			return;
		}
		var left = Start % this.widthInTiles > 0;
		var right = Start % this.widthInTiles < this.widthInTiles - 1;
		var up = Start / this.widthInTiles > 0;
		var down = Start / this.widthInTiles < this.heightInTiles - 1;
		var current = Data[Start];
		var i;
		if(up) {
			i = Start - this.widthInTiles;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(right) {
			i = Start + 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(down) {
			i = Start + this.widthInTiles;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(left) {
			i = Start - 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(up && right) {
			i = Start - this.widthInTiles + 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(right && down) {
			i = Start + this.widthInTiles + 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(left && down) {
			i = Start + this.widthInTiles - 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(up && left) {
			i = Start - this.widthInTiles - 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		return;
	}
	,simplifyPath: function(Points) {
		var deltaPrevious;
		var deltaNext;
		var last = Points[0];
		var node;
		var i = 1;
		var l = Points.length - 1;
		while(i < l) {
			node = Points[i];
			deltaPrevious = (node.x - last.x) / (node.y - last.y);
			deltaNext = (node.x - Points[i + 1].x) / (node.y - Points[i + 1].y);
			if(last.x == Points[i + 1].x || last.y == Points[i + 1].y || deltaPrevious == deltaNext) {
				Points[i] = null;
			} else {
				last = node;
			}
			++i;
		}
	}
	,raySimplifyPath: function(Points) {
		var source = Points[0];
		var lastIndex = -1;
		var node;
		var i = 1;
		var l = Points.length;
		while(i < l) {
			node = Points[i++];
			if(node == null) {
				continue;
			}
			if(this.ray(source,node,this._point)) {
				if(lastIndex >= 0) {
					Points[lastIndex] = null;
				}
			} else {
				source = Points[lastIndex];
			}
			lastIndex = i - 1;
		}
	}
	,overlaps: function(ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.tilemapOverlapsCallback),group,0,0,InScreenSpace,Camera);
		} else if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3 ? this.overlapsWithCallback(ObjectOrGroup) : this.overlaps(ObjectOrGroup,false,null)) {
			return true;
		}
		return false;
	}
	,tilemapOverlapsCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3) {
			return this.overlapsWithCallback(ObjectOrGroup);
		} else {
			return this.overlaps(ObjectOrGroup,InScreenSpace,Camera);
		}
	}
	,overlapsAt: function(X,Y,ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.tilemapOverlapsAtCallback),group,X,Y,InScreenSpace,Camera);
		} else if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3 ? this.overlapsWithCallback(ObjectOrGroup,null,false,this._point.set(X,Y)) : this.overlapsAt(X,Y,ObjectOrGroup,InScreenSpace,Camera)) {
			return true;
		}
		return false;
	}
	,tilemapOverlapsAtCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3) {
			return this.overlapsWithCallback(ObjectOrGroup,null,false,this._point.set(X,Y));
		} else {
			return this.overlapsAt(X,Y,ObjectOrGroup,InScreenSpace,Camera);
		}
	}
	,overlapsPoint: function(WorldPoint,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		if(InScreenSpace) {
			if(Camera == null) {
				Camera = flixel_FlxG.camera;
			}
			WorldPoint.subtractPoint(Camera.scroll);
			if(WorldPoint._weak) {
				WorldPoint.put();
			}
		}
		return this.tileAtPointAllowsCollisions(WorldPoint);
	}
	,tileAtPointAllowsCollisions: function(point) {
		var tileIndex = this.getTileIndexByCoords(point);
		if(tileIndex < 0 || tileIndex >= this._data.length) {
			return false;
		}
		return this._tileObjects[this._data[tileIndex]].allowCollisions > 0;
	}
	,getBounds: function(Bounds) {
		if(Bounds == null) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			var rect = _this;
			rect._inPool = false;
			Bounds = rect;
		}
		var X = this.x;
		var Y = this.y;
		var Width = this.get_width();
		var Height = this.get_height();
		Bounds.x = X;
		Bounds.y = Y;
		Bounds.width = Width;
		Bounds.height = Height;
		return Bounds;
	}
	,__class__: flixel_tile_FlxBaseTilemap
});
var flixel_tile_FlxTilemapAutoTiling = $hxClasses["flixel.tile.FlxTilemapAutoTiling"] = { __ename__ : ["flixel","tile","FlxTilemapAutoTiling"], __constructs__ : ["OFF","AUTO","ALT"] };
flixel_tile_FlxTilemapAutoTiling.OFF = ["OFF",0];
flixel_tile_FlxTilemapAutoTiling.OFF.toString = $estr;
flixel_tile_FlxTilemapAutoTiling.OFF.__enum__ = flixel_tile_FlxTilemapAutoTiling;
flixel_tile_FlxTilemapAutoTiling.AUTO = ["AUTO",1];
flixel_tile_FlxTilemapAutoTiling.AUTO.toString = $estr;
flixel_tile_FlxTilemapAutoTiling.AUTO.__enum__ = flixel_tile_FlxTilemapAutoTiling;
flixel_tile_FlxTilemapAutoTiling.ALT = ["ALT",2];
flixel_tile_FlxTilemapAutoTiling.ALT.toString = $estr;
flixel_tile_FlxTilemapAutoTiling.ALT.__enum__ = flixel_tile_FlxTilemapAutoTiling;
var flixel_tile_FlxTileblock = function(X,Y,Width,Height) {
	flixel_FlxSprite.call(this,X,Y);
	this.makeGraphic(Width,Height,0,true);
	this.set_active(false);
	this.set_immovable(true);
	this.set_moves(false);
};
$hxClasses["flixel.tile.FlxTileblock"] = flixel_tile_FlxTileblock;
flixel_tile_FlxTileblock.__name__ = ["flixel","tile","FlxTileblock"];
flixel_tile_FlxTileblock.__super__ = flixel_FlxSprite;
flixel_tile_FlxTileblock.prototype = $extend(flixel_FlxSprite.prototype,{
	destroy: function() {
		this.tileSprite = flixel_util_FlxDestroyUtil.destroy(this.tileSprite);
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,loadFrames: function(tileFrames,empties) {
		if(empties == null) {
			empties = 0;
		}
		if(tileFrames == null) {
			return this;
		}
		this.tileSprite = this.tileSprite == null ? new flixel_FlxSprite() : this.tileSprite;
		this.tileSprite.set_frames(tileFrames);
		var spriteWidth = this.tileSprite.get_width() | 0;
		var spriteHeight = this.tileSprite.get_height() | 0;
		var total = this.tileSprite.numFrames + empties;
		var regen = false;
		if(this.get_width() % this.tileSprite.get_width() != 0) {
			this.set_width((this.get_width() / spriteWidth + 1 | 0) * spriteWidth);
			regen = true;
		}
		if(this.get_height() % this.tileSprite.get_height() != 0) {
			this.set_height((this.get_height() / spriteHeight + 1 | 0) * spriteHeight);
			regen = true;
		}
		if(regen) {
			this.makeGraphic(this.get_width() | 0,this.get_height() | 0,0,true);
		} else {
			flixel_util_FlxSpriteUtil.fill(this,0);
		}
		var row = 0;
		var column;
		var destinationX;
		var destinationY = 0;
		var widthInTiles = this.get_width() / spriteWidth | 0;
		var heightInTiles = this.get_height() / spriteHeight | 0;
		while(row < heightInTiles) {
			destinationX = 0;
			column = 0;
			while(column < widthInTiles) {
				if(flixel_FlxG.random["float"]() * total > empties) {
					this.tileSprite.animation.randomFrame();
					this.tileSprite.drawFrame();
					this.stamp(this.tileSprite,destinationX,destinationY);
				}
				destinationX += spriteWidth;
				++column;
			}
			destinationY += spriteHeight;
			++row;
		}
		this.dirty = true;
		return this;
	}
	,loadTiles: function(TileGraphic,TileWidth,TileHeight,Empties) {
		if(Empties == null) {
			Empties = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		if(TileGraphic == null) {
			return this;
		}
		var graph = flixel_FlxG.bitmap.add(TileGraphic);
		if(graph == null) {
			return this;
		}
		if(TileWidth == 0) {
			TileWidth = graph.height;
			if(TileWidth > graph.width) {
				TileWidth = graph.width;
			} else {
				TileWidth = TileWidth;
			}
		}
		if(TileHeight == 0) {
			TileHeight = TileWidth;
			if(TileHeight > graph.height) {
				TileHeight = graph.height;
			} else {
				TileHeight = TileHeight;
			}
		}
		var point = flixel_math_FlxPoint._pool.get().set(TileWidth,TileHeight);
		point._inPool = false;
		var tileFrames = flixel_graphics_frames_FlxTileFrames.fromGraphic(graph,point);
		return this.loadFrames(tileFrames,Empties);
	}
	,setTile: function(x,y,index) {
		this.tileSprite.animation.set_frameIndex(index);
		this.stamp(this.tileSprite,x * (this.tileSprite.get_width() | 0),y * (this.tileSprite.get_height() | 0));
		this.dirty = true;
	}
	,__class__: flixel_tile_FlxTileblock
});
var flixel_tweens_FlxEase = function() { };
$hxClasses["flixel.tweens.FlxEase"] = flixel_tweens_FlxEase;
flixel_tweens_FlxEase.__name__ = ["flixel","tweens","FlxEase"];
flixel_tweens_FlxEase.linear = function(t) {
	return t;
};
flixel_tweens_FlxEase.quadIn = function(t) {
	return t * t;
};
flixel_tweens_FlxEase.quadOut = function(t) {
	return -t * (t - 2);
};
flixel_tweens_FlxEase.quadInOut = function(t) {
	if(t <= .5) {
		return t * t * 2;
	} else {
		return 1 - --t * t * 2;
	}
};
flixel_tweens_FlxEase.cubeIn = function(t) {
	return t * t * t;
};
flixel_tweens_FlxEase.cubeOut = function(t) {
	return 1 + --t * t * t;
};
flixel_tweens_FlxEase.cubeInOut = function(t) {
	if(t <= .5) {
		return t * t * t * 4;
	} else {
		return 1 + --t * t * t * 4;
	}
};
flixel_tweens_FlxEase.quartIn = function(t) {
	return t * t * t * t;
};
flixel_tweens_FlxEase.quartOut = function(t) {
	return 1 - --t * t * t * t;
};
flixel_tweens_FlxEase.quartInOut = function(t) {
	if(t <= .5) {
		return t * t * t * t * 8;
	} else {
		t = t * 2 - 2;
		return (1 - t * t * t * t) / 2 + .5;
	}
};
flixel_tweens_FlxEase.quintIn = function(t) {
	return t * t * t * t * t;
};
flixel_tweens_FlxEase.quintOut = function(t) {
	return --t * t * t * t * t + 1;
};
flixel_tweens_FlxEase.quintInOut = function(t) {
	if((t *= 2) < 1) {
		return t * t * t * t * t / 2;
	} else {
		return ((t -= 2) * t * t * t * t + 2) / 2;
	}
};
flixel_tweens_FlxEase.smoothStepIn = function(t) {
	var t1 = t / 2;
	return 2 * (t1 * t1 * (t1 * -2 + 3));
};
flixel_tweens_FlxEase.smoothStepOut = function(t) {
	var t1 = t / 2 + 0.5;
	return 2 * (t1 * t1 * (t1 * -2 + 3)) - 1;
};
flixel_tweens_FlxEase.smoothStepInOut = function(t) {
	return t * t * (t * -2 + 3);
};
flixel_tweens_FlxEase.smootherStepIn = function(t) {
	var t1 = t / 2;
	return 2 * (t1 * t1 * t1 * (t1 * (t1 * 6 - 15) + 10));
};
flixel_tweens_FlxEase.smootherStepOut = function(t) {
	var t1 = t / 2 + 0.5;
	return 2 * (t1 * t1 * t1 * (t1 * (t1 * 6 - 15) + 10)) - 1;
};
flixel_tweens_FlxEase.smootherStepInOut = function(t) {
	return t * t * t * (t * (t * 6 - 15) + 10);
};
flixel_tweens_FlxEase.sineIn = function(t) {
	return -Math.cos(flixel_tweens_FlxEase.PI2 * t) + 1;
};
flixel_tweens_FlxEase.sineOut = function(t) {
	return Math.sin(flixel_tweens_FlxEase.PI2 * t);
};
flixel_tweens_FlxEase.sineInOut = function(t) {
	return -Math.cos(Math.PI * t) / 2 + .5;
};
flixel_tweens_FlxEase.bounceIn = function(t) {
	t = 1 - t;
	if(t < flixel_tweens_FlxEase.B1) {
		return 1 - 7.5625 * t * t;
	}
	if(t < flixel_tweens_FlxEase.B2) {
		return 1 - (7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75);
	}
	if(t < flixel_tweens_FlxEase.B4) {
		return 1 - (7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375);
	}
	return 1 - (7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375);
};
flixel_tweens_FlxEase.bounceOut = function(t) {
	if(t < flixel_tweens_FlxEase.B1) {
		return 7.5625 * t * t;
	}
	if(t < flixel_tweens_FlxEase.B2) {
		return 7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75;
	}
	if(t < flixel_tweens_FlxEase.B4) {
		return 7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375;
	}
	return 7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375;
};
flixel_tweens_FlxEase.bounceInOut = function(t) {
	if(t < .5) {
		t = 1 - t * 2;
		if(t < flixel_tweens_FlxEase.B1) {
			return (1 - 7.5625 * t * t) / 2;
		}
		if(t < flixel_tweens_FlxEase.B2) {
			return (1 - (7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75)) / 2;
		}
		if(t < flixel_tweens_FlxEase.B4) {
			return (1 - (7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375)) / 2;
		}
		return (1 - (7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375)) / 2;
	}
	t = t * 2 - 1;
	if(t < flixel_tweens_FlxEase.B1) {
		return 7.5625 * t * t / 2 + .5;
	}
	if(t < flixel_tweens_FlxEase.B2) {
		return (7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75) / 2 + .5;
	}
	if(t < flixel_tweens_FlxEase.B4) {
		return (7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375) / 2 + .5;
	}
	return (7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375) / 2 + .5;
};
flixel_tweens_FlxEase.circIn = function(t) {
	return -(Math.sqrt(1 - t * t) - 1);
};
flixel_tweens_FlxEase.circOut = function(t) {
	return Math.sqrt(1 - (t - 1) * (t - 1));
};
flixel_tweens_FlxEase.circInOut = function(t) {
	if(t <= .5) {
		return (Math.sqrt(1 - t * t * 4) - 1) / -2;
	} else {
		return (Math.sqrt(1 - (t * 2 - 2) * (t * 2 - 2)) + 1) / 2;
	}
};
flixel_tweens_FlxEase.expoIn = function(t) {
	return Math.pow(2,10 * (t - 1));
};
flixel_tweens_FlxEase.expoOut = function(t) {
	return -Math.pow(2,-10 * t) + 1;
};
flixel_tweens_FlxEase.expoInOut = function(t) {
	if(t < .5) {
		return Math.pow(2,10 * (t * 2 - 1)) / 2;
	} else {
		return (-Math.pow(2,-10 * (t * 2 - 1)) + 2) / 2;
	}
};
flixel_tweens_FlxEase.backIn = function(t) {
	return t * t * (2.70158 * t - 1.70158);
};
flixel_tweens_FlxEase.backOut = function(t) {
	return 1 - --t * t * (-2.70158 * t - 1.70158);
};
flixel_tweens_FlxEase.backInOut = function(t) {
	t *= 2;
	if(t < 1) {
		return t * t * (2.70158 * t - 1.70158) / 2;
	}
	--t;
	return (1 - --t * t * (-2.70158 * t - 1.70158)) / 2 + .5;
};
flixel_tweens_FlxEase.elasticIn = function(t) {
	return -(flixel_tweens_FlxEase.ELASTIC_AMPLITUDE * Math.pow(2,10 * --t) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / (2 * Math.PI) * Math.asin(1 / flixel_tweens_FlxEase.ELASTIC_AMPLITUDE)) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD));
};
flixel_tweens_FlxEase.elasticOut = function(t) {
	return flixel_tweens_FlxEase.ELASTIC_AMPLITUDE * Math.pow(2,-10 * t) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / (2 * Math.PI) * Math.asin(1 / flixel_tweens_FlxEase.ELASTIC_AMPLITUDE)) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD) + 1;
};
flixel_tweens_FlxEase.elasticInOut = function(t) {
	if(t < 0.5) {
		return -0.5 * (Math.pow(2,10 * (t -= 0.5)) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / 4) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD));
	}
	return Math.pow(2,-10 * (t -= 0.5)) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / 4) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD) * 0.5 + 1;
};
var flixel_tweens_FlxTween = function(Options,manager) {
	this._waitingForRestart = false;
	this._running = false;
	this._delayToUse = 0;
	this._secondsSinceStart = 0;
	this.loopDelay = 0;
	this.startDelay = 0;
	this.executions = 0;
	this.scale = 0;
	this.duration = 0;
	this.active = false;
	Options = this.resolveTweenOptions(Options);
	this.set_type(Options.type);
	this.onStart = Options.onStart;
	this.onUpdate = Options.onUpdate;
	this.onComplete = Options.onComplete;
	this.ease = Options.ease;
	this.setDelays(Options.startDelay,Options.loopDelay);
	this.manager = manager != null ? manager : flixel_tweens_FlxTween.globalManager;
};
$hxClasses["flixel.tweens.FlxTween"] = flixel_tweens_FlxTween;
flixel_tweens_FlxTween.__name__ = ["flixel","tweens","FlxTween"];
flixel_tweens_FlxTween.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_tweens_FlxTween.globalManager = null;
flixel_tweens_FlxTween.tween = function(Object,Values,Duration,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.tween(Object,Values,Duration,Options);
};
flixel_tweens_FlxTween.num = function(FromValue,ToValue,Duration,Options,TweenFunction) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.num(FromValue,ToValue,Duration,Options,TweenFunction);
};
flixel_tweens_FlxTween.angle = function(Sprite,FromAngle,ToAngle,Duration,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.angle(Sprite,FromAngle,ToAngle,Duration,Options);
};
flixel_tweens_FlxTween.color = function(Sprite,Duration,FromColor,ToColor,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.color(Sprite,Duration,FromColor,ToColor,Options);
};
flixel_tweens_FlxTween.linearMotion = function(Object,FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.linearMotion(Object,FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.quadMotion = function(Object,FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.quadMotion(Object,FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.cubicMotion = function(Object,FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.cubicMotion(Object,FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration,Options);
};
flixel_tweens_FlxTween.circularMotion = function(Object,CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.circularMotion(Object,CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.linearPath = function(Object,Points,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.linearPath(Object,Points,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.quadPath = function(Object,Points,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.quadPath(Object,Points,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.prototype = {
	resolveTweenOptions: function(Options) {
		if(Options == null) {
			Options = { type : 8};
		}
		if(Options.type == null) {
			Options.type = 8;
		}
		return Options;
	}
	,destroy: function() {
		this.onStart = null;
		this.onUpdate = null;
		this.onComplete = null;
		this.ease = null;
		this.manager = null;
		this._chainedTweens = null;
		this._nextTweenInChain = null;
	}
	,then: function(tween) {
		return this.addChainedTween(tween);
	}
	,wait: function(delay) {
		return this.addChainedTween(flixel_tweens_FlxTween.num(0,0,delay));
	}
	,addChainedTween: function(tween) {
		tween.setVarsOnEnd();
		tween.manager.remove(tween,false);
		if(this._chainedTweens == null) {
			this._chainedTweens = [];
		}
		this._chainedTweens.push(tween);
		return this;
	}
	,update: function(elapsed) {
		this._secondsSinceStart += elapsed;
		var delay = this.executions > 0 ? this.loopDelay : this.startDelay;
		if(this._secondsSinceStart < delay) {
			return;
		}
		this.scale = Math.max(this._secondsSinceStart - delay,0) / this.duration;
		if(this.ease != null) {
			this.scale = this.ease(this.scale);
		}
		if(this.backward) {
			this.scale = 1 - this.scale;
		}
		if(this._secondsSinceStart > delay && !this._running) {
			this._running = true;
			if(this.onStart != null) {
				this.onStart(this);
			}
		}
		if(this._secondsSinceStart >= this.duration + delay) {
			this.scale = this.backward ? 0 : 1;
			this.finished = true;
		} else if(this.onUpdate != null) {
			this.onUpdate(this);
		}
	}
	,start: function() {
		this._waitingForRestart = false;
		this._secondsSinceStart = 0;
		this._delayToUse = this.executions > 0 ? this.loopDelay : this.startDelay;
		if(this.duration == 0) {
			this.set_active(false);
			return this;
		}
		this.set_active(true);
		this._running = false;
		this.finished = false;
		return this;
	}
	,cancel: function() {
		this.onEnd();
		if(this.manager != null) {
			this.manager.remove(this);
		}
	}
	,cancelChain: function() {
		if(this._nextTweenInChain != null) {
			this._nextTweenInChain.cancelChain();
		}
		if(this._chainedTweens != null) {
			this._chainedTweens = null;
		}
		this.cancel();
	}
	,finish: function() {
		this.executions++;
		if(this.onComplete != null) {
			this.onComplete(this);
		}
		var type = this.type & -17;
		if(type == 1 || type == 8) {
			this.onEnd();
			this._secondsSinceStart = this.duration + this.startDelay;
			if(type == 8 && this.manager != null) {
				this.manager.remove(this);
			}
		}
		if(type == 2 || type == 4) {
			this._secondsSinceStart = (this._secondsSinceStart - this._delayToUse) % this.duration + this._delayToUse;
			this.scale = Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration;
			if(this.ease != null && this.scale > 0 && this.scale < 1) {
				this.scale = this.ease(this.scale);
			}
			if(type == 4) {
				this.backward = !this.backward;
				if(this.backward) {
					this.scale = 1 - this.scale;
				}
			}
			this.restart();
		}
	}
	,onEnd: function() {
		this.setVarsOnEnd();
		this.processTweenChain();
	}
	,setVarsOnEnd: function() {
		this.set_active(false);
		this._running = false;
		this.finished = true;
	}
	,processTweenChain: function() {
		if(this._chainedTweens == null || this._chainedTweens.length <= 0) {
			return;
		}
		this._nextTweenInChain = this._chainedTweens.shift();
		this.doNextTween(this._nextTweenInChain);
		this._chainedTweens = null;
	}
	,doNextTween: function(tween) {
		if(!tween.active) {
			tween.start();
			this.manager.add_flixel_tweens_FlxTween(tween);
		}
		tween.setChain(this._chainedTweens);
	}
	,setChain: function(previousChain) {
		if(previousChain == null) {
			return;
		}
		if(this._chainedTweens == null) {
			this._chainedTweens = previousChain;
		} else {
			this._chainedTweens = this._chainedTweens.concat(previousChain);
		}
	}
	,restart: function() {
		if(this.active) {
			this.start();
		} else {
			this._waitingForRestart = true;
		}
	}
	,setDelays: function(StartDelay,LoopDelay) {
		this.set_startDelay(StartDelay != null ? StartDelay : 0);
		this.set_loopDelay(LoopDelay != null ? LoopDelay : 0);
		return this;
	}
	,set_startDelay: function(value) {
		var dly = Math.abs(value);
		if(this.executions == 0) {
			this._secondsSinceStart = this.duration * (Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration) + Math.max(dly - this.startDelay,0);
			this._delayToUse = dly;
		}
		return this.startDelay = dly;
	}
	,set_loopDelay: function(value) {
		var dly = Math.abs(value);
		if(this.executions > 0) {
			this._secondsSinceStart = this.duration * (Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration) + Math.max(dly - this.loopDelay,0);
			this._delayToUse = dly;
		}
		return this.loopDelay = dly;
	}
	,get_percent: function() {
		return Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration;
	}
	,set_percent: function(value) {
		return this._secondsSinceStart = this.duration * value + this._delayToUse;
	}
	,set_type: function(value) {
		if(value == 0) {
			value = 8;
		} else if(value == 16) {
			value = 17;
		}
		this.backward = (value & 16) > 0;
		return this.type = value;
	}
	,set_active: function(active) {
		this.active = active;
		if(this._waitingForRestart) {
			this.restart();
		}
		return active;
	}
	,__class__: flixel_tweens_FlxTween
	,__properties__: {set_loopDelay:"set_loopDelay",set_startDelay:"set_startDelay",set_percent:"set_percent",get_percent:"get_percent",set_type:"set_type",set_active:"set_active"}
};
var flixel_tweens_FlxTweenManager = function() {
	this._tweens = [];
	flixel_FlxBasic.call(this);
	this.set_visible(false);
	flixel_FlxG.signals.stateSwitched.add($bind(this,this.clear));
};
$hxClasses["flixel.tweens.FlxTweenManager"] = flixel_tweens_FlxTweenManager;
flixel_tweens_FlxTweenManager.__name__ = ["flixel","tweens","FlxTweenManager"];
flixel_tweens_FlxTweenManager.__super__ = flixel_FlxBasic;
flixel_tweens_FlxTweenManager.prototype = $extend(flixel_FlxBasic.prototype,{
	add_flixel_tweens_motion_QuadPath: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_LinearPath: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_CircularMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_CubicMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_QuadMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_LinearMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_ColorTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_AngleTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_NumTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_VarTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_FlxTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,tween: function(Object,Values,Duration,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_VarTween(Options,this);
		tween.tween(Object,Values,Duration);
		return this.add_flixel_tweens_misc_VarTween(tween);
	}
	,num: function(FromValue,ToValue,Duration,Options,TweenFunction) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_NumTween(Options,this);
		tween.tween(FromValue,ToValue,Duration,TweenFunction);
		return this.add_flixel_tweens_misc_NumTween(tween);
	}
	,angle: function(Sprite,FromAngle,ToAngle,Duration,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_AngleTween(Options,this);
		tween.tween(FromAngle,ToAngle,Duration,Sprite);
		return this.add_flixel_tweens_misc_AngleTween(tween);
	}
	,color: function(Sprite,Duration,FromColor,ToColor,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_ColorTween(Options,this);
		tween.tween(Duration,FromColor,ToColor,Sprite);
		return this.add_flixel_tweens_misc_ColorTween(tween);
	}
	,linearMotion: function(Object,FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_LinearMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_LinearMotion(tween);
	}
	,quadMotion: function(Object,FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_QuadMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_QuadMotion(tween);
	}
	,cubicMotion: function(Object,FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_motion_CubicMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration);
		return this.add_flixel_tweens_motion_CubicMotion(tween);
	}
	,circularMotion: function(Object,CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_CircularMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_CircularMotion(tween);
	}
	,linearPath: function(Object,Points,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_LinearPath(Options,this);
		if(Points != null) {
			var _g = 0;
			while(_g < Points.length) {
				var point = Points[_g];
				++_g;
				tween.addPoint(point.x,point.y);
			}
		}
		tween.setObject(Object);
		tween.setMotion(DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_LinearPath(tween);
	}
	,quadPath: function(Object,Points,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_QuadPath(Options,this);
		if(Points != null) {
			var _g = 0;
			while(_g < Points.length) {
				var point = Points[_g];
				++_g;
				tween.addPoint(point.x,point.y);
			}
		}
		tween.setObject(Object);
		tween.setMotion(DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_QuadPath(tween);
	}
	,destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		flixel_FlxG.signals.stateSwitched.remove($bind(this,this.clear));
	}
	,update: function(elapsed) {
		var finishedTweens = null;
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			if(!tween.active) {
				continue;
			}
			tween.update(elapsed);
			if(tween.finished) {
				if(finishedTweens == null) {
					finishedTweens = [];
				}
				finishedTweens.push(tween);
			}
		}
		if(finishedTweens != null) {
			while(finishedTweens.length > 0) finishedTweens.shift().finish();
		}
	}
	,remove: function(Tween,Destroy) {
		if(Destroy == null) {
			Destroy = true;
		}
		if(Tween == null) {
			return null;
		}
		Tween.set_active(false);
		if(Destroy) {
			Tween.destroy();
		}
		var array = this._tweens;
		var index = array.indexOf(Tween);
		if(index != -1) {
			array[index] = array[array.length - 1];
			array.pop();
		}
		return Tween;
	}
	,clear: function() {
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			if(tween != null) {
				tween.set_active(false);
				tween.destroy();
			}
		}
		this._tweens.splice(0,this._tweens.length);
	}
	,completeAll: function() {
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			if((tween.type & 2) == 0 && (tween.type & 4) == 0 && tween.active) {
				tween.update(1.79e+308);
			}
		}
	}
	,forEach: function(Function) {
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			Function(tween);
		}
	}
	,__class__: flixel_tweens_FlxTweenManager
});
var flixel_tweens_misc_AngleTween = function(Options,manager) {
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.AngleTween"] = flixel_tweens_misc_AngleTween;
flixel_tweens_misc_AngleTween.__name__ = ["flixel","tweens","misc","AngleTween"];
flixel_tweens_misc_AngleTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_AngleTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this.sprite = null;
	}
	,tween: function(FromAngle,ToAngle,Duration,Sprite) {
		this._start = this.angle = FromAngle;
		this._range = ToAngle - this.angle;
		this.duration = Duration;
		this.sprite = Sprite;
		if(this.sprite != null) {
			this.sprite.set_angle(this.angle % 360);
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		this.angle = this._start + this._range * this.scale;
		if(this.sprite != null) {
			var spriteAngle = this.angle % 360;
			this.sprite.set_angle(spriteAngle);
		}
	}
	,__class__: flixel_tweens_misc_AngleTween
});
var flixel_tweens_misc_ColorTween = function(Options,manager) {
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.ColorTween"] = flixel_tweens_misc_ColorTween;
flixel_tweens_misc_ColorTween.__name__ = ["flixel","tweens","misc","ColorTween"];
flixel_tweens_misc_ColorTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_ColorTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this.sprite = null;
	}
	,tween: function(Duration,FromColor,ToColor,Sprite) {
		this.color = this.startColor = FromColor;
		this.endColor = ToColor;
		this.duration = Duration;
		this.sprite = Sprite;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		var Color1 = this.startColor;
		var Color2 = this.endColor;
		var Factor = this.scale;
		var r = ((Color2 >> 16 & 255) - (Color1 >> 16 & 255)) * Factor + (Color1 >> 16 & 255) | 0;
		var g = ((Color2 >> 8 & 255) - (Color1 >> 8 & 255)) * Factor + (Color1 >> 8 & 255) | 0;
		var b = ((Color2 & 255) - (Color1 & 255)) * Factor + (Color1 & 255) | 0;
		var a = ((Color2 >> 24 & 255) - (Color1 >> 24 & 255)) * Factor + (Color1 >> 24 & 255) | 0;
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		color &= -16711681;
		color |= (r > 255 ? 255 : r < 0 ? 0 : r) << 16;
		color &= -65281;
		color |= (g > 255 ? 255 : g < 0 ? 0 : g) << 8;
		color &= -256;
		color |= b > 255 ? 255 : b < 0 ? 0 : b;
		color &= 16777215;
		color |= (a > 255 ? 255 : a < 0 ? 0 : a) << 24;
		this.color = color;
		if(this.sprite != null) {
			this.sprite.set_color(this.color);
			this.sprite.set_alpha((this.color >> 24 & 255) / 255);
		}
	}
	,__class__: flixel_tweens_misc_ColorTween
});
var flixel_tweens_misc_NumTween = function(Options,manager) {
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.NumTween"] = flixel_tweens_misc_NumTween;
flixel_tweens_misc_NumTween.__name__ = ["flixel","tweens","misc","NumTween"];
flixel_tweens_misc_NumTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_NumTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this._tweenFunction = null;
	}
	,tween: function(fromValue,toValue,duration,tweenFunction) {
		this._tweenFunction = tweenFunction;
		this._start = this.value = fromValue;
		this._range = toValue - this.value;
		this.duration = duration;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		this.value = this._start + this._range * this.scale;
		if(this._tweenFunction != null) {
			this._tweenFunction(this.value);
		}
	}
	,__class__: flixel_tweens_misc_NumTween
});
var flixel_tweens_misc_VarTween = function(Options,manager) {
	this._propertyInfos = [];
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.VarTween"] = flixel_tweens_misc_VarTween;
flixel_tweens_misc_VarTween.__name__ = ["flixel","tweens","misc","VarTween"];
flixel_tweens_misc_VarTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_VarTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this._object = null;
		this._properties = null;
	}
	,tween: function(object,properties,duration) {
		this._object = object;
		this._properties = properties;
		this.duration = duration;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		var delay = this.executions > 0 ? this.loopDelay : this.startDelay;
		if(this._secondsSinceStart < delay) {
			flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		} else {
			if(this._propertyInfos.length == 0) {
				this.initializeVars();
			}
			flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
			var _g = 0;
			var _g1 = this._propertyInfos;
			while(_g < _g1.length) {
				var info = _g1[_g];
				++_g;
				Reflect.setProperty(this._object,info.name,info.startValue + info.range * this.scale);
			}
		}
	}
	,initializeVars: function() {
		var fields;
		if(Reflect.isObject(this._properties)) {
			fields = Reflect.fields(this._properties);
		} else {
			throw new js__$Boot_HaxeError("Unsupported properties container - use an object containing key/value pairs.");
		}
		var _g = 0;
		while(_g < fields.length) {
			var p = fields[_g];
			++_g;
			if(Reflect.getProperty(this._object,p) == null) {
				throw new js__$Boot_HaxeError("The Object does not have the property \"" + p + "\"");
			}
			var a = Reflect.getProperty(this._object,p);
			if(isNaN(a)) {
				throw new js__$Boot_HaxeError("The property \"" + p + "\" is not numeric.");
			}
			this._propertyInfos.push({ name : p, startValue : a, range : Reflect.getProperty(this._properties,p) - a});
		}
	}
	,__class__: flixel_tweens_misc_VarTween
});
var flixel_tweens_motion_Motion = function(Options,manager) {
	this.y = 0;
	this.x = 0;
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.Motion"] = flixel_tweens_motion_Motion;
flixel_tweens_motion_Motion.__name__ = ["flixel","tweens","motion","Motion"];
flixel_tweens_motion_Motion.__super__ = flixel_tweens_FlxTween;
flixel_tweens_motion_Motion.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this._object = null;
	}
	,setObject: function(object) {
		this._object = object;
		this._wasObjectImmovable = this._object.immovable;
		this._object.set_immovable(true);
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		this.postUpdate();
	}
	,onEnd: function() {
		this._object.set_immovable(this._wasObjectImmovable);
		flixel_tweens_FlxTween.prototype.onEnd.call(this);
	}
	,postUpdate: function() {
		if(this._object != null) {
			this._object.setPosition(this.x,this.y);
		}
	}
	,__class__: flixel_tweens_motion_Motion
});
var flixel_tweens_motion_CircularMotion = function(Options,manager) {
	this._angleFinish = 0;
	this._angleStart = 0;
	this._radius = 0;
	this._centerY = 0;
	this._centerX = 0;
	this.angle = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.CircularMotion"] = flixel_tweens_motion_CircularMotion;
flixel_tweens_motion_CircularMotion.__name__ = ["flixel","tweens","motion","CircularMotion"];
flixel_tweens_motion_CircularMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_CircularMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this._centerX = CenterX;
		this._centerY = CenterY;
		this._radius = Radius;
		this.angle = this._angleStart = Angle * Math.PI / -180;
		this._angleFinish = Math.PI * 2 * (Clockwise ? 1 : -1);
		if(UseDuration) {
			this.duration = DurationOrSpeed;
		} else {
			this.duration = this._radius * (Math.PI * 2) / DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.angle = this._angleStart + this._angleFinish * this.scale;
		this.x = this._centerX + Math.cos(this.angle) * this._radius;
		this.y = this._centerY + Math.sin(this.angle) * this._radius;
		if(this.finished) {
			this.postUpdate();
		}
	}
	,get_circumference: function() {
		return this._radius * (Math.PI * 2);
	}
	,__class__: flixel_tweens_motion_CircularMotion
	,__properties__: $extend(flixel_tweens_motion_Motion.prototype.__properties__,{get_circumference:"get_circumference"})
});
var flixel_tweens_motion_CubicMotion = function(Options,manager) {
	this._tt = 0;
	this._ttt = 0;
	this._bY = 0;
	this._bX = 0;
	this._aY = 0;
	this._aX = 0;
	this._toY = 0;
	this._toX = 0;
	this._fromY = 0;
	this._fromX = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.CubicMotion"] = flixel_tweens_motion_CubicMotion;
flixel_tweens_motion_CubicMotion.__name__ = ["flixel","tweens","motion","CubicMotion"];
flixel_tweens_motion_CubicMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_CubicMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(fromX,fromY,aX,aY,bX,bY,toX,toY,duration) {
		this.x = this._fromX = fromX;
		this.y = this._fromY = fromY;
		this._aX = aX;
		this._aY = aY;
		this._bX = bX;
		this._bY = bY;
		this._toX = toX;
		this._toY = toY;
		this.duration = duration;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.x = this.scale * this.scale * this.scale * (this._toX + 3 * (this._aX - this._bX) - this._fromX) + 3 * this.scale * this.scale * (this._fromX - 2 * this._aX + this._bX) + 3 * this.scale * (this._aX - this._fromX) + this._fromX;
		this.y = this.scale * this.scale * this.scale * (this._toY + 3 * (this._aY - this._bY) - this._fromY) + 3 * this.scale * this.scale * (this._fromY - 2 * this._aY + this._bY) + 3 * this.scale * (this._aY - this._fromY) + this._fromY;
		if(this.finished) {
			this.postUpdate();
		}
	}
	,__class__: flixel_tweens_motion_CubicMotion
});
var flixel_tweens_motion_LinearMotion = function(Options,manager) {
	this._distance = -1;
	this._moveY = 0;
	this._moveX = 0;
	this._fromY = 0;
	this._fromX = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.LinearMotion"] = flixel_tweens_motion_LinearMotion;
flixel_tweens_motion_LinearMotion.__name__ = ["flixel","tweens","motion","LinearMotion"];
flixel_tweens_motion_LinearMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_LinearMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this._distance = -1;
		this.x = this._fromX = FromX;
		this.y = this._fromY = FromY;
		this._moveX = ToX - FromX;
		this._moveY = ToY - FromY;
		if(UseDuration) {
			this.duration = DurationOrSpeed;
		} else {
			this.duration = this.get_distance() / DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.x = this._fromX + this._moveX * this.scale;
		this.y = this._fromY + this._moveY * this.scale;
		if(this.x == this._fromX + this._moveX && this.y == this._fromY + this._moveY && this.active && this._secondsSinceStart >= this.duration) {
			this.finished = true;
		}
		if(this.finished) {
			this.postUpdate();
		}
	}
	,get_distance: function() {
		if(this._distance >= 0) {
			return this._distance;
		}
		return this._distance = Math.sqrt(this._moveX * this._moveX + this._moveY * this._moveY);
	}
	,__class__: flixel_tweens_motion_LinearMotion
	,__properties__: $extend(flixel_tweens_motion_Motion.prototype.__properties__,{get_distance:"get_distance"})
});
var flixel_tweens_motion_LinearPath = function(Options,manager) {
	this._index = 0;
	this._speed = 0;
	this.distance = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
	this.points = [];
	this._pointD = [0];
	this._pointT = [0];
};
$hxClasses["flixel.tweens.motion.LinearPath"] = flixel_tweens_motion_LinearPath;
flixel_tweens_motion_LinearPath.__name__ = ["flixel","tweens","motion","LinearPath"];
flixel_tweens_motion_LinearPath.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_LinearPath.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	destroy: function() {
		flixel_tweens_motion_Motion.prototype.destroy.call(this);
		var _g = 0;
		var _g1 = this.points;
		while(_g < _g1.length) {
			var point = _g1[_g];
			++_g;
			point = flixel_util_FlxDestroyUtil.put(point);
		}
		this._last = flixel_util_FlxDestroyUtil.put(this._last);
		this._prevPoint = flixel_util_FlxDestroyUtil.put(this._prevPoint);
		this._nextPoint = flixel_util_FlxDestroyUtil.put(this._nextPoint);
	}
	,setMotion: function(DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this.updatePath();
		if(UseDuration) {
			this.duration = DurationOrSpeed;
			this._speed = this.distance / DurationOrSpeed;
		} else {
			this.duration = this.distance / DurationOrSpeed;
			this._speed = DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,addPoint: function(x,y) {
		if(y == null) {
			y = 0;
		}
		if(x == null) {
			x = 0;
		}
		if(this._last != null) {
			this.distance += Math.sqrt((x - this._last.x) * (x - this._last.x) + (y - this._last.y) * (y - this._last.y));
			this._pointD[this.points.length] = this.distance;
		}
		var tmp = this.points;
		var tmp1 = this.points.length;
		var point = flixel_math_FlxPoint._pool.get().set(x,y);
		point._inPool = false;
		tmp[tmp1] = this._last = point;
		return this;
	}
	,getPoint: function(index) {
		if(index == null) {
			index = 0;
		}
		if(this.points.length == 0) {
			throw new js__$Boot_HaxeError("No points have been added to the path yet.");
		}
		return this.points[index % this.points.length];
	}
	,start: function() {
		this._index = this.backward ? this.points.length - 1 : 0;
		flixel_tweens_motion_Motion.prototype.start.call(this);
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		var td;
		var tt;
		if(this.points == null) {
			return;
		}
		if(!this.backward) {
			if(this._index < this.points.length - 1) {
				while(this.scale > this._pointT[this._index + 1]) {
					this._index++;
					if(this._index == this.points.length - 1) {
						this._index -= 1;
						break;
					}
				}
			}
			td = this._pointT[this._index];
			tt = this._pointT[this._index + 1] - td;
			td = (this.scale - td) / tt;
			this._prevPoint = this.points[this._index];
			this._nextPoint = this.points[this._index + 1];
			this.x = this._prevPoint.x + (this._nextPoint.x - this._prevPoint.x) * td;
			this.y = this._prevPoint.y + (this._nextPoint.y - this._prevPoint.y) * td;
		} else {
			if(this._index > 0) {
				while(this.scale < this._pointT[this._index - 1]) {
					this._index -= 1;
					if(this._index == 0) {
						this._index += 1;
						break;
					}
				}
			}
			td = this._pointT[this._index];
			tt = this._pointT[this._index - 1] - td;
			td = (this.scale - td) / tt;
			this._prevPoint = this.points[this._index];
			this._nextPoint = this.points[this._index - 1];
			this.x = this._prevPoint.x + (this._nextPoint.x - this._prevPoint.x) * td;
			this.y = this._prevPoint.y + (this._nextPoint.y - this._prevPoint.y) * td;
		}
		flixel_tweens_motion_Motion.prototype.postUpdate.call(this);
	}
	,updatePath: function() {
		if(this.points.length < 2) {
			throw new js__$Boot_HaxeError("A LinearPath must have at least 2 points to operate.");
		}
		if(this._pointD.length == this._pointT.length) {
			return;
		}
		var i = 0;
		while(i < this.points.length) this._pointT[i] = this._pointD[i++] / this.distance;
	}
	,__class__: flixel_tweens_motion_LinearPath
});
var flixel_tweens_motion_QuadMotion = function(Options,manager) {
	this._controlY = 0;
	this._controlX = 0;
	this._toY = 0;
	this._toX = 0;
	this._fromY = 0;
	this._fromX = 0;
	this._distance = -1;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.QuadMotion"] = flixel_tweens_motion_QuadMotion;
flixel_tweens_motion_QuadMotion.__name__ = ["flixel","tweens","motion","QuadMotion"];
flixel_tweens_motion_QuadMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_QuadMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this._distance = -1;
		this.x = this._fromX = FromX;
		this.y = this._fromY = FromY;
		this._controlX = ControlX;
		this._controlY = ControlY;
		this._toX = ToX;
		this._toY = ToY;
		if(UseDuration) {
			this.duration = DurationOrSpeed;
		} else {
			this.duration = this.get_distance() / DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.x = this._fromX * (1 - this.scale) * (1 - this.scale) + this._controlX * 2 * (1 - this.scale) * this.scale + this._toX * this.scale * this.scale;
		this.y = this._fromY * (1 - this.scale) * (1 - this.scale) + this._controlY * 2 * (1 - this.scale) * this.scale + this._toY * this.scale * this.scale;
		if(this.finished) {
			this.postUpdate();
		}
	}
	,get_distance: function() {
		if(this._distance >= 0) {
			return this._distance;
		}
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var p1 = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		var p2 = point1;
		p1.set_x(this.x - 2 * this._controlX + this._toX);
		p1.set_y(this.y - 2 * this._controlY + this._toY);
		p2.set_x(2 * this._controlX - 2 * this.x);
		p2.set_y(2 * this._controlY - 2 * this.y);
		var a = 4 * (p1.x * p1.x + p1.y * p1.y);
		var b = 4 * (p1.x * p2.x + p1.y * p2.y);
		var c = p2.x * p2.x + p2.y * p2.y;
		var abc = 2 * Math.sqrt(a + b + c);
		var a2 = Math.sqrt(a);
		var a32 = 2 * a * a2;
		var c2 = 2 * Math.sqrt(c);
		var ba = b / a2;
		p1.put();
		p2.put();
		return (a32 * abc + a2 * b * (abc - c2) + (4 * c * a - b * b) * Math.log((2 * a2 + ba + abc) / (ba + c2))) / (4 * a32);
	}
	,__class__: flixel_tweens_motion_QuadMotion
	,__properties__: $extend(flixel_tweens_motion_Motion.prototype.__properties__,{get_distance:"get_distance"})
});
var flixel_tweens_motion_QuadPath = function(Options,manager) {
	this._updateCurve = true;
	this._numSegs = 0;
	this._index = 0;
	this._speed = 0;
	this._distance = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
	this._points = [];
	this._curveT = [];
	this._curveD = [];
};
$hxClasses["flixel.tweens.motion.QuadPath"] = flixel_tweens_motion_QuadPath;
flixel_tweens_motion_QuadPath.__name__ = ["flixel","tweens","motion","QuadPath"];
flixel_tweens_motion_QuadPath.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_QuadPath.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	destroy: function() {
		flixel_tweens_motion_Motion.prototype.destroy.call(this);
		var _g = 0;
		var _g1 = this._points;
		while(_g < _g1.length) {
			var point = _g1[_g];
			++_g;
			point = flixel_util_FlxDestroyUtil.put(point);
		}
		this._a = flixel_util_FlxDestroyUtil.put(this._a);
		this._b = flixel_util_FlxDestroyUtil.put(this._b);
		this._c = flixel_util_FlxDestroyUtil.put(this._c);
	}
	,setMotion: function(DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this.updatePath();
		if(UseDuration) {
			this.duration = DurationOrSpeed;
			this._speed = this._distance / DurationOrSpeed;
		} else {
			this.duration = this._distance / DurationOrSpeed;
			this._speed = DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,addPoint: function(x,y) {
		if(y == null) {
			y = 0;
		}
		if(x == null) {
			x = 0;
		}
		this._updateCurve = true;
		var tmp = this._points;
		var point = flixel_math_FlxPoint._pool.get().set(x,y);
		point._inPool = false;
		tmp.push(point);
		return this;
	}
	,getPoint: function(index) {
		if(index == null) {
			index = 0;
		}
		if(this._points.length == 0) {
			throw new js__$Boot_HaxeError("No points have been added to the path yet.");
		}
		return this._points[index % this._points.length];
	}
	,start: function() {
		this._index = this.backward ? this._numSegs - 1 : 0;
		flixel_tweens_motion_Motion.prototype.start.call(this);
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		var td;
		var tt;
		if(!this.backward && this._points != null) {
			if(this._index < this._numSegs - 1) {
				while(this.scale > this._curveT[this._index + 1]) {
					this._index++;
					if(this._index == this._numSegs - 1) {
						break;
					}
				}
			}
			td = this._curveT[this._index];
			tt = this._curveT[this._index + 1] - td;
			td = (this.scale - td) / tt;
			this._a = this._points[this._index * 2];
			this._b = this._points[this._index * 2 + 1];
			this._c = this._points[this._index * 2 + 2];
			this.x = this._a.x * (1 - td) * (1 - td) + this._b.x * 2 * (1 - td) * td + this._c.x * td * td;
			this.y = this._a.y * (1 - td) * (1 - td) + this._b.y * 2 * (1 - td) * td + this._c.y * td * td;
		} else if(this._points != null) {
			if(this._index > 0) {
				while(this.scale < this._curveT[this._index]) {
					this._index--;
					if(this._index == 0) {
						break;
					}
				}
			}
			td = this._curveT[this._index + 1];
			tt = this._curveT[this._index] - td;
			td = (this.scale - td) / tt;
			this._a = this._points[this._index * 2 + 2];
			this._b = this._points[this._index * 2 + 1];
			this._c = this._points[this._index * 2];
			this.x = this._a.x * (1 - td) * (1 - td) + this._b.x * 2 * (1 - td) * td + this._c.x * td * td;
			this.y = this._a.y * (1 - td) * (1 - td) + this._b.y * 2 * (1 - td) * td + this._c.y * td * td;
		}
		flixel_tweens_motion_Motion.prototype.postUpdate.call(this);
	}
	,updatePath: function() {
		if((this._points.length - 1) % 2 != 0 || this._points.length < 3) {
			throw new js__$Boot_HaxeError("A QuadPath must have at least 3 points to operate and number of points must be a odd.");
		}
		if(!this._updateCurve) {
			return;
		}
		this._updateCurve = false;
		var i = 0;
		var j = 0;
		this._distance = 0;
		this._numSegs = (this._points.length - 1) / 2 | 0;
		while(i < this._numSegs) {
			j = i * 2;
			this._curveD[i] = this.getCurveLength(this._points[j],this._points[j + 1],this._points[j + 2]);
			this._distance += this._curveD[i++];
		}
		i = 0;
		var d = 0;
		while(i < this._numSegs) {
			d += this._curveD[i];
			this._curveT[i++] = d / this._distance;
		}
		this._curveT[this._numSegs - 1] = 1;
		this._curveT.unshift(0);
	}
	,getCurveLength: function(start,control,finish) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var p1 = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		var p2 = point1;
		p1.set_x(start.x - 2 * control.x + finish.x);
		p1.set_y(start.y - 2 * control.y + finish.y);
		p2.set_x(2 * control.x - 2 * start.x);
		p2.set_y(2 * control.y - 2 * start.y);
		var a = 4 * (p1.x * p1.x + p1.y * p1.y);
		var b = 4 * (p1.x * p2.x + p1.y * p2.y);
		var c = p2.x * p2.x + p2.y * p2.y;
		var abc = 2 * Math.sqrt(a + b + c);
		var a2 = Math.sqrt(a);
		var a32 = 2 * a * a2;
		var c2 = 2 * Math.sqrt(c);
		var ba = b / a2;
		p1.put();
		p2.put();
		return (a32 * abc + a2 * b * (abc - c2) + (4 * c * a - b * b) * Math.log((2 * a2 + ba + abc) / (ba + c2))) / (4 * a32);
	}
	,__class__: flixel_tweens_motion_QuadPath
});
var flixel_ui_FlxTypedButton_$flixel_$text_$FlxText = function(X,Y,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.lastStatus = -1;
	this.maxInputMovement = Infinity;
	this.mouseButtons = [-1];
	this.allowSwiping = true;
	this.statusAnimations = ["normal","highlight","pressed"];
	this.labelAlphas = [0.8,1.0,0.5];
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,1);
	point2._inPool = false;
	this.labelOffsets = [point,point1,point2];
	flixel_FlxSprite.call(this,X,Y);
	this.loadDefaultGraphic();
	this.onUp = new flixel_ui__$FlxButton_FlxButtonEvent(OnClick);
	this.onDown = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOver = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOut = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.set_status(0);
	this.scrollFactor.set();
	openfl_Lib.current.stage.addEventListener("mouseUp",$bind(this,this.onUpEventListener));
	this.input = new flixel_input_FlxInput(0);
};
$hxClasses["flixel.ui.FlxTypedButton_flixel_text_FlxText"] = flixel_ui_FlxTypedButton_$flixel_$text_$FlxText;
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.__name__ = ["flixel","ui","FlxTypedButton_flixel_text_FlxText"];
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.__interfaces__ = [flixel_input_IFlxInput];
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.__super__ = flixel_FlxSprite;
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype = $extend(flixel_FlxSprite.prototype,{
	graphicLoaded: function() {
		flixel_FlxSprite.prototype.graphicLoaded.call(this);
		this.setupAnimation("normal",0);
		this.setupAnimation("highlight",1);
		this.setupAnimation("pressed",2);
	}
	,loadDefaultGraphic: function() {
		this.loadGraphic("flixel/images/ui/button.png",true,80,20);
	}
	,setupAnimation: function(animationName,frameIndex) {
		frameIndex = Math.min(frameIndex,this.animation._sprite.numFrames - 1) | 0;
		this.animation.add(animationName,[frameIndex]);
	}
	,destroy: function() {
		this.set_label(flixel_util_FlxDestroyUtil.destroy(this.label));
		this._spriteLabel = null;
		this.onUp = flixel_util_FlxDestroyUtil.destroy(this.onUp);
		this.onDown = flixel_util_FlxDestroyUtil.destroy(this.onDown);
		this.onOver = flixel_util_FlxDestroyUtil.destroy(this.onOver);
		this.onOut = flixel_util_FlxDestroyUtil.destroy(this.onOut);
		this.labelOffsets = flixel_util_FlxDestroyUtil.putArray(this.labelOffsets);
		this.labelAlphas = null;
		this.currentInput = null;
		this.input = null;
		openfl_Lib.current.stage.removeEventListener("mouseUp",$bind(this,this.onUpEventListener));
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
		this.input.update();
		if(this.visible) {
			this.updateButton();
			if(this.lastStatus != this.status) {
				this.updateStatusAnimation();
				this.lastStatus = this.status;
			}
		}
	}
	,updateStatusAnimation: function() {
		this.animation.play(this.statusAnimations[this.status]);
	}
	,draw: function() {
		flixel_FlxSprite.prototype.draw.call(this);
		if(this._spriteLabel != null && this._spriteLabel.visible) {
			this._spriteLabel.set_cameras(this.get_cameras());
			this._spriteLabel.draw();
		}
	}
	,stampOnAtlas: function(atlas) {
		var buttonNode = atlas.addNode(this.graphic.bitmap,this.graphic.key);
		var result = buttonNode != null;
		if(buttonNode != null) {
			var buttonFrames = this.frames;
			var X = buttonFrames.tileSize.x;
			var Y = buttonFrames.tileSize.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			var tileSize = point;
			var tileFrames = buttonNode.getTileFrames(tileSize);
			this.set_frames(tileFrames);
		}
		if(result && this.label != null) {
			var labelNode = atlas.addNode(this.label.graphic.bitmap,this.label.graphic.key);
			if(result) {
				result = labelNode != null;
			} else {
				result = false;
			}
			if(labelNode != null) {
				this.label.set_frames(labelNode.getImageFrame());
			}
		}
		return result;
	}
	,updateButton: function() {
		var overlapFound = this.checkMouseOverlap();
		if(!overlapFound) {
			overlapFound = this.checkTouchOverlap();
		}
		if(this.currentInput != null && this.currentInput.get_justReleased() && js_Boot.__instanceof(this.currentInput,flixel_input_touch_FlxTouch) && overlapFound) {
			this.onUpHandler();
		}
		if(this.status != 0 && (!overlapFound || this.currentInput != null && this.currentInput.get_justReleased())) {
			this.onOutHandler();
		}
	}
	,checkMouseOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = this.mouseButtons;
			while(_g2 < _g3.length) {
				var buttonID = _g3[_g2];
				++_g2;
				var button = flixel_input_mouse_FlxMouseButton.getByID(buttonID);
				if(button != null && this.checkInput(flixel_FlxG.mouse,button,button.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkTouchOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = flixel_FlxG.touches.list;
			while(_g2 < _g3.length) {
				var touch = _g3[_g2];
				++_g2;
				if(this.checkInput(touch,touch,touch.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkInput: function(pointer,input,justPressedPosition,camera) {
		var tmp;
		var tmp1;
		if(this.maxInputMovement != Infinity) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			var point1 = point;
			point1._weak = true;
			tmp1 = justPressedPosition.distanceTo(pointer.getScreenPosition(null,point1)) > this.maxInputMovement;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = input == this.currentInput;
		} else {
			tmp = false;
		}
		if(!tmp) {
			if(this.overlapsPoint(pointer.getWorldPosition(camera,this._point),true,camera)) {
				this.updateStatus(input);
				return true;
			}
		}
		return false;
	}
	,updateStatus: function(input) {
		if(input.get_justPressed()) {
			this.currentInput = input;
			this.onDownHandler();
		} else if(this.status == 0) {
			if(this.allowSwiping && input.get_pressed()) {
				this.onDownHandler();
			} else {
				this.onOverHandler();
			}
		}
	}
	,updateLabelPosition: function() {
		if(this._spriteLabel != null) {
			this._spriteLabel.set_x((this.pixelPerfectPosition ? Math.floor(this.x) : this.x) + this.labelOffsets[this.status].x);
			this._spriteLabel.set_y((this.pixelPerfectPosition ? Math.floor(this.y) : this.y) + this.labelOffsets[this.status].y);
		}
	}
	,updateLabelAlpha: function() {
		if(this._spriteLabel != null && this.labelAlphas.length > this.status) {
			this._spriteLabel.set_alpha(this.alpha * this.labelAlphas[this.status]);
		}
	}
	,onUpEventListener: function(_) {
		if(this.visible && this.exists && this.active && this.status == 2) {
			this.onUpHandler();
		}
	}
	,onUpHandler: function() {
		this.set_status(0);
		this.input.release();
		this.currentInput = null;
		var _this = this.onUp;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onDownHandler: function() {
		this.set_status(2);
		this.input.press();
		var _this = this.onDown;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOverHandler: function() {
		this.set_status(1);
		var _this = this.onOver;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOutHandler: function() {
		this.set_status(0);
		this.input.release();
		var _this = this.onOut;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,set_label: function(Value) {
		if(Value != null) {
			Value.scrollFactor.put();
			Value.scrollFactor = this.scrollFactor;
		}
		this.label = Value;
		this._spriteLabel = this.label;
		this.updateLabelPosition();
		return Value;
	}
	,set_status: function(Value) {
		this.status = Value;
		this.updateLabelAlpha();
		return this.status;
	}
	,set_alpha: function(Value) {
		flixel_FlxSprite.prototype.set_alpha.call(this,Value);
		this.updateLabelAlpha();
		return this.alpha;
	}
	,set_x: function(Value) {
		flixel_FlxSprite.prototype.set_x.call(this,Value);
		this.updateLabelPosition();
		return this.x;
	}
	,set_y: function(Value) {
		flixel_FlxSprite.prototype.set_y.call(this,Value);
		this.updateLabelPosition();
		return this.y;
	}
	,get_justReleased: function() {
		return this.input.current == -1;
	}
	,get_released: function() {
		var _this = this.input;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		var _this = this.input;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.input.current == 2;
	}
	,__class__: flixel_ui_FlxTypedButton_$flixel_$text_$FlxText
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",set_status:"set_status",set_label:"set_label"})
});
var flixel_ui_FlxButton = function(X,Y,Text,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.call(this,X,Y,OnClick);
	var _g = 0;
	var _g1 = this.labelOffsets;
	while(_g < _g1.length) {
		var point = _g1[_g];
		++_g;
		point.set(point.x - 1,point.y + 3);
	}
	if(Text != null) {
		this.set_label(new flixel_text_FlxText(this.x + this.labelOffsets[0].x,this.y + this.labelOffsets[0].y,80,Text));
		this.label.setFormat(null,8,3355443,"center");
		this.label.set_alpha(this.labelAlphas[this.status]);
		this.label.drawFrame(true);
	}
};
$hxClasses["flixel.ui.FlxButton"] = flixel_ui_FlxButton;
flixel_ui_FlxButton.__name__ = ["flixel","ui","FlxButton"];
flixel_ui_FlxButton.__super__ = flixel_ui_FlxTypedButton_$flixel_$text_$FlxText;
flixel_ui_FlxButton.prototype = $extend(flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype,{
	resetHelpers: function() {
		flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype.resetHelpers.call(this);
		if(this.label != null) {
			var tmp = this.label;
			var tmp1 = this.get_width() | 0;
			tmp.set_fieldWidth(this.label.frameWidth = tmp1);
			this.label.set_size(this.label._defaultFormat.size | 0);
		}
	}
	,initLabel: function(Text) {
		if(Text != null) {
			this.set_label(new flixel_text_FlxText(this.x + this.labelOffsets[0].x,this.y + this.labelOffsets[0].y,80,Text));
			this.label.setFormat(null,8,3355443,"center");
			this.label.set_alpha(this.labelAlphas[this.status]);
			this.label.drawFrame(true);
		}
	}
	,get_text: function() {
		if(this.label != null) {
			return this.label.text;
		} else {
			return null;
		}
	}
	,set_text: function(Text) {
		if(this.label == null) {
			if(Text != null) {
				this.set_label(new flixel_text_FlxText(this.x + this.labelOffsets[0].x,this.y + this.labelOffsets[0].y,80,Text));
				this.label.setFormat(null,8,3355443,"center");
				this.label.set_alpha(this.labelAlphas[this.status]);
				this.label.drawFrame(true);
			}
		} else {
			this.label.set_text(Text);
		}
		return Text;
	}
	,__class__: flixel_ui_FlxButton
	,__properties__: $extend(flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype.__properties__,{set_text:"set_text",get_text:"get_text"})
});
var flixel_ui_FlxTypedButton = function(X,Y,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.lastStatus = -1;
	this.maxInputMovement = Infinity;
	this.mouseButtons = [-1];
	this.allowSwiping = true;
	this.statusAnimations = ["normal","highlight","pressed"];
	this.labelAlphas = [0.8,1.0,0.5];
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,1);
	point2._inPool = false;
	this.labelOffsets = [point,point1,point2];
	flixel_FlxSprite.call(this,X,Y);
	this.loadDefaultGraphic();
	this.onUp = new flixel_ui__$FlxButton_FlxButtonEvent(OnClick);
	this.onDown = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOver = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOut = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.set_status(0);
	this.scrollFactor.set();
	openfl_Lib.current.stage.addEventListener("mouseUp",$bind(this,this.onUpEventListener));
	this.input = new flixel_input_FlxInput(0);
};
$hxClasses["flixel.ui.FlxTypedButton"] = flixel_ui_FlxTypedButton;
flixel_ui_FlxTypedButton.__name__ = ["flixel","ui","FlxTypedButton"];
flixel_ui_FlxTypedButton.__interfaces__ = [flixel_input_IFlxInput];
flixel_ui_FlxTypedButton.__super__ = flixel_FlxSprite;
flixel_ui_FlxTypedButton.prototype = $extend(flixel_FlxSprite.prototype,{
	graphicLoaded: function() {
		flixel_FlxSprite.prototype.graphicLoaded.call(this);
		this.setupAnimation("normal",0);
		this.setupAnimation("highlight",1);
		this.setupAnimation("pressed",2);
	}
	,loadDefaultGraphic: function() {
		this.loadGraphic("flixel/images/ui/button.png",true,80,20);
	}
	,setupAnimation: function(animationName,frameIndex) {
		frameIndex = Math.min(frameIndex,this.animation._sprite.numFrames - 1) | 0;
		this.animation.add(animationName,[frameIndex]);
	}
	,destroy: function() {
		this.set_label(flixel_util_FlxDestroyUtil.destroy(this.label));
		this._spriteLabel = null;
		this.onUp = flixel_util_FlxDestroyUtil.destroy(this.onUp);
		this.onDown = flixel_util_FlxDestroyUtil.destroy(this.onDown);
		this.onOver = flixel_util_FlxDestroyUtil.destroy(this.onOver);
		this.onOut = flixel_util_FlxDestroyUtil.destroy(this.onOut);
		this.labelOffsets = flixel_util_FlxDestroyUtil.putArray(this.labelOffsets);
		this.labelAlphas = null;
		this.currentInput = null;
		this.input = null;
		openfl_Lib.current.stage.removeEventListener("mouseUp",$bind(this,this.onUpEventListener));
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
		this.input.update();
		if(this.visible) {
			this.updateButton();
			if(this.lastStatus != this.status) {
				this.updateStatusAnimation();
				this.lastStatus = this.status;
			}
		}
	}
	,updateStatusAnimation: function() {
		this.animation.play(this.statusAnimations[this.status]);
	}
	,draw: function() {
		flixel_FlxSprite.prototype.draw.call(this);
		if(this._spriteLabel != null && this._spriteLabel.visible) {
			this._spriteLabel.set_cameras(this.get_cameras());
			this._spriteLabel.draw();
		}
	}
	,stampOnAtlas: function(atlas) {
		var buttonNode = atlas.addNode(this.graphic.bitmap,this.graphic.key);
		var result = buttonNode != null;
		if(buttonNode != null) {
			var buttonFrames = this.frames;
			var X = buttonFrames.tileSize.x;
			var Y = buttonFrames.tileSize.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			var tileSize = point;
			var tileFrames = buttonNode.getTileFrames(tileSize);
			this.set_frames(tileFrames);
		}
		if(result && this.label != null) {
			var labelNode = atlas.addNode(this.label.graphic.bitmap,this.label.graphic.key);
			if(result) {
				result = labelNode != null;
			} else {
				result = false;
			}
			if(labelNode != null) {
				this.label.set_frames(labelNode.getImageFrame());
			}
		}
		return result;
	}
	,updateButton: function() {
		var overlapFound = this.checkMouseOverlap();
		if(!overlapFound) {
			overlapFound = this.checkTouchOverlap();
		}
		if(this.currentInput != null && this.currentInput.get_justReleased() && js_Boot.__instanceof(this.currentInput,flixel_input_touch_FlxTouch) && overlapFound) {
			this.onUpHandler();
		}
		if(this.status != 0 && (!overlapFound || this.currentInput != null && this.currentInput.get_justReleased())) {
			this.onOutHandler();
		}
	}
	,checkMouseOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = this.mouseButtons;
			while(_g2 < _g3.length) {
				var buttonID = _g3[_g2];
				++_g2;
				var button = flixel_input_mouse_FlxMouseButton.getByID(buttonID);
				if(button != null && this.checkInput(flixel_FlxG.mouse,button,button.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkTouchOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = flixel_FlxG.touches.list;
			while(_g2 < _g3.length) {
				var touch = _g3[_g2];
				++_g2;
				if(this.checkInput(touch,touch,touch.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkInput: function(pointer,input,justPressedPosition,camera) {
		var tmp;
		var tmp1;
		if(this.maxInputMovement != Infinity) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			var point1 = point;
			point1._weak = true;
			tmp1 = justPressedPosition.distanceTo(pointer.getScreenPosition(null,point1)) > this.maxInputMovement;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = input == this.currentInput;
		} else {
			tmp = false;
		}
		if(!tmp) {
			if(this.overlapsPoint(pointer.getWorldPosition(camera,this._point),true,camera)) {
				this.updateStatus(input);
				return true;
			}
		}
		return false;
	}
	,updateStatus: function(input) {
		if(input.get_justPressed()) {
			this.currentInput = input;
			this.onDownHandler();
		} else if(this.status == 0) {
			if(this.allowSwiping && input.get_pressed()) {
				this.onDownHandler();
			} else {
				this.onOverHandler();
			}
		}
	}
	,updateLabelPosition: function() {
		if(this._spriteLabel != null) {
			this._spriteLabel.set_x((this.pixelPerfectPosition ? Math.floor(this.x) : this.x) + this.labelOffsets[this.status].x);
			this._spriteLabel.set_y((this.pixelPerfectPosition ? Math.floor(this.y) : this.y) + this.labelOffsets[this.status].y);
		}
	}
	,updateLabelAlpha: function() {
		if(this._spriteLabel != null && this.labelAlphas.length > this.status) {
			this._spriteLabel.set_alpha(this.alpha * this.labelAlphas[this.status]);
		}
	}
	,onUpEventListener: function(_) {
		if(this.visible && this.exists && this.active && this.status == 2) {
			this.onUpHandler();
		}
	}
	,onUpHandler: function() {
		this.set_status(0);
		this.input.release();
		this.currentInput = null;
		var _this = this.onUp;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onDownHandler: function() {
		this.set_status(2);
		this.input.press();
		var _this = this.onDown;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOverHandler: function() {
		this.set_status(1);
		var _this = this.onOver;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOutHandler: function() {
		this.set_status(0);
		this.input.release();
		var _this = this.onOut;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,set_label: function(Value) {
		if(Value != null) {
			Value.scrollFactor.put();
			Value.scrollFactor = this.scrollFactor;
		}
		this.label = Value;
		this._spriteLabel = this.label;
		this.updateLabelPosition();
		return Value;
	}
	,set_status: function(Value) {
		this.status = Value;
		this.updateLabelAlpha();
		return this.status;
	}
	,set_alpha: function(Value) {
		flixel_FlxSprite.prototype.set_alpha.call(this,Value);
		this.updateLabelAlpha();
		return this.alpha;
	}
	,set_x: function(Value) {
		flixel_FlxSprite.prototype.set_x.call(this,Value);
		this.updateLabelPosition();
		return this.x;
	}
	,set_y: function(Value) {
		flixel_FlxSprite.prototype.set_y.call(this,Value);
		this.updateLabelPosition();
		return this.y;
	}
	,get_justReleased: function() {
		return this.input.current == -1;
	}
	,get_released: function() {
		var _this = this.input;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		var _this = this.input;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.input.current == 2;
	}
	,__class__: flixel_ui_FlxTypedButton
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",set_status:"set_status",set_label:"set_label"})
});
var flixel_ui__$FlxButton_FlxButtonEvent = function(Callback,sound) {
	this.callback = Callback;
	this.sound = sound;
};
$hxClasses["flixel.ui._FlxButton.FlxButtonEvent"] = flixel_ui__$FlxButton_FlxButtonEvent;
flixel_ui__$FlxButton_FlxButtonEvent.__name__ = ["flixel","ui","_FlxButton","FlxButtonEvent"];
flixel_ui__$FlxButton_FlxButtonEvent.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_ui__$FlxButton_FlxButtonEvent.prototype = {
	destroy: function() {
		this.callback = null;
		this.sound = flixel_util_FlxDestroyUtil.destroy(this.sound);
	}
	,fire: function() {
		if(this.callback != null) {
			this.callback();
		}
		if(this.sound != null) {
			this.sound.play(true);
		}
	}
	,__class__: flixel_ui__$FlxButton_FlxButtonEvent
};
var flixel_util_FlxArrayUtil = function() { };
$hxClasses["flixel.util.FlxArrayUtil"] = flixel_util_FlxArrayUtil;
flixel_util_FlxArrayUtil.__name__ = ["flixel","util","FlxArrayUtil"];
flixel_util_FlxArrayUtil.setLength_flixel_group_FlxTypedGroup_T = function(array,newLength) {
	if(newLength < 0) {
		return array;
	}
	var oldLength = array.length;
	var diff = newLength - oldLength;
	if(diff >= 0) {
		return array;
	}
	diff = -diff;
	var _g1 = 0;
	var _g = diff;
	while(_g1 < _g) {
		var i = _g1++;
		array.pop();
	}
	return array;
};
flixel_util_FlxArrayUtil.setLength_Int = function(array,newLength) {
	if(newLength < 0) {
		return array;
	}
	var oldLength = array.length;
	var diff = newLength - oldLength;
	if(diff >= 0) {
		return array;
	}
	diff = -diff;
	var _g1 = 0;
	var _g = diff;
	while(_g1 < _g) {
		var i = _g1++;
		array.pop();
	}
	return array;
};
flixel_util_FlxArrayUtil.flatten2DArray_Int = function(array) {
	var result = [];
	var _g = 0;
	while(_g < array.length) {
		var innerArray = array[_g];
		++_g;
		var _g1 = 0;
		while(_g1 < innerArray.length) {
			var element = innerArray[_g1];
			++_g1;
			result.push(element);
		}
	}
	return result;
};
flixel_util_FlxArrayUtil.fastSplice_flixel_tweens_FlxTween = function(array,element) {
	var index = array.indexOf(element);
	if(index != -1) {
		array[index] = array[array.length - 1];
		array.pop();
		return array;
	}
	return array;
};
flixel_util_FlxArrayUtil.fastSplice_flixel_util_FlxTimer = function(array,element) {
	var index = array.indexOf(element);
	if(index != -1) {
		array[index] = array[array.length - 1];
		array.pop();
		return array;
	}
	return array;
};
flixel_util_FlxArrayUtil.swapAndPop_fastSplice_T = function(array,index) {
	array[index] = array[array.length - 1];
	array.pop();
	return array;
};
flixel_util_FlxArrayUtil.clearArray = function(array,recursive) {
	if(recursive == null) {
		recursive = false;
	}
	if(array == null) {
		return array;
	}
	if(recursive) {
		while(array.length > 0) {
			var thing = array.pop();
			if((thing instanceof Array) && thing.__enum__ == null) {
				flixel_util_FlxArrayUtil.clearArray(array,recursive);
			}
		}
	} else {
		while(array.length > 0) array.pop();
	}
	return array;
};
flixel_util_FlxArrayUtil.equals = function(array1,array2) {
	if(array1 == null && array2 == null) {
		return true;
	}
	if(array1 == null && array2 != null) {
		return false;
	}
	if(array1 != null && array2 == null) {
		return false;
	}
	if(array1.length != array2.length) {
		return false;
	}
	var _g1 = 0;
	var _g = array1.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(array1[i] != array2[i]) {
			return false;
		}
	}
	return true;
};
flixel_util_FlxArrayUtil.last = function(array) {
	if(array == null || array.length == 0) {
		return null;
	}
	return array[array.length - 1];
};
flixel_util_FlxArrayUtil.contains = function(array,element) {
	return array.indexOf(element) != -1;
};
var flixel_util_FlxAxes = $hxClasses["flixel.util.FlxAxes"] = { __ename__ : ["flixel","util","FlxAxes"], __constructs__ : ["X","Y","XY"] };
flixel_util_FlxAxes.X = ["X",0];
flixel_util_FlxAxes.X.toString = $estr;
flixel_util_FlxAxes.X.__enum__ = flixel_util_FlxAxes;
flixel_util_FlxAxes.Y = ["Y",1];
flixel_util_FlxAxes.Y.toString = $estr;
flixel_util_FlxAxes.Y.__enum__ = flixel_util_FlxAxes;
flixel_util_FlxAxes.XY = ["XY",2];
flixel_util_FlxAxes.XY.toString = $estr;
flixel_util_FlxAxes.XY.__enum__ = flixel_util_FlxAxes;
var openfl_geom_Rectangle = function(x,y,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
	this.width = width;
	this.height = height;
};
$hxClasses["openfl.geom.Rectangle"] = openfl_geom_Rectangle;
openfl_geom_Rectangle.__name__ = ["openfl","geom","Rectangle"];
openfl_geom_Rectangle.prototype = {
	clone: function() {
		return new openfl_geom_Rectangle(this.x,this.y,this.width,this.height);
	}
	,contains: function(x,y) {
		if(x >= this.x && y >= this.y && x < this.get_right()) {
			return y < this.get_bottom();
		} else {
			return false;
		}
	}
	,containsPoint: function(point) {
		return this.contains(point.x,point.y);
	}
	,containsRect: function(rect) {
		if(rect.width <= 0 || rect.height <= 0) {
			if(rect.x > this.x && rect.y > this.y && rect.get_right() < this.get_right()) {
				return rect.get_bottom() < this.get_bottom();
			} else {
				return false;
			}
		} else if(rect.x >= this.x && rect.y >= this.y && rect.get_right() <= this.get_right()) {
			return rect.get_bottom() <= this.get_bottom();
		} else {
			return false;
		}
	}
	,copyFrom: function(sourceRect) {
		this.x = sourceRect.x;
		this.y = sourceRect.y;
		this.width = sourceRect.width;
		this.height = sourceRect.height;
	}
	,equals: function(toCompare) {
		if(toCompare != null && this.x == toCompare.x && this.y == toCompare.y && this.width == toCompare.width) {
			return this.height == toCompare.height;
		} else {
			return false;
		}
	}
	,inflate: function(dx,dy) {
		this.x -= dx;
		this.width += dx * 2;
		this.y -= dy;
		this.height += dy * 2;
	}
	,inflatePoint: function(point) {
		this.inflate(point.x,point.y);
	}
	,intersection: function(toIntersect) {
		var x0 = this.x < toIntersect.x ? toIntersect.x : this.x;
		var x1 = this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right();
		if(x1 <= x0) {
			return new openfl_geom_Rectangle();
		}
		var y0 = this.y < toIntersect.y ? toIntersect.y : this.y;
		var y1 = this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom();
		if(y1 <= y0) {
			return new openfl_geom_Rectangle();
		}
		return new openfl_geom_Rectangle(x0,y0,x1 - x0,y1 - y0);
	}
	,intersects: function(toIntersect) {
		var x0 = this.x < toIntersect.x ? toIntersect.x : this.x;
		var x1 = this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right();
		if(x1 <= x0) {
			return false;
		}
		var y0 = this.y < toIntersect.y ? toIntersect.y : this.y;
		var y1 = this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom();
		return y1 > y0;
	}
	,isEmpty: function() {
		if(!(this.width <= 0)) {
			return this.height <= 0;
		} else {
			return true;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,offsetPoint: function(point) {
		this.x += point.x;
		this.y += point.y;
	}
	,setEmpty: function() {
		this.x = this.y = this.width = this.height = 0;
	}
	,setTo: function(xa,ya,widtha,heighta) {
		this.x = xa;
		this.y = ya;
		this.width = widtha;
		this.height = heighta;
	}
	,toString: function() {
		return "(x=" + this.x + ", y=" + this.y + ", width=" + this.width + ", height=" + this.height + ")";
	}
	,union: function(toUnion) {
		if(this.width == 0 || this.height == 0) {
			return toUnion.clone();
		} else if(toUnion.width == 0 || toUnion.height == 0) {
			return this.clone();
		}
		var x0 = this.x > toUnion.x ? toUnion.x : this.x;
		var x1 = this.get_right() < toUnion.get_right() ? toUnion.get_right() : this.get_right();
		var y0 = this.y > toUnion.y ? toUnion.y : this.y;
		var y1 = this.get_bottom() < toUnion.get_bottom() ? toUnion.get_bottom() : this.get_bottom();
		return new openfl_geom_Rectangle(x0,y0,x1 - x0,y1 - y0);
	}
	,__contract: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			return;
		}
		var cacheRight = this.get_right();
		var cacheBottom = this.get_bottom();
		if(this.x < x) {
			this.x = x;
		}
		if(this.y < y) {
			this.y = y;
		}
		if(this.get_right() > x + width) {
			this.width = x + width - this.x;
		}
		if(this.get_bottom() > y + height) {
			this.height = y + height - this.y;
		}
	}
	,__expand: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			this.x = x;
			this.y = y;
			this.width = width;
			this.height = height;
			return;
		}
		var cacheRight = this.get_right();
		var cacheBottom = this.get_bottom();
		if(this.x > x) {
			this.x = x;
			this.width = cacheRight - x;
		}
		if(this.y > y) {
			this.y = y;
			this.height = cacheBottom - y;
		}
		if(cacheRight < x + width) {
			this.width = x + width - this.x;
		}
		if(cacheBottom < y + height) {
			this.height = y + height - this.y;
		}
	}
	,__toLimeRectangle: function() {
		return new lime_math_Rectangle(this.x,this.y,this.width,this.height);
	}
	,__transform: function(rect,m) {
		var tx0 = m.a * this.x + m.c * this.y;
		var tx1 = tx0;
		var ty0 = m.b * this.x + m.d * this.y;
		var ty1 = ty0;
		var tx = m.a * (this.x + this.width) + m.c * this.y;
		var ty = m.b * (this.x + this.width) + m.d * this.y;
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * (this.x + this.width) + m.c * (this.y + this.height);
		ty = m.b * (this.x + this.width) + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * this.x + m.c * (this.y + this.height);
		ty = m.b * this.x + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		rect.setTo(tx0 + m.tx,ty0 + m.ty,tx1 - tx0,ty1 - ty0);
	}
	,get_bottom: function() {
		return this.y + this.height;
	}
	,set_bottom: function(b) {
		this.height = b - this.y;
		return b;
	}
	,get_bottomRight: function() {
		return new openfl_geom_Point(this.x + this.width,this.y + this.height);
	}
	,set_bottomRight: function(p) {
		this.width = p.x - this.x;
		this.height = p.y - this.y;
		return p.clone();
	}
	,get_left: function() {
		return this.x;
	}
	,set_left: function(l) {
		this.width -= l - this.x;
		this.x = l;
		return l;
	}
	,get_right: function() {
		return this.x + this.width;
	}
	,set_right: function(r) {
		this.width = r - this.x;
		return r;
	}
	,get_size: function() {
		return new openfl_geom_Point(this.width,this.height);
	}
	,set_size: function(p) {
		this.width = p.x;
		this.height = p.y;
		return p.clone();
	}
	,get_top: function() {
		return this.y;
	}
	,set_top: function(t) {
		this.height -= t - this.y;
		this.y = t;
		return t;
	}
	,get_topLeft: function() {
		return new openfl_geom_Point(this.x,this.y);
	}
	,set_topLeft: function(p) {
		this.x = p.x;
		this.y = p.y;
		return p.clone();
	}
	,__class__: openfl_geom_Rectangle
	,__properties__: {set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}
};
var flixel_util_FlxBitmapDataPool = function() { };
$hxClasses["flixel.util.FlxBitmapDataPool"] = flixel_util_FlxBitmapDataPool;
flixel_util_FlxBitmapDataPool.__name__ = ["flixel","util","FlxBitmapDataPool"];
flixel_util_FlxBitmapDataPool.__properties__ = {set_maxLength:"set_maxLength"};
flixel_util_FlxBitmapDataPool.get = function(w,h,transparent,fillColor,exactSize) {
	if(exactSize == null) {
		exactSize = false;
	}
	if(transparent == null) {
		transparent = true;
	}
	var res = null;
	var node = flixel_util_FlxBitmapDataPool._head;
	while(node != null) {
		var bmd = node.bmd;
		if(bmd.transparent == transparent && bmd.width >= w && bmd.height >= h && (!exactSize || exactSize && bmd.width == w && bmd.height == h)) {
			res = bmd;
			if(node.prev != null) {
				node.prev.next = node.next;
			}
			if(node.next != null) {
				node.next.prev = node.prev;
			}
			if(node == flixel_util_FlxBitmapDataPool._head) {
				flixel_util_FlxBitmapDataPool._head = node.next;
			}
			if(node == flixel_util_FlxBitmapDataPool._tail) {
				flixel_util_FlxBitmapDataPool._tail = node.prev;
			}
			node = null;
			flixel_util_FlxBitmapDataPool.$length--;
			break;
		}
		node = node.next;
	}
	if(res != null) {
		if(fillColor != null) {
			flixel_util_FlxBitmapDataPool._rect.x = 0;
			flixel_util_FlxBitmapDataPool._rect.y = 0;
			flixel_util_FlxBitmapDataPool._rect.width = w;
			flixel_util_FlxBitmapDataPool._rect.height = h;
			res.fillRect(flixel_util_FlxBitmapDataPool._rect,fillColor);
		}
	} else {
		res = new openfl_display_BitmapData(w,h,transparent,fillColor != null ? fillColor : -1);
	}
	return res;
};
flixel_util_FlxBitmapDataPool.put = function(bmd) {
	if(flixel_util_FlxBitmapDataPool.$length >= flixel_util_FlxBitmapDataPool.maxLength) {
		var last = flixel_util_FlxBitmapDataPool._tail;
		last.bmd.dispose();
		if(last.prev != null) {
			last.prev.next = null;
			flixel_util_FlxBitmapDataPool._tail = last.prev;
		}
		last = null;
		flixel_util_FlxBitmapDataPool.$length--;
	}
	var node = new flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode(bmd);
	node.next = flixel_util_FlxBitmapDataPool._head;
	if(flixel_util_FlxBitmapDataPool._head == null) {
		flixel_util_FlxBitmapDataPool._head = flixel_util_FlxBitmapDataPool._tail = node;
	} else {
		flixel_util_FlxBitmapDataPool._head = node;
		node.next.prev = node;
	}
	flixel_util_FlxBitmapDataPool.$length++;
};
flixel_util_FlxBitmapDataPool.clear = function() {
	var node = flixel_util_FlxBitmapDataPool._head;
	while(node != null) {
		var bmd = node.bmd;
		bmd.dispose();
		bmd = null;
		node = node.next;
	}
	flixel_util_FlxBitmapDataPool.$length = 0;
	flixel_util_FlxBitmapDataPool._head = flixel_util_FlxBitmapDataPool._tail = null;
};
flixel_util_FlxBitmapDataPool.set_maxLength = function(value) {
	if(flixel_util_FlxBitmapDataPool.maxLength != value) {
		var node = flixel_util_FlxBitmapDataPool._tail;
		while(node != null && flixel_util_FlxBitmapDataPool.$length > value) {
			var bmd = node.bmd;
			bmd.dispose();
			bmd = null;
			node = node.prev;
			flixel_util_FlxBitmapDataPool.$length--;
		}
	}
	return flixel_util_FlxBitmapDataPool.maxLength = value;
};
var flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode = function(bmd,prev,next) {
	this.bmd = bmd;
	this.prev = prev;
	this.next = next;
};
$hxClasses["flixel.util._FlxBitmapDataPool.FlxBitmapDataPoolNode"] = flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode;
flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode.__name__ = ["flixel","util","_FlxBitmapDataPool","FlxBitmapDataPoolNode"];
flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode.prototype = {
	__class__: flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode
};
var flixel_util_FlxBitmapDataUtil = function() { };
$hxClasses["flixel.util.FlxBitmapDataUtil"] = flixel_util_FlxBitmapDataUtil;
flixel_util_FlxBitmapDataUtil.__name__ = ["flixel","util","FlxBitmapDataUtil"];
flixel_util_FlxBitmapDataUtil.merge = function(sourceBitmapData,sourceRect,destBitmapData,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
	if(destPoint.x >= destBitmapData.width || destPoint.y >= destBitmapData.height || sourceRect.x >= sourceBitmapData.width || sourceRect.y >= sourceBitmapData.height || sourceRect.x + sourceRect.width <= 0 || sourceRect.y + sourceRect.height <= 0) {
		return;
	}
	while(sourceRect.x + sourceRect.width > sourceBitmapData.width || sourceRect.y + sourceRect.height > sourceBitmapData.height || sourceRect.x < 0 || sourceRect.y < 0 || destPoint.x < 0 || destPoint.y < 0) {
		if(sourceRect.x + sourceRect.width > sourceBitmapData.width) {
			sourceRect.width = sourceBitmapData.width - sourceRect.x;
		}
		if(sourceRect.y + sourceRect.height > sourceBitmapData.height) {
			sourceRect.height = sourceBitmapData.height - sourceRect.y;
		}
		if(sourceRect.x < 0) {
			destPoint.x -= sourceRect.x;
			sourceRect.width += sourceRect.x;
			sourceRect.x = 0;
		}
		if(sourceRect.y < 0) {
			destPoint.y -= sourceRect.y;
			sourceRect.height += sourceRect.y;
			sourceRect.y = 0;
		}
		if(destPoint.x >= destBitmapData.width || destPoint.y >= destBitmapData.height) {
			return;
		}
		if(destPoint.x < 0) {
			sourceRect.x -= destPoint.x;
			sourceRect.width += destPoint.x;
			destPoint.x = 0;
		}
		if(destPoint.y < 0) {
			sourceRect.y -= destPoint.y;
			sourceRect.height += destPoint.y;
			destPoint.y = 0;
		}
	}
	if(sourceRect.width <= 0 || sourceRect.height <= 0) {
		return;
	}
	var startSourceX = Math.round(sourceRect.x);
	var startSourceY = Math.round(sourceRect.y);
	var width = Math.round(sourceRect.width);
	var height = Math.round(sourceRect.height);
	var sourceX = startSourceX;
	var sourceY = startSourceY;
	var destX = Math.round(destPoint.x);
	var destY = Math.round(destPoint.y);
	var currX = destX;
	var currY = destY;
	var sourceColor;
	var destColor;
	var resultRed;
	var resultGreen;
	var resultBlue;
	var resultAlpha;
	var resultColor = 0;
	destBitmapData.lock();
	var _g1 = 0;
	var _g = width;
	while(_g1 < _g) {
		var i = _g1++;
		var _g3 = 0;
		var _g2 = height;
		while(_g3 < _g2) {
			var j = _g3++;
			sourceX = startSourceX + i;
			sourceY = startSourceY + j;
			currX = destX + i;
			currY = destY + j;
			sourceColor = sourceBitmapData.getPixel32(sourceX,sourceY);
			destColor = destBitmapData.getPixel32(currX,currY);
			resultRed = ((sourceColor >> 16 & 255) * redMultiplier + (destColor >> 16 & 255) * (256 - redMultiplier)) / 256 | 0;
			resultGreen = ((sourceColor >> 8 & 255) * greenMultiplier + (destColor >> 8 & 255) * (256 - greenMultiplier)) / 256 | 0;
			resultBlue = ((sourceColor & 255) * blueMultiplier + (destColor & 255) * (256 - blueMultiplier)) / 256 | 0;
			resultAlpha = ((sourceColor >> 24 & 255) * alphaMultiplier + (destColor >> 24 & 255) * (256 - alphaMultiplier)) / 256 | 0;
			var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
			color &= -16711681;
			color |= (resultRed > 255 ? 255 : resultRed < 0 ? 0 : resultRed) << 16;
			color &= -65281;
			color |= (resultGreen > 255 ? 255 : resultGreen < 0 ? 0 : resultGreen) << 8;
			color &= -256;
			color |= resultBlue > 255 ? 255 : resultBlue < 0 ? 0 : resultBlue;
			color &= 16777215;
			color |= (resultAlpha > 255 ? 255 : resultAlpha < 0 ? 0 : resultAlpha) << 24;
			resultColor = color;
			destBitmapData.setPixel32(currX,currY,resultColor);
		}
	}
	destBitmapData.unlock();
};
flixel_util_FlxBitmapDataUtil.mergeColorComponent = function(source,dest,multiplier) {
	return (source * multiplier + dest * (256 - multiplier)) / 256 | 0;
};
flixel_util_FlxBitmapDataUtil.compare = function(Bitmap1,Bitmap2) {
	if(Bitmap1 == Bitmap2) {
		return 0;
	}
	if(Bitmap1.width != Bitmap2.width) {
		return -3;
	} else if(Bitmap1.height != Bitmap2.height) {
		return -4;
	} else {
		var width = Bitmap1.width;
		var height = Bitmap1.height;
		var result = new openfl_display_BitmapData(width,height,true,0);
		var identical = true;
		var _g1 = 0;
		var _g = width;
		while(_g1 < _g) {
			var i = _g1++;
			var _g3 = 0;
			var _g2 = height;
			while(_g3 < _g2) {
				var j = _g3++;
				var pixel1 = Bitmap1.getPixel32(i,j);
				var pixel2 = Bitmap2.getPixel32(i,j);
				if(pixel1 != pixel2) {
					identical = false;
					if((pixel1 & 16777215) != (pixel2 & 16777215)) {
						var diff = (pixel1 >> 16 & 255) - (pixel2 >> 16 & 255);
						var Red = diff >= 0 ? diff : 256 + diff;
						var diff1 = (pixel1 >> 8 & 255) - (pixel2 >> 8 & 255);
						var Green = diff1 >= 0 ? diff1 : 256 + diff1;
						var diff2 = (pixel1 & 255) - (pixel2 & 255);
						var Blue = diff2 >= 0 ? diff2 : 256 + diff2;
						var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
						color &= -16711681;
						color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
						color &= -65281;
						color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
						color &= -256;
						color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
						color &= 16777215;
						color |= -16777216;
						result.setPixel32(i,j,color);
					} else {
						var alpha1 = pixel1 >> 24 & 255;
						var alpha2 = pixel2 >> 24 & 255;
						if(alpha1 != alpha2) {
							var diff3 = alpha1 - alpha2;
							var Alpha = diff3 >= 0 ? diff3 : 256 + diff3;
							var color1 = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
							color1 &= -16711681;
							color1 |= 16711680;
							color1 &= -65281;
							color1 |= 65280;
							color1 &= -256;
							color1 |= 255;
							color1 &= 16777215;
							color1 |= (Alpha > 255 ? 255 : Alpha < 0 ? 0 : Alpha) << 24;
							result.setPixel32(i,j,color1);
						}
					}
				}
			}
		}
		if(!identical) {
			return result;
		}
	}
	return 0;
};
flixel_util_FlxBitmapDataUtil.getDiff = function(value1,value2) {
	var diff = value1 - value2;
	if(diff >= 0) {
		return diff;
	} else {
		return 256 + diff;
	}
};
flixel_util_FlxBitmapDataUtil.getMemorySize = function(bitmapData) {
	return bitmapData.width * bitmapData.height * 4;
};
flixel_util_FlxBitmapDataUtil.replaceColor = function(bitmapData,color,newColor,fetchPositions,rect) {
	if(fetchPositions == null) {
		fetchPositions = false;
	}
	var positions = null;
	if(fetchPositions) {
		positions = [];
	}
	var startX = 0;
	var startY = 0;
	var columns = bitmapData.width;
	var rows = bitmapData.height;
	if(rect != null) {
		startX = rect.x | 0;
		startY = rect.y | 0;
		columns = rect.width | 0;
		rows = rect.height | 0;
	}
	columns = Math.max(columns,bitmapData.width) | 0;
	rows = Math.max(rows,bitmapData.height) | 0;
	var row = 0;
	var column = 0;
	var x;
	var y;
	var changed = false;
	bitmapData.lock();
	while(row < rows) {
		column = 0;
		while(column < columns) {
			x = startX + column;
			y = startY + row;
			if(bitmapData.getPixel32(x,y) == color) {
				bitmapData.setPixel32(x,y,newColor);
				changed = true;
				if(fetchPositions) {
					var point = flixel_math_FlxPoint._pool.get().set(x,y);
					point._inPool = false;
					positions.push(point);
				}
			}
			++column;
		}
		++row;
	}
	bitmapData.unlock();
	if(changed && positions == null) {
		positions = [];
	}
	return positions;
};
flixel_util_FlxBitmapDataUtil.addSpacesAndBorders = function(bitmapData,frameSize,spacing,border,region) {
	if(region == null) {
		var Width = bitmapData.width;
		var Height = bitmapData.height;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		var rect = _this;
		rect._inPool = false;
		region = rect;
	}
	var frameWidth = region.width | 0;
	var frameHeight = region.height | 0;
	if(frameSize != null) {
		frameWidth = frameSize.x | 0;
		frameHeight = frameSize.y | 0;
	}
	var numHorizontalFrames = region.width / frameWidth | 0;
	var numVerticalFrames = region.height / frameHeight | 0;
	var spaceX = 0;
	var spaceY = 0;
	if(spacing != null) {
		spaceX = spacing.x | 0;
		spaceY = spacing.y | 0;
	}
	var borderX = 0;
	var borderY = 0;
	if(border != null) {
		borderX = border.x | 0;
		borderY = border.y | 0;
	}
	var result = new openfl_display_BitmapData(region.width + (numHorizontalFrames - 1) * spaceX + 2 * numHorizontalFrames * borderX | 0,region.height + (numVerticalFrames - 1) * spaceY + 2 * numVerticalFrames * borderY | 0,true,0);
	result.lock();
	var tempRect = new openfl_geom_Rectangle(0,0,frameWidth,frameHeight);
	var tempPoint = new openfl_geom_Point();
	var _g1 = 0;
	var _g = numHorizontalFrames;
	while(_g1 < _g) {
		var i = _g1++;
		tempPoint.x = i * (frameWidth + spaceX + 2 * borderX) + borderX;
		tempRect.x = i * frameWidth + region.x;
		var _g3 = 0;
		var _g2 = numVerticalFrames;
		while(_g3 < _g2) {
			var j = _g3++;
			tempPoint.y = j * (frameHeight + spaceY + 2 * borderY) + borderY;
			tempRect.y = j * frameHeight + region.y;
			result.copyPixels(bitmapData,tempRect,tempPoint);
		}
	}
	result.unlock();
	flixel_util_FlxBitmapDataUtil.copyBorderPixels(result,frameWidth,frameHeight,spaceX,spaceY,borderX,borderY,numHorizontalFrames,numVerticalFrames);
	return result;
};
flixel_util_FlxBitmapDataUtil.copyBorderPixels = function(bitmapData,frameWidth,frameHeight,spaceX,spaceY,borderX,borderY,horizontalFrames,verticalFrames) {
	var tempRect = new openfl_geom_Rectangle(0,0,1,bitmapData.height);
	var tempPoint = new openfl_geom_Point();
	bitmapData.lock();
	var _g1 = 0;
	var _g = horizontalFrames;
	while(_g1 < _g) {
		var i = _g1++;
		tempRect.x = i * (frameWidth + 2 * borderX + spaceX) + borderX;
		var _g3 = 0;
		var _g2 = borderX;
		while(_g3 < _g2) {
			var j = _g3++;
			tempPoint.x = tempRect.x - j - 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
		tempRect.x += frameWidth - 1;
		var _g31 = 0;
		var _g21 = borderX;
		while(_g31 < _g21) {
			var j1 = _g31++;
			tempPoint.x = tempRect.x + j1 + 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
	}
	tempPoint.setTo(0,0);
	tempRect.setTo(0,0,bitmapData.width,1);
	var _g11 = 0;
	var _g4 = verticalFrames;
	while(_g11 < _g4) {
		var i1 = _g11++;
		tempRect.y = i1 * (frameHeight + 2 * borderY + spaceY) + borderY;
		var _g32 = 0;
		var _g22 = borderY;
		while(_g32 < _g22) {
			var j2 = _g32++;
			tempPoint.y = tempRect.y - j2 - 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
		tempRect.y += frameHeight - 1;
		var _g33 = 0;
		var _g23 = borderY;
		while(_g33 < _g23) {
			var j3 = _g33++;
			tempPoint.y = tempRect.y + j3 + 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
	}
	bitmapData.unlock();
	return bitmapData;
};
flixel_util_FlxBitmapDataUtil.generateRotations = function(brush,rotations,antiAliasing,autoBuffer) {
	if(autoBuffer == null) {
		autoBuffer = false;
	}
	if(antiAliasing == null) {
		antiAliasing = false;
	}
	if(rotations == null) {
		rotations = 16;
	}
	var brushWidth = brush.width;
	var brushHeight = brush.height;
	var max = brushHeight > brushWidth ? brushHeight : brushWidth;
	if(autoBuffer) {
		max = max * 1.5 | 0;
	} else {
		max = max;
	}
	var rows = Math.sqrt(rotations) | 0;
	var columns = Math.ceil(rotations / rows);
	var bakedRotationAngle = 360 / rotations;
	var width = max * columns;
	var height = max * rows;
	var result = new openfl_display_BitmapData(width,height,true,0);
	var row = 0;
	var column = 0;
	var bakedAngle = 0;
	var halfBrushWidth = brushWidth * 0.5 | 0;
	var halfBrushHeight = brushHeight * 0.5 | 0;
	var midpointX = max * 0.5 | 0;
	var midpointY = max * 0.5 | 0;
	while(row < rows) {
		column = 0;
		while(column < columns) {
			flixel_util_FlxBitmapDataUtil.matrix.identity();
			flixel_util_FlxBitmapDataUtil.matrix.translate(-halfBrushWidth,-halfBrushHeight);
			flixel_util_FlxBitmapDataUtil.matrix.rotate(bakedAngle * (Math.PI / 180));
			flixel_util_FlxBitmapDataUtil.matrix.translate(max * column + midpointX,midpointY);
			bakedAngle += bakedRotationAngle;
			result.draw(brush,flixel_util_FlxBitmapDataUtil.matrix,null,null,null,antiAliasing);
			++column;
		}
		midpointY += max;
		++row;
	}
	return result;
};
var flixel_util_FlxCollision = function() { };
$hxClasses["flixel.util.FlxCollision"] = flixel_util_FlxCollision;
flixel_util_FlxCollision.__name__ = ["flixel","util","FlxCollision"];
flixel_util_FlxCollision.pixelPerfectCheck = function(Contact,Target,AlphaTolerance,Camera) {
	if(AlphaTolerance == null) {
		AlphaTolerance = 1;
	}
	var considerRotation = Contact.angle != 0 || Target.angle != 0;
	if(Camera != null) {
		Camera = Camera;
	} else {
		Camera = flixel_FlxG.camera;
	}
	flixel_util_FlxCollision.pointA.set_x(Contact.x - (Camera.scroll.x * Contact.scrollFactor.x | 0) - Contact.offset.x);
	flixel_util_FlxCollision.pointA.set_y(Contact.y - (Camera.scroll.y * Contact.scrollFactor.y | 0) - Contact.offset.y);
	flixel_util_FlxCollision.pointB.set_x(Target.x - (Camera.scroll.x * Target.scrollFactor.x | 0) - Target.offset.x);
	flixel_util_FlxCollision.pointB.set_y(Target.y - (Camera.scroll.y * Target.scrollFactor.y | 0) - Target.offset.y);
	if(considerRotation) {
		Contact.origin.copyTo(flixel_util_FlxCollision.centerA);
		Target.origin.copyTo(flixel_util_FlxCollision.centerB);
		var _this = flixel_util_FlxCollision.centerA;
		var lengthA = Math.sqrt(_this.x * _this.x + _this.y * _this.y);
		flixel_util_FlxCollision.boundsA.x = flixel_util_FlxCollision.pointA.x + flixel_util_FlxCollision.centerA.x - lengthA;
		flixel_util_FlxCollision.boundsA.y = flixel_util_FlxCollision.pointA.y + flixel_util_FlxCollision.centerA.y - lengthA;
		flixel_util_FlxCollision.boundsA.width = lengthA * 2;
		flixel_util_FlxCollision.boundsA.height = flixel_util_FlxCollision.boundsA.width;
		var _this1 = flixel_util_FlxCollision.centerB;
		var lengthB = Math.sqrt(_this1.x * _this1.x + _this1.y * _this1.y);
		flixel_util_FlxCollision.boundsB.x = flixel_util_FlxCollision.pointB.x + flixel_util_FlxCollision.centerB.x - lengthB;
		flixel_util_FlxCollision.boundsB.y = flixel_util_FlxCollision.pointB.y + flixel_util_FlxCollision.centerB.y - lengthB;
		flixel_util_FlxCollision.boundsB.width = lengthB * 2;
		flixel_util_FlxCollision.boundsB.height = flixel_util_FlxCollision.boundsB.width;
	} else {
		flixel_util_FlxCollision.boundsA.x = flixel_util_FlxCollision.pointA.x;
		flixel_util_FlxCollision.boundsA.y = flixel_util_FlxCollision.pointA.y;
		flixel_util_FlxCollision.boundsA.width = Contact.frameWidth;
		flixel_util_FlxCollision.boundsA.height = Contact.frameHeight;
		flixel_util_FlxCollision.boundsB.x = flixel_util_FlxCollision.pointB.x;
		flixel_util_FlxCollision.boundsB.y = flixel_util_FlxCollision.pointB.y;
		flixel_util_FlxCollision.boundsB.width = Target.frameWidth;
		flixel_util_FlxCollision.boundsB.height = Target.frameHeight;
	}
	var _this2 = flixel_util_FlxCollision.intersect;
	_this2.x = 0;
	_this2.y = 0;
	_this2.width = 0;
	_this2.height = 0;
	flixel_util_FlxCollision.boundsA.intersection(flixel_util_FlxCollision.boundsB,_this2);
	var tmp;
	var tmp1;
	var _this3 = flixel_util_FlxCollision.intersect;
	if(!(_this3.width == 0 || _this3.height == 0)) {
		tmp1 = flixel_util_FlxCollision.intersect.width < 1;
	} else {
		tmp1 = true;
	}
	if(!tmp1) {
		tmp = flixel_util_FlxCollision.intersect.height < 1;
	} else {
		tmp = true;
	}
	if(tmp) {
		return false;
	}
	flixel_util_FlxCollision.matrixA.identity();
	flixel_util_FlxCollision.matrixA.translate(-(flixel_util_FlxCollision.intersect.x - flixel_util_FlxCollision.boundsA.x),-(flixel_util_FlxCollision.intersect.y - flixel_util_FlxCollision.boundsA.y));
	flixel_util_FlxCollision.matrixB.identity();
	flixel_util_FlxCollision.matrixB.translate(-(flixel_util_FlxCollision.intersect.x - flixel_util_FlxCollision.boundsB.x),-(flixel_util_FlxCollision.intersect.y - flixel_util_FlxCollision.boundsB.y));
	Contact.drawFrame();
	Target.drawFrame();
	var testA = Contact.framePixels;
	var testB = Target.framePixels;
	var overlapWidth = flixel_util_FlxCollision.intersect.width | 0;
	var overlapHeight = flixel_util_FlxCollision.intersect.height | 0;
	if(considerRotation) {
		flixel_util_FlxCollision.testMatrix.identity();
		flixel_util_FlxCollision.testMatrix.translate(-Contact.origin.x,-Contact.origin.y);
		flixel_util_FlxCollision.testMatrix.rotate(Contact.angle * (Math.PI / 180));
		flixel_util_FlxCollision.testMatrix.translate(flixel_util_FlxCollision.boundsA.width / 2,flixel_util_FlxCollision.boundsA.height / 2);
		var testA2 = flixel_util_FlxBitmapDataPool.get(Math.floor(flixel_util_FlxCollision.boundsA.width),Math.floor(flixel_util_FlxCollision.boundsA.height),true,0,false);
		testA2.draw(testA,flixel_util_FlxCollision.testMatrix,null,null,null,false);
		testA = testA2;
		flixel_util_FlxCollision.testMatrix.identity();
		flixel_util_FlxCollision.testMatrix.translate(-Target.origin.x,-Target.origin.y);
		flixel_util_FlxCollision.testMatrix.rotate(Target.angle * (Math.PI / 180));
		flixel_util_FlxCollision.testMatrix.translate(flixel_util_FlxCollision.boundsB.width / 2,flixel_util_FlxCollision.boundsB.height / 2);
		var testB2 = flixel_util_FlxBitmapDataPool.get(Math.floor(flixel_util_FlxCollision.boundsB.width),Math.floor(flixel_util_FlxCollision.boundsB.height),true,0,false);
		testB2.draw(testB,flixel_util_FlxCollision.testMatrix,null,null,null,false);
		testB = testB2;
	}
	flixel_util_FlxCollision.boundsA.x = -flixel_util_FlxCollision.matrixA.tx | 0;
	flixel_util_FlxCollision.boundsA.y = -flixel_util_FlxCollision.matrixA.ty | 0;
	flixel_util_FlxCollision.boundsA.width = overlapWidth;
	flixel_util_FlxCollision.boundsA.height = overlapHeight;
	flixel_util_FlxCollision.boundsB.x = -flixel_util_FlxCollision.matrixB.tx | 0;
	flixel_util_FlxCollision.boundsB.y = -flixel_util_FlxCollision.matrixB.ty | 0;
	flixel_util_FlxCollision.boundsB.width = overlapWidth;
	flixel_util_FlxCollision.boundsB.height = overlapHeight;
	var _this4 = flixel_util_FlxCollision.boundsA;
	var FlashRect = flixel_util_FlxCollision.flashRect;
	if(FlashRect == null) {
		FlashRect = new openfl_geom_Rectangle();
	}
	FlashRect.x = _this4.x;
	FlashRect.y = _this4.y;
	FlashRect.width = _this4.width;
	FlashRect.height = _this4.height;
	var pixelsA = testA.getPixels(flixel_util_FlxCollision.flashRect);
	var _this5 = flixel_util_FlxCollision.boundsB;
	var FlashRect1 = flixel_util_FlxCollision.flashRect;
	if(FlashRect1 == null) {
		FlashRect1 = new openfl_geom_Rectangle();
	}
	FlashRect1.x = _this5.x;
	FlashRect1.y = _this5.y;
	FlashRect1.width = _this5.width;
	FlashRect1.height = _this5.height;
	var pixelsB = testB.getPixels(flixel_util_FlxCollision.flashRect);
	var hit = false;
	var alphaA = 0;
	var alphaB = 0;
	var overlapPixels = overlapWidth * overlapHeight;
	var alphaIdx = 0;
	var _g1 = 0;
	var _g = Math.ceil(overlapPixels / 2);
	while(_g1 < _g) {
		var i = _g1++;
		alphaIdx = i << 3;
		pixelsA.position = pixelsB.position = alphaIdx;
		alphaA = pixelsA.readUnsignedByte();
		alphaB = pixelsB.readUnsignedByte();
		if(alphaA >= AlphaTolerance && alphaB >= AlphaTolerance) {
			hit = true;
			break;
		}
	}
	if(!hit) {
		var _g11 = 0;
		var _g2 = overlapPixels >> 1;
		while(_g11 < _g2) {
			var i1 = _g11++;
			alphaIdx = (i1 << 3) + 4;
			pixelsA.position = pixelsB.position = alphaIdx;
			alphaA = pixelsA.readUnsignedByte();
			alphaB = pixelsB.readUnsignedByte();
			if(alphaA >= AlphaTolerance && alphaB >= AlphaTolerance) {
				hit = true;
				break;
			}
		}
	}
	if(considerRotation) {
		flixel_util_FlxBitmapDataPool.put(testA);
		flixel_util_FlxBitmapDataPool.put(testB);
	}
	return hit;
};
flixel_util_FlxCollision.pixelPerfectPointCheck = function(PointX,PointY,Target,AlphaTolerance) {
	if(AlphaTolerance == null) {
		AlphaTolerance = 1;
	}
	if(!flixel_math_FlxMath.pointInCoordinates(PointX,PointY,Math.floor(Target.x),Math.floor(Target.y),Target.get_width() | 0,Target.get_height() | 0)) {
		return false;
	}
	if(flixel_FlxG.renderTile) {
		Target.drawFrame();
	}
	var test = Target.framePixels;
	var pixelAlpha = flixel_util__$FlxColor_FlxColor_$Impl_$._new(test.getPixel32(Math.floor(PointX - Target.x),Math.floor(PointY - Target.y))) >> 24 & 255;
	if(flixel_FlxG.renderTile) {
		pixelAlpha = pixelAlpha * Target.alpha | 0;
	}
	return pixelAlpha >= AlphaTolerance;
};
flixel_util_FlxCollision.createCameraWall = function(Camera,PlaceOutside,Thickness,AdjustWorldBounds) {
	if(AdjustWorldBounds == null) {
		AdjustWorldBounds = false;
	}
	if(PlaceOutside == null) {
		PlaceOutside = true;
	}
	var left = null;
	var right = null;
	var top = null;
	var bottom = null;
	if(PlaceOutside) {
		left = new flixel_tile_FlxTileblock(Math.floor(Camera.x - Thickness),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		right = new flixel_tile_FlxTileblock(Math.floor(Camera.x + Camera.width),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		top = new flixel_tile_FlxTileblock(Math.floor(Camera.x - Thickness),Math.floor(Camera.y - Thickness),Camera.width + Thickness * 2,Thickness);
		bottom = new flixel_tile_FlxTileblock(Math.floor(Camera.x - Thickness),Camera.height,Camera.width + Thickness * 2,Thickness);
		if(AdjustWorldBounds) {
			var _this = flixel_FlxG.worldBounds;
			_this.x = Camera.x - Thickness;
			_this.y = Camera.y - Thickness;
			_this.width = Camera.width + Thickness * 2;
			_this.height = Camera.height + Thickness * 2;
		}
	} else {
		left = new flixel_tile_FlxTileblock(Math.floor(Camera.x),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		right = new flixel_tile_FlxTileblock(Math.floor(Camera.x + Camera.width - Thickness),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		top = new flixel_tile_FlxTileblock(Math.floor(Camera.x),Math.floor(Camera.y),Camera.width,Thickness);
		bottom = new flixel_tile_FlxTileblock(Math.floor(Camera.x),Camera.height - Thickness,Camera.width,Thickness);
		if(AdjustWorldBounds) {
			var _this1 = flixel_FlxG.worldBounds;
			_this1.x = Camera.x;
			_this1.y = Camera.y;
			_this1.width = Camera.width;
			_this1.height = Camera.height;
		}
	}
	var result = new flixel_group_FlxTypedGroup();
	result.add(left);
	result.add(right);
	result.add(top);
	result.add(bottom);
	return result;
};
var flixel_util__$FlxColor_FlxColor_$Impl_$ = {};
$hxClasses["flixel.util._FlxColor.FlxColor_Impl_"] = flixel_util__$FlxColor_FlxColor_$Impl_$;
flixel_util__$FlxColor_FlxColor_$Impl_$.__name__ = ["flixel","util","_FlxColor","FlxColor_Impl_"];
flixel_util__$FlxColor_FlxColor_$Impl_$.__properties__ = {set_lightness:"set_lightness",get_lightness:"get_lightness",set_brightness:"set_brightness",get_brightness:"get_brightness",set_saturation:"set_saturation",get_saturation:"get_saturation",set_hue:"set_hue",get_hue:"get_hue",set_black:"set_black",get_black:"get_black",set_yellow:"set_yellow",get_yellow:"get_yellow",set_magenta:"set_magenta",get_magenta:"get_magenta",set_cyan:"set_cyan",get_cyan:"get_cyan",set_alphaFloat:"set_alphaFloat",get_alphaFloat:"get_alphaFloat",set_greenFloat:"set_greenFloat",get_greenFloat:"get_greenFloat",set_blueFloat:"set_blueFloat",get_blueFloat:"get_blueFloat",set_redFloat:"set_redFloat",get_redFloat:"get_redFloat",set_alpha:"set_alpha",get_alpha:"get_alpha",set_green:"set_green",get_green:"get_green",set_blue:"set_blue",get_blue:"get_blue",set_red:"set_red",get_red:"get_red"};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromInt = function(Value) {
	return flixel_util__$FlxColor_FlxColor_$Impl_$._new(Value);
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromRGB = function(Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 255;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= (Alpha > 255 ? 255 : Alpha < 0 ? 0 : Alpha) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromRGBFloat = function(Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var Value = Math.round(Red * 255);
	color &= -16711681;
	color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round(Green * 255);
	color &= -65281;
	color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round(Blue * 255);
	color &= -256;
	color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(Alpha * 255);
	color &= 16777215;
	color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromCMYK = function(Cyan,Magenta,Yellow,Black,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var Value = (1 - Cyan) * (1 - Black);
	var Value1 = Math.round(Value * 255);
	color &= -16711681;
	color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	var Value2 = (1 - Magenta) * (1 - Black);
	var Value3 = Math.round(Value2 * 255);
	color &= -65281;
	color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 8;
	var Value4 = (1 - Yellow) * (1 - Black);
	var Value5 = Math.round(Value4 * 255);
	color &= -256;
	color |= Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5;
	var Value6 = Math.round(Alpha * 255);
	color &= 16777215;
	color |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB = function(Hue,Saturation,Brightness,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var chroma = Brightness * Saturation;
	var match = Brightness - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		color &= -256;
		color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		color &= -256;
		color |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		color &= -256;
		color |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		color &= -65281;
		color |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		color &= -65281;
		color |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		color &= -256;
		color |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSL = function(Hue,Saturation,Lightness,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var chroma = (1 - Math.abs(2 * Lightness - 1)) * Saturation;
	var match = Lightness - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		color &= -256;
		color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		color &= -256;
		color |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		color &= -256;
		color |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		color &= -65281;
		color |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		color &= -65281;
		color |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		color &= -256;
		color |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromString = function(str) {
	var result = null;
	str = StringTools.trim(str);
	if(flixel_util__$FlxColor_FlxColor_$Impl_$.COLOR_REGEX.match(str)) {
		var hexColor = "0x" + flixel_util__$FlxColor_FlxColor_$Impl_$.COLOR_REGEX.matched(2);
		result = flixel_util__$FlxColor_FlxColor_$Impl_$._new(Std.parseInt(hexColor));
		if(hexColor.length == 8) {
			var Value = Math.round(255);
			result &= 16777215;
			result |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 24;
		}
	} else {
		str = str.toUpperCase();
		var key = flixel_util__$FlxColor_FlxColor_$Impl_$.colorLookup.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			if(key1.toUpperCase() == str) {
				var _this = flixel_util__$FlxColor_FlxColor_$Impl_$.colorLookup;
				result = flixel_util__$FlxColor_FlxColor_$Impl_$._new(__map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1]);
				break;
			}
		}
	}
	return result;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getHSBColorWheel = function(Alpha) {
	if(Alpha == null) {
		Alpha = 255;
	}
	var _g = [];
	var _g1 = 0;
	while(_g1 < 360) {
		var c = _g1++;
		_g.push(flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(c,1.0,1.0,Alpha));
	}
	return _g;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.interpolate = function(Color1,Color2,Factor) {
	if(Factor == null) {
		Factor = 0.5;
	}
	var r = ((Color2 >> 16 & 255) - (Color1 >> 16 & 255)) * Factor + (Color1 >> 16 & 255) | 0;
	var g = ((Color2 >> 8 & 255) - (Color1 >> 8 & 255)) * Factor + (Color1 >> 8 & 255) | 0;
	var b = ((Color2 & 255) - (Color1 & 255)) * Factor + (Color1 & 255) | 0;
	var a = ((Color2 >> 24 & 255) - (Color1 >> 24 & 255)) * Factor + (Color1 >> 24 & 255) | 0;
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (r > 255 ? 255 : r < 0 ? 0 : r) << 16;
	color &= -65281;
	color |= (g > 255 ? 255 : g < 0 ? 0 : g) << 8;
	color &= -256;
	color |= b > 255 ? 255 : b < 0 ? 0 : b;
	color &= 16777215;
	color |= (a > 255 ? 255 : a < 0 ? 0 : a) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.gradient = function(Color1,Color2,Steps,Ease) {
	var output = [];
	if(Ease == null) {
		Ease = function(t) {
			return t;
		};
	}
	var _g1 = 0;
	var _g = Steps;
	while(_g1 < _g) {
		var step = _g1++;
		var Factor = Ease(step / (Steps - 1));
		var r = ((Color2 >> 16 & 255) - (Color1 >> 16 & 255)) * Factor + (Color1 >> 16 & 255) | 0;
		var g = ((Color2 >> 8 & 255) - (Color1 >> 8 & 255)) * Factor + (Color1 >> 8 & 255) | 0;
		var b = ((Color2 & 255) - (Color1 & 255)) * Factor + (Color1 & 255) | 0;
		var a = ((Color2 >> 24 & 255) - (Color1 >> 24 & 255)) * Factor + (Color1 >> 24 & 255) | 0;
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		color &= -16711681;
		color |= (r > 255 ? 255 : r < 0 ? 0 : r) << 16;
		color &= -65281;
		color |= (g > 255 ? 255 : g < 0 ? 0 : g) << 8;
		color &= -256;
		color |= b > 255 ? 255 : b < 0 ? 0 : b;
		color &= 16777215;
		color |= (a > 255 ? 255 : a < 0 ? 0 : a) << 24;
		output[step] = color;
	}
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.multiply = function(lhs,rhs) {
	var Red = (lhs >> 16 & 255) / 255 * ((rhs >> 16 & 255) / 255);
	var Green = (lhs >> 8 & 255) / 255 * ((rhs >> 8 & 255) / 255);
	var Blue = (lhs & 255) / 255 * ((rhs & 255) / 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var Value = Math.round(Red * 255);
	color &= -16711681;
	color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round(Green * 255);
	color &= -65281;
	color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round(Blue * 255);
	color &= -256;
	color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(255);
	color &= 16777215;
	color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.add = function(lhs,rhs) {
	var Red = (lhs >> 16 & 255) + (rhs >> 16 & 255);
	var Green = (lhs >> 8 & 255) + (rhs >> 8 & 255);
	var Blue = (lhs & 255) + (rhs & 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= -16777216;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.subtract = function(lhs,rhs) {
	var Red = (lhs >> 16 & 255) - (rhs >> 16 & 255);
	var Green = (lhs >> 8 & 255) - (rhs >> 8 & 255);
	var Blue = (lhs & 255) - (rhs & 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= -16777216;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getComplementHarmony = function(this1) {
	return flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + 180,0,350),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getAnalogousHarmony = function(this1,Threshold) {
	if(Threshold == null) {
		Threshold = 30;
	}
	var warmer = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) - Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	var colder = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	return { original : this1, warmer : warmer, colder : colder};
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getSplitComplementHarmony = function(this1,Threshold) {
	if(Threshold == null) {
		Threshold = 30;
	}
	var oppositeHue = flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + 180,0,350);
	var warmer = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap(oppositeHue - Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	var colder = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap(oppositeHue + Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	return { original : this1, warmer : warmer, colder : colder};
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getTriadicHarmony = function(this1) {
	var triadic1 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + 120,0,359),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	var triadic2 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(triadic1) | 0) + 120,0,359),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	return { color1 : this1, color2 : triadic1, color3 : triadic2};
};
flixel_util__$FlxColor_FlxColor_$Impl_$.to24Bit = function(this1) {
	return this1 & 16777215;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.toHexString = function(this1,Alpha,Prefix) {
	if(Prefix == null) {
		Prefix = true;
	}
	if(Alpha == null) {
		Alpha = true;
	}
	var tmp = Alpha ? StringTools.hex(this1 >> 24 & 255,2) : "";
	return (Prefix ? "0x" : "") + tmp + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2);
};
flixel_util__$FlxColor_FlxColor_$Impl_$.toWebString = function(this1) {
	return "#" + ("" + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getColorInfo = function(this1) {
	var result = "0x" + StringTools.hex(this1 >> 24 & 255,2) + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2) + "\n";
	result += "Alpha: " + (this1 >> 24 & 255) + " Red: " + (this1 >> 16 & 255) + " Green: " + (this1 >> 8 & 255) + " Blue: " + (this1 & 255) + "\n";
	result += "Hue: " + flixel_math_FlxMath.roundDecimal(flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1),2) + " Saturation: " + flixel_math_FlxMath.roundDecimal((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),2) + " Brightness: " + flixel_math_FlxMath.roundDecimal(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),2) + " Lightness: " + flixel_math_FlxMath.roundDecimal((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) + Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / 2,2);
	return result;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getDarkened = function(this1,Factor) {
	if(Factor == null) {
		Factor = 0.2;
	}
	var lowerBound = Factor < 0 ? 0 : Factor;
	if(lowerBound > 1) {
		Factor = 1;
	} else {
		Factor = lowerBound;
	}
	var output = this1;
	var Value = (Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) + Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / 2 * (1 - Factor);
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(output);
	var Alpha = (output >> 24 & 255) / 255;
	var chroma = (1 - Math.abs(2 * Value - 1)) * ((Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) - Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)));
	var match = Value - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		output &= -256;
		output |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		output &= -256;
		output |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		output &= -256;
		output |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		output &= -65281;
		output |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		output &= -65281;
		output |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		output &= -256;
		output |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getLightened = function(this1,Factor) {
	if(Factor == null) {
		Factor = 0.2;
	}
	var lowerBound = Factor < 0 ? 0 : Factor;
	if(lowerBound > 1) {
		Factor = 1;
	} else {
		Factor = lowerBound;
	}
	var output = this1;
	var Value = (Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) + Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / 2 + (1 - (Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) + Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / 2) * Factor;
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(output);
	var Alpha = (output >> 24 & 255) / 255;
	var chroma = (1 - Math.abs(2 * Value - 1)) * ((Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) - Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)));
	var match = Value - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		output &= -256;
		output |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		output &= -256;
		output |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		output &= -256;
		output |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		output &= -65281;
		output |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		output &= -65281;
		output |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		output &= -256;
		output |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getInverted = function(this1) {
	var oldAlpha = this1 >> 24 & 255;
	var lhs = -1;
	var Red = (lhs >> 16 & 255) - (this1 >> 16 & 255);
	var Green = (lhs >> 8 & 255) - (this1 >> 8 & 255);
	var Blue = (lhs & 255) - (this1 & 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= -16777216;
	var output = color;
	output &= 16777215;
	output |= (oldAlpha > 255 ? 255 : oldAlpha < 0 ? 0 : oldAlpha) << 24;
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setRGB = function(this1,Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 255;
	}
	this1 &= -16711681;
	this1 |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	this1 &= -65281;
	this1 |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	this1 &= -256;
	this1 |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	this1 &= 16777215;
	this1 |= (Alpha > 255 ? 255 : Alpha < 0 ? 0 : Alpha) << 24;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setRGBFloat = function(this1,Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var Value = Math.round(Red * 255);
	this1 &= -16711681;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round(Green * 255);
	this1 &= -65281;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round(Blue * 255);
	this1 &= -256;
	this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setCMYK = function(this1,Cyan,Magenta,Yellow,Black,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var Value = (1 - Cyan) * (1 - Black);
	var Value1 = Math.round(Value * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	var Value2 = (1 - Magenta) * (1 - Black);
	var Value3 = Math.round(Value2 * 255);
	this1 &= -65281;
	this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 8;
	var Value4 = (1 - Yellow) * (1 - Black);
	var Value5 = Math.round(Value4 * 255);
	this1 &= -256;
	this1 |= Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5;
	var Value6 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 24;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setHSB = function(this1,Hue,Saturation,Brightness,Alpha) {
	var chroma = Brightness * Saturation;
	var match = Brightness - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setHSL = function(this1,Hue,Saturation,Lightness,Alpha) {
	var chroma = (1 - Math.abs(2 * Lightness - 1)) * Saturation;
	var match = Lightness - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setHSChromaMatch = function(this1,Hue,Saturation,Chroma,Match,Alpha) {
	Hue %= 360;
	var hueD = Hue / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + Match;
	Chroma += Match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(Match * 255);
		this1 &= -256;
		this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(Match * 255);
		this1 &= -256;
		this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(Match * 255);
		this1 &= -16711681;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(Match * 255);
		this1 &= -16711681;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(Match * 255);
		this1 &= -65281;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(Match * 255);
		this1 &= -65281;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$._new = function(Value) {
	if(Value == null) {
		Value = 0;
	}
	var this1 = Value;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getThis = function(this1) {
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.validate = function(this1) {
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_red = function(this1) {
	return this1 >> 16 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_green = function(this1) {
	return this1 >> 8 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_blue = function(this1) {
	return this1 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_alpha = function(this1) {
	return this1 >> 24 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_redFloat = function(this1) {
	return (this1 >> 16 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_greenFloat = function(this1) {
	return (this1 >> 8 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_blueFloat = function(this1) {
	return (this1 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_alphaFloat = function(this1) {
	return (this1 >> 24 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_red = function(this1,Value) {
	this1 &= -16711681;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_green = function(this1,Value) {
	this1 &= -65281;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 8;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_blue = function(this1,Value) {
	this1 &= -256;
	this1 |= Value > 255 ? 255 : Value < 0 ? 0 : Value;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_alpha = function(this1,Value) {
	this1 &= 16777215;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_redFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_greenFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= -65281;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_blueFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= -256;
	this1 |= Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_alphaFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= 16777215;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_cyan = function(this1) {
	return (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_magenta = function(this1) {
	return (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_yellow = function(this1) {
	return (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_black = function(this1) {
	return 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_cyan = function(this1,Value) {
	var Magenta = (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Yellow = (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Black = 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = (1 - Value) * (1 - Black);
	var Value2 = Math.round(Value1 * 255);
	this1 &= -16711681;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 16;
	var Value3 = (1 - Magenta) * (1 - Black);
	var Value4 = Math.round(Value3 * 255);
	this1 &= -65281;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 8;
	var Value5 = (1 - Yellow) * (1 - Black);
	var Value6 = Math.round(Value5 * 255);
	this1 &= -256;
	this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
	var Value7 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_magenta = function(this1,Value) {
	var Yellow = (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Black = 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = (1 - (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) * (1 - Black);
	var Value2 = Math.round(Value1 * 255);
	this1 &= -16711681;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 16;
	var Value3 = (1 - Value) * (1 - Black);
	var Value4 = Math.round(Value3 * 255);
	this1 &= -65281;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 8;
	var Value5 = (1 - Yellow) * (1 - Black);
	var Value6 = Math.round(Value5 * 255);
	this1 &= -256;
	this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
	var Value7 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_yellow = function(this1,Value) {
	var Magenta = (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Black = 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = (1 - (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) * (1 - Black);
	var Value2 = Math.round(Value1 * 255);
	this1 &= -16711681;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 16;
	var Value3 = (1 - Magenta) * (1 - Black);
	var Value4 = Math.round(Value3 * 255);
	this1 &= -65281;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 8;
	var Value5 = (1 - Value) * (1 - Black);
	var Value6 = Math.round(Value5 * 255);
	this1 &= -256;
	this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
	var Value7 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_black = function(this1,Value) {
	var Magenta = (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Yellow = (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = (1 - (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) * (1 - Value);
	var Value2 = Math.round(Value1 * 255);
	this1 &= -16711681;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 16;
	var Value3 = (1 - Magenta) * (1 - Value);
	var Value4 = Math.round(Value3 * 255);
	this1 &= -65281;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 8;
	var Value5 = (1 - Yellow) * (1 - Value);
	var Value6 = Math.round(Value5 * 255);
	this1 &= -256;
	this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
	var Value7 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue = function(this1) {
	var hueRad = Math.atan2(Math.sqrt(3) * ((this1 >> 8 & 255) / 255 - (this1 & 255) / 255),2 * ((this1 >> 16 & 255) / 255) - (this1 >> 8 & 255) / 255 - (this1 & 255) / 255);
	var hue = 0;
	if(hueRad != 0) {
		hue = 180 / Math.PI * Math.atan2(Math.sqrt(3) * ((this1 >> 8 & 255) / 255 - (this1 & 255) / 255),2 * ((this1 >> 16 & 255) / 255) - (this1 >> 8 & 255) / 255 - (this1 & 255) / 255);
	}
	if(hue < 0) {
		return hue + 360;
	} else {
		return hue;
	}
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_brightness = function(this1) {
	return Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_saturation = function(this1) {
	return (Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_lightness = function(this1) {
	return (Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) + Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / 2;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_hue = function(this1,Value) {
	var Brightness = Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = Brightness * ((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)));
	var match = Brightness - chroma;
	var Hue = Value;
	var Chroma = chroma;
	Hue %= 360;
	var hueD = Hue / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_saturation = function(this1,Value) {
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1);
	var Brightness = Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = Brightness * Value;
	var match = Brightness - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_brightness = function(this1,Value) {
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1);
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = Value * ((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)));
	var match = Value - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_lightness = function(this1,Value) {
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1);
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = (1 - Math.abs(2 * Value - 1)) * ((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)));
	var match = Value - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 %= 360;
	var hueD = Hue1 / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma += match;
	var _g = hueD | 0;
	switch(_g) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.maxColor = function(this1) {
	return Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.minColor = function(this1) {
	return Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.boundChannel = function(this1,Value) {
	if(Value > 255) {
		return 255;
	} else if(Value < 0) {
		return 0;
	} else {
		return Value;
	}
};
var flixel_util_FlxColorTransformUtil = function() { };
$hxClasses["flixel.util.FlxColorTransformUtil"] = flixel_util_FlxColorTransformUtil;
flixel_util_FlxColorTransformUtil.__name__ = ["flixel","util","FlxColorTransformUtil"];
flixel_util_FlxColorTransformUtil.setMultipliers = function(transform,red,green,blue,alpha) {
	transform.redMultiplier = red;
	transform.greenMultiplier = green;
	transform.blueMultiplier = blue;
	transform.alphaMultiplier = alpha;
	return transform;
};
flixel_util_FlxColorTransformUtil.setOffsets = function(transform,red,green,blue,alpha) {
	transform.redOffset = red;
	transform.greenOffset = green;
	transform.blueOffset = blue;
	transform.alphaOffset = alpha;
	return transform;
};
flixel_util_FlxColorTransformUtil.hasRGBMultipliers = function(transform) {
	if(!(transform.redMultiplier != 1 || transform.greenMultiplier != 1)) {
		return transform.blueMultiplier != 1;
	} else {
		return true;
	}
};
flixel_util_FlxColorTransformUtil.hasRGBAMultipliers = function(transform) {
	if(!flixel_util_FlxColorTransformUtil.hasRGBMultipliers(transform)) {
		return transform.alphaMultiplier != 1;
	} else {
		return true;
	}
};
flixel_util_FlxColorTransformUtil.hasRGBOffsets = function(transform) {
	if(!(transform.redOffset != 0 || transform.greenOffset != 0)) {
		return transform.blueOffset != 0;
	} else {
		return true;
	}
};
flixel_util_FlxColorTransformUtil.hasRGBAOffsets = function(transform) {
	if(!flixel_util_FlxColorTransformUtil.hasRGBOffsets(transform)) {
		return transform.alphaOffset != 0;
	} else {
		return true;
	}
};
var flixel_util_FlxDestroyUtil = function() { };
$hxClasses["flixel.util.FlxDestroyUtil"] = flixel_util_FlxDestroyUtil;
flixel_util_FlxDestroyUtil.__name__ = ["flixel","util","FlxDestroyUtil"];
flixel_util_FlxDestroyUtil.destroy = function(object) {
	if(object != null) {
		object.destroy();
	}
	return null;
};
flixel_util_FlxDestroyUtil.destroyArray = function(array) {
	if(array != null) {
		var _g = 0;
		while(_g < array.length) {
			var e = array[_g];
			++_g;
			flixel_util_FlxDestroyUtil.destroy(e);
		}
		array.splice(0,array.length);
	}
	return null;
};
flixel_util_FlxDestroyUtil.put = function(object) {
	if(object != null) {
		object.put();
	}
	return null;
};
flixel_util_FlxDestroyUtil.putArray = function(array) {
	if(array != null) {
		var _g = 0;
		while(_g < array.length) {
			var e = array[_g];
			++_g;
			flixel_util_FlxDestroyUtil.put(e);
		}
		array.splice(0,array.length);
	}
	return null;
};
flixel_util_FlxDestroyUtil.dispose = function(bitmapData) {
	if(bitmapData != null) {
		bitmapData.dispose();
	}
	return null;
};
flixel_util_FlxDestroyUtil.disposeIfNotEqual = function(bitmapData,width,height) {
	if(bitmapData != null && (bitmapData.width != width || bitmapData.height != height)) {
		bitmapData.dispose();
		return null;
	} else if(bitmapData != null) {
		return bitmapData;
	}
	return null;
};
flixel_util_FlxDestroyUtil.removeChild = function(parent,child) {
	if(parent != null && child != null && parent.contains(child)) {
		parent.removeChild(child);
	}
	return null;
};
var flixel_util_FlxHorizontalAlign = $hxClasses["flixel.util.FlxHorizontalAlign"] = { __ename__ : ["flixel","util","FlxHorizontalAlign"], __constructs__ : ["LEFT","CENTER","RIGHT"] };
flixel_util_FlxHorizontalAlign.LEFT = ["LEFT",0];
flixel_util_FlxHorizontalAlign.LEFT.toString = $estr;
flixel_util_FlxHorizontalAlign.LEFT.__enum__ = flixel_util_FlxHorizontalAlign;
flixel_util_FlxHorizontalAlign.CENTER = ["CENTER",1];
flixel_util_FlxHorizontalAlign.CENTER.toString = $estr;
flixel_util_FlxHorizontalAlign.CENTER.__enum__ = flixel_util_FlxHorizontalAlign;
flixel_util_FlxHorizontalAlign.RIGHT = ["RIGHT",2];
flixel_util_FlxHorizontalAlign.RIGHT.toString = $estr;
flixel_util_FlxHorizontalAlign.RIGHT.__enum__ = flixel_util_FlxHorizontalAlign;
var flixel_util_FlxPath = function(Nodes) {
	this._firstUpdate = false;
	this._wasObjectImmovable = null;
	this._autoRotate = false;
	this._inc = 1;
	this.finished = false;
	this.nodeIndex = 0;
	this.active = false;
	this.autoCenter = true;
	this.angle = 0;
	this.speed = 0;
	if(Nodes != null) {
		this._nodes = Nodes.slice();
	} else {
		this._nodes = [];
	}
};
$hxClasses["flixel.util.FlxPath"] = flixel_util_FlxPath;
flixel_util_FlxPath.__name__ = ["flixel","util","FlxPath"];
flixel_util_FlxPath.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_FlxPath.prototype = {
	reset: function() {
		this.autoCenter = true;
		return this;
	}
	,setProperties: function(Speed,Mode,AutoRotate) {
		if(AutoRotate == null) {
			AutoRotate = false;
		}
		if(Mode == null) {
			Mode = 0;
		}
		if(Speed == null) {
			Speed = 100;
		}
		this.speed = Math.abs(Speed);
		this._mode = Mode;
		this._autoRotate = AutoRotate;
		return this;
	}
	,start: function(Nodes,Speed,Mode,AutoRotate,NodesAsReference) {
		if(NodesAsReference == null) {
			NodesAsReference = false;
		}
		if(AutoRotate == null) {
			AutoRotate = false;
		}
		if(Mode == null) {
			Mode = 0;
		}
		if(Speed == null) {
			Speed = 100;
		}
		if(Nodes != null) {
			if(NodesAsReference) {
				this._nodes = Nodes;
			} else {
				this._nodes = Nodes.slice();
			}
		}
		this.setProperties(Speed,Mode,AutoRotate);
		if(this._nodes.length > 0) {
			this.restart();
		}
		return this;
	}
	,restart: function() {
		this.finished = false;
		this._firstUpdate = true;
		this.active = this._nodes.length > 0;
		if(!this.active) {
			return this;
		}
		if(this._mode == 1 || this._mode == 256) {
			this.nodeIndex = this._nodes.length - 1;
			this._inc = -1;
		} else {
			this.nodeIndex = 0;
			this._inc = 1;
		}
		return this;
	}
	,setNode: function(NodeIndex) {
		if(NodeIndex < 0) {
			NodeIndex = 0;
		} else if(NodeIndex > this._nodes.length - 1) {
			NodeIndex = this._nodes.length - 1;
		}
		this.nodeIndex = NodeIndex;
		this.advancePath();
		return this;
	}
	,update: function(elapsed) {
		if(this.object == null) {
			return;
		}
		if(this._firstUpdate) {
			this._wasObjectImmovable = this.object.immovable;
			this.object.set_immovable(true);
			this._firstUpdate = false;
		}
		flixel_util_FlxPath._point.set_x(this.object.x);
		flixel_util_FlxPath._point.set_y(this.object.y);
		if(this.autoCenter) {
			var _this = flixel_util_FlxPath._point;
			var X = this.object.get_width() * 0.5;
			var Y = this.object.get_height() * 0.5;
			var _g = _this;
			_g.set_x(_g.x + X);
			var _g1 = _this;
			_g1.set_y(_g1.y + Y);
		}
		var node = this._nodes[this.nodeIndex];
		var deltaX = node.x - flixel_util_FlxPath._point.x;
		var deltaY = node.y - flixel_util_FlxPath._point.y;
		var horizontalOnly = (this._mode & 65536) > 0;
		var verticalOnly = (this._mode & 1048576) > 0;
		if(horizontalOnly) {
			if((deltaX > 0 ? deltaX : -deltaX) < this.speed * elapsed) {
				node = this.advancePath();
			}
		} else if(verticalOnly) {
			if((deltaY > 0 ? deltaY : -deltaY) < this.speed * elapsed) {
				node = this.advancePath();
			}
		} else if(Math.sqrt(deltaX * deltaX + deltaY * deltaY) < this.speed * elapsed) {
			node = this.advancePath();
		}
		if(this.object != null && this.speed != 0) {
			flixel_util_FlxPath._point.set_x(this.object.x);
			flixel_util_FlxPath._point.set_y(this.object.y);
			if(this.autoCenter) {
				var _this1 = flixel_util_FlxPath._point;
				var X1 = this.object.get_width() * 0.5;
				var Y1 = this.object.get_height() * 0.5;
				var _g2 = _this1;
				_g2.set_x(_g2.x + X1);
				var _g3 = _this1;
				_g3.set_y(_g3.y + Y1);
			}
			var _this2 = flixel_util_FlxPath._point;
			var result = Math.abs(_this2.x - node.x) <= 0.0000001 && Math.abs(_this2.y - node.y) <= 0.0000001;
			if(node._weak) {
				node.put();
			}
			if(!result) {
				this.calculateVelocity(node,horizontalOnly,verticalOnly);
			} else {
				this.object.velocity.set();
			}
			if(this._autoRotate) {
				this.object.angularVelocity = 0;
				this.object.angularAcceleration = 0;
				this.object.set_angle(this.angle);
			}
			if(this.finished) {
				this.cancel();
			}
		}
	}
	,calculateVelocity: function(node,horizontalOnly,verticalOnly) {
		if(horizontalOnly || flixel_util_FlxPath._point.y == node.y) {
			this.object.velocity.set_x(flixel_util_FlxPath._point.x < node.x ? this.speed : -this.speed);
			this.angle = this.object.velocity.x < 0 ? -90 : 90;
			if(!horizontalOnly) {
				this.object.velocity.set_y(0);
			}
		} else if(verticalOnly || flixel_util_FlxPath._point.x == node.x) {
			this.object.velocity.set_y(flixel_util_FlxPath._point.y < node.y ? this.speed : -this.speed);
			this.angle = this.object.velocity.y < 0 ? 0 : 180;
			if(!verticalOnly) {
				this.object.velocity.set_x(0);
			}
		} else {
			this.object.velocity.set_x(flixel_util_FlxPath._point.x < node.x ? this.speed : -this.speed);
			this.object.velocity.set_y(flixel_util_FlxPath._point.y < node.y ? this.speed : -this.speed);
			this.angle = flixel_util_FlxPath._point.angleBetween(node);
			this.object.velocity.set(0,-this.speed);
			var tmp = this.object.velocity;
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			var point1 = point;
			point1._weak = true;
			tmp.rotate(point1,this.angle);
		}
	}
	,advancePath: function(Snap) {
		if(Snap == null) {
			Snap = true;
		}
		if(Snap) {
			var oldNode = this._nodes[this.nodeIndex];
			if(oldNode != null) {
				if((this._mode & 1048576) == 0) {
					this.object.set_x(oldNode.x);
					if(this.autoCenter) {
						var _g = this.object;
						_g.set_x(_g.x - this.object.get_width() * 0.5);
					}
				}
				if((this._mode & 65536) == 0) {
					this.object.set_y(oldNode.y);
					if(this.autoCenter) {
						var _g1 = this.object;
						_g1.set_y(_g1.y - this.object.get_height() * 0.5);
					}
				}
			}
		}
		var callComplete = false;
		this.nodeIndex += this._inc;
		if((this._mode & 1) > 0) {
			if(this.nodeIndex < 0) {
				this.nodeIndex = 0;
				callComplete = true;
				this.onEnd();
			}
		} else if((this._mode & 16) > 0) {
			if(this.nodeIndex >= this._nodes.length) {
				callComplete = true;
				this.nodeIndex = 0;
			}
		} else if((this._mode & 256) > 0) {
			if(this.nodeIndex < 0) {
				this.nodeIndex = this._nodes.length - 1;
				callComplete = true;
				if(this.nodeIndex < 0) {
					this.nodeIndex = 0;
				}
			}
		} else if((this._mode & 4096) > 0) {
			if(this._inc > 0) {
				if(this.nodeIndex >= this._nodes.length) {
					this.nodeIndex = this._nodes.length - 2;
					callComplete = true;
					if(this.nodeIndex < 0) {
						this.nodeIndex = 0;
					}
					this._inc = -this._inc;
				}
			} else if(this.nodeIndex < 0) {
				this.nodeIndex = 1;
				callComplete = true;
				if(this.nodeIndex >= this._nodes.length) {
					this.nodeIndex = this._nodes.length - 1;
				}
				if(this.nodeIndex < 0) {
					this.nodeIndex = 0;
				}
				this._inc = -this._inc;
			}
		} else if(this.nodeIndex >= this._nodes.length) {
			this.nodeIndex = this._nodes.length - 1;
			callComplete = true;
			this.onEnd();
		}
		if(callComplete && this.onComplete != null) {
			this.onComplete(this);
		}
		return this._nodes[this.nodeIndex];
	}
	,cancel: function() {
		this.onEnd();
		if(this.object != null) {
			this.object.velocity.set(0,0);
		}
		return this;
	}
	,onEnd: function() {
		this.finished = true;
		this.active = false;
		if(this._wasObjectImmovable != null) {
			this.object.set_immovable(this._wasObjectImmovable);
		}
		this._wasObjectImmovable = null;
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.putArray(this._nodes);
		this._nodes = null;
		this.object = null;
		this.onComplete = null;
	}
	,add: function(X,Y) {
		var tmp = this._nodes;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		tmp.push(point);
		return this;
	}
	,addAt: function(X,Y,Index) {
		if(Index < 0) {
			return this;
		}
		var _this = this._nodes;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		_this.splice(Index,0,point);
		return this;
	}
	,addPoint: function(Node,AsReference) {
		if(AsReference == null) {
			AsReference = false;
		}
		if(AsReference) {
			this._nodes.push(Node);
		} else {
			var tmp = this._nodes;
			var X = Node.x;
			var Y = Node.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			tmp.push(point);
		}
		return this;
	}
	,addPointAt: function(Node,Index,AsReference) {
		if(AsReference == null) {
			AsReference = false;
		}
		if(Index < 0) {
			return this;
		}
		if(AsReference) {
			this._nodes.splice(Index,0,Node);
		} else {
			var _this = this._nodes;
			var X = Node.x;
			var Y = Node.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			_this.splice(Index,0,point);
		}
		return this;
	}
	,remove: function(Node) {
		var index = this._nodes.indexOf(Node);
		if(index >= 0) {
			return this._nodes.splice(index,1)[0];
		}
		return null;
	}
	,removeAt: function(Index) {
		if(this._nodes.length <= 0) {
			return null;
		}
		if(Index >= this._nodes.length - 1) {
			this._nodes.pop();
		}
		return this._nodes.splice(Index,1)[0];
	}
	,head: function() {
		if(this._nodes.length > 0) {
			return this._nodes[0];
		}
		return null;
	}
	,tail: function() {
		if(this._nodes.length > 0) {
			return this._nodes[this._nodes.length - 1];
		}
		return null;
	}
	,get_nodes: function() {
		return this._nodes;
	}
	,set_nodes: function(Nodes) {
		if(Nodes != null) {
			this._nodes = Nodes;
		}
		return this._nodes;
	}
	,__class__: flixel_util_FlxPath
	,__properties__: {set_nodes:"set_nodes",get_nodes:"get_nodes"}
};
var flixel_util_FlxPool = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool"] = flixel_util_FlxPool;
flixel_util_FlxPool.__name__ = ["flixel","util","FlxPool"];
flixel_util_FlxPool.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool
	,__properties__: {get_length:"get_length"}
};
var flixel_util_FlxPool_$flixel_$util_$LabelValuePair = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_util_LabelValuePair"] = flixel_util_FlxPool_$flixel_$util_$LabelValuePair;
flixel_util_FlxPool_$flixel_$util_$LabelValuePair.__name__ = ["flixel","util","FlxPool_flixel_util_LabelValuePair"];
flixel_util_FlxPool_$flixel_$util_$LabelValuePair.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$util_$LabelValuePair.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$util_$LabelValuePair
	,__properties__: {get_length:"get_length"}
};
var flixel_util_FlxSaveStatus = $hxClasses["flixel.util.FlxSaveStatus"] = { __ename__ : ["flixel","util","FlxSaveStatus"], __constructs__ : ["SUCCESS","PENDING","ERROR"] };
flixel_util_FlxSaveStatus.SUCCESS = ["SUCCESS",0];
flixel_util_FlxSaveStatus.SUCCESS.toString = $estr;
flixel_util_FlxSaveStatus.SUCCESS.__enum__ = flixel_util_FlxSaveStatus;
flixel_util_FlxSaveStatus.PENDING = ["PENDING",1];
flixel_util_FlxSaveStatus.PENDING.toString = $estr;
flixel_util_FlxSaveStatus.PENDING.__enum__ = flixel_util_FlxSaveStatus;
flixel_util_FlxSaveStatus.ERROR = ["ERROR",2];
flixel_util_FlxSaveStatus.ERROR.toString = $estr;
flixel_util_FlxSaveStatus.ERROR.__enum__ = flixel_util_FlxSaveStatus;
var flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$ = {};
$hxClasses["flixel.util._FlxSignal.FlxTypedSignal_Impl_"] = flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$;
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.__name__ = ["flixel","util","_FlxSignal","FlxTypedSignal_Impl_"];
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.__properties__ = {get_dispatch:"get_dispatch"};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.add = function(this1,listener) {
	this1.add(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.addOnce = function(this1,listener) {
	this1.addOnce(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.remove = function(this1,listener) {
	this1.remove(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.has = function(this1,listener) {
	return this1.has(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.removeAll = function(this1) {
	this1.removeAll();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.get_dispatch = function(this1) {
	return this1.dispatch;
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal0 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal0();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal1 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal1();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal2 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal2();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal3 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal3();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal4 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal4();
};
var flixel_util__$FlxSignal_FlxSignalHandler = function(listener,dispatchOnce) {
	this.dispatchOnce = false;
	this.listener = listener;
	this.dispatchOnce = dispatchOnce;
};
$hxClasses["flixel.util._FlxSignal.FlxSignalHandler"] = flixel_util__$FlxSignal_FlxSignalHandler;
flixel_util__$FlxSignal_FlxSignalHandler.__name__ = ["flixel","util","_FlxSignal","FlxSignalHandler"];
flixel_util__$FlxSignal_FlxSignalHandler.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util__$FlxSignal_FlxSignalHandler.prototype = {
	destroy: function() {
		this.listener = null;
	}
	,__class__: flixel_util__$FlxSignal_FlxSignalHandler
};
var flixel_util_IFlxSignal = function() { };
$hxClasses["flixel.util.IFlxSignal"] = flixel_util_IFlxSignal;
flixel_util_IFlxSignal.__name__ = ["flixel","util","IFlxSignal"];
flixel_util_IFlxSignal.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_IFlxSignal.prototype = {
	__class__: flixel_util_IFlxSignal
};
var flixel_util__$FlxSignal_FlxBaseSignal = function() {
	this.processingListeners = false;
	this.handlers = [];
	this.pendingRemove = [];
};
$hxClasses["flixel.util._FlxSignal.FlxBaseSignal"] = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxBaseSignal.__name__ = ["flixel","util","_FlxSignal","FlxBaseSignal"];
flixel_util__$FlxSignal_FlxBaseSignal.__interfaces__ = [flixel_util_IFlxSignal];
flixel_util__$FlxSignal_FlxBaseSignal.prototype = {
	add: function(listener) {
		if(listener != null) {
			this.registerListener(listener,false);
		}
	}
	,addOnce: function(listener) {
		if(listener != null) {
			this.registerListener(listener,true);
		}
	}
	,remove: function(listener) {
		if(listener != null) {
			var handler = this.getHandler(listener);
			if(handler != null) {
				if(this.processingListeners) {
					this.pendingRemove.push(handler);
				} else {
					HxOverrides.remove(this.handlers,handler);
					handler.destroy();
				}
			}
		}
	}
	,has: function(listener) {
		if(listener == null) {
			return false;
		}
		return this.getHandler(listener) != null;
	}
	,removeAll: function() {
		flixel_util_FlxDestroyUtil.destroyArray(this.handlers);
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.destroyArray(this.handlers);
		this.handlers = null;
		this.pendingRemove = null;
	}
	,registerListener: function(listener,dispatchOnce) {
		var handler = this.getHandler(listener);
		if(handler == null) {
			handler = new flixel_util__$FlxSignal_FlxSignalHandler(listener,dispatchOnce);
			this.handlers.push(handler);
			return handler;
		} else if(handler.dispatchOnce != dispatchOnce) {
			throw new js__$Boot_HaxeError("You cannot addOnce() then add() the same listener without removing the relationship first.");
		} else {
			return handler;
		}
	}
	,getHandler: function(listener) {
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			if(handler.listener == listener) {
				return handler;
			}
		}
		return null;
	}
	,__class__: flixel_util__$FlxSignal_FlxBaseSignal
};
var flixel_util__$FlxSignal_FlxSignal0 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch0);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal0"] = flixel_util__$FlxSignal_FlxSignal0;
flixel_util__$FlxSignal_FlxSignal0.__name__ = ["flixel","util","_FlxSignal","FlxSignal0"];
flixel_util__$FlxSignal_FlxSignal0.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal0.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch0: function() {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener();
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal0
});
var flixel_util__$FlxSignal_FlxSignal1 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch1);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal1"] = flixel_util__$FlxSignal_FlxSignal1;
flixel_util__$FlxSignal_FlxSignal1.__name__ = ["flixel","util","_FlxSignal","FlxSignal1"];
flixel_util__$FlxSignal_FlxSignal1.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal1.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch1: function(value1) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal1
});
var flixel_util__$FlxSignal_FlxSignal2 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch2);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal2"] = flixel_util__$FlxSignal_FlxSignal2;
flixel_util__$FlxSignal_FlxSignal2.__name__ = ["flixel","util","_FlxSignal","FlxSignal2"];
flixel_util__$FlxSignal_FlxSignal2.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal2.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch2: function(value1,value2) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1,value2);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal2
});
var flixel_util__$FlxSignal_FlxSignal3 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch3);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal3"] = flixel_util__$FlxSignal_FlxSignal3;
flixel_util__$FlxSignal_FlxSignal3.__name__ = ["flixel","util","_FlxSignal","FlxSignal3"];
flixel_util__$FlxSignal_FlxSignal3.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal3.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch3: function(value1,value2,value3) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1,value2,value3);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal3
});
var flixel_util__$FlxSignal_FlxSignal4 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch4);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal4"] = flixel_util__$FlxSignal_FlxSignal4;
flixel_util__$FlxSignal_FlxSignal4.__name__ = ["flixel","util","_FlxSignal","FlxSignal4"];
flixel_util__$FlxSignal_FlxSignal4.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal4.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch4: function(value1,value2,value3,value4) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1,value2,value3,value4);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal4
});
var flixel_util__$FlxSignal_Macro = function() { };
$hxClasses["flixel.util._FlxSignal.Macro"] = flixel_util__$FlxSignal_Macro;
flixel_util__$FlxSignal_Macro.__name__ = ["flixel","util","_FlxSignal","Macro"];
var flixel_util_FlxSort = function() { };
$hxClasses["flixel.util.FlxSort"] = flixel_util_FlxSort;
flixel_util_FlxSort.__name__ = ["flixel","util","FlxSort"];
flixel_util_FlxSort.byY = function(Order,Obj1,Obj2) {
	var Value1 = Obj1.y;
	var Value2 = Obj2.y;
	var result = 0;
	if(Value1 < Value2) {
		result = Order;
	} else if(Value1 > Value2) {
		result = -Order;
	}
	return result;
};
flixel_util_FlxSort.byValues = function(Order,Value1,Value2) {
	var result = 0;
	if(Value1 < Value2) {
		result = Order;
	} else if(Value1 > Value2) {
		result = -Order;
	}
	return result;
};
var flixel_util_FlxSpriteUtil = function() { };
$hxClasses["flixel.util.FlxSpriteUtil"] = flixel_util_FlxSpriteUtil;
flixel_util_FlxSpriteUtil.__name__ = ["flixel","util","FlxSpriteUtil"];
flixel_util_FlxSpriteUtil.alphaMask = function(output,source,mask) {
	var data = flixel_system_FlxAssets.resolveBitmapData(source);
	var maskData = flixel_system_FlxAssets.resolveBitmapData(mask);
	if(data == null || maskData == null) {
		return null;
	}
	data = data.clone();
	data.copyChannel(maskData,new openfl_geom_Rectangle(0,0,data.width,data.height),new openfl_geom_Point(),8,8);
	output.set_pixels(data);
	return output;
};
flixel_util_FlxSpriteUtil.alphaMaskFlxSprite = function(sprite,mask,output) {
	sprite.drawFrame();
	var data = sprite.get_pixels().clone();
	data.copyChannel(mask.get_pixels(),new openfl_geom_Rectangle(0,0,sprite.get_width(),sprite.get_height()),new openfl_geom_Point(),8,8);
	output.set_pixels(data);
	return output;
};
flixel_util_FlxSpriteUtil.screenWrap = function(sprite,Left,Right,Top,Bottom) {
	if(Bottom == null) {
		Bottom = true;
	}
	if(Top == null) {
		Top = true;
	}
	if(Right == null) {
		Right = true;
	}
	if(Left == null) {
		Left = true;
	}
	if(Left && sprite.x + sprite.frameWidth / 2 <= 0) {
		sprite.set_x(flixel_FlxG.width);
	} else if(Right && sprite.x >= flixel_FlxG.width) {
		sprite.set_x(0);
	}
	if(Top && sprite.y + sprite.frameHeight / 2 <= 0) {
		sprite.set_y(flixel_FlxG.height);
	} else if(Bottom && sprite.y >= flixel_FlxG.height) {
		sprite.set_y(0);
	}
	return sprite;
};
flixel_util_FlxSpriteUtil.bound = function(sprite,MinX,MaxX,MinY,MaxY) {
	if(MaxY == null) {
		MaxY = 0;
	}
	if(MinY == null) {
		MinY = 0;
	}
	if(MaxX == null) {
		MaxX = 0;
	}
	if(MinX == null) {
		MinX = 0;
	}
	if(MaxX <= 0) {
		MaxX = flixel_FlxG.width;
	}
	if(MaxY <= 0) {
		MaxY = flixel_FlxG.height;
	}
	MaxX -= sprite.frameWidth;
	MaxY -= sprite.frameHeight;
	var Value = sprite.x;
	var lowerBound = MinX != null && Value < MinX ? MinX : Value;
	sprite.set_x(MaxX != null && lowerBound > MaxX ? MaxX : lowerBound);
	var Value1 = sprite.y;
	var lowerBound1 = MinY != null && Value1 < MinY ? MinY : Value1;
	sprite.set_y(MaxY != null && lowerBound1 > MaxY ? MaxY : lowerBound1);
	return sprite;
};
flixel_util_FlxSpriteUtil.space = function(objects,startX,startY,horizontalSpacing,verticalSpacing,spaceFromBounds) {
	if(spaceFromBounds == null) {
		spaceFromBounds = false;
	}
	if(verticalSpacing == null) {
		verticalSpacing = 0;
	}
	if(horizontalSpacing == null) {
		horizontalSpacing = 0;
	}
	var prevWidth = 0;
	var prevHeight = 0;
	var _g1 = 0;
	var _g = objects.length;
	while(_g1 < _g) {
		var i = _g1++;
		var object = objects[i];
		if(spaceFromBounds) {
			object.set_x(startX + prevWidth + i * horizontalSpacing);
			object.set_y(startY + prevHeight + i * verticalSpacing);
		} else {
			object.set_x(startX + i * horizontalSpacing);
			object.set_y(startY + i * verticalSpacing);
		}
	}
};
flixel_util_FlxSpriteUtil.drawLine = function(sprite,StartX,StartY,EndX,EndY,lineStyle,drawStyle) {
	var lineStyle1 = lineStyle;
	if(lineStyle1 == null) {
		lineStyle1 = { thickness : 1, color : -1};
	}
	if(lineStyle1.thickness == null) {
		lineStyle1.thickness = 1;
	}
	if(lineStyle1.color == null) {
		lineStyle1.color = -1;
	}
	lineStyle = lineStyle1;
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(0 != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(0 & 16777215,(0 >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(StartX,StartY);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(EndX,EndY);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawCurve = function(sprite,StartX,StartY,EndX,EndY,ControlX,ControlY,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = 0;
	}
	var lineStyle1 = lineStyle;
	if(lineStyle1 == null) {
		lineStyle1 = { thickness : 1, color : -1};
	}
	if(lineStyle1.thickness == null) {
		lineStyle1.thickness = 1;
	}
	if(lineStyle1.color == null) {
		lineStyle1.color = -1;
	}
	lineStyle = lineStyle1;
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(StartX,StartY);
	flixel_util_FlxSpriteUtil.flashGfx.curveTo(EndX,EndY,ControlX,ControlY);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawRect = function(sprite,X,Y,Width,Height,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawRect(X,Y,Width,Height);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawRoundRect = function(sprite,X,Y,Width,Height,EllipseWidth,EllipseHeight,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawRoundRect(X,Y,Width,Height,EllipseWidth,EllipseHeight);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawCircle = function(sprite,X,Y,Radius,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	if(Radius == null) {
		Radius = -1;
	}
	if(Y == null) {
		Y = -1;
	}
	if(X == null) {
		X = -1;
	}
	if(X == -1 || Y == -1) {
		var midPoint = sprite.getGraphicMidpoint();
		if(X == -1) {
			X = midPoint.x - sprite.x;
		}
		if(Y == -1) {
			Y = midPoint.y - sprite.y;
		}
		midPoint.put();
	}
	if(Radius < 1) {
		var minVal = Math.min(sprite.frameWidth,sprite.frameHeight);
		Radius = minVal / 2;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawCircle(X,Y,Radius);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawEllipse = function(sprite,X,Y,Width,Height,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawEllipse(X,Y,Width,Height);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawTriangle = function(sprite,X,Y,Height,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(X + Height / 2,Y);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(X + Height,Height + Y);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(X,Height + Y);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(X + Height / 2,Y);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawPolygon = function(sprite,Vertices,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	var p = Vertices.shift();
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(p.x,p.y);
	var _g = 0;
	while(_g < Vertices.length) {
		var p1 = Vertices[_g];
		++_g;
		flixel_util_FlxSpriteUtil.flashGfx.lineTo(p1.x,p1.y);
	}
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	Vertices.unshift(p);
	return sprite;
};
flixel_util_FlxSpriteUtil.beginDraw = function(FillColor,lineStyle) {
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
};
flixel_util_FlxSpriteUtil.endDraw = function(sprite,drawStyle) {
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.updateSpriteGraphic = function(sprite,drawStyle) {
	if(drawStyle == null) {
		drawStyle = { smoothing : false};
	} else if(drawStyle.smoothing == null) {
		drawStyle.smoothing = false;
	}
	sprite.get_pixels().draw(flixel_util_FlxSpriteUtil.flashGfxSprite,drawStyle.matrix,drawStyle.colorTransform,drawStyle.blendMode,drawStyle.clipRect,drawStyle.smoothing);
	sprite.dirty = true;
	return sprite;
};
flixel_util_FlxSpriteUtil.setLineStyle = function(lineStyle) {
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
};
flixel_util_FlxSpriteUtil.getDefaultLineStyle = function(lineStyle) {
	if(lineStyle == null) {
		lineStyle = { thickness : 1, color : -1};
	}
	if(lineStyle.thickness == null) {
		lineStyle.thickness = 1;
	}
	if(lineStyle.color == null) {
		lineStyle.color = -1;
	}
	return lineStyle;
};
flixel_util_FlxSpriteUtil.fill = function(sprite,FillColor) {
	sprite.get_pixels().fillRect(sprite.get_pixels().rect,FillColor);
	if(sprite.get_pixels() != sprite.framePixels) {
		sprite.dirty = true;
	}
	return sprite;
};
flixel_util_FlxSpriteUtil.flicker = function(Object,Duration,Interval,EndVisibility,ForceRestart,CompletionCallback,ProgressCallback) {
	if(ForceRestart == null) {
		ForceRestart = true;
	}
	if(EndVisibility == null) {
		EndVisibility = true;
	}
	if(Interval == null) {
		Interval = 0.04;
	}
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_effects_FlxFlicker.flicker(Object,Duration,Interval,EndVisibility,ForceRestart,CompletionCallback,ProgressCallback);
};
flixel_util_FlxSpriteUtil.isFlickering = function(Object) {
	return flixel_effects_FlxFlicker.isFlickering(Object);
};
flixel_util_FlxSpriteUtil.stopFlickering = function(Object) {
	flixel_effects_FlxFlicker.stopFlickering(Object);
	return Object;
};
flixel_util_FlxSpriteUtil.fadeIn = function(sprite,Duration,ResetAlpha,OnComplete) {
	if(Duration == null) {
		Duration = 1;
	}
	if(ResetAlpha) {
		sprite.set_alpha(0);
	}
	var a1 = sprite;
	var tmp = function(f) {
		flixel_util_FlxSpriteUtil.alphaTween(a1,f);
	};
	flixel_tweens_FlxTween.num(sprite.alpha,1,Duration,{ onComplete : OnComplete},tmp);
	return sprite;
};
flixel_util_FlxSpriteUtil.fadeOut = function(sprite,Duration,OnComplete) {
	if(Duration == null) {
		Duration = 1;
	}
	var a1 = sprite;
	var tmp = function(f) {
		flixel_util_FlxSpriteUtil.alphaTween(a1,f);
	};
	flixel_tweens_FlxTween.num(sprite.alpha,0,Duration,{ onComplete : OnComplete},tmp);
	return sprite;
};
flixel_util_FlxSpriteUtil.alphaTween = function(sprite,f) {
	sprite.set_alpha(f);
};
var flixel_util_FlxStringUtil = function() { };
$hxClasses["flixel.util.FlxStringUtil"] = flixel_util_FlxStringUtil;
flixel_util_FlxStringUtil.__name__ = ["flixel","util","FlxStringUtil"];
flixel_util_FlxStringUtil.formatTicks = function(StartTicks,EndTicks) {
	return Math.abs(EndTicks - StartTicks) / 1000 + "s";
};
flixel_util_FlxStringUtil.formatTime = function(Seconds,ShowMS) {
	if(ShowMS == null) {
		ShowMS = false;
	}
	var timeString = (Seconds / 60 | 0) + ":";
	var timeStringHelper = (Seconds | 0) % 60;
	if(timeStringHelper < 10) {
		timeString += "0";
	}
	timeString += timeStringHelper;
	if(ShowMS) {
		timeString += ".";
		timeStringHelper = (Seconds - (Seconds | 0)) * 100 | 0;
		if(timeStringHelper < 10) {
			timeString += "0";
		}
		timeString += timeStringHelper;
	}
	return timeString;
};
flixel_util_FlxStringUtil.formatArray = function(AnyArray) {
	var string = "";
	if(AnyArray != null && AnyArray.length > 0) {
		string = Std.string(AnyArray[0]);
		var i = 1;
		var l = AnyArray.length;
		while(i < l) string += ", " + Std.string(AnyArray[i++]);
	}
	return string;
};
flixel_util_FlxStringUtil.formatStringMap = function(AnyMap) {
	var string = "";
	var key = AnyMap.keys();
	while(key.hasNext()) {
		var key1 = key.next();
		string += key1 == null ? "null" : "" + key1;
		string += ", ";
	}
	return string.substring(0,string.length - 2);
};
flixel_util_FlxStringUtil.formatMoney = function(Amount,ShowDecimal,EnglishStyle) {
	if(EnglishStyle == null) {
		EnglishStyle = true;
	}
	if(ShowDecimal == null) {
		ShowDecimal = true;
	}
	var isNegative = Amount < 0;
	Amount = Math.abs(Amount);
	var string = "";
	var comma = "";
	var amount = Math.floor(Amount);
	while(amount > 0) {
		if(string.length > 0 && comma.length <= 0) {
			if(EnglishStyle) {
				comma = ",";
			} else {
				comma = ".";
			}
		}
		var zeroes = "";
		var helper = amount - Math.floor(amount / 1000) * 1000;
		amount = Math.floor(amount / 1000);
		if(amount > 0) {
			if(helper < 100) {
				zeroes += "0";
			}
			if(helper < 10) {
				zeroes += "0";
			}
		}
		string = zeroes + helper + comma + string;
	}
	if(string == "") {
		string = "0";
	}
	if(ShowDecimal) {
		amount = Math.floor(Amount * 100) - Math.floor(Amount) * 100;
		string += EnglishStyle ? "." : ",";
		if(amount < 10) {
			string += "0";
		}
		string += amount;
	}
	if(isNegative) {
		string = "-" + string;
	}
	return string;
};
flixel_util_FlxStringUtil.formatBytes = function(Bytes,Precision) {
	if(Precision == null) {
		Precision = 2;
	}
	var units = ["Bytes","kB","MB","GB","TB","PB"];
	var curUnit = 0;
	while(Bytes >= 1024 && curUnit < units.length - 1) {
		Bytes /= 1024;
		++curUnit;
	}
	return flixel_math_FlxMath.roundDecimal(Bytes,Precision) + units[curUnit];
};
flixel_util_FlxStringUtil.filterDigits = function(Input) {
	var output_b = "";
	var _g1 = 0;
	var _g = Input.length;
	while(_g1 < _g) {
		var i = _g1++;
		var c = HxOverrides.cca(Input,i);
		if(c >= 48 && c <= 57) {
			output_b += String.fromCharCode(c);
		}
	}
	return output_b;
};
flixel_util_FlxStringUtil.htmlFormat = function(Text,Size,Color,Bold,Italic,Underlined) {
	if(Underlined == null) {
		Underlined = false;
	}
	if(Italic == null) {
		Italic = false;
	}
	if(Bold == null) {
		Bold = false;
	}
	if(Color == null) {
		Color = "FFFFFF";
	}
	if(Size == null) {
		Size = 12;
	}
	var prefix = "<font size='" + Size + "' color='#" + Color + "'>";
	var suffix = "</font>";
	if(Bold) {
		prefix = "<b>" + prefix;
		suffix += "</b>";
	}
	if(Italic) {
		prefix = "<i>" + prefix;
		suffix += "</i>";
	}
	if(Underlined) {
		prefix = "<u>" + prefix;
		suffix += "</u>";
	}
	return prefix + Text + suffix;
};
flixel_util_FlxStringUtil.getClassName = function(Obj,Simple) {
	if(Simple == null) {
		Simple = false;
	}
	var cl;
	if(js_Boot.__instanceof(Obj,Class)) {
		cl = Obj;
	} else {
		var o = Obj;
		if(o == null) {
			cl = null;
		} else {
			cl = js_Boot.getClass(o);
		}
	}
	var s = Type.getClassName(cl);
	if(s != null) {
		s = StringTools.replace(s,"::",".");
		if(Simple) {
			s = HxOverrides.substr(s,s.lastIndexOf(".") + 1,null);
		}
	}
	return s;
};
flixel_util_FlxStringUtil.getHost = function(url) {
	var hostFromURL = new EReg("^(?:[a-z][a-z0-9+\\-.]*://)?(?:[a-z0-9\\-._~%!$&'()*+,;=]+@)?([a-z0-9\\-._~%]{3,}|\\[[a-f0-9:.]+\\])?(?::[0-9]+)?","i");
	if(hostFromURL.match(url)) {
		var host = hostFromURL.matched(1);
		if(host != null) {
			return decodeURIComponent(host.split("+").join(" ")).toLowerCase();
		} else {
			return "";
		}
	}
	return "";
};
flixel_util_FlxStringUtil.getDomain = function(url) {
	var host = flixel_util_FlxStringUtil.getHost(url);
	var isLocalhostOrIpAddress = new EReg("^(localhost|[0-9.]+|\\[[a-f0-9:.]+\\])$","i");
	var domainFromHost = new EReg("^(?:[a-z0-9\\-]+\\.)*([a-z0-9\\-]+\\.[a-z0-9\\-]+)$","i");
	if(!isLocalhostOrIpAddress.match(host) && domainFromHost.match(host)) {
		var domain = domainFromHost.matched(1);
		if(domain != null) {
			return domain.toLowerCase();
		} else {
			return "";
		}
	}
	return "";
};
flixel_util_FlxStringUtil.sameClassName = function(Obj1,Obj2,Simple) {
	if(Simple == null) {
		Simple = true;
	}
	return flixel_util_FlxStringUtil.getClassName(Obj1,Simple) == flixel_util_FlxStringUtil.getClassName(Obj2,Simple);
};
flixel_util_FlxStringUtil.toIntArray = function(Data) {
	if(Data != null && Data != "") {
		var strArray = Data.split(",");
		var iArray = [];
		var _g = 0;
		while(_g < strArray.length) {
			var str = strArray[_g];
			++_g;
			iArray.push(Std.parseInt(str));
		}
		return iArray;
	}
	return null;
};
flixel_util_FlxStringUtil.toFloatArray = function(Data) {
	if(Data != null && Data != "") {
		var strArray = Data.split(",");
		var fArray = [];
		var _g = 0;
		while(_g < strArray.length) {
			var str = strArray[_g];
			++_g;
			fArray.push(parseFloat(str));
		}
		return fArray;
	}
	return null;
};
flixel_util_FlxStringUtil.arrayToCSV = function(Data,Width,Invert) {
	if(Invert == null) {
		Invert = false;
	}
	var row = 0;
	var column;
	var csv = "";
	var height = Data.length / Width | 0;
	var index;
	var offset = 0;
	while(row < height) {
		column = 0;
		while(column < Width) {
			index = Data[offset];
			if(Invert) {
				if(index == 0) {
					index = 1;
				} else if(index == 1) {
					index = 0;
				}
			}
			if(column == 0) {
				if(row == 0) {
					csv += index;
				} else {
					csv += "\n" + index;
				}
			} else {
				csv += ", " + index;
			}
			++column;
			++offset;
		}
		++row;
	}
	return csv;
};
flixel_util_FlxStringUtil.bitmapToCSV = function(Bitmap,Invert,Scale,ColorMap) {
	if(Scale == null) {
		Scale = 1;
	}
	if(Invert == null) {
		Invert = false;
	}
	if(Scale < 1) {
		Scale = 1;
	}
	if(Scale > 1) {
		var bd = Bitmap;
		Bitmap = new openfl_display_BitmapData(Bitmap.width * Scale,Bitmap.height * Scale);
		var bdW = bd.width;
		var bdH = bd.height;
		var pCol = 0;
		var _g1 = 0;
		var _g = bdW;
		while(_g1 < _g) {
			var i = _g1++;
			var _g3 = 0;
			var _g2 = bdH;
			while(_g3 < _g2) {
				var j = _g3++;
				pCol = bd.getPixel(i,j);
				var _g5 = 0;
				var _g4 = Scale;
				while(_g5 < _g4) {
					var k = _g5++;
					var _g7 = 0;
					var _g6 = Scale;
					while(_g7 < _g6) {
						var m = _g7++;
						Bitmap.setPixel(i * Scale + k,j * Scale + m,pCol);
					}
				}
			}
		}
	}
	if(ColorMap != null) {
		var _g11 = 0;
		var _g8 = ColorMap.length;
		while(_g11 < _g8) {
			var i1 = _g11++;
			ColorMap[i1] = ColorMap[i1] & 16777215;
		}
	}
	var row = 0;
	var column;
	var pixel;
	var csv = "";
	var bitmapWidth = Bitmap.width;
	var bitmapHeight = Bitmap.height;
	while(row < bitmapHeight) {
		column = 0;
		while(column < bitmapWidth) {
			pixel = Bitmap.getPixel(column,row);
			if(ColorMap != null) {
				pixel = ColorMap.indexOf(pixel);
			} else if(Invert && pixel > 0 || !Invert && pixel == 0) {
				pixel = 1;
			} else {
				pixel = 0;
			}
			if(column == 0) {
				if(row == 0) {
					csv += pixel;
				} else {
					csv += "\n" + pixel;
				}
			} else {
				csv += ", " + pixel;
			}
			++column;
		}
		++row;
	}
	return csv;
};
flixel_util_FlxStringUtil.imageToCSV = function(ImageFile,Invert,Scale,ColorMap) {
	if(Scale == null) {
		Scale = 1;
	}
	if(Invert == null) {
		Invert = false;
	}
	var tempBitmapData;
	if(typeof(ImageFile) == "string") {
		var id = ImageFile;
		if(openfl_Assets.exists(id)) {
			tempBitmapData = openfl_Assets.getBitmapData(id,false);
		} else {
			var _this = flixel_FlxG.log;
			tempBitmapData = null;
		}
	} else {
		tempBitmapData = Type.createInstance(ImageFile,[]).bitmapData;
	}
	return flixel_util_FlxStringUtil.bitmapToCSV(tempBitmapData,Invert,Scale,ColorMap);
};
flixel_util_FlxStringUtil.getDebugString = function(LabelValuePairs) {
	var output = "(";
	var _g = 0;
	while(_g < LabelValuePairs.length) {
		var pair = LabelValuePairs[_g];
		++_g;
		output += pair.label + ": ";
		var value = pair.value;
		if(typeof(value) == "number") {
			value = flixel_math_FlxMath.roundDecimal(value,flixel_FlxG["debugger"].precision);
		}
		output += Std.string(value) + " | ";
		flixel_util_LabelValuePair._pool.put(pair);
	}
	output = StringTools.trim(HxOverrides.substr(output,0,output.length - 2));
	return output + ")";
};
flixel_util_FlxStringUtil.contains = function(s,str) {
	return s.indexOf(str) != -1;
};
flixel_util_FlxStringUtil.remove = function(s,sub) {
	return StringTools.replace(s,sub,"");
};
flixel_util_FlxStringUtil.insert = function(s,pos,insertion) {
	return s.substring(0,pos) + insertion + HxOverrides.substr(s,pos,null);
};
flixel_util_FlxStringUtil.sortAlphabetically = function(list) {
	list.sort(function(a,b) {
		a = a.toLowerCase();
		b = b.toLowerCase();
		if(a < b) {
			return -1;
		}
		if(a > b) {
			return 1;
		}
		return 0;
	});
	return list;
};
flixel_util_FlxStringUtil.isNullOrEmpty = function(s) {
	if(s != null) {
		return s.length == 0;
	} else {
		return true;
	}
};
var flixel_util_LabelValuePair = function() {
};
$hxClasses["flixel.util.LabelValuePair"] = flixel_util_LabelValuePair;
flixel_util_LabelValuePair.__name__ = ["flixel","util","LabelValuePair"];
flixel_util_LabelValuePair.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_LabelValuePair.weak = function(label,value) {
	var _this = flixel_util_LabelValuePair._pool.get();
	_this.label = label;
	_this.value = value;
	return _this;
};
flixel_util_LabelValuePair.prototype = {
	create: function(label,value) {
		this.label = label;
		this.value = value;
		return this;
	}
	,put: function() {
		flixel_util_LabelValuePair._pool.put(this);
	}
	,destroy: function() {
		this.label = null;
		this.value = null;
	}
	,__class__: flixel_util_LabelValuePair
};
var flixel_util_FlxTimer = function(manager) {
	this._inManager = false;
	this._loopsCounter = 0;
	this._timeCounter = 0;
	this.finished = false;
	this.active = false;
	this.loops = 0;
	this.time = 0;
	this.manager = manager != null ? manager : flixel_util_FlxTimer.globalManager;
};
$hxClasses["flixel.util.FlxTimer"] = flixel_util_FlxTimer;
flixel_util_FlxTimer.__name__ = ["flixel","util","FlxTimer"];
flixel_util_FlxTimer.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_FlxTimer.globalManager = null;
flixel_util_FlxTimer.prototype = {
	destroy: function() {
		this.onComplete = null;
	}
	,start: function(Time,OnComplete,Loops) {
		if(Loops == null) {
			Loops = 1;
		}
		if(Time == null) {
			Time = 1;
		}
		if(this.manager != null && !this._inManager) {
			this.manager.add(this);
			this._inManager = true;
		}
		this.active = true;
		this.finished = false;
		this.time = Math.abs(Time);
		if(Loops < 0) {
			Loops *= -1;
		}
		this.loops = Loops;
		this.onComplete = OnComplete;
		this._timeCounter = 0;
		this._loopsCounter = 0;
		return this;
	}
	,reset: function(NewTime) {
		if(NewTime == null) {
			NewTime = -1;
		}
		if(NewTime < 0) {
			NewTime = this.time;
		}
		this.start(NewTime,this.onComplete,this.loops);
		return this;
	}
	,cancel: function() {
		this.finished = true;
		this.active = false;
		if(this.manager != null && this._inManager) {
			this.manager.remove(this);
			this._inManager = false;
		}
	}
	,update: function(elapsed) {
		this._timeCounter += elapsed;
		while(this._timeCounter >= this.time && this.active && !this.finished) {
			this._timeCounter -= this.time;
			this._loopsCounter++;
			if(this.loops > 0 && this._loopsCounter >= this.loops) {
				this.finished = true;
			}
		}
	}
	,onLoopFinished: function() {
		if(this.finished) {
			this.cancel();
		}
		if(this.onComplete != null) {
			this.onComplete(this);
		}
	}
	,get_timeLeft: function() {
		return this.time - this._timeCounter;
	}
	,get_elapsedTime: function() {
		return this._timeCounter;
	}
	,get_loopsLeft: function() {
		return this.loops - this._loopsCounter;
	}
	,get_elapsedLoops: function() {
		return this._loopsCounter;
	}
	,get_progress: function() {
		if(this.time > 0) {
			return this._timeCounter / this.time;
		} else {
			return 0;
		}
	}
	,__class__: flixel_util_FlxTimer
	,__properties__: {get_progress:"get_progress",get_elapsedLoops:"get_elapsedLoops",get_loopsLeft:"get_loopsLeft",get_elapsedTime:"get_elapsedTime",get_timeLeft:"get_timeLeft"}
};
var flixel_util_FlxTimerManager = function() {
	this._timers = [];
	flixel_FlxBasic.call(this);
	this.set_visible(false);
	flixel_FlxG.signals.stateSwitched.add($bind(this,this.clear));
};
$hxClasses["flixel.util.FlxTimerManager"] = flixel_util_FlxTimerManager;
flixel_util_FlxTimerManager.__name__ = ["flixel","util","FlxTimerManager"];
flixel_util_FlxTimerManager.__super__ = flixel_FlxBasic;
flixel_util_FlxTimerManager.prototype = $extend(flixel_FlxBasic.prototype,{
	destroy: function() {
		flixel_util_FlxArrayUtil.clearArray(this._timers);
		this._timers = null;
		flixel_FlxG.signals.stateSwitched.remove($bind(this,this.clear));
		flixel_FlxBasic.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		var loopedTimers = null;
		var _g = 0;
		var _g1 = this._timers;
		while(_g < _g1.length) {
			var timer = _g1[_g];
			++_g;
			if(timer.active && !timer.finished && timer.time >= 0) {
				var timerLoops = timer._loopsCounter;
				timer.update(elapsed);
				if(timerLoops != timer._loopsCounter) {
					if(loopedTimers == null) {
						loopedTimers = [];
					}
					loopedTimers.push(timer);
				}
			}
		}
		if(loopedTimers != null) {
			while(loopedTimers.length > 0) loopedTimers.shift().onLoopFinished();
		}
	}
	,add: function(Timer) {
		this._timers.push(Timer);
	}
	,remove: function(Timer) {
		var array = this._timers;
		var index = array.indexOf(Timer);
		if(index != -1) {
			array[index] = array[array.length - 1];
			array.pop();
		}
	}
	,completeAll: function() {
		var timersToFinish = [];
		var _g = 0;
		var _g1 = this._timers;
		while(_g < _g1.length) {
			var timer = _g1[_g];
			++_g;
			if(timer.loops > 0 && timer.active) {
				timersToFinish.push(timer);
			}
		}
		var _g2 = 0;
		while(_g2 < timersToFinish.length) {
			var timer1 = timersToFinish[_g2];
			++_g2;
			while(!timer1.finished) {
				timer1.update(timer1.time - timer1._timeCounter);
				timer1.onLoopFinished();
			}
		}
	}
	,clear: function() {
		flixel_util_FlxArrayUtil.clearArray(this._timers);
	}
	,forEach: function(Function) {
		var _g = 0;
		var _g1 = this._timers;
		while(_g < _g1.length) {
			var timer = _g1[_g];
			++_g;
			Function(timer);
		}
	}
	,__class__: flixel_util_FlxTimerManager
});
var flixel_util_FlxVerticalAlign = $hxClasses["flixel.util.FlxVerticalAlign"] = { __ename__ : ["flixel","util","FlxVerticalAlign"], __constructs__ : ["TOP","CENTER","BOTTOM"] };
flixel_util_FlxVerticalAlign.TOP = ["TOP",0];
flixel_util_FlxVerticalAlign.TOP.toString = $estr;
flixel_util_FlxVerticalAlign.TOP.__enum__ = flixel_util_FlxVerticalAlign;
flixel_util_FlxVerticalAlign.CENTER = ["CENTER",1];
flixel_util_FlxVerticalAlign.CENTER.toString = $estr;
flixel_util_FlxVerticalAlign.CENTER.__enum__ = flixel_util_FlxVerticalAlign;
flixel_util_FlxVerticalAlign.BOTTOM = ["BOTTOM",2];
flixel_util_FlxVerticalAlign.BOTTOM.toString = $estr;
flixel_util_FlxVerticalAlign.BOTTOM.__enum__ = flixel_util_FlxVerticalAlign;
var flixel_util_helpers_FlxRange = function(start,end) {
	this.active = true;
	this.start = start;
	this.end = end == null ? start : end;
};
$hxClasses["flixel.util.helpers.FlxRange"] = flixel_util_helpers_FlxRange;
flixel_util_helpers_FlxRange.__name__ = ["flixel","util","helpers","FlxRange"];
flixel_util_helpers_FlxRange.prototype = {
	set: function(start,end) {
		this.start = start;
		this.end = end == null ? start : end;
		return this;
	}
	,equals: function(OtherFlxRange) {
		if(this.start == OtherFlxRange.start) {
			return this.end == OtherFlxRange.end;
		} else {
			return false;
		}
	}
	,toString: function() {
		var value = this.start;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "start";
		_this.value = value;
		var value1 = this.end;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "end";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,__class__: flixel_util_helpers_FlxRange
};
var haxe_StackItem = $hxClasses["haxe.StackItem"] = { __ename__ : ["haxe","StackItem"], __constructs__ : ["CFunction","Module","FilePos","Method","LocalFunction"] };
haxe_StackItem.CFunction = ["CFunction",0];
haxe_StackItem.CFunction.toString = $estr;
haxe_StackItem.CFunction.__enum__ = haxe_StackItem;
haxe_StackItem.Module = function(m) { var $x = ["Module",1,m]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
haxe_StackItem.FilePos = function(s,file,line) { var $x = ["FilePos",2,s,file,line]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
haxe_StackItem.Method = function(classname,method) { var $x = ["Method",3,classname,method]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
haxe_StackItem.LocalFunction = function(v) { var $x = ["LocalFunction",4,v]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
var haxe_CallStack = function() { };
$hxClasses["haxe.CallStack"] = haxe_CallStack;
haxe_CallStack.__name__ = ["haxe","CallStack"];
haxe_CallStack.lastException = null;
haxe_CallStack.getStack = function(e) {
	if(e == null) {
		return [];
	}
	var oldValue = Error.prepareStackTrace;
	Error.prepareStackTrace = function(error,callsites) {
		var stack = [];
		var _g = 0;
		while(_g < callsites.length) {
			var site = callsites[_g];
			++_g;
			if(haxe_CallStack.wrapCallSite != null) {
				site = haxe_CallStack.wrapCallSite(site);
			}
			var method = null;
			var fullName = site.getFunctionName();
			if(fullName != null) {
				var idx = fullName.lastIndexOf(".");
				if(idx >= 0) {
					var className = HxOverrides.substr(fullName,0,idx);
					var methodName = HxOverrides.substr(fullName,idx + 1,null);
					method = haxe_StackItem.Method(className,methodName);
				}
			}
			stack.push(haxe_StackItem.FilePos(method,site.getFileName(),site.getLineNumber()));
		}
		return stack;
	};
	var a = haxe_CallStack.makeStack(e.stack);
	Error.prepareStackTrace = oldValue;
	return a;
};
haxe_CallStack.wrapCallSite = null;
haxe_CallStack.callStack = function() {
	try {
		throw new Error();
	} catch( e ) {
		haxe_CallStack.lastException = e;
		if (e instanceof js__$Boot_HaxeError) e = e.val;
		var a = haxe_CallStack.getStack(e);
		a.shift();
		return a;
	}
};
haxe_CallStack.exceptionStack = function() {
	return haxe_CallStack.getStack(haxe_CallStack.lastException);
};
haxe_CallStack.toString = function(stack) {
	var b = new StringBuf();
	var _g = 0;
	while(_g < stack.length) {
		var s = stack[_g];
		++_g;
		b.b += "\nCalled from ";
		haxe_CallStack.itemToString(b,s);
	}
	return b.b;
};
haxe_CallStack.itemToString = function(b,s) {
	switch(s[1]) {
	case 0:
		b.b += "a C function";
		break;
	case 1:
		var m = s[2];
		b.b += "module ";
		b.b += m == null ? "null" : "" + m;
		break;
	case 2:
		var line = s[4];
		var file = s[3];
		var s1 = s[2];
		if(s1 != null) {
			haxe_CallStack.itemToString(b,s1);
			b.b += " (";
		}
		b.b += file == null ? "null" : "" + file;
		b.b += " line ";
		b.b += line == null ? "null" : "" + line;
		if(s1 != null) {
			b.b += ")";
		}
		break;
	case 3:
		var meth = s[3];
		var cname = s[2];
		b.b += cname == null ? "null" : "" + cname;
		b.b += ".";
		b.b += meth == null ? "null" : "" + meth;
		break;
	case 4:
		var n = s[2];
		b.b += "local function #";
		b.b += n == null ? "null" : "" + n;
		break;
	}
};
haxe_CallStack.makeStack = function(s) {
	if(s == null) {
		return [];
	} else if(typeof(s) == "string") {
		var stack = s.split("\n");
		if(stack[0] == "Error") {
			stack.shift();
		}
		var m = [];
		var rie10 = new EReg("^   at ([A-Za-z0-9_. ]+) \\(([^)]+):([0-9]+):([0-9]+)\\)$","");
		var _g = 0;
		while(_g < stack.length) {
			var line = stack[_g];
			++_g;
			if(rie10.match(line)) {
				var path = rie10.matched(1).split(".");
				var meth = path.pop();
				var file = rie10.matched(2);
				var line1 = Std.parseInt(rie10.matched(3));
				m.push(haxe_StackItem.FilePos(meth == "Anonymous function" ? haxe_StackItem.LocalFunction() : meth == "Global code" ? null : haxe_StackItem.Method(path.join("."),meth),file,line1));
			} else {
				m.push(haxe_StackItem.Module(StringTools.trim(line)));
			}
		}
		return m;
	} else {
		return s;
	}
};
var haxe_IMap = function() { };
$hxClasses["haxe.IMap"] = haxe_IMap;
haxe_IMap.__name__ = ["haxe","IMap"];
haxe_IMap.prototype = {
	__class__: haxe_IMap
};
var haxe__$Int64__$_$_$Int64 = function(high,low) {
	this.high = high;
	this.low = low;
};
$hxClasses["haxe._Int64.___Int64"] = haxe__$Int64__$_$_$Int64;
haxe__$Int64__$_$_$Int64.__name__ = ["haxe","_Int64","___Int64"];
haxe__$Int64__$_$_$Int64.prototype = {
	__class__: haxe__$Int64__$_$_$Int64
};
var haxe_Resource = function() { };
$hxClasses["haxe.Resource"] = haxe_Resource;
haxe_Resource.__name__ = ["haxe","Resource"];
haxe_Resource.content = null;
haxe_Resource.getString = function(name) {
	var _g = 0;
	var _g1 = haxe_Resource.content;
	while(_g < _g1.length) {
		var x = _g1[_g];
		++_g;
		if(x.name == name) {
			if(x.str != null) {
				return x.str;
			}
			var b = haxe_crypto_Base64.decode(x.data);
			return b.toString();
		}
	}
	return null;
};
haxe_Resource.getBytes = function(name) {
	var _g = 0;
	var _g1 = haxe_Resource.content;
	while(_g < _g1.length) {
		var x = _g1[_g];
		++_g;
		if(x.name == name) {
			if(x.str != null) {
				return haxe_io_Bytes.ofString(x.str);
			}
			return haxe_crypto_Base64.decode(x.data);
		}
	}
	return null;
};
var haxe_Serializer = function() {
	this.buf = new StringBuf();
	this.cache = [];
	this.useCache = haxe_Serializer.USE_CACHE;
	this.useEnumIndex = haxe_Serializer.USE_ENUM_INDEX;
	this.shash = new haxe_ds_StringMap();
	this.scount = 0;
};
$hxClasses["haxe.Serializer"] = haxe_Serializer;
haxe_Serializer.__name__ = ["haxe","Serializer"];
haxe_Serializer.run = function(v) {
	var s = new haxe_Serializer();
	s.serialize(v);
	return s.toString();
};
haxe_Serializer.prototype = {
	toString: function() {
		return this.buf.b;
	}
	,serializeString: function(s) {
		var _this = this.shash;
		var x = __map_reserved[s] != null ? _this.getReserved(s) : _this.h[s];
		if(x != null) {
			this.buf.b += "R";
			this.buf.b += x == null ? "null" : "" + x;
			return;
		}
		var _this1 = this.shash;
		var value = this.scount++;
		if(__map_reserved[s] != null) {
			_this1.setReserved(s,value);
		} else {
			_this1.h[s] = value;
		}
		this.buf.b += "y";
		s = encodeURIComponent(s);
		this.buf.b += Std.string(s.length);
		this.buf.b += ":";
		this.buf.b += s == null ? "null" : "" + s;
	}
	,serializeRef: function(v) {
		var vt = typeof(v);
		var _g1 = 0;
		var _g = this.cache.length;
		while(_g1 < _g) {
			var i = _g1++;
			var ci = this.cache[i];
			if(typeof(ci) == vt && ci == v) {
				this.buf.b += "r";
				this.buf.b += i == null ? "null" : "" + i;
				return true;
			}
		}
		this.cache.push(v);
		return false;
	}
	,serializeFields: function(v) {
		var _g = 0;
		var _g1 = Reflect.fields(v);
		while(_g < _g1.length) {
			var f = _g1[_g];
			++_g;
			this.serializeString(f);
			this.serialize(Reflect.field(v,f));
		}
		this.buf.b += "g";
	}
	,serialize: function(v) {
		var _g = Type["typeof"](v);
		switch(_g[1]) {
		case 0:
			this.buf.b += "n";
			break;
		case 1:
			var v1 = v;
			if(v1 == 0) {
				this.buf.b += "z";
				return;
			}
			this.buf.b += "i";
			this.buf.b += v1 == null ? "null" : "" + v1;
			break;
		case 2:
			var v2 = v;
			if(isNaN(v2)) {
				this.buf.b += "k";
			} else if(!isFinite(v2)) {
				this.buf.b += v2 < 0 ? "m" : "p";
			} else {
				this.buf.b += "d";
				this.buf.b += v2 == null ? "null" : "" + v2;
			}
			break;
		case 3:
			this.buf.b += v ? "t" : "f";
			break;
		case 4:
			if(js_Boot.__instanceof(v,Class)) {
				var className = Type.getClassName(v);
				this.buf.b += "A";
				this.serializeString(className);
			} else if(js_Boot.__instanceof(v,Enum)) {
				this.buf.b += "B";
				this.serializeString(Type.getEnumName(v));
			} else {
				if(this.useCache && this.serializeRef(v)) {
					return;
				}
				this.buf.b += "o";
				this.serializeFields(v);
			}
			break;
		case 5:
			throw new js__$Boot_HaxeError("Cannot serialize function");
			break;
		case 6:
			var c = _g[2];
			if(c == String) {
				this.serializeString(v);
				return;
			}
			if(this.useCache && this.serializeRef(v)) {
				return;
			}
			switch(c) {
			case Array:
				var ucount = 0;
				this.buf.b += "a";
				var l = v["length"];
				var _g1 = 0;
				var _g2 = l;
				while(_g1 < _g2) {
					var i = _g1++;
					if(v[i] == null) {
						++ucount;
					} else {
						if(ucount > 0) {
							if(ucount == 1) {
								this.buf.b += "n";
							} else {
								this.buf.b += "u";
								this.buf.b += ucount == null ? "null" : "" + ucount;
							}
							ucount = 0;
						}
						this.serialize(v[i]);
					}
				}
				if(ucount > 0) {
					if(ucount == 1) {
						this.buf.b += "n";
					} else {
						this.buf.b += "u";
						this.buf.b += ucount == null ? "null" : "" + ucount;
					}
				}
				this.buf.b += "h";
				break;
			case Date:
				var d = v;
				this.buf.b += "v";
				this.buf.b += Std.string(d.getTime());
				break;
			case List:
				this.buf.b += "l";
				var v3 = v;
				var _g_head = v3.h;
				while(_g_head != null) {
					var val = _g_head.item;
					_g_head = _g_head.next;
					var i1 = val;
					this.serialize(i1);
				}
				this.buf.b += "h";
				break;
			case haxe_ds_IntMap:
				this.buf.b += "q";
				var v4 = v;
				var k = v4.keys();
				while(k.hasNext()) {
					var k1 = k.next();
					this.buf.b += ":";
					this.buf.b += k1 == null ? "null" : "" + k1;
					this.serialize(v4.h[k1]);
				}
				this.buf.b += "h";
				break;
			case haxe_ds_ObjectMap:
				this.buf.b += "M";
				var v5 = v;
				var k2 = v5.keys();
				while(k2.hasNext()) {
					var k3 = k2.next();
					var id = Reflect.field(k3,"__id__");
					Reflect.deleteField(k3,"__id__");
					this.serialize(k3);
					k3["__id__"] = id;
					this.serialize(v5.h[k3.__id__]);
				}
				this.buf.b += "h";
				break;
			case haxe_ds_StringMap:
				this.buf.b += "b";
				var v6 = v;
				var k4 = v6.keys();
				while(k4.hasNext()) {
					var k5 = k4.next();
					this.serializeString(k5);
					this.serialize(__map_reserved[k5] != null ? v6.getReserved(k5) : v6.h[k5]);
				}
				this.buf.b += "h";
				break;
			case haxe_io_Bytes:
				var v7 = v;
				this.buf.b += "s";
				this.buf.b += Std.string(Math.ceil(v7.length * 8 / 6));
				this.buf.b += ":";
				var i2 = 0;
				var max = v7.length - 2;
				var b64 = haxe_Serializer.BASE64_CODES;
				if(b64 == null) {
					var length = haxe_Serializer.BASE64.length;
					var this1 = new Array(length);
					b64 = this1;
					var _g11 = 0;
					var _g3 = haxe_Serializer.BASE64.length;
					while(_g11 < _g3) {
						var i3 = _g11++;
						b64[i3] = HxOverrides.cca(haxe_Serializer.BASE64,i3);
					}
					haxe_Serializer.BASE64_CODES = b64;
				}
				while(i2 < max) {
					var b1 = v7.b[i2++];
					var b2 = v7.b[i2++];
					var b3 = v7.b[i2++];
					this.buf.b += String.fromCharCode(b64[b1 >> 2]);
					this.buf.b += String.fromCharCode(b64[(b1 << 4 | b2 >> 4) & 63]);
					this.buf.b += String.fromCharCode(b64[(b2 << 2 | b3 >> 6) & 63]);
					this.buf.b += String.fromCharCode(b64[b3 & 63]);
				}
				if(i2 == max) {
					var b11 = v7.b[i2++];
					var b21 = v7.b[i2++];
					this.buf.b += String.fromCharCode(b64[b11 >> 2]);
					this.buf.b += String.fromCharCode(b64[(b11 << 4 | b21 >> 4) & 63]);
					this.buf.b += String.fromCharCode(b64[b21 << 2 & 63]);
				} else if(i2 == max + 1) {
					var b12 = v7.b[i2++];
					this.buf.b += String.fromCharCode(b64[b12 >> 2]);
					this.buf.b += String.fromCharCode(b64[b12 << 4 & 63]);
				}
				break;
			default:
				if(this.useCache) {
					this.cache.pop();
				}
				if(v.hxSerialize != null) {
					this.buf.b += "C";
					this.serializeString(Type.getClassName(c));
					if(this.useCache) {
						this.cache.push(v);
					}
					v.hxSerialize(this);
					this.buf.b += "g";
				} else {
					this.buf.b += "c";
					this.serializeString(Type.getClassName(c));
					if(this.useCache) {
						this.cache.push(v);
					}
					this.serializeFields(v);
				}
			}
			break;
		case 7:
			var e = _g[2];
			if(this.useCache) {
				if(this.serializeRef(v)) {
					return;
				}
				this.cache.pop();
			}
			this.buf.b += Std.string(this.useEnumIndex ? "j" : "w");
			this.serializeString(Type.getEnumName(e));
			if(this.useEnumIndex) {
				this.buf.b += ":";
				this.buf.b += Std.string(v[1]);
			} else {
				this.serializeString(v[0]);
			}
			this.buf.b += ":";
			var l1 = v["length"];
			this.buf.b += Std.string(l1 - 2);
			var _g12 = 2;
			var _g4 = l1;
			while(_g12 < _g4) {
				var i4 = _g12++;
				this.serialize(v[i4]);
			}
			if(this.useCache) {
				this.cache.push(v);
			}
			break;
		default:
			throw new js__$Boot_HaxeError("Cannot serialize " + Std.string(v));
		}
	}
	,__class__: haxe_Serializer
};
var haxe_Timer = function(time_ms) {
	var me = this;
	this.id = setInterval(function() {
		me.run();
	},time_ms);
};
$hxClasses["haxe.Timer"] = haxe_Timer;
haxe_Timer.__name__ = ["haxe","Timer"];
haxe_Timer.delay = function(f,time_ms) {
	var t = new haxe_Timer(time_ms);
	t.run = function() {
		t.stop();
		f();
	};
	return t;
};
haxe_Timer.measure = function(f,pos) {
	var t0 = haxe_Timer.stamp();
	var r = f();
	haxe_Log.trace(haxe_Timer.stamp() - t0 + "s",pos);
	return r;
};
haxe_Timer.stamp = function() {
	return new Date().getTime() / 1000;
};
haxe_Timer.prototype = {
	stop: function() {
		if(this.id == null) {
			return;
		}
		clearInterval(this.id);
		this.id = null;
	}
	,run: function() {
	}
	,__class__: haxe_Timer
};
var haxe__$Unserializer_DefaultResolver = function() {
};
$hxClasses["haxe._Unserializer.DefaultResolver"] = haxe__$Unserializer_DefaultResolver;
haxe__$Unserializer_DefaultResolver.__name__ = ["haxe","_Unserializer","DefaultResolver"];
haxe__$Unserializer_DefaultResolver.prototype = {
	resolveClass: function(name) {
		return Type.resolveClass(name);
	}
	,resolveEnum: function(name) {
		return Type.resolveEnum(name);
	}
	,__class__: haxe__$Unserializer_DefaultResolver
};
var haxe_Unserializer = function(buf) {
	this.buf = buf;
	this.length = buf.length;
	this.pos = 0;
	this.scache = [];
	this.cache = [];
	var r = haxe_Unserializer.DEFAULT_RESOLVER;
	if(r == null) {
		r = new haxe__$Unserializer_DefaultResolver();
		haxe_Unserializer.DEFAULT_RESOLVER = r;
	}
	this.resolver = r;
};
$hxClasses["haxe.Unserializer"] = haxe_Unserializer;
haxe_Unserializer.__name__ = ["haxe","Unserializer"];
haxe_Unserializer.initCodes = function() {
	var codes = [];
	var _g1 = 0;
	var _g = haxe_Unserializer.BASE64.length;
	while(_g1 < _g) {
		var i = _g1++;
		codes[haxe_Unserializer.BASE64.charCodeAt(i)] = i;
	}
	return codes;
};
haxe_Unserializer.prototype = {
	setResolver: function(r) {
		if(r == null) {
			if(haxe__$Unserializer_NullResolver.instance == null) {
				haxe__$Unserializer_NullResolver.instance = new haxe__$Unserializer_NullResolver();
			}
			this.resolver = haxe__$Unserializer_NullResolver.instance;
		} else {
			this.resolver = r;
		}
	}
	,readDigits: function() {
		var k = 0;
		var s = false;
		var fpos = this.pos;
		while(true) {
			var c = this.buf.charCodeAt(this.pos);
			if(c != c) {
				break;
			}
			if(c == 45) {
				if(this.pos != fpos) {
					break;
				}
				s = true;
				this.pos++;
				continue;
			}
			if(c < 48 || c > 57) {
				break;
			}
			k = k * 10 + (c - 48);
			this.pos++;
		}
		if(s) {
			k *= -1;
		}
		return k;
	}
	,readFloat: function() {
		var p1 = this.pos;
		while(true) {
			var c = this.buf.charCodeAt(this.pos);
			if(c != c) {
				break;
			}
			if(c >= 43 && c < 58 || c == 101 || c == 69) {
				this.pos++;
			} else {
				break;
			}
		}
		return parseFloat(HxOverrides.substr(this.buf,p1,this.pos - p1));
	}
	,unserializeObject: function(o) {
		while(true) {
			if(this.pos >= this.length) {
				throw new js__$Boot_HaxeError("Invalid object");
			}
			if(this.buf.charCodeAt(this.pos) == 103) {
				break;
			}
			var k = this.unserialize();
			if(typeof(k) != "string") {
				throw new js__$Boot_HaxeError("Invalid object key");
			}
			var v = this.unserialize();
			o[k] = v;
		}
		this.pos++;
	}
	,unserializeEnum: function(edecl,tag) {
		if(this.buf.charCodeAt(this.pos++) != 58) {
			throw new js__$Boot_HaxeError("Invalid enum format");
		}
		var nargs = this.readDigits();
		if(nargs == 0) {
			return Type.createEnum(edecl,tag);
		}
		var args = [];
		while(nargs-- > 0) args.push(this.unserialize());
		return Type.createEnum(edecl,tag,args);
	}
	,unserialize: function() {
		var _g = this.buf.charCodeAt(this.pos++);
		switch(_g) {
		case 65:
			var name = this.unserialize();
			var cl = this.resolver.resolveClass(name);
			if(cl == null) {
				throw new js__$Boot_HaxeError("Class not found " + name);
			}
			return cl;
		case 66:
			var name1 = this.unserialize();
			var e = this.resolver.resolveEnum(name1);
			if(e == null) {
				throw new js__$Boot_HaxeError("Enum not found " + name1);
			}
			return e;
		case 67:
			var name2 = this.unserialize();
			var cl1 = this.resolver.resolveClass(name2);
			if(cl1 == null) {
				throw new js__$Boot_HaxeError("Class not found " + name2);
			}
			var o = Type.createEmptyInstance(cl1);
			this.cache.push(o);
			o.hxUnserialize(this);
			if(this.buf.charCodeAt(this.pos++) != 103) {
				throw new js__$Boot_HaxeError("Invalid custom data");
			}
			return o;
		case 77:
			var h = new haxe_ds_ObjectMap();
			this.cache.push(h);
			var buf = this.buf;
			while(this.buf.charCodeAt(this.pos) != 104) {
				var s = this.unserialize();
				h.set(s,this.unserialize());
			}
			this.pos++;
			return h;
		case 82:
			var n = this.readDigits();
			if(n < 0 || n >= this.scache.length) {
				throw new js__$Boot_HaxeError("Invalid string reference");
			}
			return this.scache[n];
		case 97:
			var buf1 = this.buf;
			var a = [];
			this.cache.push(a);
			while(true) {
				var c = this.buf.charCodeAt(this.pos);
				if(c == 104) {
					this.pos++;
					break;
				}
				if(c == 117) {
					this.pos++;
					var n1 = this.readDigits();
					a[a.length + n1 - 1] = null;
				} else {
					a.push(this.unserialize());
				}
			}
			return a;
		case 98:
			var h1 = new haxe_ds_StringMap();
			this.cache.push(h1);
			var buf2 = this.buf;
			while(this.buf.charCodeAt(this.pos) != 104) {
				var s1 = this.unserialize();
				var value = this.unserialize();
				if(__map_reserved[s1] != null) {
					h1.setReserved(s1,value);
				} else {
					h1.h[s1] = value;
				}
			}
			this.pos++;
			return h1;
		case 99:
			var name3 = this.unserialize();
			var cl2 = this.resolver.resolveClass(name3);
			if(cl2 == null) {
				throw new js__$Boot_HaxeError("Class not found " + name3);
			}
			var o1 = Type.createEmptyInstance(cl2);
			this.cache.push(o1);
			this.unserializeObject(o1);
			return o1;
		case 100:
			return this.readFloat();
		case 102:
			return false;
		case 105:
			return this.readDigits();
		case 106:
			var name4 = this.unserialize();
			var edecl = this.resolver.resolveEnum(name4);
			if(edecl == null) {
				throw new js__$Boot_HaxeError("Enum not found " + name4);
			}
			this.pos++;
			var index = this.readDigits();
			var tag = edecl.__constructs__.slice()[index];
			if(tag == null) {
				throw new js__$Boot_HaxeError("Unknown enum index " + name4 + "@" + index);
			}
			var e1 = this.unserializeEnum(edecl,tag);
			this.cache.push(e1);
			return e1;
		case 107:
			return NaN;
		case 108:
			var l = new List();
			this.cache.push(l);
			var buf3 = this.buf;
			while(this.buf.charCodeAt(this.pos) != 104) l.add(this.unserialize());
			this.pos++;
			return l;
		case 109:
			return -Infinity;
		case 110:
			return null;
		case 111:
			var o2 = { };
			this.cache.push(o2);
			this.unserializeObject(o2);
			return o2;
		case 112:
			return Infinity;
		case 113:
			var h2 = new haxe_ds_IntMap();
			this.cache.push(h2);
			var buf4 = this.buf;
			var c1 = this.buf.charCodeAt(this.pos++);
			while(c1 == 58) {
				var i = this.readDigits();
				var value1 = this.unserialize();
				h2.h[i] = value1;
				c1 = this.buf.charCodeAt(this.pos++);
			}
			if(c1 != 104) {
				throw new js__$Boot_HaxeError("Invalid IntMap format");
			}
			return h2;
		case 114:
			var n2 = this.readDigits();
			if(n2 < 0 || n2 >= this.cache.length) {
				throw new js__$Boot_HaxeError("Invalid reference");
			}
			return this.cache[n2];
		case 115:
			var len = this.readDigits();
			var buf5 = this.buf;
			if(this.buf.charCodeAt(this.pos++) != 58 || this.length - this.pos < len) {
				throw new js__$Boot_HaxeError("Invalid bytes length");
			}
			var codes = haxe_Unserializer.CODES;
			if(codes == null) {
				codes = haxe_Unserializer.initCodes();
				haxe_Unserializer.CODES = codes;
			}
			var i1 = this.pos;
			var rest = len & 3;
			var size = (len >> 2) * 3 + (rest >= 2 ? rest - 1 : 0);
			var max = i1 + (len - rest);
			var bytes = new haxe_io_Bytes(new ArrayBuffer(size));
			var bpos = 0;
			while(i1 < max) {
				var c11 = codes[buf5.charCodeAt(i1++)];
				var c2 = codes[buf5.charCodeAt(i1++)];
				bytes.b[bpos++] = (c11 << 2 | c2 >> 4) & 255;
				var c3 = codes[buf5.charCodeAt(i1++)];
				bytes.b[bpos++] = (c2 << 4 | c3 >> 2) & 255;
				var c4 = codes[buf5.charCodeAt(i1++)];
				bytes.b[bpos++] = (c3 << 6 | c4) & 255;
			}
			if(rest >= 2) {
				var c12 = codes[buf5.charCodeAt(i1++)];
				var c21 = codes[buf5.charCodeAt(i1++)];
				bytes.b[bpos++] = (c12 << 2 | c21 >> 4) & 255;
				if(rest == 3) {
					var c31 = codes[buf5.charCodeAt(i1++)];
					bytes.b[bpos++] = (c21 << 4 | c31 >> 2) & 255;
				}
			}
			this.pos += len;
			this.cache.push(bytes);
			return bytes;
		case 116:
			return true;
		case 118:
			var d;
			if(this.buf.charCodeAt(this.pos) >= 48 && this.buf.charCodeAt(this.pos) <= 57 && this.buf.charCodeAt(this.pos + 1) >= 48 && this.buf.charCodeAt(this.pos + 1) <= 57 && this.buf.charCodeAt(this.pos + 2) >= 48 && this.buf.charCodeAt(this.pos + 2) <= 57 && this.buf.charCodeAt(this.pos + 3) >= 48 && this.buf.charCodeAt(this.pos + 3) <= 57 && this.buf.charCodeAt(this.pos + 4) == 45) {
				d = HxOverrides.strDate(HxOverrides.substr(this.buf,this.pos,19));
				this.pos += 19;
			} else {
				var t = this.readFloat();
				d = new Date(t);
			}
			this.cache.push(d);
			return d;
		case 119:
			var name5 = this.unserialize();
			var edecl1 = this.resolver.resolveEnum(name5);
			if(edecl1 == null) {
				throw new js__$Boot_HaxeError("Enum not found " + name5);
			}
			var e2 = this.unserializeEnum(edecl1,this.unserialize());
			this.cache.push(e2);
			return e2;
		case 120:
			throw js__$Boot_HaxeError.wrap(this.unserialize());
			break;
		case 121:
			var len1 = this.readDigits();
			if(this.buf.charCodeAt(this.pos++) != 58 || this.length - this.pos < len1) {
				throw new js__$Boot_HaxeError("Invalid string length");
			}
			var s2 = HxOverrides.substr(this.buf,this.pos,len1);
			this.pos += len1;
			s2 = decodeURIComponent(s2.split("+").join(" "));
			this.scache.push(s2);
			return s2;
		case 122:
			return 0;
		default:
		}
		this.pos--;
		throw new js__$Boot_HaxeError("Invalid char " + this.buf.charAt(this.pos) + " at position " + this.pos);
	}
	,__class__: haxe_Unserializer
};
var haxe__$Unserializer_NullResolver = function() {
};
$hxClasses["haxe._Unserializer.NullResolver"] = haxe__$Unserializer_NullResolver;
haxe__$Unserializer_NullResolver.__name__ = ["haxe","_Unserializer","NullResolver"];
haxe__$Unserializer_NullResolver.instance = null;
haxe__$Unserializer_NullResolver.prototype = {
	resolveClass: function(name) {
		return null;
	}
	,resolveEnum: function(name) {
		return null;
	}
	,__class__: haxe__$Unserializer_NullResolver
};
var haxe_Utf8 = function() { };
$hxClasses["haxe.Utf8"] = haxe_Utf8;
haxe_Utf8.__name__ = ["haxe","Utf8"];
haxe_Utf8.compare = function(a,b) {
	if(a > b) {
		return 1;
	} else if(a == b) {
		return 0;
	} else {
		return -1;
	}
};
var haxe_crypto_Base64 = function() { };
$hxClasses["haxe.crypto.Base64"] = haxe_crypto_Base64;
haxe_crypto_Base64.__name__ = ["haxe","crypto","Base64"];
haxe_crypto_Base64.decode = function(str,complement) {
	if(complement == null) {
		complement = true;
	}
	if(complement) {
		while(HxOverrides.cca(str,str.length - 1) == 61) str = HxOverrides.substr(str,0,-1);
	}
	return new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).decodeBytes(haxe_io_Bytes.ofString(str));
};
var haxe_crypto_BaseCode = function(base) {
	var len = base.length;
	var nbits = 1;
	while(len > 1 << nbits) ++nbits;
	if(nbits > 8 || len != 1 << nbits) {
		throw new js__$Boot_HaxeError("BaseCode : base length must be a power of two.");
	}
	this.base = base;
	this.nbits = nbits;
};
$hxClasses["haxe.crypto.BaseCode"] = haxe_crypto_BaseCode;
haxe_crypto_BaseCode.__name__ = ["haxe","crypto","BaseCode"];
haxe_crypto_BaseCode.prototype = {
	encodeBytes: function(b) {
		var nbits = this.nbits;
		var base = this.base;
		var size = b.length * 8 / nbits | 0;
		var out = new haxe_io_Bytes(new ArrayBuffer(size + (b.length * 8 % nbits == 0 ? 0 : 1)));
		var buf = 0;
		var curbits = 0;
		var mask = (1 << nbits) - 1;
		var pin = 0;
		var pout = 0;
		while(pout < size) {
			while(curbits < nbits) {
				curbits += 8;
				buf <<= 8;
				buf |= b.b[pin++];
			}
			curbits -= nbits;
			out.b[pout++] = base.b[buf >> curbits & mask] & 255;
		}
		if(curbits > 0) {
			out.b[pout++] = base.b[buf << nbits - curbits & mask] & 255;
		}
		return out;
	}
	,initTable: function() {
		var tbl = [];
		var _g = 0;
		while(_g < 256) {
			var i = _g++;
			tbl[i] = -1;
		}
		var _g1 = 0;
		var _g2 = this.base.length;
		while(_g1 < _g2) {
			var i1 = _g1++;
			tbl[this.base.b[i1]] = i1;
		}
		this.tbl = tbl;
	}
	,decodeBytes: function(b) {
		var nbits = this.nbits;
		var base = this.base;
		if(this.tbl == null) {
			this.initTable();
		}
		var tbl = this.tbl;
		var size = b.length * nbits >> 3;
		var out = new haxe_io_Bytes(new ArrayBuffer(size));
		var buf = 0;
		var curbits = 0;
		var pin = 0;
		var pout = 0;
		while(pout < size) {
			while(curbits < 8) {
				curbits += nbits;
				buf <<= nbits;
				var i = tbl[b.b[pin++]];
				if(i == -1) {
					throw new js__$Boot_HaxeError("BaseCode : invalid encoded char");
				}
				buf |= i;
			}
			curbits -= 8;
			out.b[pout++] = buf >> curbits & 255 & 255;
		}
		return out;
	}
	,__class__: haxe_crypto_BaseCode
};
var haxe_crypto_Md5 = function() {
};
$hxClasses["haxe.crypto.Md5"] = haxe_crypto_Md5;
haxe_crypto_Md5.__name__ = ["haxe","crypto","Md5"];
haxe_crypto_Md5.encode = function(s) {
	var m = new haxe_crypto_Md5();
	var h = m.doEncode(haxe_crypto_Md5.str2blks(s));
	return m.hex(h);
};
haxe_crypto_Md5.str2blks = function(str) {
	var str1 = haxe_io_Bytes.ofString(str);
	var nblk = (str1.length + 8 >> 6) + 1;
	var blks = [];
	var blksSize = nblk * 16;
	var _g1 = 0;
	var _g = blksSize;
	while(_g1 < _g) {
		var i = _g1++;
		blks[i] = 0;
	}
	var i1 = 0;
	var max = str1.length;
	var l = max * 8;
	while(i1 < max) {
		blks[i1 >> 2] |= str1.b[i1] << (l + i1) % 4 * 8;
		++i1;
	}
	blks[i1 >> 2] |= 128 << (l + i1) % 4 * 8;
	var k = nblk * 16 - 2;
	blks[k] = l & 255;
	blks[k] |= (l >>> 8 & 255) << 8;
	blks[k] |= (l >>> 16 & 255) << 16;
	blks[k] |= (l >>> 24 & 255) << 24;
	return blks;
};
haxe_crypto_Md5.prototype = {
	bitOR: function(a,b) {
		var lsb = a & 1 | b & 1;
		var msb31 = a >>> 1 | b >>> 1;
		return msb31 << 1 | lsb;
	}
	,bitXOR: function(a,b) {
		var lsb = a & 1 ^ b & 1;
		var msb31 = a >>> 1 ^ b >>> 1;
		return msb31 << 1 | lsb;
	}
	,bitAND: function(a,b) {
		var lsb = a & 1 & (b & 1);
		var msb31 = a >>> 1 & b >>> 1;
		return msb31 << 1 | lsb;
	}
	,addme: function(x,y) {
		var lsw = (x & 65535) + (y & 65535);
		var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
		return msw << 16 | lsw & 65535;
	}
	,hex: function(a) {
		var str = "";
		var hex_chr = "0123456789abcdef";
		var _g = 0;
		while(_g < a.length) {
			var num = a[_g];
			++_g;
			var _g1 = 0;
			while(_g1 < 4) {
				var j = _g1++;
				str += hex_chr.charAt(num >> j * 8 + 4 & 15) + hex_chr.charAt(num >> j * 8 & 15);
			}
		}
		return str;
	}
	,rol: function(num,cnt) {
		return num << cnt | num >>> 32 - cnt;
	}
	,cmn: function(q,a,b,x,s,t) {
		return this.addme(this.rol(this.addme(this.addme(a,q),this.addme(x,t)),s),b);
	}
	,ff: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitOR(this.bitAND(b,c),this.bitAND(~b,d)),a,b,x,s,t);
	}
	,gg: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitOR(this.bitAND(b,d),this.bitAND(c,~d)),a,b,x,s,t);
	}
	,hh: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitXOR(this.bitXOR(b,c),d),a,b,x,s,t);
	}
	,ii: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitXOR(c,this.bitOR(b,~d)),a,b,x,s,t);
	}
	,doEncode: function(x) {
		var a = 1732584193;
		var b = -271733879;
		var c = -1732584194;
		var d = 271733878;
		var step;
		var i = 0;
		while(i < x.length) {
			var olda = a;
			var oldb = b;
			var oldc = c;
			var oldd = d;
			step = 0;
			a = this.ff(a,b,c,d,x[i],7,-680876936);
			d = this.ff(d,a,b,c,x[i + 1],12,-389564586);
			c = this.ff(c,d,a,b,x[i + 2],17,606105819);
			b = this.ff(b,c,d,a,x[i + 3],22,-1044525330);
			a = this.ff(a,b,c,d,x[i + 4],7,-176418897);
			d = this.ff(d,a,b,c,x[i + 5],12,1200080426);
			c = this.ff(c,d,a,b,x[i + 6],17,-1473231341);
			b = this.ff(b,c,d,a,x[i + 7],22,-45705983);
			a = this.ff(a,b,c,d,x[i + 8],7,1770035416);
			d = this.ff(d,a,b,c,x[i + 9],12,-1958414417);
			c = this.ff(c,d,a,b,x[i + 10],17,-42063);
			b = this.ff(b,c,d,a,x[i + 11],22,-1990404162);
			a = this.ff(a,b,c,d,x[i + 12],7,1804603682);
			d = this.ff(d,a,b,c,x[i + 13],12,-40341101);
			c = this.ff(c,d,a,b,x[i + 14],17,-1502002290);
			b = this.ff(b,c,d,a,x[i + 15],22,1236535329);
			a = this.gg(a,b,c,d,x[i + 1],5,-165796510);
			d = this.gg(d,a,b,c,x[i + 6],9,-1069501632);
			c = this.gg(c,d,a,b,x[i + 11],14,643717713);
			b = this.gg(b,c,d,a,x[i],20,-373897302);
			a = this.gg(a,b,c,d,x[i + 5],5,-701558691);
			d = this.gg(d,a,b,c,x[i + 10],9,38016083);
			c = this.gg(c,d,a,b,x[i + 15],14,-660478335);
			b = this.gg(b,c,d,a,x[i + 4],20,-405537848);
			a = this.gg(a,b,c,d,x[i + 9],5,568446438);
			d = this.gg(d,a,b,c,x[i + 14],9,-1019803690);
			c = this.gg(c,d,a,b,x[i + 3],14,-187363961);
			b = this.gg(b,c,d,a,x[i + 8],20,1163531501);
			a = this.gg(a,b,c,d,x[i + 13],5,-1444681467);
			d = this.gg(d,a,b,c,x[i + 2],9,-51403784);
			c = this.gg(c,d,a,b,x[i + 7],14,1735328473);
			b = this.gg(b,c,d,a,x[i + 12],20,-1926607734);
			a = this.hh(a,b,c,d,x[i + 5],4,-378558);
			d = this.hh(d,a,b,c,x[i + 8],11,-2022574463);
			c = this.hh(c,d,a,b,x[i + 11],16,1839030562);
			b = this.hh(b,c,d,a,x[i + 14],23,-35309556);
			a = this.hh(a,b,c,d,x[i + 1],4,-1530992060);
			d = this.hh(d,a,b,c,x[i + 4],11,1272893353);
			c = this.hh(c,d,a,b,x[i + 7],16,-155497632);
			b = this.hh(b,c,d,a,x[i + 10],23,-1094730640);
			a = this.hh(a,b,c,d,x[i + 13],4,681279174);
			d = this.hh(d,a,b,c,x[i],11,-358537222);
			c = this.hh(c,d,a,b,x[i + 3],16,-722521979);
			b = this.hh(b,c,d,a,x[i + 6],23,76029189);
			a = this.hh(a,b,c,d,x[i + 9],4,-640364487);
			d = this.hh(d,a,b,c,x[i + 12],11,-421815835);
			c = this.hh(c,d,a,b,x[i + 15],16,530742520);
			b = this.hh(b,c,d,a,x[i + 2],23,-995338651);
			a = this.ii(a,b,c,d,x[i],6,-198630844);
			d = this.ii(d,a,b,c,x[i + 7],10,1126891415);
			c = this.ii(c,d,a,b,x[i + 14],15,-1416354905);
			b = this.ii(b,c,d,a,x[i + 5],21,-57434055);
			a = this.ii(a,b,c,d,x[i + 12],6,1700485571);
			d = this.ii(d,a,b,c,x[i + 3],10,-1894986606);
			c = this.ii(c,d,a,b,x[i + 10],15,-1051523);
			b = this.ii(b,c,d,a,x[i + 1],21,-2054922799);
			a = this.ii(a,b,c,d,x[i + 8],6,1873313359);
			d = this.ii(d,a,b,c,x[i + 15],10,-30611744);
			c = this.ii(c,d,a,b,x[i + 6],15,-1560198380);
			b = this.ii(b,c,d,a,x[i + 13],21,1309151649);
			a = this.ii(a,b,c,d,x[i + 4],6,-145523070);
			d = this.ii(d,a,b,c,x[i + 11],10,-1120210379);
			c = this.ii(c,d,a,b,x[i + 2],15,718787259);
			b = this.ii(b,c,d,a,x[i + 9],21,-343485551);
			a = this.addme(a,olda);
			b = this.addme(b,oldb);
			c = this.addme(c,oldc);
			d = this.addme(d,oldd);
			i += 16;
		}
		return [a,b,c,d];
	}
	,__class__: haxe_crypto_Md5
};
var haxe_ds_ArraySort = function() { };
$hxClasses["haxe.ds.ArraySort"] = haxe_ds_ArraySort;
haxe_ds_ArraySort.__name__ = ["haxe","ds","ArraySort"];
haxe_ds_ArraySort.sort = function(a,cmp) {
	haxe_ds_ArraySort.rec(a,cmp,0,a.length);
};
haxe_ds_ArraySort.rec = function(a,cmp,from,to) {
	var middle = from + to >> 1;
	if(to - from < 12) {
		if(to <= from) {
			return;
		}
		var _g1 = from + 1;
		var _g = to;
		while(_g1 < _g) {
			var i = _g1++;
			var j = i;
			while(j > from) {
				if(cmp(a[j],a[j - 1]) < 0) {
					haxe_ds_ArraySort.swap(a,j - 1,j);
				} else {
					break;
				}
				--j;
			}
		}
		return;
	}
	haxe_ds_ArraySort.rec(a,cmp,from,middle);
	haxe_ds_ArraySort.rec(a,cmp,middle,to);
	haxe_ds_ArraySort.doMerge(a,cmp,from,middle,to,middle - from,to - middle);
};
haxe_ds_ArraySort.doMerge = function(a,cmp,from,pivot,to,len1,len2) {
	var first_cut;
	var second_cut;
	var len11;
	var len22;
	var new_mid;
	if(len1 == 0 || len2 == 0) {
		return;
	}
	if(len1 + len2 == 2) {
		if(cmp(a[pivot],a[from]) < 0) {
			haxe_ds_ArraySort.swap(a,pivot,from);
		}
		return;
	}
	if(len1 > len2) {
		len11 = len1 >> 1;
		first_cut = from + len11;
		second_cut = haxe_ds_ArraySort.lower(a,cmp,pivot,to,first_cut);
		len22 = second_cut - pivot;
	} else {
		len22 = len2 >> 1;
		second_cut = pivot + len22;
		first_cut = haxe_ds_ArraySort.upper(a,cmp,from,pivot,second_cut);
		len11 = first_cut - from;
	}
	haxe_ds_ArraySort.rotate(a,cmp,first_cut,pivot,second_cut);
	new_mid = first_cut + len22;
	haxe_ds_ArraySort.doMerge(a,cmp,from,first_cut,new_mid,len11,len22);
	haxe_ds_ArraySort.doMerge(a,cmp,new_mid,second_cut,to,len1 - len11,len2 - len22);
};
haxe_ds_ArraySort.rotate = function(a,cmp,from,mid,to) {
	var n;
	if(from == mid || mid == to) {
		return;
	}
	n = haxe_ds_ArraySort.gcd(to - from,mid - from);
	while(n-- != 0) {
		var val = a[from + n];
		var shift = mid - from;
		var p1 = from + n;
		var p2 = from + n + shift;
		while(p2 != from + n) {
			a[p1] = a[p2];
			p1 = p2;
			if(to - p2 > shift) {
				p2 += shift;
			} else {
				p2 = from + (shift - (to - p2));
			}
		}
		a[p1] = val;
	}
};
haxe_ds_ArraySort.gcd = function(m,n) {
	while(n != 0) {
		var t = m % n;
		m = n;
		n = t;
	}
	return m;
};
haxe_ds_ArraySort.upper = function(a,cmp,from,to,val) {
	var len = to - from;
	var half;
	var mid;
	while(len > 0) {
		half = len >> 1;
		mid = from + half;
		if(cmp(a[val],a[mid]) < 0) {
			len = half;
		} else {
			from = mid + 1;
			len = len - half - 1;
		}
	}
	return from;
};
haxe_ds_ArraySort.lower = function(a,cmp,from,to,val) {
	var len = to - from;
	var half;
	var mid;
	while(len > 0) {
		half = len >> 1;
		mid = from + half;
		if(cmp(a[mid],a[val]) < 0) {
			from = mid + 1;
			len = len - half - 1;
		} else {
			len = half;
		}
	}
	return from;
};
haxe_ds_ArraySort.swap = function(a,i,j) {
	var tmp = a[i];
	a[i] = a[j];
	a[j] = tmp;
};
var haxe_ds_BalancedTree = function() {
};
$hxClasses["haxe.ds.BalancedTree"] = haxe_ds_BalancedTree;
haxe_ds_BalancedTree.__name__ = ["haxe","ds","BalancedTree"];
haxe_ds_BalancedTree.prototype = {
	set: function(key,value) {
		this.root = this.setLoop(key,value,this.root);
	}
	,get: function(key) {
		var node = this.root;
		while(node != null) {
			var c = this.compare(key,node.key);
			if(c == 0) {
				return node.value;
			}
			if(c < 0) {
				node = node.left;
			} else {
				node = node.right;
			}
		}
		return null;
	}
	,remove: function(key) {
		try {
			this.root = this.removeLoop(key,this.root);
			return true;
		} catch( e ) {
			haxe_CallStack.lastException = e;
			if (e instanceof js__$Boot_HaxeError) e = e.val;
			if( js_Boot.__instanceof(e,String) ) {
				return false;
			} else throw(e);
		}
	}
	,exists: function(key) {
		var node = this.root;
		while(node != null) {
			var c = this.compare(key,node.key);
			if(c == 0) {
				return true;
			} else if(c < 0) {
				node = node.left;
			} else {
				node = node.right;
			}
		}
		return false;
	}
	,setLoop: function(k,v,node) {
		if(node == null) {
			return new haxe_ds_TreeNode(null,k,v,null);
		}
		var c = this.compare(k,node.key);
		if(c == 0) {
			return new haxe_ds_TreeNode(node.left,k,v,node.right,node == null ? 0 : node._height);
		} else if(c < 0) {
			var nl = this.setLoop(k,v,node.left);
			return this.balance(nl,node.key,node.value,node.right);
		} else {
			var nr = this.setLoop(k,v,node.right);
			return this.balance(node.left,node.key,node.value,nr);
		}
	}
	,removeLoop: function(k,node) {
		if(node == null) {
			throw new js__$Boot_HaxeError("Not_found");
		}
		var c = this.compare(k,node.key);
		if(c == 0) {
			return this.merge(node.left,node.right);
		} else if(c < 0) {
			return this.balance(this.removeLoop(k,node.left),node.key,node.value,node.right);
		} else {
			return this.balance(node.left,node.key,node.value,this.removeLoop(k,node.right));
		}
	}
	,merge: function(t1,t2) {
		if(t1 == null) {
			return t2;
		}
		if(t2 == null) {
			return t1;
		}
		var t = this.minBinding(t2);
		return this.balance(t1,t.key,t.value,this.removeMinBinding(t2));
	}
	,minBinding: function(t) {
		if(t == null) {
			throw new js__$Boot_HaxeError("Not_found");
		} else if(t.left == null) {
			return t;
		} else {
			return this.minBinding(t.left);
		}
	}
	,removeMinBinding: function(t) {
		if(t.left == null) {
			return t.right;
		} else {
			return this.balance(this.removeMinBinding(t.left),t.key,t.value,t.right);
		}
	}
	,balance: function(l,k,v,r) {
		var hl = l == null ? 0 : l._height;
		var hr = r == null ? 0 : r._height;
		if(hl > hr + 2) {
			var _this = l.left;
			var _this1 = l.right;
			if((_this == null ? 0 : _this._height) >= (_this1 == null ? 0 : _this1._height)) {
				return new haxe_ds_TreeNode(l.left,l.key,l.value,new haxe_ds_TreeNode(l.right,k,v,r));
			} else {
				return new haxe_ds_TreeNode(new haxe_ds_TreeNode(l.left,l.key,l.value,l.right.left),l.right.key,l.right.value,new haxe_ds_TreeNode(l.right.right,k,v,r));
			}
		} else if(hr > hl + 2) {
			var _this2 = r.right;
			var _this3 = r.left;
			if((_this2 == null ? 0 : _this2._height) > (_this3 == null ? 0 : _this3._height)) {
				return new haxe_ds_TreeNode(new haxe_ds_TreeNode(l,k,v,r.left),r.key,r.value,r.right);
			} else {
				return new haxe_ds_TreeNode(new haxe_ds_TreeNode(l,k,v,r.left.left),r.left.key,r.left.value,new haxe_ds_TreeNode(r.left.right,r.key,r.value,r.right));
			}
		} else {
			return new haxe_ds_TreeNode(l,k,v,r,(hl > hr ? hl : hr) + 1);
		}
	}
	,compare: function(k1,k2) {
		return Reflect.compare(k1,k2);
	}
	,__class__: haxe_ds_BalancedTree
};
var haxe_ds_TreeNode = function(l,k,v,r,h) {
	if(h == null) {
		h = -1;
	}
	this.left = l;
	this.key = k;
	this.value = v;
	this.right = r;
	if(h == -1) {
		var tmp;
		var _this = this.left;
		var _this1 = this.right;
		if((_this == null ? 0 : _this._height) > (_this1 == null ? 0 : _this1._height)) {
			var _this2 = this.left;
			if(_this2 == null) {
				tmp = 0;
			} else {
				tmp = _this2._height;
			}
		} else {
			var _this3 = this.right;
			if(_this3 == null) {
				tmp = 0;
			} else {
				tmp = _this3._height;
			}
		}
		this._height = tmp + 1;
	} else {
		this._height = h;
	}
};
$hxClasses["haxe.ds.TreeNode"] = haxe_ds_TreeNode;
haxe_ds_TreeNode.__name__ = ["haxe","ds","TreeNode"];
haxe_ds_TreeNode.prototype = {
	__class__: haxe_ds_TreeNode
};
var haxe_ds_EnumValueMap = function() {
	haxe_ds_BalancedTree.call(this);
};
$hxClasses["haxe.ds.EnumValueMap"] = haxe_ds_EnumValueMap;
haxe_ds_EnumValueMap.__name__ = ["haxe","ds","EnumValueMap"];
haxe_ds_EnumValueMap.__interfaces__ = [haxe_IMap];
haxe_ds_EnumValueMap.__super__ = haxe_ds_BalancedTree;
haxe_ds_EnumValueMap.prototype = $extend(haxe_ds_BalancedTree.prototype,{
	compare: function(k1,k2) {
		var d = k1[1] - k2[1];
		if(d != 0) {
			return d;
		}
		var p1 = k1.slice(2);
		var p2 = k2.slice(2);
		if(p1.length == 0 && p2.length == 0) {
			return 0;
		}
		return this.compareArgs(p1,p2);
	}
	,compareArgs: function(a1,a2) {
		var ld = a1.length - a2.length;
		if(ld != 0) {
			return ld;
		}
		var _g1 = 0;
		var _g = a1.length;
		while(_g1 < _g) {
			var i = _g1++;
			var d = this.compareArg(a1[i],a2[i]);
			if(d != 0) {
				return d;
			}
		}
		return 0;
	}
	,compareArg: function(v1,v2) {
		if(Reflect.isEnumValue(v1) && Reflect.isEnumValue(v2)) {
			return this.compare(v1,v2);
		} else if((v1 instanceof Array) && v1.__enum__ == null && ((v2 instanceof Array) && v2.__enum__ == null)) {
			return this.compareArgs(v1,v2);
		} else {
			return Reflect.compare(v1,v2);
		}
	}
	,__class__: haxe_ds_EnumValueMap
});
var haxe_ds_IntMap = function() {
	this.h = { };
};
$hxClasses["haxe.ds.IntMap"] = haxe_ds_IntMap;
haxe_ds_IntMap.__name__ = ["haxe","ds","IntMap"];
haxe_ds_IntMap.__interfaces__ = [haxe_IMap];
haxe_ds_IntMap.prototype = {
	set: function(key,value) {
		this.h[key] = value;
	}
	,get: function(key) {
		return this.h[key];
	}
	,exists: function(key) {
		return this.h.hasOwnProperty(key);
	}
	,remove: function(key) {
		if(!this.h.hasOwnProperty(key)) {
			return false;
		}
		delete(this.h[key]);
		return true;
	}
	,keys: function() {
		var a = [];
		for( var key in this.h ) if(this.h.hasOwnProperty(key)) {
			a.push(key | 0);
		}
		return HxOverrides.iter(a);
	}
	,__class__: haxe_ds_IntMap
};
var haxe_ds_ObjectMap = function() {
	this.h = { __keys__ : { }};
};
$hxClasses["haxe.ds.ObjectMap"] = haxe_ds_ObjectMap;
haxe_ds_ObjectMap.__name__ = ["haxe","ds","ObjectMap"];
haxe_ds_ObjectMap.__interfaces__ = [haxe_IMap];
haxe_ds_ObjectMap.assignId = function(obj) {
	return obj.__id__ = ++haxe_ds_ObjectMap.count;
};
haxe_ds_ObjectMap.getId = function(obj) {
	return obj.__id__;
};
haxe_ds_ObjectMap.prototype = {
	set: function(key,value) {
		var id = key.__id__ || (key.__id__ = ++haxe_ds_ObjectMap.count);
		this.h[id] = value;
		this.h.__keys__[id] = key;
	}
	,get: function(key) {
		return this.h[key.__id__];
	}
	,exists: function(key) {
		return this.h.__keys__[key.__id__] != null;
	}
	,remove: function(key) {
		var id = key.__id__;
		if(this.h.__keys__[id] == null) {
			return false;
		}
		delete(this.h[id]);
		delete(this.h.__keys__[id]);
		return true;
	}
	,keys: function() {
		var a = [];
		for( var key in this.h.__keys__ ) {
		if(this.h.hasOwnProperty(key)) {
			a.push(this.h.__keys__[key]);
		}
		}
		return HxOverrides.iter(a);
	}
	,__class__: haxe_ds_ObjectMap
};
var haxe_ds__$StringMap_StringMapIterator = function(map,keys) {
	this.map = map;
	this.keys = keys;
	this.index = 0;
	this.count = keys.length;
};
$hxClasses["haxe.ds._StringMap.StringMapIterator"] = haxe_ds__$StringMap_StringMapIterator;
haxe_ds__$StringMap_StringMapIterator.__name__ = ["haxe","ds","_StringMap","StringMapIterator"];
haxe_ds__$StringMap_StringMapIterator.prototype = {
	hasNext: function() {
		return this.index < this.count;
	}
	,next: function() {
		var _this = this.map;
		var key = this.keys[this.index++];
		if(__map_reserved[key] != null) {
			return _this.getReserved(key);
		} else {
			return _this.h[key];
		}
	}
	,__class__: haxe_ds__$StringMap_StringMapIterator
};
var haxe_ds_StringMap = function() {
	this.h = { };
};
$hxClasses["haxe.ds.StringMap"] = haxe_ds_StringMap;
haxe_ds_StringMap.__name__ = ["haxe","ds","StringMap"];
haxe_ds_StringMap.__interfaces__ = [haxe_IMap];
haxe_ds_StringMap.prototype = {
	set: function(key,value) {
		if(__map_reserved[key] != null) {
			this.setReserved(key,value);
		} else {
			this.h[key] = value;
		}
	}
	,get: function(key) {
		if(__map_reserved[key] != null) {
			return this.getReserved(key);
		}
		return this.h[key];
	}
	,exists: function(key) {
		if(__map_reserved[key] != null) {
			return this.existsReserved(key);
		}
		return this.h.hasOwnProperty(key);
	}
	,setReserved: function(key,value) {
		if(this.rh == null) {
			this.rh = { };
		}
		this.rh["$" + key] = value;
	}
	,getReserved: function(key) {
		if(this.rh == null) {
			return null;
		} else {
			return this.rh["$" + key];
		}
	}
	,existsReserved: function(key) {
		if(this.rh == null) {
			return false;
		}
		return this.rh.hasOwnProperty("$" + key);
	}
	,remove: function(key) {
		if(__map_reserved[key] != null) {
			key = "$" + key;
			if(this.rh == null || !this.rh.hasOwnProperty(key)) {
				return false;
			}
			delete(this.rh[key]);
			return true;
		} else {
			if(!this.h.hasOwnProperty(key)) {
				return false;
			}
			delete(this.h[key]);
			return true;
		}
	}
	,keys: function() {
		return HxOverrides.iter(this.arrayKeys());
	}
	,arrayKeys: function() {
		var out = [];
		for( var key in this.h ) {
		if(this.h.hasOwnProperty(key)) {
			out.push(key);
		}
		}
		if(this.rh != null) {
			for( var key in this.rh ) {
			if(key.charCodeAt(0) == 36) {
				out.push(key.substr(1));
			}
			}
		}
		return out;
	}
	,__class__: haxe_ds_StringMap
};
var haxe_ds__$Vector_Vector_$Impl_$ = {};
$hxClasses["haxe.ds._Vector.Vector_Impl_"] = haxe_ds__$Vector_Vector_$Impl_$;
haxe_ds__$Vector_Vector_$Impl_$.__name__ = ["haxe","ds","_Vector","Vector_Impl_"];
haxe_ds__$Vector_Vector_$Impl_$.blit = function(src,srcPos,dest,destPos,len) {
	if(src == dest) {
		if(srcPos < destPos) {
			var i = srcPos + len;
			var j = destPos + len;
			var _g1 = 0;
			var _g = len;
			while(_g1 < _g) {
				var k = _g1++;
				--i;
				--j;
				src[j] = src[i];
			}
		} else if(srcPos > destPos) {
			var i1 = srcPos;
			var j1 = destPos;
			var _g11 = 0;
			var _g2 = len;
			while(_g11 < _g2) {
				var k1 = _g11++;
				src[j1] = src[i1];
				++i1;
				++j1;
			}
		}
	} else {
		var _g12 = 0;
		var _g3 = len;
		while(_g12 < _g3) {
			var i2 = _g12++;
			dest[destPos + i2] = src[srcPos + i2];
		}
	}
};
var haxe_io_Eof = function() { };
$hxClasses["haxe.io.Eof"] = haxe_io_Eof;
haxe_io_Eof.__name__ = ["haxe","io","Eof"];
haxe_io_Eof.prototype = {
	toString: function() {
		return "Eof";
	}
	,__class__: haxe_io_Eof
};
var haxe_io_Error = $hxClasses["haxe.io.Error"] = { __ename__ : ["haxe","io","Error"], __constructs__ : ["Blocked","Overflow","OutsideBounds","Custom"] };
haxe_io_Error.Blocked = ["Blocked",0];
haxe_io_Error.Blocked.toString = $estr;
haxe_io_Error.Blocked.__enum__ = haxe_io_Error;
haxe_io_Error.Overflow = ["Overflow",1];
haxe_io_Error.Overflow.toString = $estr;
haxe_io_Error.Overflow.__enum__ = haxe_io_Error;
haxe_io_Error.OutsideBounds = ["OutsideBounds",2];
haxe_io_Error.OutsideBounds.toString = $estr;
haxe_io_Error.OutsideBounds.__enum__ = haxe_io_Error;
haxe_io_Error.Custom = function(e) { var $x = ["Custom",3,e]; $x.__enum__ = haxe_io_Error; $x.toString = $estr; return $x; };
var haxe_io_FPHelper = function() { };
$hxClasses["haxe.io.FPHelper"] = haxe_io_FPHelper;
haxe_io_FPHelper.__name__ = ["haxe","io","FPHelper"];
haxe_io_FPHelper.i32ToFloat = function(i) {
	var sign = 1 - (i >>> 31 << 1);
	var exp = i >>> 23 & 255;
	var sig = i & 8388607;
	if(sig == 0 && exp == 0) {
		return 0.0;
	}
	return sign * (1 + Math.pow(2,-23) * sig) * Math.pow(2,exp - 127);
};
haxe_io_FPHelper.floatToI32 = function(f) {
	if(f == 0) {
		return 0;
	}
	var af = f < 0 ? -f : f;
	var exp = Math.floor(Math.log(af) / 0.6931471805599453);
	if(exp < -127) {
		exp = -127;
	} else if(exp > 128) {
		exp = 128;
	}
	var sig = Math.round((af / Math.pow(2,exp) - 1) * 8388608);
	if(sig == 8388608 && exp < 128) {
		sig = 0;
		++exp;
	}
	return (f < 0 ? -2147483648 : 0) | exp + 127 << 23 | sig;
};
haxe_io_FPHelper.i64ToDouble = function(low,high) {
	var sign = 1 - (high >>> 31 << 1);
	var exp = (high >> 20 & 2047) - 1023;
	var sig = (high & 1048575) * 4294967296. + (low >>> 31) * 2147483648. + (low & 2147483647);
	if(sig == 0 && exp == -1023) {
		return 0.0;
	}
	return sign * (1.0 + Math.pow(2,-52) * sig) * Math.pow(2,exp);
};
haxe_io_FPHelper.doubleToI64 = function(v) {
	var i64 = haxe_io_FPHelper.i64tmp;
	if(v == 0) {
		i64.low = 0;
		i64.high = 0;
	} else if(!isFinite(v)) {
		if(v > 0) {
			i64.low = 0;
			i64.high = 2146435072;
		} else {
			i64.low = 0;
			i64.high = -1048576;
		}
	} else {
		var av = v < 0 ? -v : v;
		var exp = Math.floor(Math.log(av) / 0.6931471805599453);
		var sig = Math.round((av / Math.pow(2,exp) - 1) * 4503599627370496.);
		var sig_l = sig | 0;
		var sig_h = sig / 4294967296.0 | 0;
		i64.low = sig_l;
		i64.high = (v < 0 ? -2147483648 : 0) | exp + 1023 << 20 | sig_h;
	}
	return i64;
};
var haxe_io_Path = function(path) {
	switch(path) {
	case ".":case "..":
		this.dir = path;
		this.file = "";
		return;
	}
	var c1 = path.lastIndexOf("/");
	var c2 = path.lastIndexOf("\\");
	if(c1 < c2) {
		this.dir = HxOverrides.substr(path,0,c2);
		path = HxOverrides.substr(path,c2 + 1,null);
		this.backslash = true;
	} else if(c2 < c1) {
		this.dir = HxOverrides.substr(path,0,c1);
		path = HxOverrides.substr(path,c1 + 1,null);
	} else {
		this.dir = null;
	}
	var cp = path.lastIndexOf(".");
	if(cp != -1) {
		this.ext = HxOverrides.substr(path,cp + 1,null);
		this.file = HxOverrides.substr(path,0,cp);
	} else {
		this.ext = null;
		this.file = path;
	}
};
$hxClasses["haxe.io.Path"] = haxe_io_Path;
haxe_io_Path.__name__ = ["haxe","io","Path"];
haxe_io_Path.withoutExtension = function(path) {
	var s = new haxe_io_Path(path);
	s.ext = null;
	return s.toString();
};
haxe_io_Path.prototype = {
	toString: function() {
		return (this.dir == null ? "" : this.dir + (this.backslash ? "\\" : "/")) + this.file + (this.ext == null ? "" : "." + this.ext);
	}
	,__class__: haxe_io_Path
};
var haxe_xml__$Fast_NodeAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.NodeAccess"] = haxe_xml__$Fast_NodeAccess;
haxe_xml__$Fast_NodeAccess.__name__ = ["haxe","xml","_Fast","NodeAccess"];
haxe_xml__$Fast_NodeAccess.prototype = {
	__class__: haxe_xml__$Fast_NodeAccess
};
var haxe_xml__$Fast_AttribAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.AttribAccess"] = haxe_xml__$Fast_AttribAccess;
haxe_xml__$Fast_AttribAccess.__name__ = ["haxe","xml","_Fast","AttribAccess"];
haxe_xml__$Fast_AttribAccess.prototype = {
	resolve: function(name) {
		if(this.__x.nodeType == Xml.Document) {
			throw new js__$Boot_HaxeError("Cannot access document attribute " + name);
		}
		var v = this.__x.get(name);
		if(v == null) {
			var _this = this.__x;
			if(_this.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + _this.nodeType);
			}
			throw new js__$Boot_HaxeError(_this.nodeName + " is missing attribute " + name);
		}
		return v;
	}
	,__class__: haxe_xml__$Fast_AttribAccess
};
var haxe_xml__$Fast_HasAttribAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.HasAttribAccess"] = haxe_xml__$Fast_HasAttribAccess;
haxe_xml__$Fast_HasAttribAccess.__name__ = ["haxe","xml","_Fast","HasAttribAccess"];
haxe_xml__$Fast_HasAttribAccess.prototype = {
	resolve: function(name) {
		if(this.__x.nodeType == Xml.Document) {
			throw new js__$Boot_HaxeError("Cannot access document attribute " + name);
		}
		return this.__x.exists(name);
	}
	,__class__: haxe_xml__$Fast_HasAttribAccess
};
var haxe_xml__$Fast_HasNodeAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.HasNodeAccess"] = haxe_xml__$Fast_HasNodeAccess;
haxe_xml__$Fast_HasNodeAccess.__name__ = ["haxe","xml","_Fast","HasNodeAccess"];
haxe_xml__$Fast_HasNodeAccess.prototype = {
	__class__: haxe_xml__$Fast_HasNodeAccess
};
var haxe_xml__$Fast_NodeListAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.NodeListAccess"] = haxe_xml__$Fast_NodeListAccess;
haxe_xml__$Fast_NodeListAccess.__name__ = ["haxe","xml","_Fast","NodeListAccess"];
haxe_xml__$Fast_NodeListAccess.prototype = {
	resolve: function(name) {
		var l = new List();
		var x = this.__x.elementsNamed(name);
		while(x.hasNext()) {
			var x1 = x.next();
			l.add(new haxe_xml_Fast(x1));
		}
		return l;
	}
	,__class__: haxe_xml__$Fast_NodeListAccess
};
var haxe_xml_Fast = function(x) {
	if(x.nodeType != Xml.Document && x.nodeType != Xml.Element) {
		throw new js__$Boot_HaxeError("Invalid nodeType " + x.nodeType);
	}
	this.x = x;
	this.node = new haxe_xml__$Fast_NodeAccess(x);
	this.nodes = new haxe_xml__$Fast_NodeListAccess(x);
	this.att = new haxe_xml__$Fast_AttribAccess(x);
	this.has = new haxe_xml__$Fast_HasAttribAccess(x);
	this.hasNode = new haxe_xml__$Fast_HasNodeAccess(x);
};
$hxClasses["haxe.xml.Fast"] = haxe_xml_Fast;
haxe_xml_Fast.__name__ = ["haxe","xml","Fast"];
haxe_xml_Fast.prototype = {
	__class__: haxe_xml_Fast
};
var haxe_xml_XmlParserException = function(message,xml,position) {
	this.xml = xml;
	this.message = message;
	this.position = position;
	this.lineNumber = 1;
	this.positionAtLine = 0;
	var _g1 = 0;
	var _g = position;
	while(_g1 < _g) {
		var i = _g1++;
		var c = xml.charCodeAt(i);
		if(c == 10) {
			this.lineNumber++;
			this.positionAtLine = 0;
		} else if(c != 13) {
			this.positionAtLine++;
		}
	}
};
$hxClasses["haxe.xml.XmlParserException"] = haxe_xml_XmlParserException;
haxe_xml_XmlParserException.__name__ = ["haxe","xml","XmlParserException"];
haxe_xml_XmlParserException.prototype = {
	toString: function() {
		return Type.getClassName(js_Boot.getClass(this)) + ": " + this.message + " at line " + this.lineNumber + " char " + this.positionAtLine;
	}
	,__class__: haxe_xml_XmlParserException
};
var haxe_xml_Parser = function() { };
$hxClasses["haxe.xml.Parser"] = haxe_xml_Parser;
haxe_xml_Parser.__name__ = ["haxe","xml","Parser"];
haxe_xml_Parser.parse = function(str,strict) {
	if(strict == null) {
		strict = false;
	}
	var doc = Xml.createDocument();
	haxe_xml_Parser.doParse(str,strict,0,doc);
	return doc;
};
haxe_xml_Parser.doParse = function(str,strict,p,parent) {
	if(p == null) {
		p = 0;
	}
	var xml = null;
	var state = 1;
	var next = 1;
	var aname = null;
	var start = 0;
	var nsubs = 0;
	var nbrackets = 0;
	var c = str.charCodeAt(p);
	var buf = new StringBuf();
	var escapeNext = 1;
	var attrValQuote = -1;
	while(c == c) {
		switch(state) {
		case 0:
			switch(c) {
			case 9:case 10:case 13:case 32:
				break;
			default:
				state = next;
				continue;
			}
			break;
		case 1:
			if(c == 60) {
				state = 0;
				next = 2;
			} else {
				start = p;
				state = 13;
				continue;
			}
			break;
		case 2:
			switch(c) {
			case 33:
				if(str.charCodeAt(p + 1) == 91) {
					p += 2;
					if(HxOverrides.substr(str,p,6).toUpperCase() != "CDATA[") {
						throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <![CDATA[",str,p));
					}
					p += 5;
					state = 17;
					start = p + 1;
				} else if(str.charCodeAt(p + 1) == 68 || str.charCodeAt(p + 1) == 100) {
					if(HxOverrides.substr(str,p + 2,6).toUpperCase() != "OCTYPE") {
						throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <!DOCTYPE",str,p));
					}
					p += 8;
					state = 16;
					start = p + 1;
				} else if(str.charCodeAt(p + 1) != 45 || str.charCodeAt(p + 2) != 45) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <!--",str,p));
				} else {
					p += 2;
					state = 15;
					start = p + 1;
				}
				break;
			case 47:
				if(parent == null) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",str,p));
				}
				start = p + 1;
				state = 0;
				next = 10;
				break;
			case 63:
				state = 14;
				start = p;
				break;
			default:
				state = 3;
				start = p;
				continue;
			}
			break;
		case 3:
			if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45)) {
				if(p == start) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",str,p));
				}
				xml = Xml.createElement(HxOverrides.substr(str,start,p - start));
				parent.addChild(xml);
				++nsubs;
				state = 0;
				next = 4;
				continue;
			}
			break;
		case 4:
			switch(c) {
			case 47:
				state = 11;
				break;
			case 62:
				state = 9;
				break;
			default:
				state = 5;
				start = p;
				continue;
			}
			break;
		case 5:
			if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45)) {
				var tmp;
				if(start == p) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected attribute name",str,p));
				}
				tmp = HxOverrides.substr(str,start,p - start);
				aname = tmp;
				if(xml.exists(aname)) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Duplicate attribute [" + aname + "]",str,p));
				}
				state = 0;
				next = 6;
				continue;
			}
			break;
		case 6:
			if(c == 61) {
				state = 0;
				next = 7;
			} else {
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected =",str,p));
			}
			break;
		case 7:
			switch(c) {
			case 34:case 39:
				buf = new StringBuf();
				state = 8;
				start = p + 1;
				attrValQuote = c;
				break;
			default:
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected \"",str,p));
			}
			break;
		case 8:
			switch(c) {
			case 38:
				var len = p - start;
				buf.b += len == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len);
				state = 18;
				escapeNext = 8;
				start = p + 1;
				break;
			case 60:case 62:
				if(strict) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid unescaped " + String.fromCharCode(c) + " in attribute value",str,p));
				} else if(c == attrValQuote) {
					var len1 = p - start;
					buf.b += len1 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len1);
					var val = buf.b;
					buf = new StringBuf();
					xml.set(aname,val);
					state = 0;
					next = 4;
				}
				break;
			default:
				if(c == attrValQuote) {
					var len2 = p - start;
					buf.b += len2 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len2);
					var val1 = buf.b;
					buf = new StringBuf();
					xml.set(aname,val1);
					state = 0;
					next = 4;
				}
			}
			break;
		case 9:
			p = haxe_xml_Parser.doParse(str,strict,p,xml);
			start = p;
			state = 1;
			break;
		case 10:
			if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45)) {
				if(start == p) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",str,p));
				}
				var v = HxOverrides.substr(str,start,p - start);
				if(parent.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + parent.nodeType);
				}
				if(v != parent.nodeName) {
					if(parent.nodeType != Xml.Element) {
						throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + parent.nodeType);
					}
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected </" + parent.nodeName + ">",str,p));
				}
				state = 0;
				next = 12;
				continue;
			}
			break;
		case 11:
			if(c == 62) {
				state = 1;
			} else {
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",str,p));
			}
			break;
		case 12:
			if(c == 62) {
				if(nsubs == 0) {
					parent.addChild(Xml.createPCData(""));
				}
				return p;
			} else {
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",str,p));
			}
			break;
		case 13:
			if(c == 60) {
				var len3 = p - start;
				buf.b += len3 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len3);
				var child = Xml.createPCData(buf.b);
				buf = new StringBuf();
				parent.addChild(child);
				++nsubs;
				state = 0;
				next = 2;
			} else if(c == 38) {
				var len4 = p - start;
				buf.b += len4 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len4);
				state = 18;
				escapeNext = 13;
				start = p + 1;
			}
			break;
		case 14:
			if(c == 63 && str.charCodeAt(p + 1) == 62) {
				++p;
				var str1 = HxOverrides.substr(str,start + 1,p - start - 2);
				parent.addChild(Xml.createProcessingInstruction(str1));
				++nsubs;
				state = 1;
			}
			break;
		case 15:
			if(c == 45 && str.charCodeAt(p + 1) == 45 && str.charCodeAt(p + 2) == 62) {
				parent.addChild(Xml.createComment(HxOverrides.substr(str,start,p - start)));
				++nsubs;
				p += 2;
				state = 1;
			}
			break;
		case 16:
			if(c == 91) {
				++nbrackets;
			} else if(c == 93) {
				--nbrackets;
			} else if(c == 62 && nbrackets == 0) {
				parent.addChild(Xml.createDocType(HxOverrides.substr(str,start,p - start)));
				++nsubs;
				state = 1;
			}
			break;
		case 17:
			if(c == 93 && str.charCodeAt(p + 1) == 93 && str.charCodeAt(p + 2) == 62) {
				var child1 = Xml.createCData(HxOverrides.substr(str,start,p - start));
				parent.addChild(child1);
				++nsubs;
				p += 2;
				state = 1;
			}
			break;
		case 18:
			if(c == 59) {
				var s = HxOverrides.substr(str,start,p - start);
				if(s.charCodeAt(0) == 35) {
					var c1 = s.charCodeAt(1) == 120 ? Std.parseInt("0" + HxOverrides.substr(s,1,s.length - 1)) : Std.parseInt(HxOverrides.substr(s,1,s.length - 1));
					buf.b += String.fromCharCode(c1);
				} else {
					var _this = haxe_xml_Parser.escapes;
					if(!(__map_reserved[s] != null ? _this.existsReserved(s) : _this.h.hasOwnProperty(s))) {
						if(strict) {
							throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Undefined entity: " + s,str,p));
						}
						buf.b += Std.string("&" + s + ";");
					} else {
						var _this1 = haxe_xml_Parser.escapes;
						var x = __map_reserved[s] != null ? _this1.getReserved(s) : _this1.h[s];
						buf.b += Std.string(x);
					}
				}
				start = p + 1;
				state = escapeNext;
			} else if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45) && c != 35) {
				if(strict) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid character in entity: " + String.fromCharCode(c),str,p));
				}
				buf.b += "&";
				var len5 = p - start;
				buf.b += len5 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len5);
				start = p--;
				state = escapeNext;
			}
			break;
		}
		c = str.charCodeAt(++p);
	}
	if(state == 1) {
		start = p;
		state = 13;
	}
	if(state == 13) {
		if(p != start || nsubs == 0) {
			var len6 = p - start;
			buf.b += len6 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len6);
			parent.addChild(Xml.createPCData(buf.b));
			++nsubs;
		}
		return p;
	}
	if(!strict && state == 18 && escapeNext == 13) {
		buf.b += "&";
		var len7 = p - start;
		buf.b += len7 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len7);
		parent.addChild(Xml.createPCData(buf.b));
		++nsubs;
		return p;
	}
	throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Unexpected end",str,p));
};
var js__$Boot_HaxeError = function(val) {
	Error.call(this);
	this.val = val;
	this.message = String(val);
	if(Error.captureStackTrace) {
		Error.captureStackTrace(this,js__$Boot_HaxeError);
	}
};
$hxClasses["js._Boot.HaxeError"] = js__$Boot_HaxeError;
js__$Boot_HaxeError.__name__ = ["js","_Boot","HaxeError"];
js__$Boot_HaxeError.wrap = function(val) {
	if((val instanceof Error)) {
		return val;
	} else {
		return new js__$Boot_HaxeError(val);
	}
};
js__$Boot_HaxeError.__super__ = Error;
js__$Boot_HaxeError.prototype = $extend(Error.prototype,{
	__class__: js__$Boot_HaxeError
});
var js_Browser = function() { };
$hxClasses["js.Browser"] = js_Browser;
js_Browser.__name__ = ["js","Browser"];
js_Browser.getLocalStorage = function() {
	try {
		var s = window.localStorage;
		s.getItem("");
		return s;
	} catch( e ) {
		haxe_CallStack.lastException = e;
		return null;
	}
};
js_Browser.alert = function(v) {
	window.alert(js_Boot.__string_rec(v,""));
};
var js_html_compat_ArrayBuffer = function(a) {
	if((a instanceof Array) && a.__enum__ == null) {
		this.a = a;
		this.byteLength = a.length;
	} else {
		var len = a;
		this.a = [];
		var _g1 = 0;
		var _g = len;
		while(_g1 < _g) {
			var i = _g1++;
			this.a[i] = 0;
		}
		this.byteLength = len;
	}
};
$hxClasses["js.html.compat.ArrayBuffer"] = js_html_compat_ArrayBuffer;
js_html_compat_ArrayBuffer.__name__ = ["js","html","compat","ArrayBuffer"];
js_html_compat_ArrayBuffer.sliceImpl = function(begin,end) {
	var u = new Uint8Array(this,begin,end == null ? null : end - begin);
	var result = new ArrayBuffer(u.byteLength);
	var resultArray = new Uint8Array(result);
	resultArray.set(u);
	return result;
};
js_html_compat_ArrayBuffer.prototype = {
	slice: function(begin,end) {
		return new js_html_compat_ArrayBuffer(this.a.slice(begin,end));
	}
	,__class__: js_html_compat_ArrayBuffer
};
var js_html_compat_DataView = function(buffer,byteOffset,byteLength) {
	this.buf = buffer;
	this.offset = byteOffset == null ? 0 : byteOffset;
	this.length = byteLength == null ? buffer.byteLength - this.offset : byteLength;
	if(this.offset < 0 || this.length < 0 || this.offset + this.length > buffer.byteLength) {
		throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
	}
	this.byteLength = this.length;
	this.byteOffset = this.offset;
	this.buffer = this.buf;
};
$hxClasses["js.html.compat.DataView"] = js_html_compat_DataView;
js_html_compat_DataView.__name__ = ["js","html","compat","DataView"];
js_html_compat_DataView.prototype = {
	getInt8: function(byteOffset) {
		var v = this.buf.a[this.offset + byteOffset];
		if(v >= 128) {
			return v - 256;
		} else {
			return v;
		}
	}
	,getUint8: function(byteOffset) {
		return this.buf.a[this.offset + byteOffset];
	}
	,getInt16: function(byteOffset,littleEndian) {
		var v = this.getUint16(byteOffset,littleEndian);
		if(v >= 32768) {
			return v - 65536;
		} else {
			return v;
		}
	}
	,getUint16: function(byteOffset,littleEndian) {
		if(littleEndian) {
			return this.buf.a[this.offset + byteOffset] | this.buf.a[this.offset + byteOffset + 1] << 8;
		} else {
			return this.buf.a[this.offset + byteOffset] << 8 | this.buf.a[this.offset + byteOffset + 1];
		}
	}
	,getInt32: function(byteOffset,littleEndian) {
		var p = this.offset + byteOffset;
		var a = this.buf.a[p++];
		var b = this.buf.a[p++];
		var c = this.buf.a[p++];
		var d = this.buf.a[p++];
		if(littleEndian) {
			return a | b << 8 | c << 16 | d << 24;
		} else {
			return d | c << 8 | b << 16 | a << 24;
		}
	}
	,getUint32: function(byteOffset,littleEndian) {
		var v = this.getInt32(byteOffset,littleEndian);
		if(v < 0) {
			return v + 4294967296.;
		} else {
			return v;
		}
	}
	,getFloat32: function(byteOffset,littleEndian) {
		return haxe_io_FPHelper.i32ToFloat(this.getInt32(byteOffset,littleEndian));
	}
	,getFloat64: function(byteOffset,littleEndian) {
		var a = this.getInt32(byteOffset,littleEndian);
		var b = this.getInt32(byteOffset + 4,littleEndian);
		return haxe_io_FPHelper.i64ToDouble(littleEndian ? a : b,littleEndian ? b : a);
	}
	,setInt8: function(byteOffset,value) {
		this.buf.a[byteOffset + this.offset] = value < 0 ? value + 128 & 255 : value & 255;
	}
	,setUint8: function(byteOffset,value) {
		this.buf.a[byteOffset + this.offset] = value & 255;
	}
	,setInt16: function(byteOffset,value,littleEndian) {
		this.setUint16(byteOffset,value < 0 ? value + 65536 : value,littleEndian);
	}
	,setUint16: function(byteOffset,value,littleEndian) {
		var p = byteOffset + this.offset;
		if(littleEndian) {
			this.buf.a[p] = value & 255;
			this.buf.a[p++] = value >> 8 & 255;
		} else {
			this.buf.a[p++] = value >> 8 & 255;
			this.buf.a[p] = value & 255;
		}
	}
	,setInt32: function(byteOffset,value,littleEndian) {
		this.setUint32(byteOffset,value,littleEndian);
	}
	,setUint32: function(byteOffset,value,littleEndian) {
		var p = byteOffset + this.offset;
		if(littleEndian) {
			this.buf.a[p++] = value & 255;
			this.buf.a[p++] = value >> 8 & 255;
			this.buf.a[p++] = value >> 16 & 255;
			this.buf.a[p++] = value >>> 24;
		} else {
			this.buf.a[p++] = value >>> 24;
			this.buf.a[p++] = value >> 16 & 255;
			this.buf.a[p++] = value >> 8 & 255;
			this.buf.a[p++] = value & 255;
		}
	}
	,setFloat32: function(byteOffset,value,littleEndian) {
		this.setUint32(byteOffset,haxe_io_FPHelper.floatToI32(value),littleEndian);
	}
	,setFloat64: function(byteOffset,value,littleEndian) {
		var i64 = haxe_io_FPHelper.doubleToI64(value);
		if(littleEndian) {
			this.setUint32(byteOffset,i64.low);
			this.setUint32(byteOffset,i64.high);
		} else {
			this.setUint32(byteOffset,i64.high);
			this.setUint32(byteOffset,i64.low);
		}
	}
	,__class__: js_html_compat_DataView
};
var js_html_compat_Float32Array = function() { };
$hxClasses["js.html.compat.Float32Array"] = js_html_compat_Float32Array;
js_html_compat_Float32Array.__name__ = ["js","html","compat","Float32Array"];
js_html_compat_Float32Array._new = function(arg1,offset,length) {
	var arr;
	if(typeof(arg1) == "number") {
		arr = [];
		var _g1 = 0;
		var _g = arg1;
		while(_g1 < _g) {
			var i = _g1++;
			arr[i] = 0;
		}
		arr.byteLength = arr.length << 2;
		arr.byteOffset = 0;
		var _g2 = [];
		var _g21 = 0;
		var _g11 = arr.length << 2;
		while(_g21 < _g11) {
			var i1 = _g21++;
			_g2.push(0);
		}
		arr.buffer = new js_html_compat_ArrayBuffer(_g2);
	} else if(js_Boot.__instanceof(arg1,js_html_compat_ArrayBuffer)) {
		var buffer = arg1;
		if(offset == null) {
			offset = 0;
		}
		if(length == null) {
			length = buffer.byteLength - offset >> 2;
		}
		arr = [];
		var _g12 = 0;
		var _g3 = length;
		while(_g12 < _g3) {
			var i2 = _g12++;
			var val = buffer.a[offset++] | buffer.a[offset++] << 8 | buffer.a[offset++] << 16 | buffer.a[offset++] << 24;
			arr.push(haxe_io_FPHelper.i32ToFloat(val));
		}
		arr.byteLength = arr.length << 2;
		arr.byteOffset = offset;
		arr.buffer = buffer;
	} else if((arg1 instanceof Array) && arg1.__enum__ == null) {
		arr = arg1.slice();
		var buffer1 = [];
		var _g4 = 0;
		while(_g4 < arr.length) {
			var f = arr[_g4];
			++_g4;
			var i3 = haxe_io_FPHelper.floatToI32(f);
			buffer1.push(i3 & 255);
			buffer1.push(i3 >> 8 & 255);
			buffer1.push(i3 >> 16 & 255);
			buffer1.push(i3 >>> 24);
		}
		arr.byteLength = arr.length << 2;
		arr.byteOffset = 0;
		arr.buffer = new js_html_compat_ArrayBuffer(buffer1);
	} else {
		throw new js__$Boot_HaxeError("TODO " + Std.string(arg1));
	}
	arr.subarray = js_html_compat_Float32Array._subarray;
	arr.set = js_html_compat_Float32Array._set;
	return arr;
};
js_html_compat_Float32Array._set = function(arg,offset) {
	if(js_Boot.__instanceof(arg.buffer,js_html_compat_ArrayBuffer)) {
		var a = arg;
		if(arg.byteLength + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g1 = 0;
		var _g = arg.byteLength;
		while(_g1 < _g) {
			var i = _g1++;
			this[i + offset] = a[i];
		}
	} else if((arg instanceof Array) && arg.__enum__ == null) {
		var a1 = arg;
		if(a1.length + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g11 = 0;
		var _g2 = a1.length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			this[i1 + offset] = a1[i1];
		}
	} else {
		throw new js__$Boot_HaxeError("TODO");
	}
};
js_html_compat_Float32Array._subarray = function(start,end) {
	var a = js_html_compat_Float32Array._new(this.slice(start,end));
	a.byteOffset = start * 4;
	return a;
};
var js_html_compat_Uint8Array = function() { };
$hxClasses["js.html.compat.Uint8Array"] = js_html_compat_Uint8Array;
js_html_compat_Uint8Array.__name__ = ["js","html","compat","Uint8Array"];
js_html_compat_Uint8Array._new = function(arg1,offset,length) {
	var arr;
	if(typeof(arg1) == "number") {
		arr = [];
		var _g1 = 0;
		var _g = arg1;
		while(_g1 < _g) {
			var i = _g1++;
			arr[i] = 0;
		}
		arr.byteLength = arr.length;
		arr.byteOffset = 0;
		arr.buffer = new js_html_compat_ArrayBuffer(arr);
	} else if(js_Boot.__instanceof(arg1,js_html_compat_ArrayBuffer)) {
		var buffer = arg1;
		if(offset == null) {
			offset = 0;
		}
		if(length == null) {
			length = buffer.byteLength - offset;
		}
		if(offset == 0) {
			arr = buffer.a;
		} else {
			arr = buffer.a.slice(offset,offset + length);
		}
		arr.byteLength = arr.length;
		arr.byteOffset = offset;
		arr.buffer = buffer;
	} else if((arg1 instanceof Array) && arg1.__enum__ == null) {
		arr = arg1.slice();
		arr.byteLength = arr.length;
		arr.byteOffset = 0;
		arr.buffer = new js_html_compat_ArrayBuffer(arr);
	} else {
		throw new js__$Boot_HaxeError("TODO " + Std.string(arg1));
	}
	arr.subarray = js_html_compat_Uint8Array._subarray;
	arr.set = js_html_compat_Uint8Array._set;
	return arr;
};
js_html_compat_Uint8Array._set = function(arg,offset) {
	if(js_Boot.__instanceof(arg.buffer,js_html_compat_ArrayBuffer)) {
		var a = arg;
		if(arg.byteLength + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g1 = 0;
		var _g = arg.byteLength;
		while(_g1 < _g) {
			var i = _g1++;
			this[i + offset] = a[i];
		}
	} else if((arg instanceof Array) && arg.__enum__ == null) {
		var a1 = arg;
		if(a1.length + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g11 = 0;
		var _g2 = a1.length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			this[i1 + offset] = a1[i1];
		}
	} else {
		throw new js__$Boot_HaxeError("TODO");
	}
};
js_html_compat_Uint8Array._subarray = function(start,end) {
	var a = js_html_compat_Uint8Array._new(this.slice(start,end));
	a.byteOffset = start;
	return a;
};
var lime_AssetCache = function() {
	this.enabled = true;
	this.audio = new haxe_ds_StringMap();
	this.font = new haxe_ds_StringMap();
	this.image = new haxe_ds_StringMap();
	this.version = Math.random() * 1000000 | 0;
};
$hxClasses["lime.AssetCache"] = lime_AssetCache;
lime_AssetCache.__name__ = ["lime","AssetCache"];
lime_AssetCache.prototype = {
	clear: function(prefix) {
		if(prefix == null) {
			this.audio = new haxe_ds_StringMap();
			this.font = new haxe_ds_StringMap();
			this.image = new haxe_ds_StringMap();
		} else {
			var keys = this.audio.keys();
			var key = keys;
			while(key.hasNext()) {
				var key1 = key.next();
				if(StringTools.startsWith(key1,prefix)) {
					this.audio.remove(key1);
				}
			}
			var keys1 = this.font.keys();
			var key2 = keys1;
			while(key2.hasNext()) {
				var key3 = key2.next();
				if(StringTools.startsWith(key3,prefix)) {
					this.font.remove(key3);
				}
			}
			var keys2 = this.image.keys();
			var key4 = keys2;
			while(key4.hasNext()) {
				var key5 = key4.next();
				if(StringTools.startsWith(key5,prefix)) {
					this.image.remove(key5);
				}
			}
		}
	}
	,__class__: lime_AssetCache
};
var lime_app_Event_$Void_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Void_Void"] = lime_app_Event_$Void_$Void;
lime_app_Event_$Void_$Void.__name__ = ["lime","app","Event_Void_Void"];
lime_app_Event_$Void_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function() {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i]();
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Void_$Void
};
var lime_Assets = function() { };
$hxClasses["lime.Assets"] = lime_Assets;
lime_Assets.__name__ = ["lime","Assets"];
lime_Assets.exists = function(id,type) {
	lime_Assets.initialize();
	if(type == null) {
		type = "BINARY";
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		return library.exists(symbolName,type);
	}
	return false;
};
lime_Assets.getAudioBuffer = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.audio;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.audio;
		var audio = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidAudio(audio)) {
			return audio;
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"SOUND")) {
			if(library.isLocal(symbolName,"SOUND")) {
				var audio1 = library.getAudioBuffer(symbolName);
				if(useCache && lime_Assets.cache.enabled) {
					var _this2 = lime_Assets.cache.audio;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,audio1);
					} else {
						_this2.h[id] = audio1;
					}
				}
				return audio1;
			} else {
				haxe_Log.trace("[Assets] Audio asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 122, className : "lime.Assets", methodName : "getAudioBuffer"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no audio asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 128, className : "lime.Assets", methodName : "getAudioBuffer"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 134, className : "lime.Assets", methodName : "getAudioBuffer"});
	}
	return null;
};
lime_Assets.getBytes = function(id) {
	lime_Assets.initialize();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"BINARY")) {
			if(library.isLocal(symbolName,"BINARY")) {
				return library.getBytes(symbolName);
			} else {
				haxe_Log.trace("[Assets] String or Bytes asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 171, className : "lime.Assets", methodName : "getBytes"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no String or Bytes asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 177, className : "lime.Assets", methodName : "getBytes"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 183, className : "lime.Assets", methodName : "getBytes"});
	}
	return null;
};
lime_Assets.getFont = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.font;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.font;
		if(__map_reserved[id] != null) {
			return _this1.getReserved(id);
		} else {
			return _this1.h[id];
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"FONT")) {
			if(library.isLocal(symbolName,"FONT")) {
				var font = library.getFont(symbolName);
				if(useCache && lime_Assets.cache.enabled) {
					var _this2 = lime_Assets.cache.font;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,font);
					} else {
						_this2.h[id] = font;
					}
				}
				return font;
			} else {
				haxe_Log.trace("[Assets] Font asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 234, className : "lime.Assets", methodName : "getFont"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no Font asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 240, className : "lime.Assets", methodName : "getFont"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 246, className : "lime.Assets", methodName : "getFont"});
	}
	return null;
};
lime_Assets.getImage = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.image;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.image;
		var image = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidImage(image)) {
			return image;
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"IMAGE")) {
			if(library.isLocal(symbolName,"IMAGE")) {
				var image1 = library.getImage(symbolName);
				if(useCache && lime_Assets.cache.enabled) {
					var _this2 = lime_Assets.cache.image;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,image1);
					} else {
						_this2.h[id] = image1;
					}
				}
				return image1;
			} else {
				haxe_Log.trace("[Assets] Image asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 304, className : "lime.Assets", methodName : "getImage"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no Image asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 310, className : "lime.Assets", methodName : "getImage"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 316, className : "lime.Assets", methodName : "getImage"});
	}
	return null;
};
lime_Assets.getLibrary = function(name) {
	if(name == null || name == "") {
		name = "default";
	}
	var _this = lime_Assets.libraries;
	if(__map_reserved[name] != null) {
		return _this.getReserved(name);
	} else {
		return _this.h[name];
	}
};
lime_Assets.getPath = function(id) {
	lime_Assets.initialize();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,null)) {
			return library.getPath(symbolName);
		} else {
			haxe_Log.trace("[Assets] There is no asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 364, className : "lime.Assets", methodName : "getPath"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 370, className : "lime.Assets", methodName : "getPath"});
	}
	return null;
};
lime_Assets.getText = function(id) {
	lime_Assets.initialize();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"TEXT")) {
			if(library.isLocal(symbolName,"TEXT")) {
				return library.getText(symbolName);
			} else {
				haxe_Log.trace("[Assets] String asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 407, className : "lime.Assets", methodName : "getText"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no String asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 413, className : "lime.Assets", methodName : "getText"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 419, className : "lime.Assets", methodName : "getText"});
	}
	return null;
};
lime_Assets.initialize = function() {
	if(!lime_Assets.initialized) {
		lime_Assets.registerLibrary("default",new DefaultAssetLibrary());
		lime_Assets.initialized = true;
	}
};
lime_Assets.isLocal = function(id,type,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	if(useCache && lime_Assets.cache.enabled) {
		if(type == "IMAGE" || type == null) {
			var _this = lime_Assets.cache.image;
			if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
				return true;
			}
		}
		if(type == "FONT" || type == null) {
			var _this1 = lime_Assets.cache.font;
			if(__map_reserved[id] != null ? _this1.existsReserved(id) : _this1.h.hasOwnProperty(id)) {
				return true;
			}
		}
		if(type == "SOUND" || type == "MUSIC" || type == null) {
			var _this2 = lime_Assets.cache.audio;
			if(__map_reserved[id] != null ? _this2.existsReserved(id) : _this2.h.hasOwnProperty(id)) {
				return true;
			}
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		return library.isLocal(symbolName,type);
	}
	return false;
};
lime_Assets.isValidAudio = function(buffer) {
	return buffer != null;
};
lime_Assets.isValidImage = function(buffer) {
	return true;
};
lime_Assets.list = function(type) {
	lime_Assets.initialize();
	var items = [];
	var _this = lime_Assets.libraries;
	var library = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(library.hasNext()) {
		var library1 = library.next();
		var libraryItems = library1.list(type);
		if(libraryItems != null) {
			items = items.concat(libraryItems);
		}
	}
	return items;
};
lime_Assets.loadAudioBuffer = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.audio;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.audio;
		var audio = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidAudio(audio)) {
			promise.complete(audio);
			return promise.future;
		}
	}
	var libraryName = id.indexOf(":");
	var libraryName1 = id.substring(0,libraryName);
	var pos = id.indexOf(":") + 1;
	var symbolName = HxOverrides.substr(id,pos,null);
	var library = lime_Assets.getLibrary(libraryName1);
	if(library != null) {
		if(library.exists(symbolName,"SOUND")) {
			var future = library.loadAudioBuffer(symbolName);
			if(useCache && lime_Assets.cache.enabled) {
				future.onComplete(function(audio1) {
					var _this2 = lime_Assets.cache.audio;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,audio1);
					} else {
						_this2.h[id] = audio1;
					}
				});
			}
			promise.completeWith(future);
		} else {
			promise.error("[Assets] There is no audio asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName1 + "\"");
	}
	return promise.future;
};
lime_Assets.loadBytes = function(id) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"BINARY")) {
			promise.completeWith(library.loadBytes(symbolName));
		} else {
			promise.error("[Assets] There is no String or Bytes asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
lime_Assets.loadFont = function(id) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"FONT")) {
			promise.completeWith(library.loadFont(symbolName));
		} else {
			promise.error("[Assets] There is no Font asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
lime_Assets.loadImage = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.image;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.image;
		var image = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidImage(image)) {
			promise.complete(image);
			return promise.future;
		}
	}
	var libraryName = id.indexOf(":");
	var libraryName1 = id.substring(0,libraryName);
	var pos = id.indexOf(":") + 1;
	var symbolName = HxOverrides.substr(id,pos,null);
	var library = lime_Assets.getLibrary(libraryName1);
	if(library != null) {
		if(library.exists(symbolName,"IMAGE")) {
			var future = library.loadImage(symbolName);
			if(useCache && lime_Assets.cache.enabled) {
				future.onComplete(function(image1) {
					var _this2 = lime_Assets.cache.image;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,image1);
					} else {
						_this2.h[id] = image1;
					}
				});
			}
			promise.completeWith(future);
		} else {
			promise.error("[Assets] There is no Image asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName1 + "\"");
	}
	return promise.future;
};
lime_Assets.loadLibrary = function(name) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var data = lime_Assets.getText("libraries/" + name + ".json");
	if(data != null && data != "") {
		var info = JSON.parse(data);
		var library = Type.createInstance(Type.resolveClass(info.type),info.args);
		var _this = lime_Assets.libraries;
		if(__map_reserved[name] != null) {
			_this.setReserved(name,library);
		} else {
			_this.h[name] = library;
		}
		library.onChange.add(($_=lime_Assets.onChange,$bind($_,$_.dispatch)));
		promise.completeWith(library.load());
	} else {
		promise.error("[Assets] There is no asset library named \"" + name + "\"");
	}
	return promise.future;
};
lime_Assets.loadText = function(id) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"TEXT")) {
			promise.completeWith(library.loadText(symbolName));
		} else {
			promise.error("[Assets] There is no String asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
lime_Assets.registerLibrary = function(name,library) {
	var _this = lime_Assets.libraries;
	if(__map_reserved[name] != null ? _this.existsReserved(name) : _this.h.hasOwnProperty(name)) {
		var _this1 = lime_Assets.libraries;
		if((__map_reserved[name] != null ? _this1.getReserved(name) : _this1.h[name]) == library) {
			return;
		} else {
			lime_Assets.unloadLibrary(name);
		}
	}
	if(library != null) {
		library.onChange.add(lime_Assets.library_onChange);
	}
	var _this2 = lime_Assets.libraries;
	if(__map_reserved[name] != null) {
		_this2.setReserved(name,library);
	} else {
		_this2.h[name] = library;
	}
};
lime_Assets.unloadLibrary = function(name) {
	lime_Assets.initialize();
	var _this = lime_Assets.libraries;
	var library = __map_reserved[name] != null ? _this.getReserved(name) : _this.h[name];
	if(library != null) {
		lime_Assets.cache.clear(name + ":");
		library.onChange.remove(lime_Assets.library_onChange);
		library.unload();
	}
	lime_Assets.libraries.remove(name);
};
lime_Assets.library_onChange = function() {
	lime_Assets.cache.clear();
	lime_Assets.onChange.dispatch();
};
var lime__$backend_html5_HTML5Application = function(parent) {
	this.gameDeviceCache = new haxe_ds_IntMap();
	this.parent = parent;
	this.currentUpdate = 0;
	this.lastUpdate = 0;
	this.nextUpdate = 0;
	this.framePeriod = -1;
	lime_audio_AudioManager.init();
};
$hxClasses["lime._backend.html5.HTML5Application"] = lime__$backend_html5_HTML5Application;
lime__$backend_html5_HTML5Application.__name__ = ["lime","_backend","html5","HTML5Application"];
lime__$backend_html5_HTML5Application.prototype = {
	convertKeyCode: function(keyCode) {
		if(keyCode >= 65 && keyCode <= 90) {
			return keyCode + 32;
		}
		switch(keyCode) {
		case 16:
			return 1073742049;
		case 17:
			return 1073742048;
		case 18:
			return 1073742050;
		case 20:
			return 1073741881;
		case 33:
			return 1073741899;
		case 34:
			return 1073741902;
		case 35:
			return 1073741901;
		case 36:
			return 1073741898;
		case 37:
			return 1073741904;
		case 38:
			return 1073741906;
		case 39:
			return 1073741903;
		case 40:
			return 1073741905;
		case 45:
			return 1073741897;
		case 46:
			return 127;
		case 112:
			return 1073741882;
		case 113:
			return 1073741883;
		case 114:
			return 1073741884;
		case 115:
			return 1073741885;
		case 116:
			return 1073741886;
		case 117:
			return 1073741887;
		case 118:
			return 1073741888;
		case 119:
			return 1073741889;
		case 120:
			return 1073741890;
		case 121:
			return 1073741891;
		case 122:
			return 1073741892;
		case 123:
			return 1073741893;
		case 124:
			return 1073741928;
		case 125:
			return 1073741929;
		case 126:
			return 1073741930;
		case 144:
			return 1073741907;
		case 186:
			return 59;
		case 187:
			return 61;
		case 188:
			return 44;
		case 189:
			return 45;
		case 190:
			return 46;
		case 191:
			return 47;
		case 192:
			return 96;
		case 219:
			return 91;
		case 220:
			return 92;
		case 221:
			return 93;
		case 222:
			return 39;
		}
		return keyCode;
	}
	,create: function(config) {
	}
	,exec: function() {
		window.addEventListener("keydown",$bind(this,this.handleKeyEvent),false);
		window.addEventListener("keyup",$bind(this,this.handleKeyEvent),false);
		window.addEventListener("focus",$bind(this,this.handleWindowEvent),false);
		window.addEventListener("blur",$bind(this,this.handleWindowEvent),false);
		window.addEventListener("resize",$bind(this,this.handleWindowEvent),false);
		window.addEventListener("beforeunload",$bind(this,this.handleWindowEvent),false);
		
			if (!CanvasRenderingContext2D.prototype.isPointInStroke) {
				CanvasRenderingContext2D.prototype.isPointInStroke = function (path, x, y) {
					return false;
				};
			}
			
			var lastTime = 0;
			var vendors = ['ms', 'moz', 'webkit', 'o'];
			for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
				window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
				window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
			}
			
			if (!window.requestAnimationFrame)
				window.requestAnimationFrame = function(callback, element) {
					var currTime = new Date().getTime();
					var timeToCall = Math.max(0, 16 - (currTime - lastTime));
					var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 
					  timeToCall);
					lastTime = currTime + timeToCall;
					return id;
				};
			
			if (!window.cancelAnimationFrame)
				window.cancelAnimationFrame = function(id) {
					clearTimeout(id);
				};
			
			window.requestAnimFrame = window.requestAnimationFrame;
		;
		this.lastUpdate = new Date().getTime();
		this.handleApplicationEvent();
		return 0;
	}
	,exit: function() {
	}
	,getFrameRate: function() {
		if(this.framePeriod < 0) {
			return 60;
		} else if(this.framePeriod == 1000) {
			return 0;
		} else {
			return 1000 / this.framePeriod;
		}
	}
	,handleApplicationEvent: function(__) {
		this.updateGameDevices();
		this.currentUpdate = new Date().getTime();
		if(this.currentUpdate >= this.nextUpdate) {
			this.deltaTime = this.currentUpdate - this.lastUpdate;
			this.parent.onUpdate.dispatch(this.deltaTime | 0);
			if(this.parent.renderers[0] != null) {
				this.parent.renderers[0].onRender.dispatch();
				this.parent.renderers[0].flip();
			}
			if(this.framePeriod < 0) {
				this.nextUpdate = this.currentUpdate;
				this.nextUpdate = this.currentUpdate;
			} else {
				this.nextUpdate = this.currentUpdate + this.framePeriod;
			}
			this.lastUpdate = this.currentUpdate;
		}
		window.requestAnimationFrame($bind(this,this.handleApplicationEvent));
	}
	,handleKeyEvent: function(event) {
		if(this.parent.windows[0] != null) {
			var keyCode = this.convertKeyCode(event.keyCode != null ? event.keyCode : event.which);
			var modifier = (event.shiftKey ? 3 : 0) | (event.ctrlKey ? 192 : 0) | (event.altKey ? 768 : 0) | (event.metaKey ? 3072 : 0);
			if(event.type == "keydown") {
				this.parent.windows[0].onKeyDown.dispatch(keyCode,modifier);
				if(this.parent.windows[0].onKeyDown.canceled) {
					event.preventDefault();
				}
			} else {
				this.parent.windows[0].onKeyUp.dispatch(keyCode,modifier);
				if(this.parent.windows[0].onKeyUp.canceled) {
					event.preventDefault();
				}
			}
		}
	}
	,handleWindowEvent: function(event) {
		if(this.parent.windows[0] != null) {
			var _g = event.type;
			switch(_g) {
			case "beforeunload":
				this.parent.windows[0].onClose.dispatch();
				break;
			case "blur":
				this.parent.windows[0].onFocusOut.dispatch();
				this.parent.windows[0].onDeactivate.dispatch();
				break;
			case "focus":
				this.parent.windows[0].onFocusIn.dispatch();
				this.parent.windows[0].onActivate.dispatch();
				break;
			case "resize":
				var cacheWidth = this.parent.windows[0].__width;
				var cacheHeight = this.parent.windows[0].__height;
				this.parent.windows[0].backend.handleResize();
				if(this.parent.windows[0].__width != cacheWidth || this.parent.windows[0].__height != cacheHeight) {
					this.parent.windows[0].onResize.dispatch(this.parent.windows[0].__width,this.parent.windows[0].__height);
				}
				break;
			}
		}
	}
	,setFrameRate: function(value) {
		if(value >= 60) {
			this.framePeriod = -1;
		} else if(value > 0) {
			this.framePeriod = 1000 / value;
		} else {
			this.framePeriod = 1000;
		}
		return value;
	}
	,updateGameDevices: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		if(devices == null) {
			return;
		}
		var id;
		var gamepad;
		var joystick;
		var data;
		var cache;
		var _g1 = 0;
		var _g = devices.length;
		while(_g1 < _g) {
			var i = _g1++;
			id = i;
			data = devices[id];
			if(data == null) {
				continue;
			}
			if(!this.gameDeviceCache.h.hasOwnProperty(id)) {
				cache = new lime__$backend_html5_GameDeviceData();
				cache.id = id;
				cache.connected = data.connected;
				var _g3 = 0;
				var _g2 = data.buttons.length;
				while(_g3 < _g2) {
					var i1 = _g3++;
					cache.buttons.push(data.buttons[i1].value);
				}
				var _g31 = 0;
				var _g21 = data.axes.length;
				while(_g31 < _g21) {
					var i2 = _g31++;
					cache.axes.push(data.axes[i2]);
				}
				if(data.mapping == "standard") {
					cache.isGamepad = true;
				}
				this.gameDeviceCache.h[id] = cache;
				if(data.connected) {
					lime_ui_Joystick.__connect(id);
					if(cache.isGamepad) {
						lime_ui_Gamepad.__connect(id);
					}
				}
			}
			cache = this.gameDeviceCache.h[id];
			joystick = lime_ui_Joystick.devices.h[id];
			gamepad = lime_ui_Gamepad.devices.h[id];
			if(data.connected) {
				var button;
				var value;
				var _g32 = 0;
				var _g22 = data.buttons.length;
				while(_g32 < _g22) {
					var i3 = _g32++;
					value = data.buttons[i3].value;
					if(value != cache.buttons[i3]) {
						if(i3 == 6) {
							joystick.onAxisMove.dispatch(data.axes.length,value);
							if(gamepad != null) {
								gamepad.onAxisMove.dispatch(4,value);
							}
						} else if(i3 == 7) {
							joystick.onAxisMove.dispatch(data.axes.length + 1,value);
							if(gamepad != null) {
								gamepad.onAxisMove.dispatch(5,value);
							}
						} else {
							if(value > 0) {
								joystick.onButtonDown.dispatch(i3);
							} else {
								joystick.onButtonUp.dispatch(i3);
							}
							if(gamepad != null) {
								switch(i3) {
								case 0:
									button = 0;
									break;
								case 1:
									button = 1;
									break;
								case 2:
									button = 2;
									break;
								case 3:
									button = 3;
									break;
								case 4:
									button = 9;
									break;
								case 5:
									button = 10;
									break;
								case 8:
									button = 4;
									break;
								case 9:
									button = 6;
									break;
								case 10:
									button = 7;
									break;
								case 11:
									button = 8;
									break;
								case 12:
									button = 11;
									break;
								case 13:
									button = 12;
									break;
								case 14:
									button = 13;
									break;
								case 15:
									button = 14;
									break;
								case 16:
									button = 5;
									break;
								default:
									continue;
								}
								if(value > 0) {
									gamepad.onButtonDown.dispatch(button);
								} else {
									gamepad.onButtonUp.dispatch(button);
								}
							}
						}
						cache.buttons[i3] = value;
					}
				}
				var _g33 = 0;
				var _g23 = data.axes.length;
				while(_g33 < _g23) {
					var i4 = _g33++;
					if(data.axes[i4] != cache.axes[i4]) {
						joystick.onAxisMove.dispatch(i4,data.axes[i4]);
						if(gamepad != null) {
							gamepad.onAxisMove.dispatch(i4,data.axes[i4]);
						}
						cache.axes[i4] = data.axes[i4];
					}
				}
			} else if(cache.connected) {
				cache.connected = false;
				lime_ui_Joystick.__disconnect(id);
				lime_ui_Gamepad.__disconnect(id);
			}
		}
	}
	,__class__: lime__$backend_html5_HTML5Application
};
var lime__$backend_html5_GameDeviceData = function() {
	this.connected = true;
	this.buttons = [];
	this.axes = [];
};
$hxClasses["lime._backend.html5.GameDeviceData"] = lime__$backend_html5_GameDeviceData;
lime__$backend_html5_GameDeviceData.__name__ = ["lime","_backend","html5","GameDeviceData"];
lime__$backend_html5_GameDeviceData.prototype = {
	__class__: lime__$backend_html5_GameDeviceData
};
var lime__$backend_html5_HTML5Mouse = function() { };
$hxClasses["lime._backend.html5.HTML5Mouse"] = lime__$backend_html5_HTML5Mouse;
lime__$backend_html5_HTML5Mouse.__name__ = ["lime","_backend","html5","HTML5Mouse"];
lime__$backend_html5_HTML5Mouse.__cursor = null;
lime__$backend_html5_HTML5Mouse.__hidden = null;
lime__$backend_html5_HTML5Mouse.hide = function() {
	if(!lime__$backend_html5_HTML5Mouse.__hidden) {
		lime__$backend_html5_HTML5Mouse.__hidden = true;
		var _g = 0;
		var _g1 = lime_app_Application.current.windows;
		while(_g < _g1.length) {
			var $window = _g1[_g];
			++_g;
			$window.backend.element.style.cursor = "none";
		}
	}
};
lime__$backend_html5_HTML5Mouse.show = function() {
	if(lime__$backend_html5_HTML5Mouse.__hidden) {
		lime__$backend_html5_HTML5Mouse.__hidden = false;
		var cacheValue = lime__$backend_html5_HTML5Mouse.__cursor;
		lime__$backend_html5_HTML5Mouse.__cursor = null;
		lime__$backend_html5_HTML5Mouse.set_cursor(cacheValue);
	}
};
lime__$backend_html5_HTML5Mouse.warp = function(x,y,window) {
};
lime__$backend_html5_HTML5Mouse.get_cursor = function() {
	if(lime__$backend_html5_HTML5Mouse.__cursor == null) {
		return lime_ui_MouseCursor.DEFAULT;
	}
	return lime__$backend_html5_HTML5Mouse.__cursor;
};
lime__$backend_html5_HTML5Mouse.set_cursor = function(value) {
	if(lime__$backend_html5_HTML5Mouse.__cursor != value) {
		if(!lime__$backend_html5_HTML5Mouse.__hidden) {
			var _g = 0;
			var _g1 = lime_app_Application.current.windows;
			while(_g < _g1.length) {
				var $window = _g1[_g];
				++_g;
				var tmp;
				switch(value[1]) {
				case 0:
					tmp = "default";
					break;
				case 1:
					tmp = "crosshair";
					break;
				case 3:
					tmp = "move";
					break;
				case 4:
					tmp = "pointer";
					break;
				case 5:
					tmp = "nesw-resize";
					break;
				case 6:
					tmp = "ns-resize";
					break;
				case 7:
					tmp = "nwse-resize";
					break;
				case 8:
					tmp = "ew-resize";
					break;
				case 9:
					tmp = "text";
					break;
				case 10:
					tmp = "wait";
					break;
				case 11:
					tmp = "wait";
					break;
				default:
					tmp = "auto";
				}
				$window.backend.element.style.cursor = tmp;
			}
		}
		lime__$backend_html5_HTML5Mouse.__cursor = value;
	}
	return lime__$backend_html5_HTML5Mouse.__cursor;
};
lime__$backend_html5_HTML5Mouse.get_lock = function() {
	return false;
};
lime__$backend_html5_HTML5Mouse.set_lock = function(value) {
	return value;
};
var lime__$backend_html5_HTML5Renderer = function(parent) {
	this.parent = parent;
};
$hxClasses["lime._backend.html5.HTML5Renderer"] = lime__$backend_html5_HTML5Renderer;
lime__$backend_html5_HTML5Renderer.__name__ = ["lime","_backend","html5","HTML5Renderer"];
lime__$backend_html5_HTML5Renderer.prototype = {
	create: function() {
		this.createContext();
		var _g = this.parent.context;
		if(_g[1] == 0) {
			this.parent.window.backend.canvas.addEventListener("webglcontextlost",$bind(this,this.handleEvent),false);
			this.parent.window.backend.canvas.addEventListener("webglcontextrestored",$bind(this,this.handleEvent),false);
		}
	}
	,createContext: function() {
		if(this.parent.window.backend.div != null) {
			this.parent.context = lime_graphics_RenderContext.DOM(this.parent.window.backend.div);
			this.parent.type = lime_graphics_RendererType.DOM;
		} else if(this.parent.window.backend.canvas != null) {
			var webgl = null;
			if(webgl == null) {
				this.parent.context = lime_graphics_RenderContext.CANVAS(this.parent.window.backend.canvas.getContext("2d"));
				this.parent.type = lime_graphics_RendererType.CANVAS;
			} else {
				lime_graphics_opengl_GL.context = webgl;
				this.parent.context = lime_graphics_RenderContext.OPENGL(lime_graphics_opengl_GL.context);
				this.parent.type = lime_graphics_RendererType.OPENGL;
			}
		}
	}
	,flip: function() {
	}
	,handleEvent: function(event) {
		var _g = event.type;
		switch(_g) {
		case "webglcontextlost":
			event.preventDefault();
			this.parent.context = null;
			this.parent.onContextLost.dispatch();
			break;
		case "webglcontextrestored":
			this.createContext();
			this.parent.onContextRestored.dispatch(this.parent.context);
			break;
		default:
		}
	}
	,readPixels: function(rect) {
		if(this.parent.window.backend.canvas != null) {
			if(rect == null) {
				rect = new lime_math_Rectangle(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height);
			} else {
				rect.__contract(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height);
			}
			if(rect.width > 0 && rect.height > 0) {
				var canvas = window.document.createElement("canvas");
				canvas.width = rect.width | 0;
				canvas.height = rect.height | 0;
				var context = canvas.getContext("2d");
				context.drawImage(this.parent.window.backend.canvas,-rect.x,-rect.y);
				return lime_graphics_Image.fromCanvas(canvas);
			}
		}
		return null;
	}
	,render: function() {
	}
	,__class__: lime__$backend_html5_HTML5Renderer
};
var lime__$backend_html5_HTML5Window = function(parent) {
	this.unusedTouchesPool = new List();
	this.currentTouches = new haxe_ds_IntMap();
	this.parent = parent;
	if(parent.config != null && Object.prototype.hasOwnProperty.call(parent.config,"element")) {
		this.element = parent.config.element;
	}
};
$hxClasses["lime._backend.html5.HTML5Window"] = lime__$backend_html5_HTML5Window;
lime__$backend_html5_HTML5Window.__name__ = ["lime","_backend","html5","HTML5Window"];
lime__$backend_html5_HTML5Window.textInput = null;
lime__$backend_html5_HTML5Window.prototype = {
	alert: function(message,title) {
		if(message != null) {
			js_Browser.alert(message);
		}
	}
	,close: function() {
		this.parent.application.removeWindow(this.parent);
	}
	,create: function(application) {
		this.setWidth = this.parent.__width;
		this.setHeight = this.parent.__height;
		this.parent.id = lime__$backend_html5_HTML5Window.windowID++;
		if(js_Boot.__instanceof(this.element,HTMLCanvasElement)) {
			this.canvas = this.element;
		} else {
			this.canvas = window.document.createElement("canvas");
		}
		if(this.canvas != null) {
			var style = this.canvas.style;
			style.setProperty("-webkit-transform","translateZ(0)",null);
			style.setProperty("transform","translateZ(0)",null);
		} else if(this.div != null) {
			var style1 = this.div.style;
			style1.setProperty("-webkit-transform","translate3D(0,0,0)",null);
			style1.setProperty("transform","translate3D(0,0,0)",null);
			style1.position = "relative";
			style1.overflow = "hidden";
			style1.setProperty("-webkit-user-select","none",null);
			style1.setProperty("-moz-user-select","none",null);
			style1.setProperty("-ms-user-select","none",null);
			style1.setProperty("-o-user-select","none",null);
		}
		if(this.parent.__width == 0 && this.parent.__height == 0) {
			if(this.element != null) {
				this.parent.set_width(this.element.clientWidth);
				this.parent.set_height(this.element.clientHeight);
			} else {
				this.parent.set_width(window.innerWidth);
				this.parent.set_height(window.innerHeight);
			}
			this.parent.set_fullscreen(true);
		}
		if(this.canvas != null) {
			this.canvas.width = this.parent.__width;
			this.canvas.height = this.parent.__height;
		} else {
			this.div.style.width = this.parent.__width + "px";
			this.div.style.height = this.parent.__height + "px";
		}
		this.handleResize();
		if(this.element != null) {
			if(this.canvas != null) {
				if(this.element != this.canvas) {
					this.element.appendChild(this.canvas);
				}
			} else {
				this.element.appendChild(this.div);
			}
			var events = ["mousedown","mouseenter","mouseleave","mousemove","mouseup","wheel"];
			var _g = 0;
			while(_g < events.length) {
				var event = events[_g];
				++_g;
				this.element.addEventListener(event,$bind(this,this.handleMouseEvent),true);
			}
			window.document.addEventListener("dragstart",function(e) {
				if(e.target.nodeName.toLowerCase() == "img") {
					e.preventDefault();
					return false;
				}
				return true;
			},false);
			this.element.addEventListener("touchstart",$bind(this,this.handleTouchEvent),true);
			this.element.addEventListener("touchmove",$bind(this,this.handleTouchEvent),true);
			this.element.addEventListener("touchend",$bind(this,this.handleTouchEvent),true);
			this.element.addEventListener("gamepadconnected",$bind(this,this.handleGamepadEvent),true);
			this.element.addEventListener("gamepaddisconnected",$bind(this,this.handleGamepadEvent),true);
		}
	}
	,focus: function() {
	}
	,getDisplay: function() {
		return lime_system_System.getDisplay(0);
	}
	,getEnableTextEvents: function() {
		return this.enableTextEvents;
	}
	,handleFocusEvent: function(event) {
		if(this.enableTextEvents) {
			haxe_Timer.delay(function() {
				lime__$backend_html5_HTML5Window.textInput.focus();
			},20);
		}
	}
	,handleGamepadEvent: function(event) {
		var _g = event.type;
		switch(_g) {
		case "gamepadconnected":
			lime_ui_Joystick.__connect(event.gamepad.index);
			if(event.gamepad.mapping == "standard") {
				lime_ui_Gamepad.__connect(event.gamepad.index);
			}
			break;
		case "gamepaddisconnected":
			lime_ui_Joystick.__disconnect(event.gamepad.index);
			lime_ui_Gamepad.__disconnect(event.gamepad.index);
			break;
		default:
		}
	}
	,handleInputEvent: function(event) {
		if(lime__$backend_html5_HTML5Window.textInput.value != "") {
			this.parent.onTextInput.dispatch(lime__$backend_html5_HTML5Window.textInput.value);
			lime__$backend_html5_HTML5Window.textInput.value = "";
		}
	}
	,handleMouseEvent: function(event) {
		var x = 0.0;
		var y = 0.0;
		if(event.type != "wheel") {
			if(this.element != null) {
				if(this.canvas != null) {
					var rect = this.canvas.getBoundingClientRect();
					x = (event.clientX - rect.left) * (this.parent.__width / rect.width);
					y = (event.clientY - rect.top) * (this.parent.__height / rect.height);
				} else if(this.div != null) {
					var rect1 = this.div.getBoundingClientRect();
					x = event.clientX - rect1.left;
					y = event.clientY - rect1.top;
				} else {
					var rect2 = this.element.getBoundingClientRect();
					x = (event.clientX - rect2.left) * (this.parent.__width / rect2.width);
					y = (event.clientY - rect2.top) * (this.parent.__height / rect2.height);
				}
			} else {
				x = event.clientX;
				y = event.clientY;
			}
			var _g = event.type;
			switch(_g) {
			case "mousedown":
				this.parent.onMouseDown.dispatch(x,y,event.button);
				break;
			case "mouseenter":
				this.parent.onEnter.dispatch();
				break;
			case "mouseleave":
				this.parent.onLeave.dispatch();
				break;
			case "mousemove":
				this.parent.onMouseMove.dispatch(x,y);
				break;
			case "mouseup":
				this.parent.onMouseUp.dispatch(x,y,event.button);
				break;
			default:
			}
		} else {
			this.parent.onMouseWheel.dispatch(event.deltaX,-event.deltaY);
		}
	}
	,handleResize: function() {
		var stretch = this.parent.__fullscreen || this.setWidth == 0 && this.setHeight == 0;
		if(this.element != null && (this.div == null || this.div != null && stretch)) {
			if(stretch) {
				if(this.parent.__width != this.element.clientWidth || this.parent.__height != this.element.clientHeight) {
					this.parent.set_width(this.element.clientWidth);
					this.parent.set_height(this.element.clientHeight);
					if(this.canvas != null) {
						if(this.element != this.canvas) {
							this.canvas.width = this.element.clientWidth;
							this.canvas.height = this.element.clientHeight;
						}
					} else {
						this.div.style.width = this.element.clientWidth + "px";
						this.div.style.height = this.element.clientHeight + "px";
					}
				}
			} else {
				var scaleX = this.element.clientWidth / this.setWidth;
				var scaleY = this.element.clientHeight / this.setHeight;
				var currentRatio = scaleX / scaleY;
				var targetRatio = Math.min(scaleX,scaleY);
				if(this.canvas != null) {
					if(this.element != this.canvas) {
						this.canvas.style.width = this.setWidth * targetRatio + "px";
						this.canvas.style.height = this.setHeight * targetRatio + "px";
						this.canvas.style.marginLeft = (this.element.clientWidth - this.setWidth * targetRatio) / 2 + "px";
						this.canvas.style.marginTop = (this.element.clientHeight - this.setHeight * targetRatio) / 2 + "px";
					}
				} else {
					this.div.style.width = this.setWidth * targetRatio + "px";
					this.div.style.height = this.setHeight * targetRatio + "px";
					this.div.style.marginLeft = (this.element.clientWidth - this.setWidth * targetRatio) / 2 + "px";
					this.div.style.marginTop = (this.element.clientHeight - this.setHeight * targetRatio) / 2 + "px";
				}
			}
		}
	}
	,handleTouchEvent: function(event) {
		event.preventDefault();
		var rect = null;
		if(this.element != null) {
			if(this.canvas != null) {
				rect = this.canvas.getBoundingClientRect();
			} else if(this.div != null) {
				rect = this.div.getBoundingClientRect();
			} else {
				rect = this.element.getBoundingClientRect();
			}
		}
		var windowWidth = this.setWidth;
		var windowHeight = this.setHeight;
		if(windowWidth == 0 || windowHeight == 0) {
			if(rect != null) {
				windowWidth = rect.width;
				windowHeight = rect.height;
			} else {
				windowWidth = 1;
				windowHeight = 1;
			}
		}
		var _g = 0;
		var _g1 = event.changedTouches;
		while(_g < _g1.length) {
			var data = _g1[_g];
			++_g;
			var x = 0.0;
			var y = 0.0;
			if(rect != null) {
				x = (data.clientX - rect.left) * (windowWidth / rect.width);
				y = (data.clientY - rect.top) * (windowHeight / rect.height);
			} else {
				x = data.clientX;
				y = data.clientY;
			}
			var _g2 = event.type;
			switch(_g2) {
			case "touchend":
				var touch = this.currentTouches.get(data.identifier);
				if(touch != null) {
					var cacheX = touch.x;
					var cacheY = touch.y;
					touch.x = x / windowWidth;
					touch.y = y / windowHeight;
					touch.dx = touch.x - cacheX;
					touch.dy = touch.y - cacheY;
					touch.pressure = data.force;
					lime_ui_Touch.onEnd.dispatch(touch);
					this.currentTouches.remove(data.identifier);
					this.unusedTouchesPool.add(touch);
					if(touch == this.primaryTouch) {
						this.parent.onMouseUp.dispatch(x,y,0);
						this.primaryTouch = null;
					}
				}
				break;
			case "touchmove":
				var touch1 = this.currentTouches.get(data.identifier);
				if(touch1 != null) {
					var cacheX1 = touch1.x;
					var cacheY1 = touch1.y;
					touch1.x = x / windowWidth;
					touch1.y = y / windowHeight;
					touch1.dx = touch1.x - cacheX1;
					touch1.dy = touch1.y - cacheY1;
					touch1.pressure = data.force;
					lime_ui_Touch.onMove.dispatch(touch1);
					if(touch1 == this.primaryTouch) {
						this.parent.onMouseMove.dispatch(x,y);
					}
				}
				break;
			case "touchstart":
				var touch2 = this.unusedTouchesPool.pop();
				if(touch2 == null) {
					touch2 = new lime_ui_Touch(x / windowWidth,y / windowHeight,data.identifier,0,0,data.force,this.parent.id);
				} else {
					touch2.x = x / windowWidth;
					touch2.y = y / windowHeight;
					touch2.id = data.identifier;
					touch2.dx = 0;
					touch2.dy = 0;
					touch2.pressure = data.force;
					touch2.device = this.parent.id;
				}
				this.currentTouches.set(data.identifier,touch2);
				lime_ui_Touch.onStart.dispatch(touch2);
				if(this.primaryTouch == null) {
					this.primaryTouch = touch2;
				}
				if(touch2 == this.primaryTouch) {
					this.parent.onMouseDown.dispatch(x,y,0);
				}
				break;
			default:
			}
		}
	}
	,move: function(x,y) {
	}
	,resize: function(width,height) {
	}
	,setBorderless: function(value) {
		return value;
	}
	,setEnableTextEvents: function(value) {
		if(value) {
			if(lime__$backend_html5_HTML5Window.textInput == null) {
				lime__$backend_html5_HTML5Window.textInput = window.document.createElement("input");
				lime__$backend_html5_HTML5Window.textInput.type = "text";
				lime__$backend_html5_HTML5Window.textInput.style.position = "absolute";
				lime__$backend_html5_HTML5Window.textInput.style.opacity = "0";
				lime__$backend_html5_HTML5Window.textInput.style.color = "transparent";
				lime__$backend_html5_HTML5Window.textInput.value = "";
				lime__$backend_html5_HTML5Window.textInput.autocapitalize = "off";
				lime__$backend_html5_HTML5Window.textInput.autocorrect = "off";
				lime__$backend_html5_HTML5Window.textInput.autocomplete = "off";
				lime__$backend_html5_HTML5Window.textInput.style.left = "0px";
				lime__$backend_html5_HTML5Window.textInput.style.top = "50%";
				if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)) {
					lime__$backend_html5_HTML5Window.textInput.style.fontSize = "0px";
					lime__$backend_html5_HTML5Window.textInput.style.width = "0px";
					lime__$backend_html5_HTML5Window.textInput.style.height = "0px";
				} else {
					lime__$backend_html5_HTML5Window.textInput.style.width = "1px";
					lime__$backend_html5_HTML5Window.textInput.style.height = "1px";
				}
				lime__$backend_html5_HTML5Window.textInput.style.pointerEvents = "none";
				lime__$backend_html5_HTML5Window.textInput.style.zIndex = "-10000000";
				window.document.body.appendChild(lime__$backend_html5_HTML5Window.textInput);
			}
			if(!this.enableTextEvents) {
				lime__$backend_html5_HTML5Window.textInput.addEventListener("input",$bind(this,this.handleInputEvent),true);
				lime__$backend_html5_HTML5Window.textInput.addEventListener("blur",$bind(this,this.handleFocusEvent),true);
			}
			lime__$backend_html5_HTML5Window.textInput.focus();
		} else if(lime__$backend_html5_HTML5Window.textInput != null) {
			lime__$backend_html5_HTML5Window.textInput.removeEventListener("input",$bind(this,this.handleInputEvent),true);
			lime__$backend_html5_HTML5Window.textInput.removeEventListener("blur",$bind(this,this.handleFocusEvent),true);
			lime__$backend_html5_HTML5Window.textInput.blur();
		}
		return this.enableTextEvents = value;
	}
	,setFullscreen: function(value) {
		return false;
	}
	,setIcon: function(image) {
	}
	,setMaximized: function(value) {
		return false;
	}
	,setMinimized: function(value) {
		return false;
	}
	,setResizable: function(value) {
		return value;
	}
	,setTitle: function(value) {
		return value;
	}
	,__class__: lime__$backend_html5_HTML5Window
};
var lime_app_IModule = function() { };
$hxClasses["lime.app.IModule"] = lime_app_IModule;
lime_app_IModule.__name__ = ["lime","app","IModule"];
lime_app_IModule.prototype = {
	__class__: lime_app_IModule
};
var lime_app_Module = function() {
	this.onExit = new lime_app_Event_$Int_$Void();
};
$hxClasses["lime.app.Module"] = lime_app_Module;
lime_app_Module.__name__ = ["lime","app","Module"];
lime_app_Module.__interfaces__ = [lime_app_IModule];
lime_app_Module.prototype = {
	onGamepadAxisMove: function(gamepad,axis,value) {
	}
	,onGamepadButtonDown: function(gamepad,button) {
	}
	,onGamepadButtonUp: function(gamepad,button) {
	}
	,onGamepadConnect: function(gamepad) {
		haxe_Log.trace("onGamepadConnect (module)",{ fileName : "Module.hx", lineNumber : 64, className : "lime.app.Module", methodName : "onGamepadConnect"});
	}
	,onGamepadDisconnect: function(gamepad) {
	}
	,onJoystickAxisMove: function(joystick,axis,value) {
	}
	,onJoystickButtonDown: function(joystick,button) {
	}
	,onJoystickButtonUp: function(joystick,button) {
	}
	,onJoystickConnect: function(joystick) {
	}
	,onJoystickDisconnect: function(joystick) {
	}
	,onJoystickHatMove: function(joystick,hat,position) {
	}
	,onJoystickTrackballMove: function(joystick,trackball,value) {
	}
	,onKeyDown: function(window,keyCode,modifier) {
	}
	,onKeyUp: function(window,keyCode,modifier) {
	}
	,onModuleExit: function(code) {
	}
	,onMouseDown: function(window,x,y,button) {
	}
	,onMouseMove: function(window,x,y) {
	}
	,onMouseMoveRelative: function(window,x,y) {
	}
	,onMouseUp: function(window,x,y,button) {
	}
	,onMouseWheel: function(window,deltaX,deltaY) {
	}
	,onPreloadComplete: function() {
	}
	,onPreloadProgress: function(loaded,total) {
	}
	,onRenderContextLost: function(renderer) {
	}
	,onRenderContextRestored: function(renderer,context) {
	}
	,onTextEdit: function(window,text,start,length) {
	}
	,onTextInput: function(window,text) {
	}
	,onTouchEnd: function(touch) {
	}
	,onTouchMove: function(touch) {
	}
	,onTouchStart: function(touch) {
	}
	,onWindowActivate: function(window) {
	}
	,onWindowClose: function(window) {
	}
	,onWindowCreate: function(window) {
	}
	,onWindowDeactivate: function(window) {
	}
	,onWindowDropFile: function(window,file) {
	}
	,onWindowEnter: function(window) {
	}
	,onWindowFocusIn: function(window) {
	}
	,onWindowFocusOut: function(window) {
	}
	,onWindowFullscreen: function(window) {
	}
	,onWindowLeave: function(window) {
	}
	,onWindowMove: function(window,x,y) {
	}
	,onWindowMinimize: function(window) {
	}
	,onWindowResize: function(window,width,height) {
	}
	,onWindowRestore: function(window) {
	}
	,render: function(renderer) {
	}
	,update: function(deltaTime) {
	}
	,__class__: lime_app_Module
};
var lime_app_Application = function() {
	this.onUpdate = new lime_app_Event_$Int_$Void();
	lime_app_Module.call(this);
	if(lime_app_Application.current == null) {
		lime_app_Application.current = this;
	}
	this.modules = [];
	this.renderers = [];
	this.windows = [];
	this.windowByID = new haxe_ds_IntMap();
	this.backend = new lime__$backend_html5_HTML5Application(this);
	this.onExit.add($bind(this,this.onModuleExit));
	this.onUpdate.add($bind(this,this.update));
	lime_ui_Gamepad.onConnect.add($bind(this,this.__onGamepadConnect));
	lime_ui_Joystick.onConnect.add($bind(this,this.__onJoystickConnect));
	lime_ui_Touch.onStart.add($bind(this,this.onTouchStart));
	lime_ui_Touch.onMove.add($bind(this,this.onTouchMove));
	lime_ui_Touch.onEnd.add($bind(this,this.onTouchEnd));
};
$hxClasses["lime.app.Application"] = lime_app_Application;
lime_app_Application.__name__ = ["lime","app","Application"];
lime_app_Application.current = null;
lime_app_Application.__super__ = lime_app_Module;
lime_app_Application.prototype = $extend(lime_app_Module.prototype,{
	addModule: function(module) {
		this.modules.push(module);
		if(this.windows.length > 0) {
			var _g = 0;
			var _g1 = this.windows;
			while(_g < _g1.length) {
				var $window = _g1[_g];
				++_g;
				module.onWindowCreate($window);
			}
			if(this.preloader == null || this.preloader.complete) {
				module.onPreloadComplete();
			}
		}
	}
	,addRenderer: function(renderer) {
		var f = $bind(this,this.render);
		var a1 = renderer;
		var tmp = function() {
			f(a1);
		};
		renderer.onRender.add(tmp);
		var f1 = $bind(this,this.onRenderContextLost);
		var a11 = renderer;
		var tmp1 = function() {
			f1(a11);
		};
		renderer.onContextLost.add(tmp1);
		var f2 = $bind(this,this.onRenderContextRestored);
		var a12 = renderer;
		var tmp2 = function(a2) {
			f2(a12,a2);
		};
		renderer.onContextRestored.add(tmp2);
		this.renderers.push(renderer);
	}
	,create: function(config) {
		this.config = config;
		this.backend.create(config);
		if(config != null) {
			if(Object.prototype.hasOwnProperty.call(config,"fps")) {
				this.backend.setFrameRate(config.fps);
			}
			if(Object.prototype.hasOwnProperty.call(config,"windows")) {
				var _g = 0;
				var _g1 = config.windows;
				while(_g < _g1.length) {
					var windowConfig = _g1[_g];
					++_g;
					var $window = new lime_ui_Window(windowConfig);
					this.createWindow($window);
					break;
				}
			}
			if(this.preloader == null || this.preloader.complete) {
				this.onPreloadComplete();
			}
		}
	}
	,createWindow: function(window) {
		var f = $bind(this,this.onWindowActivate);
		var a1 = window;
		var tmp = function() {
			f(a1);
		};
		window.onActivate.add(tmp);
		var f1 = $bind(this,this.onWindowClose);
		var a11 = window;
		var tmp1 = function() {
			f1(a11);
		};
		window.onClose.add(tmp1);
		var f2 = $bind(this,this.onWindowCreate);
		var a12 = window;
		var tmp2 = function() {
			f2(a12);
		};
		window.onCreate.add(tmp2);
		var f3 = $bind(this,this.onWindowDeactivate);
		var a13 = window;
		var tmp3 = function() {
			f3(a13);
		};
		window.onDeactivate.add(tmp3);
		var f4 = $bind(this,this.onWindowDropFile);
		var a14 = window;
		var tmp4 = function(a2) {
			f4(a14,a2);
		};
		window.onDropFile.add(tmp4);
		var f5 = $bind(this,this.onWindowEnter);
		var a15 = window;
		var tmp5 = function() {
			f5(a15);
		};
		window.onEnter.add(tmp5);
		var f6 = $bind(this,this.onWindowFocusIn);
		var a16 = window;
		var tmp6 = function() {
			f6(a16);
		};
		window.onFocusIn.add(tmp6);
		var f7 = $bind(this,this.onWindowFocusOut);
		var a17 = window;
		var tmp7 = function() {
			f7(a17);
		};
		window.onFocusOut.add(tmp7);
		var f8 = $bind(this,this.onWindowFullscreen);
		var a18 = window;
		var tmp8 = function() {
			f8(a18);
		};
		window.onFullscreen.add(tmp8);
		var f9 = $bind(this,this.onKeyDown);
		var a19 = window;
		var tmp9 = function(a21,a3) {
			f9(a19,a21,a3);
		};
		window.onKeyDown.add(tmp9);
		var f10 = $bind(this,this.onKeyUp);
		var a110 = window;
		var tmp10 = function(a22,a31) {
			f10(a110,a22,a31);
		};
		window.onKeyUp.add(tmp10);
		var f11 = $bind(this,this.onWindowLeave);
		var a111 = window;
		var tmp11 = function() {
			f11(a111);
		};
		window.onLeave.add(tmp11);
		var f12 = $bind(this,this.onWindowMinimize);
		var a112 = window;
		var tmp12 = function() {
			f12(a112);
		};
		window.onMinimize.add(tmp12);
		var f13 = $bind(this,this.onMouseDown);
		var a113 = window;
		var tmp13 = function(x,y,a23) {
			f13(a113,x,y,a23);
		};
		window.onMouseDown.add(tmp13);
		var f14 = $bind(this,this.onMouseMove);
		var a114 = window;
		var tmp14 = function(x1,y1) {
			f14(a114,x1,y1);
		};
		window.onMouseMove.add(tmp14);
		var f15 = $bind(this,this.onMouseMoveRelative);
		var a115 = window;
		var tmp15 = function(x2,y2) {
			f15(a115,x2,y2);
		};
		window.onMouseMoveRelative.add(tmp15);
		var f16 = $bind(this,this.onMouseUp);
		var a116 = window;
		var tmp16 = function(x3,y3,a24) {
			f16(a116,x3,y3,a24);
		};
		window.onMouseUp.add(tmp16);
		var f17 = $bind(this,this.onMouseWheel);
		var a117 = window;
		var tmp17 = function(a25,a32) {
			f17(a117,a25,a32);
		};
		window.onMouseWheel.add(tmp17);
		var f18 = $bind(this,this.onWindowMove);
		var a118 = window;
		var tmp18 = function(x4,y4) {
			f18(a118,x4,y4);
		};
		window.onMove.add(tmp18);
		var f19 = $bind(this,this.onWindowResize);
		var a119 = window;
		var tmp19 = function(a26,a33) {
			f19(a119,a26,a33);
		};
		window.onResize.add(tmp19);
		var f20 = $bind(this,this.onWindowRestore);
		var a120 = window;
		var tmp20 = function() {
			f20(a120);
		};
		window.onRestore.add(tmp20);
		var f21 = $bind(this,this.onTextEdit);
		var a121 = window;
		var tmp21 = function(a27,a34,a4) {
			f21(a121,a27,a34,a4);
		};
		window.onTextEdit.add(tmp21);
		var f22 = $bind(this,this.onTextInput);
		var a122 = window;
		var tmp22 = function(a28) {
			f22(a122,a28);
		};
		window.onTextInput.add(tmp22);
		if(window.renderer == null) {
			var renderer = new lime_graphics_Renderer(window);
			this.addRenderer(renderer);
		}
		window.create(this);
		this.windows.push(window);
		this.windowByID.h[window.id] = window;
		window.onCreate.dispatch();
	}
	,exec: function() {
		lime_app_Application.current = this;
		return this.backend.exec();
	}
	,onGamepadAxisMove: function(gamepad,axis,value) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadAxisMove(gamepad,axis,value);
		}
	}
	,onGamepadButtonDown: function(gamepad,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadButtonDown(gamepad,button);
		}
	}
	,onGamepadButtonUp: function(gamepad,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadButtonUp(gamepad,button);
		}
	}
	,onGamepadConnect: function(gamepad) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadConnect(gamepad);
		}
	}
	,onGamepadDisconnect: function(gamepad) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadDisconnect(gamepad);
		}
	}
	,onJoystickAxisMove: function(joystick,axis,value) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickAxisMove(joystick,axis,value);
		}
	}
	,onJoystickButtonDown: function(joystick,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickButtonDown(joystick,button);
		}
	}
	,onJoystickButtonUp: function(joystick,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickButtonUp(joystick,button);
		}
	}
	,onJoystickConnect: function(joystick) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickConnect(joystick);
		}
	}
	,onJoystickDisconnect: function(joystick) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickDisconnect(joystick);
		}
	}
	,onJoystickHatMove: function(joystick,hat,position) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickHatMove(joystick,hat,position);
		}
	}
	,onJoystickTrackballMove: function(joystick,trackball,value) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickTrackballMove(joystick,trackball,value);
		}
	}
	,onKeyDown: function(window,keyCode,modifier) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onKeyDown(window,keyCode,modifier);
		}
	}
	,onKeyUp: function(window,keyCode,modifier) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onKeyUp(window,keyCode,modifier);
		}
	}
	,onModuleExit: function(code) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onModuleExit(code);
		}
		this.backend.exit();
	}
	,onMouseDown: function(window,x,y,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseDown(window,x,y,button);
		}
	}
	,onMouseMove: function(window,x,y) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseMove(window,x,y);
		}
	}
	,onMouseMoveRelative: function(window,x,y) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseMoveRelative(window,x,y);
		}
	}
	,onMouseUp: function(window,x,y,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseUp(window,x,y,button);
		}
	}
	,onMouseWheel: function(window,deltaX,deltaY) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseWheel(window,deltaX,deltaY);
		}
	}
	,onPreloadComplete: function() {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onPreloadComplete();
		}
	}
	,onPreloadProgress: function(loaded,total) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onPreloadProgress(loaded,total);
		}
	}
	,onRenderContextLost: function(renderer) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onRenderContextLost(renderer);
		}
	}
	,onRenderContextRestored: function(renderer,context) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onRenderContextRestored(renderer,context);
		}
	}
	,onTextEdit: function(window,text,start,length) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTextEdit(window,text,start,length);
		}
	}
	,onTextInput: function(window,text) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTextInput(window,text);
		}
	}
	,onTouchEnd: function(touch) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTouchEnd(touch);
		}
	}
	,onTouchMove: function(touch) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTouchMove(touch);
		}
	}
	,onTouchStart: function(touch) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTouchStart(touch);
		}
	}
	,onWindowActivate: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowActivate(window);
		}
	}
	,onWindowClose: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowClose(window);
		}
		this.removeWindow(window);
	}
	,onWindowCreate: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowCreate(window);
		}
	}
	,onWindowDeactivate: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowDeactivate(window);
		}
	}
	,onWindowDropFile: function(window,file) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowDropFile(window,file);
		}
	}
	,onWindowEnter: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowEnter(window);
		}
	}
	,onWindowFocusIn: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowFocusIn(window);
		}
	}
	,onWindowFocusOut: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowFocusOut(window);
		}
	}
	,onWindowFullscreen: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowFullscreen(window);
		}
	}
	,onWindowLeave: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowLeave(window);
		}
	}
	,onWindowMinimize: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowMinimize(window);
		}
	}
	,onWindowMove: function(window,x,y) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowMove(window,x,y);
		}
	}
	,onWindowResize: function(window,width,height) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowResize(window,width,height);
		}
	}
	,onWindowRestore: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowRestore(window);
		}
	}
	,removeModule: function(module) {
		if(module != null) {
			module.onModuleExit(0);
			HxOverrides.remove(this.modules,module);
		}
	}
	,removeRenderer: function(renderer) {
		if(renderer != null && this.renderers.indexOf(renderer) > -1) {
			HxOverrides.remove(this.renderers,renderer);
		}
	}
	,removeWindow: function(window) {
		if(window != null && this.windowByID.h.hasOwnProperty(window.id)) {
			HxOverrides.remove(this.windows,window);
			this.windowByID.remove(window.id);
			window.close();
			if(this.windows[0] == window) {
				this.window = null;
			}
		}
	}
	,render: function(renderer) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.render(renderer);
		}
	}
	,setPreloader: function(preloader) {
		if(this.preloader != null) {
			this.preloader.onProgress.remove($bind(this,this.onPreloadProgress));
			this.preloader.onComplete.remove($bind(this,this.onPreloadComplete));
		}
		this.preloader = preloader;
		if(preloader.complete) {
			this.onPreloadComplete();
		} else {
			preloader.onProgress.add($bind(this,this.onPreloadProgress));
			preloader.onComplete.add($bind(this,this.onPreloadComplete));
		}
	}
	,update: function(deltaTime) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.update(deltaTime);
		}
	}
	,__onGamepadConnect: function(gamepad) {
		this.onGamepadConnect(gamepad);
		var f = $bind(this,this.onGamepadAxisMove);
		var a1 = gamepad;
		var tmp = function(a2,a3) {
			f(a1,a2,a3);
		};
		gamepad.onAxisMove.add(tmp);
		var f1 = $bind(this,this.onGamepadButtonDown);
		var a11 = gamepad;
		var tmp1 = function(a21) {
			f1(a11,a21);
		};
		gamepad.onButtonDown.add(tmp1);
		var f2 = $bind(this,this.onGamepadButtonUp);
		var a12 = gamepad;
		var tmp2 = function(a22) {
			f2(a12,a22);
		};
		gamepad.onButtonUp.add(tmp2);
		var f3 = $bind(this,this.onGamepadDisconnect);
		var a13 = gamepad;
		var tmp3 = function() {
			f3(a13);
		};
		gamepad.onDisconnect.add(tmp3);
	}
	,__onJoystickConnect: function(joystick) {
		this.onJoystickConnect(joystick);
		var f = $bind(this,this.onJoystickAxisMove);
		var a1 = joystick;
		var tmp = function(a2,a3) {
			f(a1,a2,a3);
		};
		joystick.onAxisMove.add(tmp);
		var f1 = $bind(this,this.onJoystickButtonDown);
		var a11 = joystick;
		var tmp1 = function(a21) {
			f1(a11,a21);
		};
		joystick.onButtonDown.add(tmp1);
		var f2 = $bind(this,this.onJoystickButtonUp);
		var a12 = joystick;
		var tmp2 = function(a22) {
			f2(a12,a22);
		};
		joystick.onButtonUp.add(tmp2);
		var f3 = $bind(this,this.onJoystickDisconnect);
		var a13 = joystick;
		var tmp3 = function() {
			f3(a13);
		};
		joystick.onDisconnect.add(tmp3);
		var f4 = $bind(this,this.onJoystickHatMove);
		var a14 = joystick;
		var tmp4 = function(a23,a31) {
			f4(a14,a23,a31);
		};
		joystick.onHatMove.add(tmp4);
		var f5 = $bind(this,this.onJoystickTrackballMove);
		var a15 = joystick;
		var tmp5 = function(a24,a32) {
			f5(a15,a24,a32);
		};
		joystick.onTrackballMove.add(tmp5);
	}
	,get_frameRate: function() {
		return this.backend.getFrameRate();
	}
	,set_frameRate: function(value) {
		return this.backend.setFrameRate(value);
	}
	,get_renderer: function() {
		return this.renderers[0];
	}
	,get_window: function() {
		return this.windows[0];
	}
	,__class__: lime_app_Application
	,__properties__: {get_window:"get_window",get_renderer:"get_renderer",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate"}
});
var lime_app_Event = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event"] = lime_app_Event;
lime_app_Event.__name__ = ["lime","app","Event"];
lime_app_Event.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,__class__: lime_app_Event
};
var lime_app_Event_$Dynamic_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Dynamic_Void"] = lime_app_Event_$Dynamic_$Void;
lime_app_Event_$Dynamic_$Void.__name__ = ["lime","app","Event_Dynamic_Void"];
lime_app_Event_$Dynamic_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Dynamic_$Void
};
var lime_app_Event_$Float_$Float_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Float_Float_Int_Void"] = lime_app_Event_$Float_$Float_$Int_$Void;
lime_app_Event_$Float_$Float_$Int_$Void.__name__ = ["lime","app","Event_Float_Float_Int_Void"];
lime_app_Event_$Float_$Float_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1,a2) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1,a2);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Float_$Float_$Int_$Void
};
var lime_app_Event_$Float_$Float_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Float_Float_Void"] = lime_app_Event_$Float_$Float_$Void;
lime_app_Event_$Float_$Float_$Void.__name__ = ["lime","app","Event_Float_Float_Void"];
lime_app_Event_$Float_$Float_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Float_$Float_$Void
};
var lime_app_Event_$Int_$Float_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_Float_Void"] = lime_app_Event_$Int_$Float_$Void;
lime_app_Event_$Int_$Float_$Void.__name__ = ["lime","app","Event_Int_Float_Void"];
lime_app_Event_$Int_$Float_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$Float_$Void
};
var lime_app_Event_$Int_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_Int_Void"] = lime_app_Event_$Int_$Int_$Void;
lime_app_Event_$Int_$Int_$Void.__name__ = ["lime","app","Event_Int_Int_Void"];
lime_app_Event_$Int_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$Int_$Void
};
var lime_app_Event_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_Void"] = lime_app_Event_$Int_$Void;
lime_app_Event_$Int_$Void.__name__ = ["lime","app","Event_Int_Void"];
lime_app_Event_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$Void
};
var lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_lime_ui_JoystickHatPosition_Void"] = lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void;
lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.__name__ = ["lime","app","Event_Int_lime_ui_JoystickHatPosition_Void"];
lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void
};
var lime_app_Event_$String_$Int_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_String_Int_Int_Void"] = lime_app_Event_$String_$Int_$Int_$Void;
lime_app_Event_$String_$Int_$Int_$Void.__name__ = ["lime","app","Event_String_Int_Int_Void"];
lime_app_Event_$String_$Int_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1,a2) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1,a2);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$String_$Int_$Int_$Void
};
var lime_app_Event_$String_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_String_Void"] = lime_app_Event_$String_$Void;
lime_app_Event_$String_$Void.__name__ = ["lime","app","Event_String_Void"];
lime_app_Event_$String_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$String_$Void
};
var lime_app_Event_$lime_$graphics_$RenderContext_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_graphics_RenderContext_Void"] = lime_app_Event_$lime_$graphics_$RenderContext_$Void;
lime_app_Event_$lime_$graphics_$RenderContext_$Void.__name__ = ["lime","app","Event_lime_graphics_RenderContext_Void"];
lime_app_Event_$lime_$graphics_$RenderContext_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$graphics_$RenderContext_$Void
};
var lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_GamepadAxis_Float_Void"] = lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void;
lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void.__name__ = ["lime","app","Event_lime_ui_GamepadAxis_Float_Void"];
lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void
};
var lime_app_Event_$lime_$ui_$GamepadButton_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_GamepadButton_Void"] = lime_app_Event_$lime_$ui_$GamepadButton_$Void;
lime_app_Event_$lime_$ui_$GamepadButton_$Void.__name__ = ["lime","app","Event_lime_ui_GamepadButton_Void"];
lime_app_Event_$lime_$ui_$GamepadButton_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$GamepadButton_$Void
};
var lime_app_Event_$lime_$ui_$Gamepad_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_Gamepad_Void"] = lime_app_Event_$lime_$ui_$Gamepad_$Void;
lime_app_Event_$lime_$ui_$Gamepad_$Void.__name__ = ["lime","app","Event_lime_ui_Gamepad_Void"];
lime_app_Event_$lime_$ui_$Gamepad_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$Gamepad_$Void
};
var lime_app_Event_$lime_$ui_$Joystick_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_Joystick_Void"] = lime_app_Event_$lime_$ui_$Joystick_$Void;
lime_app_Event_$lime_$ui_$Joystick_$Void.__name__ = ["lime","app","Event_lime_ui_Joystick_Void"];
lime_app_Event_$lime_$ui_$Joystick_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$Joystick_$Void
};
var lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"] = lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;
lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.__name__ = ["lime","app","Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"];
lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void
};
var lime_app_Event_$lime_$ui_$Touch_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_Touch_Void"] = lime_app_Event_$lime_$ui_$Touch_$Void;
lime_app_Event_$lime_$ui_$Touch_$Void.__name__ = ["lime","app","Event_lime_ui_Touch_Void"];
lime_app_Event_$lime_$ui_$Touch_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$Touch_$Void
};
var lime_app_Future = function(work) {
	if(work != null) {
		if(lime_app_Future.__threadPool == null) {
			lime_app_Future.__threadPool = new lime_system_ThreadPool();
			lime_app_Future.__threadPool.doWork.add(lime_app_Future.threadPool_doWork);
			lime_app_Future.__threadPool.onComplete.add(lime_app_Future.threadPool_onComplete);
			lime_app_Future.__threadPool.onError.add(lime_app_Future.threadPool_onError);
		}
		var promise = new lime_app_Promise();
		promise.future = this;
		lime_app_Future.__threadPool.queue({ promise : promise, work : work});
	}
};
$hxClasses["lime.app.Future"] = lime_app_Future;
lime_app_Future.__name__ = ["lime","app","Future"];
lime_app_Future.__threadPool = null;
lime_app_Future.threadPool_doWork = function(state) {
	try {
		var result = state.work();
		lime_app_Future.__threadPool.sendComplete({ promise : state.promise, result : result});
	} catch( e ) {
		haxe_CallStack.lastException = e;
		if (e instanceof js__$Boot_HaxeError) e = e.val;
		lime_app_Future.__threadPool.sendError({ promise : state.promise, error : e});
	}
};
lime_app_Future.threadPool_onComplete = function(state) {
	state.promise.complete(state.result);
};
lime_app_Future.threadPool_onError = function(state) {
	state.promise.error(state.error);
};
lime_app_Future.prototype = {
	onComplete: function(listener) {
		if(listener != null) {
			if(this.__completed) {
				listener(this.value);
			} else if(!this.__errored) {
				if(this.__completeListeners == null) {
					this.__completeListeners = [];
				}
				this.__completeListeners.push(listener);
			}
		}
		return this;
	}
	,onError: function(listener) {
		if(listener != null) {
			if(this.__errored) {
				listener(this.__errorMessage);
			} else if(!this.__completed) {
				if(this.__errorListeners == null) {
					this.__errorListeners = [];
				}
				this.__errorListeners.push(listener);
			}
		}
		return this;
	}
	,onProgress: function(listener) {
		if(listener != null) {
			if(this.__progressListeners == null) {
				this.__progressListeners = [];
			}
			this.__progressListeners.push(listener);
		}
		return this;
	}
	,then: function(next) {
		if(this.__completed) {
			return next(this.value);
		} else if(this.__errored) {
			var future = new lime_app_Future();
			future.onError(this.__errorMessage);
			return future;
		} else {
			var promise = new lime_app_Promise();
			this.onError($bind(promise,promise.error));
			this.onProgress($bind(promise,promise.progress));
			this.onComplete(function(val) {
				var future1 = next(val);
				future1.onError($bind(promise,promise.error));
				future1.onComplete($bind(promise,promise.complete));
			});
			return promise.future;
		}
	}
	,get_isCompleted: function() {
		if(!this.__completed) {
			return this.__errored;
		} else {
			return true;
		}
	}
	,__class__: lime_app_Future
	,__properties__: {get_isCompleted:"get_isCompleted"}
};
var lime_app_Preloader = function() {
	this.total = 0;
	this.loaded = 0;
	this.onProgress = new lime_app_Event_$Int_$Int_$Void();
	this.onComplete = new lime_app_Event_$Void_$Void();
	this.onProgress.add($bind(this,this.update));
};
$hxClasses["lime.app.Preloader"] = lime_app_Preloader;
lime_app_Preloader.__name__ = ["lime","app","Preloader"];
lime_app_Preloader.prototype = {
	create: function(config) {
	}
	,load: function(urls,types) {
		var url = null;
		var cacheVersion = lime_Assets.cache.version;
		var _g1 = 0;
		var _g = urls.length;
		while(_g1 < _g) {
			var i = _g1++;
			url = urls[i];
			var _g2 = types[i];
			switch(_g2) {
			case "BINARY":
				if(!lime_app_Preloader.loaders.exists(url)) {
					var loader = new lime_net_HTTPRequest();
					lime_app_Preloader.loaders.set(url,loader);
					this.total++;
				}
				break;
			case "FONT":
				this.total++;
				this.loadFont(url);
				break;
			case "IMAGE":
				if(!lime_app_Preloader.images.exists(url)) {
					var image = new Image();
					lime_app_Preloader.images.set(url,image);
					image.onload = $bind(this,this.image_onLoad);
					image.src = url + "?" + cacheVersion;
					this.total++;
				}
				break;
			case "TEXT":
				if(!lime_app_Preloader.loaders.exists(url)) {
					var loader1 = new lime_net_HTTPRequest();
					lime_app_Preloader.loaders.set(url,loader1);
					this.total++;
				}
				break;
			default:
			}
		}
		var url1 = lime_app_Preloader.loaders.keys();
		while(url1.hasNext()) {
			var url2 = url1.next();
			var _this = lime_app_Preloader.loaders;
			var loader2 = __map_reserved[url2] != null ? _this.getReserved(url2) : _this.h[url2];
			var future = loader2.load(url2 + "?" + cacheVersion);
			future.onComplete($bind(this,this.loader_onComplete));
		}
		if(this.total == 0) {
			this.start();
		}
	}
	,loadFont: function(font) {
		var _gthis = this;
		if(window.document.fonts && ($_=window.document.fonts,$bind($_,$_.load))) {
			window.document.fonts.load("1em '" + font + "'").then(function(_) {
				_gthis.loaded++;
				_gthis.onProgress.dispatch(_gthis.loaded,_gthis.total);
				if(_gthis.loaded == _gthis.total) {
					_gthis.start();
				}
			});
		} else {
			var node = window.document.createElement("span");
			node.innerHTML = "giItT1WQy@!-/#";
			var style = node.style;
			style.position = "absolute";
			style.left = "-10000px";
			style.top = "-10000px";
			style.fontSize = "300px";
			style.fontFamily = "sans-serif";
			style.fontVariant = "normal";
			style.fontStyle = "normal";
			style.fontWeight = "normal";
			style.letterSpacing = "0";
			window.document.body.appendChild(node);
			var width = node.offsetWidth;
			style.fontFamily = "'" + font + "', sans-serif";
			var interval = null;
			var found = false;
			var checkFont = function() {
				if(node.offsetWidth != width) {
					if(!found) {
						found = true;
						return false;
					}
					_gthis.loaded++;
					if(interval != null) {
						window.clearInterval(interval);
					}
					node.parentNode.removeChild(node);
					node = null;
					_gthis.onProgress.dispatch(_gthis.loaded,_gthis.total);
					if(_gthis.loaded == _gthis.total) {
						_gthis.start();
					}
					return true;
				}
				return false;
			};
			if(!checkFont()) {
				interval = window.setInterval(checkFont,50);
			}
		}
	}
	,start: function() {
		this.complete = true;
		this.onComplete.dispatch();
	}
	,update: function(loaded,total) {
	}
	,image_onLoad: function(_) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,loader_onComplete: function(_) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,__class__: lime_app_Preloader
};
var lime_app_Promise = function() {
	this.future = new lime_app_Future();
};
$hxClasses["lime.app.Promise"] = lime_app_Promise;
lime_app_Promise.__name__ = ["lime","app","Promise"];
lime_app_Promise.prototype = {
	complete: function(data) {
		if(!this.future.__errored) {
			this.future.__completed = true;
			this.future.value = data;
			if(this.future.__completeListeners != null) {
				var _g = 0;
				var _g1 = this.future.__completeListeners;
				while(_g < _g1.length) {
					var listener = _g1[_g];
					++_g;
					listener(data);
				}
				this.future.__completeListeners = null;
			}
		}
		return this;
	}
	,completeWith: function(future) {
		future.onComplete($bind(this,this.complete));
		future.onError($bind(this,this.error));
		future.onProgress($bind(this,this.progress));
		return this;
	}
	,error: function(msg) {
		if(!this.future.__completed) {
			this.future.__errored = true;
			this.future.__errorMessage = msg;
			if(this.future.__errorListeners != null) {
				var _g = 0;
				var _g1 = this.future.__errorListeners;
				while(_g < _g1.length) {
					var listener = _g1[_g];
					++_g;
					listener(msg);
				}
				this.future.__errorListeners = null;
			}
		}
		return this;
	}
	,progress: function(progress) {
		if(!this.future.__errored && !this.future.__completed) {
			if(this.future.__progressListeners != null) {
				var _g = 0;
				var _g1 = this.future.__progressListeners;
				while(_g < _g1.length) {
					var listener = _g1[_g];
					++_g;
					listener(progress);
				}
			}
		}
		return this;
	}
	,get_isCompleted: function() {
		return this.future.get_isCompleted();
	}
	,__class__: lime_app_Promise
	,__properties__: {get_isCompleted:"get_isCompleted"}
};
var lime_audio_ALAudioContext = function() {
	this.EXPONENT_DISTANCE_CLAMPED = 53254;
	this.EXPONENT_DISTANCE = 53253;
	this.LINEAR_DISTANCE_CLAMPED = 53252;
	this.LINEAR_DISTANCE = 53251;
	this.INVERSE_DISTANCE_CLAMPED = 53250;
	this.INVERSE_DISTANCE = 53249;
	this.DISTANCE_MODEL = 53248;
	this.DOPPLER_VELOCITY = 49153;
	this.SPEED_OF_SOUND = 49155;
	this.DOPPLER_FACTOR = 49152;
	this.EXTENSIONS = 45060;
	this.RENDERER = 45059;
	this.VERSION = 45058;
	this.VENDOR = 45057;
	this.OUT_OF_MEMORY = 40965;
	this.INVALID_OPERATION = 40964;
	this.INVALID_VALUE = 40963;
	this.INVALID_ENUM = 40962;
	this.INVALID_NAME = 40961;
	this.NO_ERROR = 0;
	this.SIZE = 8196;
	this.CHANNELS = 8195;
	this.BITS = 8194;
	this.FREQUENCY = 8193;
	this.FORMAT_STEREO16 = 4355;
	this.FORMAT_STEREO8 = 4354;
	this.FORMAT_MONO16 = 4353;
	this.FORMAT_MONO8 = 4352;
	this.UNDETERMINED = 4144;
	this.STREAMING = 4137;
	this.STATIC = 4136;
	this.SOURCE_TYPE = 4135;
	this.BYTE_OFFSET = 4134;
	this.SAMPLE_OFFSET = 4133;
	this.SEC_OFFSET = 4132;
	this.MAX_DISTANCE = 4131;
	this.CONE_OUTER_GAIN = 4130;
	this.ROLLOFF_FACTOR = 4129;
	this.REFERENCE_DISTANCE = 4128;
	this.BUFFERS_PROCESSED = 4118;
	this.BUFFERS_QUEUED = 4117;
	this.STOPPED = 4116;
	this.PAUSED = 4115;
	this.PLAYING = 4114;
	this.INITIAL = 4113;
	this.SOURCE_STATE = 4112;
	this.ORIENTATION = 4111;
	this.MAX_GAIN = 4110;
	this.MIN_GAIN = 4109;
	this.GAIN = 4106;
	this.BUFFER = 4105;
	this.LOOPING = 4103;
	this.VELOCITY = 4102;
	this.DIRECTION = 4101;
	this.POSITION = 4100;
	this.PITCH = 4099;
	this.CONE_OUTER_ANGLE = 4098;
	this.CONE_INNER_ANGLE = 4097;
	this.SOURCE_RELATIVE = 514;
	this.TRUE = 1;
	this.FALSE = 0;
	this.NONE = 0;
};
$hxClasses["lime.audio.ALAudioContext"] = lime_audio_ALAudioContext;
lime_audio_ALAudioContext.__name__ = ["lime","audio","ALAudioContext"];
lime_audio_ALAudioContext.prototype = {
	bufferData: function(buffer,format,data,size,freq) {
		lime_audio_openal_AL.bufferData(buffer,format,data,size,freq);
	}
	,buffer3f: function(buffer,param,value1,value2,value3) {
		lime_audio_openal_AL.buffer3f(buffer,param,value1,value2,value3);
	}
	,buffer3i: function(buffer,param,value1,value2,value3) {
		lime_audio_openal_AL.buffer3i(buffer,param,value1,value2,value3);
	}
	,bufferf: function(buffer,param,value) {
		lime_audio_openal_AL.bufferf(buffer,param,value);
	}
	,bufferfv: function(buffer,param,values) {
		lime_audio_openal_AL.bufferfv(buffer,param,values);
	}
	,bufferi: function(buffer,param,value) {
		lime_audio_openal_AL.bufferi(buffer,param,value);
	}
	,bufferiv: function(buffer,param,values) {
		lime_audio_openal_AL.bufferiv(buffer,param,values);
	}
	,deleteBuffer: function(buffer) {
		lime_audio_openal_AL.deleteBuffer(buffer);
	}
	,deleteBuffers: function(buffers) {
		lime_audio_openal_AL.deleteBuffers(buffers);
	}
	,deleteSource: function(source) {
		lime_audio_openal_AL.deleteSource(source);
	}
	,deleteSources: function(sources) {
		lime_audio_openal_AL.deleteSources(sources);
	}
	,disable: function(capability) {
		lime_audio_openal_AL.disable(capability);
	}
	,distanceModel: function(distanceModel) {
		lime_audio_openal_AL.distanceModel(distanceModel);
	}
	,dopplerFactor: function(value) {
		lime_audio_openal_AL.dopplerFactor(value);
	}
	,dopplerVelocity: function(value) {
		lime_audio_openal_AL.dopplerVelocity(value);
	}
	,enable: function(capability) {
		lime_audio_openal_AL.enable(capability);
	}
	,genSource: function() {
		return lime_audio_openal_AL.genSource();
	}
	,genSources: function(n) {
		return lime_audio_openal_AL.genSources(n);
	}
	,genBuffer: function() {
		return lime_audio_openal_AL.genBuffer();
	}
	,genBuffers: function(n) {
		return lime_audio_openal_AL.genBuffers(n);
	}
	,getBoolean: function(param) {
		return lime_audio_openal_AL.getBoolean(param);
	}
	,getBooleanv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getBooleanv(param,count);
	}
	,getBuffer3f: function(buffer,param) {
		return lime_audio_openal_AL.getBuffer3f(buffer,param);
	}
	,getBuffer3i: function(buffer,param) {
		return lime_audio_openal_AL.getBuffer3i(buffer,param);
	}
	,getBufferf: function(buffer,param) {
		return lime_audio_openal_AL.getBufferf(buffer,param);
	}
	,getBufferfv: function(buffer,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getBufferfv(buffer,param,count);
	}
	,getBufferi: function(buffer,param) {
		return lime_audio_openal_AL.getBufferi(buffer,param);
	}
	,getBufferiv: function(buffer,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getBufferiv(buffer,param,count);
	}
	,getDouble: function(param) {
		return lime_audio_openal_AL.getDouble(param);
	}
	,getDoublev: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getDoublev(param,count);
	}
	,getEnumValue: function(ename) {
		return lime_audio_openal_AL.getEnumValue(ename);
	}
	,getError: function() {
		return lime_audio_openal_AL.getError();
	}
	,getErrorString: function() {
		return lime_audio_openal_AL.getErrorString();
	}
	,getFloat: function(param) {
		return lime_audio_openal_AL.getFloat(param);
	}
	,getFloatv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getFloatv(param,count);
	}
	,getInteger: function(param) {
		return lime_audio_openal_AL.getInteger(param);
	}
	,getIntegerv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getIntegerv(param,count);
	}
	,getListener3f: function(param) {
		return lime_audio_openal_AL.getListener3f(param);
	}
	,getListener3i: function(param) {
		return lime_audio_openal_AL.getListener3i(param);
	}
	,getListenerf: function(param) {
		return lime_audio_openal_AL.getListenerf(param);
	}
	,getListenerfv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getListenerfv(param,count);
	}
	,getListeneri: function(param) {
		return lime_audio_openal_AL.getListeneri(param);
	}
	,getListeneriv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getListeneriv(param,count);
	}
	,getProcAddress: function(fname) {
		return lime_audio_openal_AL.getProcAddress(fname);
	}
	,getSource3f: function(source,param) {
		return lime_audio_openal_AL.getSource3f(source,param);
	}
	,getSourcef: function(source,param) {
		return lime_audio_openal_AL.getSourcef(source,param);
	}
	,getSource3i: function(source,param) {
		return lime_audio_openal_AL.getSource3i(source,param);
	}
	,getSourcefv: function(source,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getSourcefv(source,param);
	}
	,getSourcei: function(source,param) {
		return lime_audio_openal_AL.getSourcei(source,param);
	}
	,getSourceiv: function(source,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getSourceiv(source,param,count);
	}
	,getString: function(param) {
		return lime_audio_openal_AL.getString(param);
	}
	,isBuffer: function(buffer) {
		return lime_audio_openal_AL.isBuffer(buffer);
	}
	,isEnabled: function(capability) {
		return lime_audio_openal_AL.isEnabled(capability);
	}
	,isExtensionPresent: function(extname) {
		return lime_audio_openal_AL.isExtensionPresent(extname);
	}
	,isSource: function(source) {
		return lime_audio_openal_AL.isSource(source);
	}
	,listener3f: function(param,value1,value2,value3) {
		lime_audio_openal_AL.listener3f(param,value1,value2,value3);
	}
	,listener3i: function(param,value1,value2,value3) {
		lime_audio_openal_AL.listener3i(param,value1,value2,value3);
	}
	,listenerf: function(param,value) {
		lime_audio_openal_AL.listenerf(param,value);
	}
	,listenerfv: function(param,values) {
		lime_audio_openal_AL.listenerfv(param,values);
	}
	,listeneri: function(param,value) {
		lime_audio_openal_AL.listeneri(param,value);
	}
	,listeneriv: function(param,values) {
		lime_audio_openal_AL.listeneriv(param,values);
	}
	,source3f: function(source,param,value1,value2,value3) {
		lime_audio_openal_AL.source3f(source,param,value1,value2,value3);
	}
	,source3i: function(source,param,value1,value2,value3) {
		lime_audio_openal_AL.source3i(source,param,value1,value2,value3);
	}
	,sourcef: function(source,param,value) {
		lime_audio_openal_AL.sourcef(source,param,value);
	}
	,sourcefv: function(source,param,values) {
		lime_audio_openal_AL.sourcefv(source,param,values);
	}
	,sourcei: function(source,param,value) {
		lime_audio_openal_AL.sourcei(source,param,value);
	}
	,sourceiv: function(source,param,values) {
		lime_audio_openal_AL.sourceiv(source,param,values);
	}
	,sourcePlay: function(source) {
		lime_audio_openal_AL.sourcePlay(source);
	}
	,sourcePlayv: function(sources) {
		lime_audio_openal_AL.sourcePlayv(sources);
	}
	,sourceStop: function(source) {
		lime_audio_openal_AL.sourceStop(source);
	}
	,sourceStopv: function(sources) {
		lime_audio_openal_AL.sourceStopv(sources);
	}
	,sourceRewind: function(source) {
		lime_audio_openal_AL.sourceRewind(source);
	}
	,sourceRewindv: function(sources) {
		lime_audio_openal_AL.sourceRewindv(sources);
	}
	,sourcePause: function(source) {
		lime_audio_openal_AL.sourcePause(source);
	}
	,sourcePausev: function(sources) {
		lime_audio_openal_AL.sourcePausev(sources);
	}
	,sourceQueueBuffer: function(source,buffer) {
		lime_audio_openal_AL.sourceQueueBuffer(source,buffer);
	}
	,sourceQueueBuffers: function(source,nb,buffers) {
		lime_audio_openal_AL.sourceQueueBuffers(source,nb,buffers);
	}
	,sourceUnqueueBuffer: function(source) {
		return lime_audio_openal_AL.sourceUnqueueBuffer(source);
	}
	,sourceUnqueueBuffers: function(source,nb) {
		return lime_audio_openal_AL.sourceUnqueueBuffers(source,nb);
	}
	,speedOfSound: function(value) {
		lime_audio_openal_AL.speedOfSound(value);
	}
	,__class__: lime_audio_ALAudioContext
};
var lime_audio_ALCAudioContext = function() {
	this.ALL_DEVICES_SPECIFIER = 4115;
	this.DEFAULT_ALL_DEVICES_SPECIFIER = 4114;
	this.ENUMERATE_ALL_EXT = 1;
	this.EXTENSIONS = 4102;
	this.DEVICE_SPECIFIER = 4101;
	this.DEFAULT_DEVICE_SPECIFIER = 4100;
	this.ALL_ATTRIBUTES = 4099;
	this.ATTRIBUTES_SIZE = 4098;
	this.OUT_OF_MEMORY = 40965;
	this.INVALID_VALUE = 40964;
	this.INVALID_ENUM = 40963;
	this.INVALID_CONTEXT = 40962;
	this.INVALID_DEVICE = 40961;
	this.NO_ERROR = 0;
	this.STEREO_SOURCES = 4113;
	this.MONO_SOURCES = 4112;
	this.SYNC = 4105;
	this.REFRESH = 4104;
	this.FREQUENCY = 4103;
	this.TRUE = 1;
	this.FALSE = 0;
};
$hxClasses["lime.audio.ALCAudioContext"] = lime_audio_ALCAudioContext;
lime_audio_ALCAudioContext.__name__ = ["lime","audio","ALCAudioContext"];
lime_audio_ALCAudioContext.prototype = {
	closeDevice: function(device) {
		return lime_audio_openal_ALC.closeDevice(device);
	}
	,createContext: function(device,attrlist) {
		return lime_audio_openal_ALC.createContext(device,attrlist);
	}
	,destroyContext: function(context) {
		lime_audio_openal_ALC.destroyContext(context);
	}
	,getContextsDevice: function(context) {
		return lime_audio_openal_ALC.getContextsDevice(context);
	}
	,getCurrentContext: function() {
		return lime_audio_openal_ALC.getCurrentContext();
	}
	,getError: function(device) {
		return lime_audio_openal_ALC.getError(device);
	}
	,getErrorString: function(device) {
		return lime_audio_openal_ALC.getErrorString(device);
	}
	,getIntegerv: function(device,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_ALC.getIntegerv(device,param,count);
	}
	,getString: function(device,param) {
		return lime_audio_openal_ALC.getString(device,param);
	}
	,makeContextCurrent: function(context) {
		return lime_audio_openal_ALC.makeContextCurrent(context);
	}
	,openDevice: function(deviceName) {
		return lime_audio_openal_ALC.openDevice(deviceName);
	}
	,processContext: function(context) {
		lime_audio_openal_ALC.processContext(context);
	}
	,suspendContext: function(context) {
		lime_audio_openal_ALC.suspendContext(context);
	}
	,__class__: lime_audio_ALCAudioContext
};
var lime_audio_AudioBuffer = function() {
	this.id = 0;
};
$hxClasses["lime.audio.AudioBuffer"] = lime_audio_AudioBuffer;
lime_audio_AudioBuffer.__name__ = ["lime","audio","AudioBuffer"];
lime_audio_AudioBuffer.fromBytes = function(bytes) {
	return null;
};
lime_audio_AudioBuffer.fromFile = function(path) {
	return null;
};
lime_audio_AudioBuffer.fromURL = function(url,handler) {
	if(url != null && url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
		handler(lime_audio_AudioBuffer.fromFile(url));
	}
};
lime_audio_AudioBuffer.prototype = {
	dispose: function() {
	}
	,__class__: lime_audio_AudioBuffer
};
var lime_audio_AudioContext = $hxClasses["lime.audio.AudioContext"] = { __ename__ : ["lime","audio","AudioContext"], __constructs__ : ["OPENAL","HTML5","WEB","FLASH","CUSTOM"] };
lime_audio_AudioContext.OPENAL = function(alc,al) { var $x = ["OPENAL",0,alc,al]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.HTML5 = function(context) { var $x = ["HTML5",1,context]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.WEB = function(context) { var $x = ["WEB",2,context]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.FLASH = function(context) { var $x = ["FLASH",3,context]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.CUSTOM = function(data) { var $x = ["CUSTOM",4,data]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
var lime_audio_AudioManager = function() { };
$hxClasses["lime.audio.AudioManager"] = lime_audio_AudioManager;
lime_audio_AudioManager.__name__ = ["lime","audio","AudioManager"];
lime_audio_AudioManager.context = null;
lime_audio_AudioManager.init = function(context) {
	if(lime_audio_AudioManager.context == null) {
		if(context == null) {
			try {
				window.AudioContext = window.AudioContext || window.webkitAudioContext;
				lime_audio_AudioManager.context = lime_audio_AudioContext.WEB(new AudioContext ());
			} catch( e ) {
				haxe_CallStack.lastException = e;
				lime_audio_AudioManager.context = lime_audio_AudioContext.HTML5(new lime_audio_HTML5AudioContext());
			}
		} else {
			lime_audio_AudioManager.context = context;
		}
	}
};
lime_audio_AudioManager.resume = function() {
	if(lime_audio_AudioManager.context != null) {
		var _g = lime_audio_AudioManager.context;
		if(_g[1] == 0) {
			var al = _g[3];
			var alc = _g[2];
			alc.processContext(alc.getCurrentContext());
		}
	}
};
lime_audio_AudioManager.shutdown = function() {
	if(lime_audio_AudioManager.context != null) {
		var _g = lime_audio_AudioManager.context;
		if(_g[1] == 0) {
			var al = _g[3];
			var alc = _g[2];
			var currentContext = alc.getCurrentContext();
			if(currentContext != null) {
				var device = alc.getContextsDevice(currentContext);
				alc.makeContextCurrent(null);
				alc.destroyContext(currentContext);
				alc.closeDevice(device);
			}
		}
	}
};
lime_audio_AudioManager.suspend = function() {
	if(lime_audio_AudioManager.context != null) {
		var _g = lime_audio_AudioManager.context;
		if(_g[1] == 0) {
			var al = _g[3];
			var alc = _g[2];
			alc.suspendContext(alc.getCurrentContext());
		}
	}
};
var lime_audio_AudioSource = function(buffer,offset,length,loops) {
	if(loops == null) {
		loops = 0;
	}
	if(offset == null) {
		offset = 0;
	}
	this.onComplete = new lime_app_Event_$Void_$Void();
	this.buffer = buffer;
	this.offset = offset;
	if(length != null && length != 0) {
		this.set_length(length);
	}
	this.set_loops(loops);
	this.id = 0;
	if(buffer != null) {
		this.init();
	}
};
$hxClasses["lime.audio.AudioSource"] = lime_audio_AudioSource;
lime_audio_AudioSource.__name__ = ["lime","audio","AudioSource"];
lime_audio_AudioSource.prototype = {
	dispose: function() {
		var _g = lime_audio_AudioManager.context;
		if(_g[1] == 0) {
			var al = _g[3];
			var alc = _g[2];
			if(this.id != 0) {
				al.deleteSource(this.id);
			}
		}
	}
	,init: function() {
		var _g = lime_audio_AudioManager.context;
		if(_g[1] == 0) {
			var al = _g[3];
			var alc = _g[2];
			if(this.buffer.id == 0) {
				this.buffer.id = al.genBuffer();
				var format = 0;
				if(this.buffer.channels == 1) {
					if(this.buffer.bitsPerSample == 8) {
						format = al.FORMAT_MONO8;
					} else if(this.buffer.bitsPerSample == 16) {
						format = al.FORMAT_MONO16;
					}
				} else if(this.buffer.channels == 2) {
					if(this.buffer.bitsPerSample == 8) {
						format = al.FORMAT_STEREO8;
					} else if(this.buffer.bitsPerSample == 16) {
						format = al.FORMAT_STEREO16;
					}
				}
				al.bufferData(this.buffer.id,format,this.buffer.data,this.buffer.data.length,this.buffer.sampleRate);
			}
			this.id = al.genSource();
			al.sourcei(this.id,al.BUFFER,this.buffer.id);
		}
	}
	,play: function() {
	}
	,pause: function() {
	}
	,stop: function() {
	}
	,timer_onRun: function() {
	}
	,get_currentTime: function() {
		return 0;
	}
	,set_currentTime: function(value) {
		return this.pauseTime = value;
	}
	,get_gain: function() {
		return 1;
	}
	,set_gain: function(value) {
		return 1;
	}
	,get_length: function() {
		if(this.__length != null) {
			return this.__length;
		}
		return 0;
	}
	,set_length: function(value) {
		return this.__length = value;
	}
	,get_loops: function() {
		return this.__loops;
	}
	,set_loops: function(loops) {
		return this.__loops = loops;
	}
	,__class__: lime_audio_AudioSource
	,__properties__: {set_loops:"set_loops",get_loops:"get_loops",set_length:"set_length",get_length:"get_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}
};
var lime_audio_FlashAudioContext = function() {
};
$hxClasses["lime.audio.FlashAudioContext"] = lime_audio_FlashAudioContext;
lime_audio_FlashAudioContext.__name__ = ["lime","audio","FlashAudioContext"];
lime_audio_FlashAudioContext.prototype = {
	createBuffer: function(stream,context) {
		return null;
	}
	,getBytesLoaded: function(buffer) {
		return 0;
	}
	,getBytesTotal: function(buffer) {
		return 0;
	}
	,getID3: function(buffer) {
		return null;
	}
	,getIsBuffering: function(buffer) {
		return false;
	}
	,getIsURLInaccessible: function(buffer) {
		return false;
	}
	,getLength: function(buffer) {
		return 0;
	}
	,getURL: function(buffer) {
		return null;
	}
	,close: function(buffer) {
	}
	,extract: function(buffer,target,length,startPosition) {
		if(startPosition == null) {
			startPosition = -1;
		}
		return 0;
	}
	,load: function(buffer,stream,context) {
	}
	,loadCompressedDataFromByteArray: function(buffer,bytes,bytesLength) {
	}
	,loadPCMFromByteArray: function(buffer,bytes,samples,format,stereo,sampleRate) {
		if(sampleRate == null) {
			sampleRate = 44100;
		}
		if(stereo == null) {
			stereo = true;
		}
	}
	,play: function(buffer,startTime,loops,sndTransform) {
		if(loops == null) {
			loops = 0;
		}
		if(startTime == null) {
			startTime = 0;
		}
		return null;
	}
	,__class__: lime_audio_FlashAudioContext
};
var lime_audio_HTML5AudioContext = function() {
	this.NETWORK_NO_SOURCE = 3;
	this.NETWORK_LOADING = 2;
	this.NETWORK_IDLE = 1;
	this.NETWORK_EMPTY = 0;
	this.HAVE_NOTHING = 0;
	this.HAVE_METADATA = 1;
	this.HAVE_FUTURE_DATA = 3;
	this.HAVE_ENOUGH_DATA = 4;
	this.HAVE_CURRENT_DATA = 2;
};
$hxClasses["lime.audio.HTML5AudioContext"] = lime_audio_HTML5AudioContext;
lime_audio_HTML5AudioContext.__name__ = ["lime","audio","HTML5AudioContext"];
lime_audio_HTML5AudioContext.prototype = {
	canPlayType: function(buffer,type) {
		if(buffer.src != null) {
			return buffer.src.canPlayType(type);
		}
		return null;
	}
	,createBuffer: function(urlString) {
		var buffer = new lime_audio_AudioBuffer();
		buffer.src = new Audio();
		buffer.src.src = urlString;
		return buffer;
	}
	,getAutoplay: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.autoplay;
		}
		return false;
	}
	,getBuffered: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.buffered;
		}
		return null;
	}
	,getCurrentSrc: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.currentSrc;
		}
		return null;
	}
	,getCurrentTime: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.currentTime;
		}
		return 0;
	}
	,getDefaultPlaybackRate: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.defaultPlaybackRate;
		}
		return 1;
	}
	,getDuration: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.duration;
		}
		return 0;
	}
	,getEnded: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.ended;
		}
		return false;
	}
	,getError: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.error;
		}
		return null;
	}
	,getLoop: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.loop;
		}
		return false;
	}
	,getMuted: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.muted;
		}
		return false;
	}
	,getNetworkState: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.networkState;
		}
		return 0;
	}
	,getPaused: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.paused;
		}
		return false;
	}
	,getPlaybackRate: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.playbackRate;
		}
		return 1;
	}
	,getPlayed: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.played;
		}
		return null;
	}
	,getPreload: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.preload;
		}
		return null;
	}
	,getReadyState: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.readyState;
		}
		return 0;
	}
	,getSeekable: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.seekable;
		}
		return null;
	}
	,getSeeking: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.seeking;
		}
		return false;
	}
	,getSrc: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.src;
		}
		return null;
	}
	,getStartTime: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.playbackRate;
		}
		return 0;
	}
	,getVolume: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.volume;
		}
		return 1;
	}
	,load: function(buffer) {
		if(buffer.src != null) {
			buffer.src.load();
			return;
		}
	}
	,pause: function(buffer) {
		if(buffer.src != null) {
			buffer.src.pause();
			return;
		}
	}
	,play: function(buffer) {
		if(buffer.src != null) {
			buffer.src.play();
			return;
		}
	}
	,setAutoplay: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.autoplay = value;
		}
	}
	,setCurrentTime: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.currentTime = value;
		}
	}
	,setDefaultPlaybackRate: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.defaultPlaybackRate = value;
		}
	}
	,setLoop: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.loop = value;
		}
	}
	,setMuted: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.muted = value;
		}
	}
	,setPlaybackRate: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.playbackRate = value;
		}
	}
	,setPreload: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.preload = value;
		}
	}
	,setSrc: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.src = value;
		}
	}
	,setVolume: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.volume = value;
		}
	}
	,__class__: lime_audio_HTML5AudioContext
};
var lime_audio_openal_AL = function() { };
$hxClasses["lime.audio.openal.AL"] = lime_audio_openal_AL;
lime_audio_openal_AL.__name__ = ["lime","audio","openal","AL"];
lime_audio_openal_AL.bufferData = function(buffer,format,data,size,freq) {
};
lime_audio_openal_AL.buffer3f = function(buffer,param,value1,value2,value3) {
};
lime_audio_openal_AL.buffer3i = function(buffer,param,value1,value2,value3) {
};
lime_audio_openal_AL.bufferf = function(buffer,param,value) {
};
lime_audio_openal_AL.bufferfv = function(buffer,param,values) {
};
lime_audio_openal_AL.bufferi = function(buffer,param,value) {
};
lime_audio_openal_AL.bufferiv = function(buffer,param,values) {
};
lime_audio_openal_AL.deleteBuffer = function(buffer) {
};
lime_audio_openal_AL.deleteBuffers = function(buffers) {
};
lime_audio_openal_AL.deleteSource = function(source) {
};
lime_audio_openal_AL.deleteSources = function(sources) {
};
lime_audio_openal_AL.disable = function(capability) {
};
lime_audio_openal_AL.distanceModel = function(distanceModel) {
};
lime_audio_openal_AL.dopplerFactor = function(value) {
};
lime_audio_openal_AL.dopplerVelocity = function(value) {
};
lime_audio_openal_AL.enable = function(capability) {
};
lime_audio_openal_AL.genSource = function() {
	return 0;
};
lime_audio_openal_AL.genSources = function(n) {
	return null;
};
lime_audio_openal_AL.genBuffer = function() {
	return 0;
};
lime_audio_openal_AL.genBuffers = function(n) {
	return null;
};
lime_audio_openal_AL.getBoolean = function(param) {
	return false;
};
lime_audio_openal_AL.getBooleanv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getBuffer3f = function(buffer,param) {
	return null;
};
lime_audio_openal_AL.getBuffer3i = function(buffer,param) {
	return null;
};
lime_audio_openal_AL.getBufferf = function(buffer,param) {
	return 0;
};
lime_audio_openal_AL.getBufferfv = function(buffer,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getBufferi = function(buffer,param) {
	return 0;
};
lime_audio_openal_AL.getBufferiv = function(buffer,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getDouble = function(param) {
	return 0;
};
lime_audio_openal_AL.getDoublev = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getEnumValue = function(ename) {
	return 0;
};
lime_audio_openal_AL.getError = function() {
	return 0;
};
lime_audio_openal_AL.getErrorString = function() {
	var _g = lime_audio_openal_AL.getError();
	switch(_g) {
	case 40961:
		return "INVALID_NAME: Invalid parameter name";
	case 40962:
		return "INVALID_ENUM: Invalid enum value";
	case 40963:
		return "INVALID_VALUE: Invalid parameter value";
	case 40964:
		return "INVALID_OPERATION: Illegal operation or call";
	case 40965:
		return "OUT_OF_MEMORY: OpenAL has run out of memory";
	default:
		return "";
	}
};
lime_audio_openal_AL.getFloat = function(param) {
	return 0;
};
lime_audio_openal_AL.getFloatv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getInteger = function(param) {
	return 0;
};
lime_audio_openal_AL.getIntegerv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getListener3f = function(param) {
	return null;
};
lime_audio_openal_AL.getListener3i = function(param) {
	return null;
};
lime_audio_openal_AL.getListenerf = function(param) {
	return 0;
};
lime_audio_openal_AL.getListenerfv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getListeneri = function(param) {
	return 0;
};
lime_audio_openal_AL.getListeneriv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getProcAddress = function(fname) {
	return null;
};
lime_audio_openal_AL.getSource3f = function(source,param) {
	return null;
};
lime_audio_openal_AL.getSourcef = function(source,param) {
	return 0;
};
lime_audio_openal_AL.getSource3i = function(source,param) {
	return null;
};
lime_audio_openal_AL.getSourcefv = function(source,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getSourcei = function(source,param) {
	return 0;
};
lime_audio_openal_AL.getSourceiv = function(source,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getString = function(param) {
	return null;
};
lime_audio_openal_AL.isBuffer = function(buffer) {
	return false;
};
lime_audio_openal_AL.isEnabled = function(capability) {
	return false;
};
lime_audio_openal_AL.isExtensionPresent = function(extname) {
	return false;
};
lime_audio_openal_AL.isSource = function(source) {
	return false;
};
lime_audio_openal_AL.listener3f = function(param,value1,value2,value3) {
};
lime_audio_openal_AL.listener3i = function(param,value1,value2,value3) {
};
lime_audio_openal_AL.listenerf = function(param,value) {
};
lime_audio_openal_AL.listenerfv = function(param,values) {
};
lime_audio_openal_AL.listeneri = function(param,value) {
};
lime_audio_openal_AL.listeneriv = function(param,values) {
};
lime_audio_openal_AL.source3f = function(source,param,value1,value2,value3) {
};
lime_audio_openal_AL.source3i = function(source,param,value1,value2,value3) {
};
lime_audio_openal_AL.sourcef = function(source,param,value) {
};
lime_audio_openal_AL.sourcefv = function(source,param,values) {
};
lime_audio_openal_AL.sourcei = function(source,param,value) {
};
lime_audio_openal_AL.sourceiv = function(source,param,values) {
};
lime_audio_openal_AL.sourcePlay = function(source) {
};
lime_audio_openal_AL.sourcePlayv = function(sources) {
};
lime_audio_openal_AL.sourceStop = function(source) {
};
lime_audio_openal_AL.sourceStopv = function(sources) {
};
lime_audio_openal_AL.sourceRewind = function(source) {
};
lime_audio_openal_AL.sourceRewindv = function(sources) {
};
lime_audio_openal_AL.sourcePause = function(source) {
};
lime_audio_openal_AL.sourcePausev = function(sources) {
};
lime_audio_openal_AL.sourceQueueBuffer = function(source,buffer) {
};
lime_audio_openal_AL.sourceQueueBuffers = function(source,nb,buffers) {
};
lime_audio_openal_AL.sourceUnqueueBuffer = function(source) {
	return 0;
};
lime_audio_openal_AL.sourceUnqueueBuffers = function(source,nb) {
	return null;
};
lime_audio_openal_AL.speedOfSound = function(value) {
};
var lime_audio_openal_ALC = function() { };
$hxClasses["lime.audio.openal.ALC"] = lime_audio_openal_ALC;
lime_audio_openal_ALC.__name__ = ["lime","audio","openal","ALC"];
lime_audio_openal_ALC.closeDevice = function(device) {
	return false;
};
lime_audio_openal_ALC.createContext = function(device,attrlist) {
	return null;
};
lime_audio_openal_ALC.destroyContext = function(context) {
};
lime_audio_openal_ALC.getContextsDevice = function(context) {
	return null;
};
lime_audio_openal_ALC.getCurrentContext = function() {
	return null;
};
lime_audio_openal_ALC.getError = function(device) {
	return 0;
};
lime_audio_openal_ALC.getErrorString = function(device) {
	var _g = lime_audio_openal_ALC.getError(device);
	switch(_g) {
	case 40961:
		return "INVALID_DEVICE: Invalid device (or no device?)";
	case 40962:
		return "INVALID_CONTEXT: Invalid context (or no context?)";
	case 40963:
		return "INVALID_ENUM: Invalid enum value";
	case 40964:
		return "INVALID_VALUE: Invalid param value";
	case 40965:
		return "OUT_OF_MEMORY: OpenAL has run out of memory";
	default:
		return "";
	}
};
lime_audio_openal_ALC.getIntegerv = function(device,param,size) {
	return null;
};
lime_audio_openal_ALC.getString = function(device,param) {
	return null;
};
lime_audio_openal_ALC.makeContextCurrent = function(context) {
	return false;
};
lime_audio_openal_ALC.openDevice = function(deviceName) {
	return null;
};
lime_audio_openal_ALC.processContext = function(context) {
};
lime_audio_openal_ALC.suspendContext = function(context) {
};
var lime_audio_openal__$ALContext_ALContext_$Impl_$ = {};
$hxClasses["lime.audio.openal._ALContext.ALContext_Impl_"] = lime_audio_openal__$ALContext_ALContext_$Impl_$;
lime_audio_openal__$ALContext_ALContext_$Impl_$.__name__ = ["lime","audio","openal","_ALContext","ALContext_Impl_"];
lime_audio_openal__$ALContext_ALContext_$Impl_$._new = function(handle) {
	var this1 = handle;
	return this1;
};
var lime_audio_openal__$ALDevice_ALDevice_$Impl_$ = {};
$hxClasses["lime.audio.openal._ALDevice.ALDevice_Impl_"] = lime_audio_openal__$ALDevice_ALDevice_$Impl_$;
lime_audio_openal__$ALDevice_ALDevice_$Impl_$.__name__ = ["lime","audio","openal","_ALDevice","ALDevice_Impl_"];
lime_audio_openal__$ALDevice_ALDevice_$Impl_$._new = function(handle) {
	var this1 = handle;
	return this1;
};
var lime_graphics_ConsoleRenderContext = function() {
};
$hxClasses["lime.graphics.ConsoleRenderContext"] = lime_graphics_ConsoleRenderContext;
lime_graphics_ConsoleRenderContext.__name__ = ["lime","graphics","ConsoleRenderContext"];
lime_graphics_ConsoleRenderContext.prototype = {
	createIndexBuffer: function(indices,count) {
		return new lime_graphics_console_IndexBuffer();
	}
	,createVertexBuffer: function(decl,count) {
		return new lime_graphics_console_VertexBuffer();
	}
	,lookupShader: function(name) {
		return new lime_graphics_console_Shader();
	}
	,clear: function(r,g,b,a,depth,stencil) {
		if(stencil == null) {
			stencil = 0;
		}
		if(depth == null) {
			depth = 1.0;
		}
	}
	,bindShader: function(shader) {
	}
	,setViewport: function(x,y,width,height,nearPlane,farPlane) {
		if(farPlane == null) {
			farPlane = 1.0;
		}
		if(nearPlane == null) {
			nearPlane = 0.0;
		}
	}
	,setVertexShaderConstantF: function(startRegister,vec4,vec4count) {
	}
	,setVertexSource: function(vb) {
	}
	,setIndexSource: function(ib) {
	}
	,draw: function(primitive,startVertex,primitiveCount) {
	}
	,drawIndexed: function(primitive,vertexCount,startIndex,primitiveCount) {
	}
	,get_width: function() {
		return 0;
	}
	,get_height: function() {
		return 0;
	}
	,__class__: lime_graphics_ConsoleRenderContext
	,__properties__: {get_height:"get_height",get_width:"get_width"}
};
var lime_graphics_FlashRenderContext = function() {
};
$hxClasses["lime.graphics.FlashRenderContext"] = lime_graphics_FlashRenderContext;
lime_graphics_FlashRenderContext.__name__ = ["lime","graphics","FlashRenderContext"];
lime_graphics_FlashRenderContext.prototype = {
	addChild: function(child) {
		return null;
	}
	,addChildAt: function(child,index) {
		return null;
	}
	,addEventListener: function(type,listener,useCapture,priority,useWeakReference) {
		if(useWeakReference == null) {
			useWeakReference = false;
		}
		if(priority == null) {
			priority = 0;
		}
		if(useCapture == null) {
			useCapture = false;
		}
	}
	,areInaccessibleObjectsUnderPoint: function(point) {
		return false;
	}
	,contains: function(child) {
		return false;
	}
	,dispatchEvent: function(event) {
		return false;
	}
	,getBounds: function(targetCoordinateSpace) {
		return null;
	}
	,getChildAt: function(index) {
		return null;
	}
	,getChildByName: function(name) {
		return null;
	}
	,getChildIndex: function(child) {
		return 0;
	}
	,getObjectsUnderPoint: function(point) {
		return null;
	}
	,getRect: function(targetCoordinateSpace) {
		return null;
	}
	,globalToLocal: function(point) {
		return null;
	}
	,globalToLocal3D: function(point) {
		return null;
	}
	,hasEventListener: function(type) {
		return false;
	}
	,hitTestObject: function(obj) {
		return false;
	}
	,hitTestPoint: function(x,y,shapeFlag) {
		if(shapeFlag == null) {
			shapeFlag = false;
		}
		return false;
	}
	,local3DToGlobal: function(point3d) {
		return null;
	}
	,localToGlobal: function(point) {
		return null;
	}
	,removeChild: function(child) {
		return null;
	}
	,removeChildAt: function(index) {
		return null;
	}
	,removeChildren: function(beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 2147483647;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
	}
	,removeEventListener: function(type,listener,useCapture) {
		if(useCapture == null) {
			useCapture = false;
		}
	}
	,requestSoftKeyboard: function() {
		return false;
	}
	,setChildIndex: function(child,index) {
	}
	,startDrag: function(lockCenter,bounds) {
		if(lockCenter == null) {
			lockCenter = false;
		}
	}
	,startTouchDrag: function(touchPointID,lockCenter,bounds) {
		if(lockCenter == null) {
			lockCenter = false;
		}
	}
	,stopAllMovieClips: function() {
	}
	,stopDrag: function() {
	}
	,stopTouchDrag: function(touchPointID) {
	}
	,swapChildren: function(child1,child2) {
	}
	,swapChildrenAt: function(index1,index2) {
	}
	,toString: function() {
		return null;
	}
	,willTrigger: function(type) {
		return false;
	}
	,__class__: lime_graphics_FlashRenderContext
};
var lime_graphics_Image = function(buffer,offsetX,offsetY,width,height,color,type) {
	if(height == null) {
		height = -1;
	}
	if(width == null) {
		width = -1;
	}
	if(offsetY == null) {
		offsetY = 0;
	}
	if(offsetX == null) {
		offsetX = 0;
	}
	this.offsetX = offsetX;
	this.offsetY = offsetY;
	this.width = width;
	this.height = height;
	if(type == null) {
		if(lime_app_Application.current != null && lime_app_Application.current.renderers[0] != null) {
			var _g = lime_app_Application.current.renderers[0].context;
			var tmp;
			switch(_g[1]) {
			case 1:case 2:
				tmp = lime_graphics_ImageType.CANVAS;
				break;
			case 3:
				tmp = lime_graphics_ImageType.FLASH;
				break;
			default:
				tmp = lime_graphics_ImageType.DATA;
			}
			this.type = tmp;
		} else {
			this.type = lime_graphics_ImageType.DATA;
		}
	} else {
		this.type = type;
	}
	if(buffer == null) {
		if(width > 0 && height > 0) {
			var _g1 = this.type;
			switch(_g1[1]) {
			case 0:
				this.buffer = new lime_graphics_ImageBuffer(null,width,height);
				lime_graphics_utils_ImageCanvasUtil.createCanvas(this,width,height);
				if(color != null) {
					this.fillRect(new lime_math_Rectangle(0,0,width,height),color);
				}
				break;
			case 1:
				var elements = width * height * 4;
				var this1;
				if(elements != null) {
					this1 = new Uint8Array(elements);
				} else {
					this1 = null;
				}
				this.buffer = new lime_graphics_ImageBuffer(this1,width,height);
				if(color != null) {
					this.fillRect(new lime_math_Rectangle(0,0,width,height),color);
				}
				break;
			case 2:
				break;
			default:
			}
		}
	} else {
		this.__fromImageBuffer(buffer);
	}
};
$hxClasses["lime.graphics.Image"] = lime_graphics_Image;
lime_graphics_Image.__name__ = ["lime","graphics","Image"];
lime_graphics_Image.__base64Encoder = null;
lime_graphics_Image.fromBase64 = function(base64,type,onload) {
	if(base64 == null) {
		return null;
	}
	var image = new lime_graphics_Image();
	image.__fromBase64(base64,type,onload);
	return image;
};
lime_graphics_Image.fromBitmapData = function(bitmapData) {
	if(bitmapData == null) {
		return null;
	}
	return bitmapData.image;
};
lime_graphics_Image.fromBytes = function(bytes,onload) {
	if(bytes == null) {
		return null;
	}
	var image = new lime_graphics_Image();
	image.__fromBytes(bytes,onload);
	return image;
};
lime_graphics_Image.fromCanvas = function(canvas) {
	if(canvas == null) {
		return null;
	}
	var buffer = new lime_graphics_ImageBuffer(null,canvas.width,canvas.height);
	buffer.set_src(canvas);
	return new lime_graphics_Image(buffer);
};
lime_graphics_Image.fromFile = function(path,onload,onerror) {
	var image = new lime_graphics_Image();
	image.__fromFile(path,onload,onerror);
	return image;
};
lime_graphics_Image.fromImageElement = function(image) {
	if(image == null) {
		return null;
	}
	var buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
	buffer.set_src(image);
	return new lime_graphics_Image(buffer);
};
lime_graphics_Image.__base64Encode = function(bytes) {
	var extension;
	var _g = bytes.length % 3;
	switch(_g) {
	case 1:
		extension = "==";
		break;
	case 2:
		extension = "=";
		break;
	default:
		extension = "";
	}
	if(lime_graphics_Image.__base64Encoder == null) {
		lime_graphics_Image.__base64Encoder = new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_graphics_Image.__base64Chars));
	}
	return lime_graphics_Image.__base64Encoder.encodeBytes(bytes).toString() + extension;
};
lime_graphics_Image.__isJPG = function(bytes) {
	if(bytes.b[0] == 255) {
		return bytes.b[1] == 216;
	} else {
		return false;
	}
};
lime_graphics_Image.__isPNG = function(bytes) {
	if(bytes.b[0] == 137 && bytes.b[1] == 80 && bytes.b[2] == 78 && bytes.b[3] == 71 && bytes.b[4] == 13 && bytes.b[5] == 10 && bytes.b[6] == 26) {
		return bytes.b[7] == 10;
	} else {
		return false;
	}
};
lime_graphics_Image.__isGIF = function(bytes) {
	if(bytes.b[0] == 71 && bytes.b[1] == 73 && bytes.b[2] == 70 && bytes.b[3] == 56) {
		var b = bytes.b[4];
		if(b == 55 || b == 57) {
			return bytes.b[5] == 97;
		} else {
			return false;
		}
	}
	return false;
};
lime_graphics_Image.prototype = {
	clone: function() {
		if(this.buffer != null) {
			if(this.type == lime_graphics_ImageType.CANVAS && this.buffer.__srcImage == null) {
				lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
				lime_graphics_utils_ImageCanvasUtil.sync(this,true);
			}
			var image = new lime_graphics_Image(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);
			image.dirty = this.dirty;
			return image;
		} else {
			return new lime_graphics_Image(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type);
		}
	}
	,colorTransform: function(rect,colorMatrix) {
		rect = this.__clipRect(rect);
		if(this.buffer == null || rect == null) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.colorTransform(this,rect,colorMatrix);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.colorTransform(this,rect,colorMatrix);
			break;
		case 2:
			rect.offset(this.offsetX,this.offsetY);
			this.buffer.__srcBitmapData.colorTransform(rect.__toFlashRectangle(),lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform(colorMatrix));
			break;
		default:
		}
	}
	,copyChannel: function(sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
		sourceRect = this.__clipRect(sourceRect);
		if(this.buffer == null || sourceRect == null) {
			return;
		}
		if(destChannel == lime_graphics_ImageChannel.ALPHA && !this.get_transparent()) {
			return;
		}
		if(sourceRect.width <= 0 || sourceRect.height <= 0) {
			return;
		}
		if(sourceRect.x + sourceRect.width > sourceImage.width) {
			sourceRect.width = sourceImage.width - sourceRect.x;
		}
		if(sourceRect.y + sourceRect.height > sourceImage.height) {
			sourceRect.height = sourceImage.height - sourceRect.y;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.copyChannel(this,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.copyChannel(this,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
			break;
		case 2:
			var srcChannel;
			switch(sourceChannel[1]) {
			case 0:
				srcChannel = 1;
				break;
			case 1:
				srcChannel = 2;
				break;
			case 2:
				srcChannel = 4;
				break;
			case 3:
				srcChannel = 8;
				break;
			}
			var dstChannel;
			switch(destChannel[1]) {
			case 0:
				dstChannel = 1;
				break;
			case 1:
				dstChannel = 2;
				break;
			case 2:
				dstChannel = 4;
				break;
			case 3:
				dstChannel = 8;
				break;
			}
			sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
			destPoint.offset(this.offsetX,this.offsetY);
			this.buffer.__srcBitmapData.copyChannel(sourceImage.buffer.get_src(),sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),srcChannel,dstChannel);
			break;
		default:
		}
	}
	,copyPixels: function(sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(this.buffer == null || sourceImage == null) {
			return;
		}
		if(sourceRect.width <= 0 || sourceRect.height <= 0) {
			return;
		}
		if(this.width <= 0 || this.height <= 0) {
			return;
		}
		if(sourceRect.x + sourceRect.width > sourceImage.width) {
			sourceRect.width = sourceImage.width - sourceRect.x;
		}
		if(sourceRect.y + sourceRect.height > sourceImage.height) {
			sourceRect.height = sourceImage.height - sourceRect.y;
		}
		if(sourceRect.x < 0) {
			sourceRect.width += sourceRect.x;
			sourceRect.x = 0;
		}
		if(sourceRect.y < 0) {
			sourceRect.height += sourceRect.y;
			sourceRect.y = 0;
		}
		if(destPoint.x + sourceRect.width > this.width) {
			sourceRect.width = this.width - destPoint.x;
		}
		if(destPoint.y + sourceRect.height > this.height) {
			sourceRect.height = this.height - destPoint.y;
		}
		if(destPoint.x < 0) {
			sourceRect.width += destPoint.x;
			sourceRect.x = -destPoint.x;
			destPoint.x = 0;
		}
		if(destPoint.y < 0) {
			sourceRect.height += destPoint.y;
			sourceRect.y = -destPoint.y;
			destPoint.y = 0;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
			lime_graphics_utils_ImageCanvasUtil.copyPixels(this,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
			lime_graphics_utils_ImageDataUtil.copyPixels(this,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha);
			break;
		case 2:
			sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
			destPoint.offset(this.offsetX,this.offsetY);
			if(alphaImage != null && alphaPoint != null) {
				alphaPoint.offset(alphaImage.offsetX,alphaImage.offsetY);
			}
			this.buffer.__srcBitmapData.copyPixels(sourceImage.buffer.__srcBitmapData,sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),alphaImage != null ? alphaImage.buffer.get_src() : null,alphaPoint != null ? alphaPoint.__toFlashPoint() : null,mergeAlpha);
			break;
		default:
		}
	}
	,encode: function(format,quality) {
		if(quality == null) {
			quality = 90;
		}
		if(format == null) {
			format = "png";
		}
		switch(format) {
		case "bmp":
			return lime_graphics_format_BMP.encode(this);
		case "jpeg":case "jpg":
			return lime_graphics_format_JPEG.encode(this,quality);
		case "png":
			return lime_graphics_format_PNG.encode(this);
		default:
		}
		return null;
	}
	,fillRect: function(rect,color,format) {
		rect = this.__clipRect(rect);
		if(this.buffer == null || rect == null) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.fillRect(this,rect,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			if(this.buffer.data.length == 0) {
				return;
			}
			lime_graphics_utils_ImageDataUtil.fillRect(this,rect,color,format);
			break;
		case 2:
			rect.offset(this.offsetX,this.offsetY);
			var argb;
			if(format == null) {
				var rgba = color;
				var this1 = 0;
				var argb1 = this1;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var this2 = 0;
					var argb2 = this2;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var this3 = 0;
					var argb3 = this3;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.fillRect(rect.__toFlashRectangle(),argb);
			break;
		default:
		}
	}
	,floodFill: function(x,y,color,format) {
		if(this.buffer == null) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.floodFill(this,x,y,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.floodFill(this,x,y,color,format);
			break;
		case 2:
			var argb;
			if(format == null) {
				var rgba = color;
				var this1 = 0;
				var argb1 = this1;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var this2 = 0;
					var argb2 = this2;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var this3 = 0;
					var argb3 = this3;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.floodFill(x + this.offsetX,y + this.offsetY,argb);
			break;
		default:
		}
	}
	,getColorBoundsRect: function(mask,color,findColor,format) {
		if(findColor == null) {
			findColor = true;
		}
		if(this.buffer == null) {
			return null;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getColorBoundsRect(this,mask,color,findColor,format);
		case 1:
			return lime_graphics_utils_ImageDataUtil.getColorBoundsRect(this,mask,color,findColor,format);
		case 2:
			var rect = this.buffer.__srcBitmapData.getColorBoundsRect(mask,color,findColor);
			return new lime_math_Rectangle(rect.x,rect.y,rect.width,rect.height);
		default:
			return null;
		}
	}
	,getPixel: function(x,y,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return 0;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			return lime_graphics_utils_ImageCanvasUtil.getPixel(this,x,y,format);
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getPixel(this,x,y,format);
		case 2:
			var color = this.buffer.__srcBitmapData.getPixel(x + this.offsetX,y + this.offsetY);
			if(format == null) {
				var this1 = 0;
				var rgba = this1;
				rgba = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
				var rgba1 = rgba;
				return rgba1;
			} else {
				switch(format) {
				case 1:
					return color;
				case 2:
					var this2 = 0;
					var bgra = this2;
					bgra = (color & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color >> 16 & 255 & 255) << 8 | color >> 24 & 255 & 255;
					var bgra1 = bgra;
					return bgra1;
				default:
					var this3 = 0;
					var rgba2 = this3;
					rgba2 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
					var rgba3 = rgba2;
					return rgba3;
				}
			}
			break;
		default:
			return 0;
		}
	}
	,getPixel32: function(x,y,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return 0;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			return lime_graphics_utils_ImageCanvasUtil.getPixel32(this,x,y,format);
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getPixel32(this,x,y,format);
		case 2:
			var color = this.buffer.__srcBitmapData.getPixel32(x + this.offsetX,y + this.offsetY);
			if(format == null) {
				var this1 = 0;
				var rgba = this1;
				rgba = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
				var rgba1 = rgba;
				return rgba1;
			} else {
				switch(format) {
				case 1:
					return color;
				case 2:
					var this2 = 0;
					var bgra = this2;
					bgra = (color & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color >> 16 & 255 & 255) << 8 | color >> 24 & 255 & 255;
					var bgra1 = bgra;
					return bgra1;
				default:
					var this3 = 0;
					var rgba2 = this3;
					rgba2 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
					var rgba3 = rgba2;
					return rgba3;
				}
			}
			break;
		default:
			return 0;
		}
	}
	,getPixels: function(rect,format) {
		if(this.buffer == null) {
			return null;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			return lime_graphics_utils_ImageCanvasUtil.getPixels(this,rect,format);
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getPixels(this,rect,format);
		case 2:
			return null;
		default:
			return null;
		}
	}
	,merge: function(sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
		if(this.buffer == null || sourceImage == null) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
			lime_graphics_utils_ImageCanvasUtil.merge(this,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
			lime_graphics_utils_ImageDataUtil.merge(this,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
			break;
		case 2:
			sourceRect.offset(this.offsetX,this.offsetY);
			this.buffer.__srcBitmapData.merge(sourceImage.buffer.__srcBitmapData,sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
			break;
		default:
			return;
		}
	}
	,resize: function(newWidth,newHeight) {
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.resize(this,newWidth,newHeight);
			break;
		case 1:
			lime_graphics_utils_ImageDataUtil.resize(this,newWidth,newHeight);
			break;
		case 2:
			break;
		default:
		}
		this.buffer.width = newWidth;
		this.buffer.height = newHeight;
		this.offsetX = 0;
		this.offsetY = 0;
		this.width = newWidth;
		this.height = newHeight;
	}
	,scroll: function(x,y) {
		if(this.buffer == null) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.scroll(this,x,y);
			break;
		case 1:
			this.copyPixels(this,this.get_rect(),new lime_math_Vector2(x,y));
			break;
		case 2:
			this.buffer.__srcBitmapData.scroll(x + this.offsetX,y + this.offsetX);
			break;
		default:
		}
	}
	,setPixel: function(x,y,color,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.setPixel(this,x,y,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.setPixel(this,x,y,color,format);
			break;
		case 2:
			var argb;
			if(format == null) {
				var rgba = color;
				var this1 = 0;
				var argb1 = this1;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var this2 = 0;
					var argb2 = this2;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var this3 = 0;
					var argb3 = this3;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.setPixel(x + this.offsetX,y + this.offsetX,argb);
			break;
		default:
		}
	}
	,setPixel32: function(x,y,color,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.setPixel32(this,x,y,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.setPixel32(this,x,y,color,format);
			break;
		case 2:
			var argb;
			if(format == null) {
				var rgba = color;
				var this1 = 0;
				var argb1 = this1;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var this2 = 0;
					var argb2 = this2;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var this3 = 0;
					var argb3 = this3;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.setPixel32(x + this.offsetX,y + this.offsetY,argb);
			break;
		default:
		}
	}
	,setPixels: function(rect,bytes,format) {
		rect = this.__clipRect(rect);
		if(this.buffer == null || rect == null) {
			return;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.setPixels(this,rect,bytes,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.setPixels(this,rect,bytes,format);
			break;
		case 2:
			break;
		default:
		}
	}
	,threshold: function(sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format) {
		if(copySource == null) {
			copySource = false;
		}
		if(mask == null) {
			mask = -1;
		}
		if(color == null) {
			color = 0;
		}
		if(this.buffer == null || sourceImage == null || sourceRect == null) {
			return 0;
		}
		var _g = this.type;
		switch(_g[1]) {
		case 0:case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.threshold(this,sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format);
		case 2:
			var _color;
			if(format == null) {
				var rgba = color;
				var this1 = 0;
				var argb = this1;
				argb = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				_color = argb;
			} else {
				switch(format) {
				case 1:
					_color = color;
					break;
				case 2:
					var bgra = color;
					var this2 = 0;
					var argb1 = this2;
					argb1 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					_color = argb1;
					break;
				default:
					var rgba1 = color;
					var this3 = 0;
					var argb2 = this3;
					argb2 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					_color = argb2;
				}
			}
			var _mask;
			if(format == null) {
				var rgba2 = mask;
				var this4 = 0;
				var argb3 = this4;
				argb3 = (rgba2 & 255 & 255) << 24 | (rgba2 >> 24 & 255 & 255) << 16 | (rgba2 >> 16 & 255 & 255) << 8 | rgba2 >> 8 & 255 & 255;
				_mask = argb3;
			} else {
				switch(format) {
				case 1:
					_mask = mask;
					break;
				case 2:
					var bgra1 = mask;
					var this5 = 0;
					var argb4 = this5;
					argb4 = (bgra1 & 255 & 255) << 24 | (bgra1 >> 8 & 255 & 255) << 16 | (bgra1 >> 16 & 255 & 255) << 8 | bgra1 >> 24 & 255 & 255;
					_mask = argb4;
					break;
				default:
					var rgba3 = mask;
					var this6 = 0;
					var argb5 = this6;
					argb5 = (rgba3 & 255 & 255) << 24 | (rgba3 >> 24 & 255 & 255) << 16 | (rgba3 >> 16 & 255 & 255) << 8 | rgba3 >> 8 & 255 & 255;
					_mask = argb5;
				}
			}
			sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
			destPoint.offset(this.offsetX,this.offsetY);
			return this.buffer.__srcBitmapData.threshold(sourceImage.buffer.get_src(),sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),operation,threshold,_color,_mask,copySource);
		default:
		}
		return 0;
	}
	,__clipRect: function(r) {
		if(r == null) {
			return null;
		}
		if(r.x < 0) {
			r.width -= -r.x;
			r.x = 0;
			if(r.x + r.width <= 0) {
				return null;
			}
		}
		if(r.y < 0) {
			r.height -= -r.y;
			r.y = 0;
			if(r.y + r.height <= 0) {
				return null;
			}
		}
		if(r.x + r.width >= this.width) {
			r.width -= r.x + r.width - this.width;
			if(r.width <= 0) {
				return null;
			}
		}
		if(r.y + r.height >= this.height) {
			r.height -= r.y + r.height - this.height;
			if(r.height <= 0) {
				return null;
			}
		}
		return r;
	}
	,__fromBase64: function(base64,type,onload) {
		var _gthis = this;
		var image = new Image();
		image.crossOrigin = "Anonymous";
		var image_onLoaded = function(event) {
			_gthis.buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
			_gthis.buffer.__srcImage = image;
			_gthis.offsetX = 0;
			_gthis.offsetY = 0;
			_gthis.width = _gthis.buffer.width;
			_gthis.height = _gthis.buffer.height;
			if(onload != null) {
				onload(_gthis);
			}
		};
		image.addEventListener("load",image_onLoaded,false);
		image.src = "data:" + type + ";base64," + base64;
	}
	,__fromBytes: function(bytes,onload) {
		var type = "";
		if(lime_graphics_Image.__isPNG(bytes)) {
			type = "image/png";
		} else if(lime_graphics_Image.__isJPG(bytes)) {
			type = "image/jpeg";
		} else if(lime_graphics_Image.__isGIF(bytes)) {
			type = "image/gif";
		} else {
			throw new js__$Boot_HaxeError("Image tried to read PNG/JPG Bytes, but found an invalid header.");
		}
		this.__fromBase64(lime_graphics_Image.__base64Encode(bytes),type,onload);
	}
	,__fromFile: function(path,onload,onerror) {
		var _gthis = this;
		var image = new Image();
		image.crossOrigin = "Anonymous";
		image.onload = function(_) {
			_gthis.buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
			_gthis.buffer.__srcImage = image;
			_gthis.width = image.width;
			_gthis.height = image.height;
			if(onload != null) {
				onload(_gthis);
			}
		};
		image.onerror = function(_1) {
			if(onerror != null) {
				onerror();
			}
		};
		image.src = path;
		var image1 = image.complete;
	}
	,__fromImageBuffer: function(buffer) {
		this.buffer = buffer;
		if(buffer != null) {
			if(this.width == -1) {
				this.width = buffer.width;
			}
			if(this.height == -1) {
				this.height = buffer.height;
			}
		}
	}
	,get_data: function() {
		if(this.buffer.data == null && this.buffer.width > 0 && this.buffer.height > 0) {
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
			lime_graphics_utils_ImageCanvasUtil.sync(this,false);
			lime_graphics_utils_ImageCanvasUtil.createImageData(this);
		}
		return this.buffer.data;
	}
	,set_data: function(value) {
		return this.buffer.data = value;
	}
	,get_format: function() {
		return this.buffer.format;
	}
	,set_format: function(value) {
		if(this.buffer.format != value) {
			var _g = this.type;
			if(_g[1] == 1) {
				lime_graphics_utils_ImageDataUtil.setFormat(this,value);
			}
		}
		return this.buffer.format = value;
	}
	,get_powerOfTwo: function() {
		if(this.buffer.width != 0 && (this.buffer.width & ~this.buffer.width + 1) == this.buffer.width) {
			if(this.buffer.height != 0) {
				return (this.buffer.height & ~this.buffer.height + 1) == this.buffer.height;
			} else {
				return false;
			}
		} else {
			return false;
		}
	}
	,set_powerOfTwo: function(value) {
		if(value != this.get_powerOfTwo()) {
			var newWidth = 1;
			var newHeight = 1;
			while(newWidth < this.buffer.width) newWidth <<= 1;
			while(newHeight < this.buffer.height) newHeight <<= 1;
			var _g = this.type;
			switch(_g[1]) {
			case 0:
				break;
			case 1:
				lime_graphics_utils_ImageDataUtil.resizeBuffer(this,newWidth,newHeight);
				break;
			case 2:
				break;
			default:
			}
		}
		return value;
	}
	,get_premultiplied: function() {
		return this.buffer.premultiplied;
	}
	,set_premultiplied: function(value) {
		if(value && !this.buffer.premultiplied) {
			var _g = this.type;
			if(_g[1] == 1) {
				lime_graphics_utils_ImageCanvasUtil.convertToData(this);
				lime_graphics_utils_ImageDataUtil.multiplyAlpha(this);
			}
		} else if(!value && this.buffer.premultiplied) {
			var _g1 = this.type;
			if(_g1[1] == 1) {
				lime_graphics_utils_ImageCanvasUtil.convertToData(this);
				lime_graphics_utils_ImageDataUtil.unmultiplyAlpha(this);
			}
		}
		return value;
	}
	,get_rect: function() {
		return new lime_math_Rectangle(0,0,this.width,this.height);
	}
	,get_src: function() {
		if(this.buffer.__srcCanvas == null) {
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
		}
		return this.buffer.get_src();
	}
	,set_src: function(value) {
		return this.buffer.set_src(value);
	}
	,get_transparent: function() {
		if(this.buffer == null) {
			return false;
		}
		return this.buffer.transparent;
	}
	,set_transparent: function(value) {
		if(this.buffer == null) {
			return false;
		}
		return this.buffer.transparent = value;
	}
	,__class__: lime_graphics_Image
	,__properties__: {set_transparent:"set_transparent",get_transparent:"get_transparent",set_src:"set_src",get_src:"get_src",get_rect:"get_rect",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_powerOfTwo:"set_powerOfTwo",get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",set_data:"set_data",get_data:"get_data"}
};
var lime_graphics_ImageBuffer = function(data,width,height,bitsPerPixel,format) {
	if(bitsPerPixel == null) {
		bitsPerPixel = 32;
	}
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	this.data = data;
	this.width = width;
	this.height = height;
	this.bitsPerPixel = bitsPerPixel;
	this.format = format == null ? 0 : format;
	this.transparent = true;
};
$hxClasses["lime.graphics.ImageBuffer"] = lime_graphics_ImageBuffer;
lime_graphics_ImageBuffer.__name__ = ["lime","graphics","ImageBuffer"];
lime_graphics_ImageBuffer.prototype = {
	clone: function() {
		var buffer = new lime_graphics_ImageBuffer(this.data,this.width,this.height,this.bitsPerPixel);
		if(this.data != null) {
			var elements = this.data.byteLength;
			var this1;
			if(elements != null) {
				this1 = new Uint8Array(elements);
			} else {
				this1 = null;
			}
			buffer.data = this1;
			var view = this.data;
			var this2;
			if(view != null) {
				this2 = new Uint8Array(view);
			} else {
				this2 = null;
			}
			var copy = this2;
			buffer.data.set(copy);
		} else if(this.__srcImageData != null) {
			buffer.__srcCanvas = window.document.createElement("canvas");
			buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
			buffer.__srcCanvas.width = this.__srcImageData.width;
			buffer.__srcCanvas.height = this.__srcImageData.height;
			buffer.__srcImageData = buffer.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height);
			var copy1 = new Uint8ClampedArray(this.__srcImageData.data);
			buffer.__srcImageData.data.set(copy1);
		} else if(this.__srcCanvas != null) {
			buffer.__srcCanvas = window.document.createElement("canvas");
			buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
			buffer.__srcCanvas.width = this.__srcCanvas.width;
			buffer.__srcCanvas.height = this.__srcCanvas.height;
			buffer.__srcContext.drawImage(this.__srcCanvas,0,0);
		} else {
			buffer.__srcImage = this.__srcImage;
		}
		buffer.bitsPerPixel = this.bitsPerPixel;
		buffer.format = this.format;
		buffer.premultiplied = this.premultiplied;
		buffer.transparent = this.transparent;
		return buffer;
	}
	,get_src: function() {
		if(this.__srcImage != null) {
			return this.__srcImage;
		}
		return this.__srcCanvas;
	}
	,set_src: function(value) {
		if(js_Boot.__instanceof(value,Image)) {
			this.__srcImage = value;
		} else if(js_Boot.__instanceof(value,HTMLCanvasElement)) {
			this.__srcCanvas = value;
			this.__srcContext = this.__srcCanvas.getContext("2d");
		}
		return value;
	}
	,get_stride: function() {
		return this.width * 4;
	}
	,__class__: lime_graphics_ImageBuffer
	,__properties__: {get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}
};
var lime_graphics_ImageChannel = $hxClasses["lime.graphics.ImageChannel"] = { __ename__ : ["lime","graphics","ImageChannel"], __constructs__ : ["RED","GREEN","BLUE","ALPHA"] };
lime_graphics_ImageChannel.RED = ["RED",0];
lime_graphics_ImageChannel.RED.toString = $estr;
lime_graphics_ImageChannel.RED.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.GREEN = ["GREEN",1];
lime_graphics_ImageChannel.GREEN.toString = $estr;
lime_graphics_ImageChannel.GREEN.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.BLUE = ["BLUE",2];
lime_graphics_ImageChannel.BLUE.toString = $estr;
lime_graphics_ImageChannel.BLUE.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.ALPHA = ["ALPHA",3];
lime_graphics_ImageChannel.ALPHA.toString = $estr;
lime_graphics_ImageChannel.ALPHA.__enum__ = lime_graphics_ImageChannel;
var lime_graphics_ImageType = $hxClasses["lime.graphics.ImageType"] = { __ename__ : ["lime","graphics","ImageType"], __constructs__ : ["CANVAS","DATA","FLASH","CUSTOM"] };
lime_graphics_ImageType.CANVAS = ["CANVAS",0];
lime_graphics_ImageType.CANVAS.toString = $estr;
lime_graphics_ImageType.CANVAS.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.DATA = ["DATA",1];
lime_graphics_ImageType.DATA.toString = $estr;
lime_graphics_ImageType.DATA.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.FLASH = ["FLASH",2];
lime_graphics_ImageType.FLASH.toString = $estr;
lime_graphics_ImageType.FLASH.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.CUSTOM = ["CUSTOM",3];
lime_graphics_ImageType.CUSTOM.toString = $estr;
lime_graphics_ImageType.CUSTOM.__enum__ = lime_graphics_ImageType;
var lime_graphics_RenderContext = $hxClasses["lime.graphics.RenderContext"] = { __ename__ : ["lime","graphics","RenderContext"], __constructs__ : ["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM","NONE"] };
lime_graphics_RenderContext.OPENGL = function(gl) { var $x = ["OPENGL",0,gl]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CANVAS = function(context) { var $x = ["CANVAS",1,context]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.DOM = function(element) { var $x = ["DOM",2,element]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.FLASH = function(stage) { var $x = ["FLASH",3,stage]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CAIRO = function(cairo) { var $x = ["CAIRO",4,cairo]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CONSOLE = function(context) { var $x = ["CONSOLE",5,context]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CUSTOM = function(data) { var $x = ["CUSTOM",6,data]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.NONE = ["NONE",7];
lime_graphics_RenderContext.NONE.toString = $estr;
lime_graphics_RenderContext.NONE.__enum__ = lime_graphics_RenderContext;
var lime_graphics_Renderer = function(window) {
	this.onRender = new lime_app_Event_$Void_$Void();
	this.onContextRestored = new lime_app_Event_$lime_$graphics_$RenderContext_$Void();
	this.onContextLost = new lime_app_Event_$Void_$Void();
	this.window = window;
	this.backend = new lime__$backend_html5_HTML5Renderer(this);
	this.window.renderer = this;
};
$hxClasses["lime.graphics.Renderer"] = lime_graphics_Renderer;
lime_graphics_Renderer.__name__ = ["lime","graphics","Renderer"];
lime_graphics_Renderer.prototype = {
	create: function() {
		this.backend.create();
	}
	,flip: function() {
		this.backend.flip();
	}
	,readPixels: function(rect) {
		return this.backend.readPixels(rect);
	}
	,render: function() {
		this.backend.render();
	}
	,__class__: lime_graphics_Renderer
};
var lime_graphics_RendererType = $hxClasses["lime.graphics.RendererType"] = { __ename__ : ["lime","graphics","RendererType"], __constructs__ : ["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM"] };
lime_graphics_RendererType.OPENGL = ["OPENGL",0];
lime_graphics_RendererType.OPENGL.toString = $estr;
lime_graphics_RendererType.OPENGL.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CANVAS = ["CANVAS",1];
lime_graphics_RendererType.CANVAS.toString = $estr;
lime_graphics_RendererType.CANVAS.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.DOM = ["DOM",2];
lime_graphics_RendererType.DOM.toString = $estr;
lime_graphics_RendererType.DOM.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.FLASH = ["FLASH",3];
lime_graphics_RendererType.FLASH.toString = $estr;
lime_graphics_RendererType.FLASH.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CAIRO = ["CAIRO",4];
lime_graphics_RendererType.CAIRO.toString = $estr;
lime_graphics_RendererType.CAIRO.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CONSOLE = ["CONSOLE",5];
lime_graphics_RendererType.CONSOLE.toString = $estr;
lime_graphics_RendererType.CONSOLE.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CUSTOM = ["CUSTOM",6];
lime_graphics_RendererType.CUSTOM.toString = $estr;
lime_graphics_RendererType.CUSTOM.__enum__ = lime_graphics_RendererType;
var lime_graphics_cairo_Cairo = function(surface) {
	var tmp = surface != null;
};
$hxClasses["lime.graphics.cairo.Cairo"] = lime_graphics_cairo_Cairo;
lime_graphics_cairo_Cairo.__name__ = ["lime","graphics","cairo","Cairo"];
lime_graphics_cairo_Cairo.__properties__ = {get_versionString:"get_versionString",get_version:"get_version"};
lime_graphics_cairo_Cairo.version = null;
lime_graphics_cairo_Cairo.versionString = null;
lime_graphics_cairo_Cairo.get_version = function() {
	return 0;
};
lime_graphics_cairo_Cairo.get_versionString = function() {
	return "";
};
lime_graphics_cairo_Cairo.prototype = {
	arc: function(xc,yc,radius,angle1,angle2) {
	}
	,arcNegative: function(xc,yc,radius,angle1,angle2) {
	}
	,clip: function() {
	}
	,clipExtents: function(x1,y1,x2,y2) {
	}
	,clipPreserve: function() {
	}
	,closePath: function() {
	}
	,copyPage: function() {
	}
	,curveTo: function(x1,y1,x2,y2,x3,y3) {
	}
	,fill: function() {
	}
	,fillExtents: function(x1,y1,x2,y2) {
	}
	,fillPreserve: function() {
	}
	,identityMatrix: function() {
	}
	,inClip: function(x,y) {
		return false;
	}
	,inFill: function(x,y) {
		return false;
	}
	,inStroke: function(x,y) {
		return false;
	}
	,lineTo: function(x,y) {
	}
	,moveTo: function(x,y) {
	}
	,mask: function(pattern) {
	}
	,maskSurface: function(surface,x,y) {
	}
	,newPath: function() {
	}
	,paint: function() {
	}
	,paintWithAlpha: function(alpha) {
	}
	,popGroup: function() {
		return null;
	}
	,popGroupToSource: function() {
	}
	,pushGroup: function() {
	}
	,pushGroupWithContent: function(content) {
	}
	,recreate: function(surface) {
	}
	,rectangle: function(x,y,width,height) {
	}
	,relCurveTo: function(dx1,dy1,dx2,dy2,dx3,dy3) {
	}
	,relLineTo: function(dx,dy) {
	}
	,relMoveTo: function(dx,dy) {
	}
	,resetClip: function() {
	}
	,restore: function() {
	}
	,save: function() {
	}
	,setFontSize: function(size) {
	}
	,setSourceRGB: function(r,g,b) {
	}
	,setSourceRGBA: function(r,g,b,a) {
	}
	,setSourceSurface: function(surface,x,y) {
	}
	,showPage: function() {
	}
	,showText: function(utf8) {
	}
	,status: function() {
		return 0;
	}
	,stroke: function() {
	}
	,strokeExtents: function(x1,y1,x2,y2) {
	}
	,strokePreserve: function() {
	}
	,transform: function(matrix) {
	}
	,rotate: function(amount) {
	}
	,scale: function(x,y) {
	}
	,translate: function(x,y) {
	}
	,get_antialias: function() {
		return 0;
	}
	,set_antialias: function(value) {
		return value;
	}
	,get_currentPoint: function() {
		return null;
	}
	,get_dash: function() {
		return [];
	}
	,set_dash: function(value) {
		return value;
	}
	,get_dashCount: function() {
		return 0;
	}
	,get_fillRule: function() {
		return 0;
	}
	,set_fillRule: function(value) {
		return value;
	}
	,get_fontFace: function() {
		return 0;
	}
	,set_fontFace: function(value) {
		return value;
	}
	,get_fontOptions: function() {
		return null;
	}
	,set_fontOptions: function(value) {
		return value;
	}
	,get_groupTarget: function() {
		return 0;
	}
	,get_hasCurrentPoint: function() {
		return false;
	}
	,get_lineCap: function() {
		return 0;
	}
	,set_lineCap: function(value) {
		return value;
	}
	,get_lineJoin: function() {
		return 0;
	}
	,set_lineJoin: function(value) {
		return value;
	}
	,get_lineWidth: function() {
		return 0;
	}
	,set_lineWidth: function(value) {
		return value;
	}
	,get_matrix: function() {
		return null;
	}
	,set_matrix: function(value) {
		return value;
	}
	,get_miterLimit: function() {
		return 0;
	}
	,set_miterLimit: function(value) {
		return value;
	}
	,get_operator: function() {
		return 0;
	}
	,set_operator: function(value) {
		return value;
	}
	,get_source: function() {
		return 0;
	}
	,set_source: function(value) {
		return value;
	}
	,get_target: function() {
		return 0;
	}
	,get_tolerance: function() {
		return 0;
	}
	,set_tolerance: function(value) {
		return value;
	}
	,__class__: lime_graphics_cairo_Cairo
	,__properties__: {set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_operator:"set_operator",get_operator:"get_operator",set_miterLimit:"set_miterLimit",get_miterLimit:"get_miterLimit",set_matrix:"set_matrix",get_matrix:"get_matrix",set_lineWidth:"set_lineWidth",get_lineWidth:"get_lineWidth",set_lineJoin:"set_lineJoin",get_lineJoin:"get_lineJoin",set_lineCap:"set_lineCap",get_lineCap:"get_lineCap",get_hasCurrentPoint:"get_hasCurrentPoint",get_groupTarget:"get_groupTarget",set_fontOptions:"set_fontOptions",get_fontOptions:"get_fontOptions",set_fontFace:"set_fontFace",get_fontFace:"get_fontFace",set_fillRule:"set_fillRule",get_fillRule:"get_fillRule",get_dashCount:"get_dashCount",set_dash:"set_dash",get_dash:"get_dash",get_currentPoint:"get_currentPoint",set_antialias:"set_antialias",get_antialias:"get_antialias"}
};
var lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFTFontFace.CairoFTFontFace_Impl_"] = lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$;
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFTFontFace","CairoFTFontFace_Impl_"];
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$._new = function() {
	var this1 = 0;
	return this1;
};
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.create = function(face,loadFlags) {
	return 0;
};
var lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFontFace.CairoFontFace_Impl_"] = lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$;
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFontFace","CairoFontFace_Impl_"];
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$._new = function() {
	var this1 = null;
	return this1;
};
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$.status = function(this1) {
	return 0;
};
var lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFontOptions.CairoFontOptions_Impl_"] = lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$;
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFontOptions","CairoFontOptions_Impl_"];
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.__properties__ = {set_subpixelOrder:"set_subpixelOrder",get_subpixelOrder:"get_subpixelOrder",set_hintStyle:"set_hintStyle",get_hintStyle:"get_hintStyle",set_hintMetrics:"set_hintMetrics",get_hintMetrics:"get_hintMetrics",set_antialias:"set_antialias",get_antialias:"get_antialias"};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$._new = function() {
	var this1 = null;
	return this1;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_antialias = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_antialias = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_hintMetrics = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_hintMetrics = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_hintStyle = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_hintStyle = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_subpixelOrder = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_subpixelOrder = function(this1,value) {
	return value;
};
var lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_"] = lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$;
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoImageSurface","CairoImageSurface_Impl_"];
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.__properties__ = {get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$._new = function(format,width,height) {
	var this1 = 0;
	return this1;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.create = function(data,format,width,height,stride) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.fromImage = function(image) {
	return null;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_data = function(this1) {
	return null;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_format = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_height = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_stride = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_width = function(this1) {
	return 0;
};
var lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoPattern.CairoPattern_Impl_"] = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$;
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoPattern","CairoPattern_Impl_"];
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.__properties__ = {set_matrix:"set_matrix",get_matrix:"get_matrix",set_filter:"set_filter",get_filter:"get_filter",set_extend:"set_extend",get_extend:"get_extend",get_colorStopCount:"get_colorStopCount"};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$._new = function(handle) {
	var this1 = handle;
	return this1;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGB = function(this1,offset,r,g,b) {
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGBA = function(this1,offset,r,g,b,a) {
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface = function(surface) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createLinear = function(x0,y0,x1,y1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRadial = function(cx0,cy0,radius0,cx1,cy1,radius1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGB = function(r,g,b) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA = function(r,g,b,a) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_colorStopCount = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_extend = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_extend = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_filter = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_matrix = function(this1) {
	return null;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix = function(this1,value) {
	return value;
};
var lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"] = lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$;
lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];
lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush = function(this1) {
};
var lime_graphics_console_IndexBuffer = function() {
};
$hxClasses["lime.graphics.console.IndexBuffer"] = lime_graphics_console_IndexBuffer;
lime_graphics_console_IndexBuffer.__name__ = ["lime","graphics","console","IndexBuffer"];
lime_graphics_console_IndexBuffer.prototype = {
	__class__: lime_graphics_console_IndexBuffer
};
var lime_graphics_console_Primitive = $hxClasses["lime.graphics.console.Primitive"] = { __ename__ : ["lime","graphics","console","Primitive"], __constructs__ : ["Point","Line","LineStrip","Triangle","TriangleStrip"] };
lime_graphics_console_Primitive.Point = ["Point",0];
lime_graphics_console_Primitive.Point.toString = $estr;
lime_graphics_console_Primitive.Point.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.Line = ["Line",1];
lime_graphics_console_Primitive.Line.toString = $estr;
lime_graphics_console_Primitive.Line.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.LineStrip = ["LineStrip",2];
lime_graphics_console_Primitive.LineStrip.toString = $estr;
lime_graphics_console_Primitive.LineStrip.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.Triangle = ["Triangle",3];
lime_graphics_console_Primitive.Triangle.toString = $estr;
lime_graphics_console_Primitive.Triangle.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.TriangleStrip = ["TriangleStrip",4];
lime_graphics_console_Primitive.TriangleStrip.toString = $estr;
lime_graphics_console_Primitive.TriangleStrip.__enum__ = lime_graphics_console_Primitive;
var lime_graphics_console_Shader = function() {
};
$hxClasses["lime.graphics.console.Shader"] = lime_graphics_console_Shader;
lime_graphics_console_Shader.__name__ = ["lime","graphics","console","Shader"];
lime_graphics_console_Shader.prototype = {
	__class__: lime_graphics_console_Shader
};
var lime_graphics_console_VertexBuffer = function() {
};
$hxClasses["lime.graphics.console.VertexBuffer"] = lime_graphics_console_VertexBuffer;
lime_graphics_console_VertexBuffer.__name__ = ["lime","graphics","console","VertexBuffer"];
lime_graphics_console_VertexBuffer.prototype = {
	lock: function() {
		return new lime_graphics_console_VertexOutput();
	}
	,unlock: function() {
	}
	,__class__: lime_graphics_console_VertexBuffer
};
var lime_graphics_console_VertexOutput = function() {
};
$hxClasses["lime.graphics.console.VertexOutput"] = lime_graphics_console_VertexOutput;
lime_graphics_console_VertexOutput.__name__ = ["lime","graphics","console","VertexOutput"];
lime_graphics_console_VertexOutput.prototype = {
	vec2: function(x,y) {
	}
	,vec3: function(x,y,z) {
	}
	,color: function(r,g,b,a) {
	}
	,__class__: lime_graphics_console_VertexOutput
};
var lime_graphics_format_BMP = function() { };
$hxClasses["lime.graphics.format.BMP"] = lime_graphics_format_BMP;
lime_graphics_format_BMP.__name__ = ["lime","graphics","format","BMP"];
lime_graphics_format_BMP.encode = function(image,type) {
	if(image.get_premultiplied() || image.get_format() != 0) {
		image = image.clone();
		image.set_premultiplied(false);
		image.set_format(0);
	}
	if(type == null) {
		type = lime_graphics_format_BMPType.RGB;
	}
	var fileHeaderLength = 14;
	var infoHeaderLength = 40;
	var pixelValuesLength = image.width * image.height * 4;
	if(type != null) {
		switch(type[1]) {
		case 0:
			pixelValuesLength = image.width * 3 + image.width * 3 % 4 + image.height * 3 + image.height * 3;
			break;
		case 1:
			infoHeaderLength = 108;
			break;
		case 2:
			fileHeaderLength = 0;
			pixelValuesLength += image.width * image.height;
			break;
		}
	}
	var data = new haxe_io_Bytes(new ArrayBuffer(fileHeaderLength + infoHeaderLength + pixelValuesLength));
	var position = 0;
	if(fileHeaderLength > 0) {
		data.b[position++] = 66;
		data.b[position++] = 77;
		data.setInt32(position,data.length);
		position += 4;
		data.setUInt16(position,0);
		position += 2;
		data.setUInt16(position,0);
		position += 2;
		data.setInt32(position,fileHeaderLength + infoHeaderLength);
		position += 4;
	}
	data.setInt32(position,infoHeaderLength);
	position += 4;
	data.setInt32(position,image.width);
	position += 4;
	data.setInt32(position,type == lime_graphics_format_BMPType.ICO ? image.height * 2 : image.height);
	position += 4;
	data.setUInt16(position,1);
	position += 2;
	data.setUInt16(position,type == lime_graphics_format_BMPType.RGB ? 24 : 32);
	position += 2;
	data.setInt32(position,type == lime_graphics_format_BMPType.BITFIELD ? 3 : 0);
	position += 4;
	data.setInt32(position,pixelValuesLength);
	position += 4;
	data.setInt32(position,11824);
	position += 4;
	data.setInt32(position,11824);
	position += 4;
	data.setInt32(position,0);
	position += 4;
	data.setInt32(position,0);
	position += 4;
	if(type == lime_graphics_format_BMPType.BITFIELD) {
		data.setInt32(position,16711680);
		position += 4;
		data.setInt32(position,65280);
		position += 4;
		data.setInt32(position,255);
		position += 4;
		data.setInt32(position,-16777216);
		position += 4;
		data.b[position++] = 32;
		data.b[position++] = 110;
		data.b[position++] = 105;
		data.b[position++] = 87;
		var _g = 0;
		while(_g < 48) {
			var i = _g++;
			data.b[position++] = 0;
		}
	}
	var pixels = image.getPixels(new lime_math_Rectangle(0,0,image.width,image.height),1);
	var readPosition = 0;
	var a;
	var r;
	var g;
	var b;
	if(type != null) {
		switch(type[1]) {
		case 0:
			var _g1 = 0;
			var _g2 = image.height;
			while(_g1 < _g2) {
				var y = _g1++;
				readPosition = (image.height - 1 - y) * 4 * image.width;
				var _g3 = 0;
				var _g21 = image.width;
				while(_g3 < _g21) {
					var x = _g3++;
					a = pixels.b[readPosition++];
					r = pixels.b[readPosition++];
					g = pixels.b[readPosition++];
					b = pixels.b[readPosition++];
					data.b[position++] = b & 255;
					data.b[position++] = g & 255;
					data.b[position++] = r & 255;
				}
				var _g31 = 0;
				var _g22 = image.width * 3 % 4;
				while(_g31 < _g22) {
					var i1 = _g31++;
					data.b[position++] = 0;
				}
			}
			break;
		case 1:
			var _g11 = 0;
			var _g4 = image.height;
			while(_g11 < _g4) {
				var y1 = _g11++;
				readPosition = (image.height - 1 - y1) * 4 * image.width;
				var _g32 = 0;
				var _g23 = image.width;
				while(_g32 < _g23) {
					var x1 = _g32++;
					a = pixels.b[readPosition++];
					r = pixels.b[readPosition++];
					g = pixels.b[readPosition++];
					b = pixels.b[readPosition++];
					data.b[position++] = b & 255;
					data.b[position++] = g & 255;
					data.b[position++] = r & 255;
					data.b[position++] = a & 255;
				}
			}
			break;
		case 2:
			var andMask = new haxe_io_Bytes(new ArrayBuffer(image.width * image.height));
			var maskPosition = 0;
			var _g12 = 0;
			var _g5 = image.height;
			while(_g12 < _g5) {
				var y2 = _g12++;
				readPosition = (image.height - 1 - y2) * 4 * image.width;
				var _g33 = 0;
				var _g24 = image.width;
				while(_g33 < _g24) {
					var x2 = _g33++;
					a = pixels.b[readPosition++];
					r = pixels.b[readPosition++];
					g = pixels.b[readPosition++];
					b = pixels.b[readPosition++];
					data.b[position++] = b & 255;
					data.b[position++] = g & 255;
					data.b[position++] = r & 255;
					data.b[position++] = a & 255;
					andMask.b[maskPosition++] = 0;
				}
			}
			data.blit(position,andMask,0,image.width * image.height);
			break;
		}
	}
	return data;
};
var lime_graphics_format_BMPType = $hxClasses["lime.graphics.format.BMPType"] = { __ename__ : ["lime","graphics","format","BMPType"], __constructs__ : ["RGB","BITFIELD","ICO"] };
lime_graphics_format_BMPType.RGB = ["RGB",0];
lime_graphics_format_BMPType.RGB.toString = $estr;
lime_graphics_format_BMPType.RGB.__enum__ = lime_graphics_format_BMPType;
lime_graphics_format_BMPType.BITFIELD = ["BITFIELD",1];
lime_graphics_format_BMPType.BITFIELD.toString = $estr;
lime_graphics_format_BMPType.BITFIELD.__enum__ = lime_graphics_format_BMPType;
lime_graphics_format_BMPType.ICO = ["ICO",2];
lime_graphics_format_BMPType.ICO.toString = $estr;
lime_graphics_format_BMPType.ICO.__enum__ = lime_graphics_format_BMPType;
var lime_graphics_format_JPEG = function() { };
$hxClasses["lime.graphics.format.JPEG"] = lime_graphics_format_JPEG;
lime_graphics_format_JPEG.__name__ = ["lime","graphics","format","JPEG"];
lime_graphics_format_JPEG.decodeBytes = function(bytes,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_JPEG.decodeFile = function(path,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_JPEG.encode = function(image,quality) {
	if(image.get_premultiplied() || image.get_format() != 0) {
		image = image.clone();
		image.set_premultiplied(false);
		image.set_format(0);
	}
	lime_graphics_utils_ImageCanvasUtil.sync(image,false);
	if(image.buffer.__srcCanvas != null) {
		var data = image.buffer.__srcCanvas.toDataURL("image/jpeg",quality / 100);
		var buffer = window.atob(data.split(";base64,")[1]);
		var bytes = new haxe_io_Bytes(new ArrayBuffer(buffer.length));
		var _g1 = 0;
		var _g = buffer.length;
		while(_g1 < _g) {
			var i = _g1++;
			var v = HxOverrides.cca(buffer,i);
			bytes.b[i] = v & 255;
		}
		return bytes;
	}
	return null;
};
var lime_graphics_format_PNG = function() { };
$hxClasses["lime.graphics.format.PNG"] = lime_graphics_format_PNG;
lime_graphics_format_PNG.__name__ = ["lime","graphics","format","PNG"];
lime_graphics_format_PNG.decodeBytes = function(bytes,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_PNG.decodeFile = function(path,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_PNG.encode = function(image) {
	if(image.get_premultiplied() || image.get_format() != 0) {
		image = image.clone();
		image.set_premultiplied(false);
		image.set_format(0);
	}
	return null;
};
var lime_graphics_opengl_GL = function() { };
$hxClasses["lime.graphics.opengl.GL"] = lime_graphics_opengl_GL;
lime_graphics_opengl_GL.__name__ = ["lime","graphics","opengl","GL"];
lime_graphics_opengl_GL.__properties__ = {get_version:"get_version"};
lime_graphics_opengl_GL.version = null;
lime_graphics_opengl_GL.context = null;
lime_graphics_opengl_GL.activeTexture = function(texture) {
	lime_graphics_opengl_GL.context.activeTexture(texture);
};
lime_graphics_opengl_GL.attachShader = function(program,shader) {
	lime_graphics_opengl_GL.context.attachShader(program,shader);
};
lime_graphics_opengl_GL.bindAttribLocation = function(program,index,name) {
	lime_graphics_opengl_GL.context.bindAttribLocation(program,index,name);
};
lime_graphics_opengl_GL.bindBuffer = function(target,buffer) {
	lime_graphics_opengl_GL.context.bindBuffer(target,buffer);
};
lime_graphics_opengl_GL.bindFramebuffer = function(target,framebuffer) {
	lime_graphics_opengl_GL.context.bindFramebuffer(target,framebuffer);
};
lime_graphics_opengl_GL.bindRenderbuffer = function(target,renderbuffer) {
	lime_graphics_opengl_GL.context.bindRenderbuffer(target,renderbuffer);
};
lime_graphics_opengl_GL.bindTexture = function(target,texture) {
	lime_graphics_opengl_GL.context.bindTexture(target,texture);
};
lime_graphics_opengl_GL.blendColor = function(red,green,blue,alpha) {
	lime_graphics_opengl_GL.context.blendColor(red,green,blue,alpha);
};
lime_graphics_opengl_GL.blendEquation = function(mode) {
	lime_graphics_opengl_GL.context.blendEquation(mode);
};
lime_graphics_opengl_GL.blendEquationSeparate = function(modeRGB,modeAlpha) {
	lime_graphics_opengl_GL.context.blendEquationSeparate(modeRGB,modeAlpha);
};
lime_graphics_opengl_GL.blendFunc = function(sfactor,dfactor) {
	lime_graphics_opengl_GL.context.blendFunc(sfactor,dfactor);
};
lime_graphics_opengl_GL.blendFuncSeparate = function(srcRGB,dstRGB,srcAlpha,dstAlpha) {
	lime_graphics_opengl_GL.context.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
};
lime_graphics_opengl_GL.bufferData = function(target,data,usage) {
	lime_graphics_opengl_GL.context.bufferData(target,data,usage);
};
lime_graphics_opengl_GL.bufferSubData = function(target,offset,data) {
	lime_graphics_opengl_GL.context.bufferSubData(target,offset,data);
};
lime_graphics_opengl_GL.checkFramebufferStatus = function(target) {
	return lime_graphics_opengl_GL.context.checkFramebufferStatus(target);
};
lime_graphics_opengl_GL.clear = function(mask) {
	lime_graphics_opengl_GL.context.clear(mask);
};
lime_graphics_opengl_GL.clearColor = function(red,green,blue,alpha) {
	lime_graphics_opengl_GL.context.clearColor(red,green,blue,alpha);
};
lime_graphics_opengl_GL.clearDepth = function(depth) {
	lime_graphics_opengl_GL.context.clearDepth(depth);
};
lime_graphics_opengl_GL.clearStencil = function(s) {
	lime_graphics_opengl_GL.context.clearStencil(s);
};
lime_graphics_opengl_GL.colorMask = function(red,green,blue,alpha) {
	lime_graphics_opengl_GL.context.colorMask(red,green,blue,alpha);
};
lime_graphics_opengl_GL.compileShader = function(shader) {
	lime_graphics_opengl_GL.context.compileShader(shader);
};
lime_graphics_opengl_GL.compressedTexImage2D = function(target,level,internalformat,width,height,border,data) {
	lime_graphics_opengl_GL.context.compressedTexImage2D(target,level,internalformat,width,height,border,data);
};
lime_graphics_opengl_GL.compressedTexSubImage2D = function(target,level,xoffset,yoffset,width,height,format,data) {
	lime_graphics_opengl_GL.context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,data);
};
lime_graphics_opengl_GL.copyTexImage2D = function(target,level,internalformat,x,y,width,height,border) {
	lime_graphics_opengl_GL.context.copyTexImage2D(target,level,internalformat,x,y,width,height,border);
};
lime_graphics_opengl_GL.copyTexSubImage2D = function(target,level,xoffset,yoffset,x,y,width,height) {
	lime_graphics_opengl_GL.context.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
};
lime_graphics_opengl_GL.createBuffer = function() {
	return lime_graphics_opengl_GL.context.createBuffer();
};
lime_graphics_opengl_GL.createFramebuffer = function() {
	return lime_graphics_opengl_GL.context.createFramebuffer();
};
lime_graphics_opengl_GL.createProgram = function() {
	return lime_graphics_opengl_GL.context.createProgram();
};
lime_graphics_opengl_GL.createRenderbuffer = function() {
	return lime_graphics_opengl_GL.context.createRenderbuffer();
};
lime_graphics_opengl_GL.createShader = function(type) {
	return lime_graphics_opengl_GL.context.createShader(type);
};
lime_graphics_opengl_GL.createTexture = function() {
	return lime_graphics_opengl_GL.context.createTexture();
};
lime_graphics_opengl_GL.cullFace = function(mode) {
	lime_graphics_opengl_GL.context.cullFace(mode);
};
lime_graphics_opengl_GL.deleteBuffer = function(buffer) {
	lime_graphics_opengl_GL.context.deleteBuffer(buffer);
};
lime_graphics_opengl_GL.deleteFramebuffer = function(framebuffer) {
	lime_graphics_opengl_GL.context.deleteFramebuffer(framebuffer);
};
lime_graphics_opengl_GL.deleteProgram = function(program) {
	lime_graphics_opengl_GL.context.deleteProgram(program);
};
lime_graphics_opengl_GL.deleteRenderbuffer = function(renderbuffer) {
	lime_graphics_opengl_GL.context.deleteRenderbuffer(renderbuffer);
};
lime_graphics_opengl_GL.deleteShader = function(shader) {
	lime_graphics_opengl_GL.context.deleteShader(shader);
};
lime_graphics_opengl_GL.deleteTexture = function(texture) {
	lime_graphics_opengl_GL.context.deleteTexture(texture);
};
lime_graphics_opengl_GL.depthFunc = function(func) {
	lime_graphics_opengl_GL.context.depthFunc(func);
};
lime_graphics_opengl_GL.depthMask = function(flag) {
	lime_graphics_opengl_GL.context.depthMask(flag);
};
lime_graphics_opengl_GL.depthRange = function(zNear,zFar) {
	lime_graphics_opengl_GL.context.depthRange(zNear,zFar);
};
lime_graphics_opengl_GL.detachShader = function(program,shader) {
	lime_graphics_opengl_GL.context.detachShader(program,shader);
};
lime_graphics_opengl_GL.disable = function(cap) {
	lime_graphics_opengl_GL.context.disable(cap);
};
lime_graphics_opengl_GL.disableVertexAttribArray = function(index) {
	lime_graphics_opengl_GL.context.disableVertexAttribArray(index);
};
lime_graphics_opengl_GL.drawArrays = function(mode,first,count) {
	lime_graphics_opengl_GL.context.drawArrays(mode,first,count);
};
lime_graphics_opengl_GL.drawElements = function(mode,count,type,offset) {
	lime_graphics_opengl_GL.context.drawElements(mode,count,type,offset);
};
lime_graphics_opengl_GL.enable = function(cap) {
	lime_graphics_opengl_GL.context.enable(cap);
};
lime_graphics_opengl_GL.enableVertexAttribArray = function(index) {
	lime_graphics_opengl_GL.context.enableVertexAttribArray(index);
};
lime_graphics_opengl_GL.finish = function() {
	lime_graphics_opengl_GL.context.finish();
};
lime_graphics_opengl_GL.flush = function() {
	lime_graphics_opengl_GL.context.flush();
};
lime_graphics_opengl_GL.framebufferRenderbuffer = function(target,attachment,renderbuffertarget,renderbuffer) {
	lime_graphics_opengl_GL.context.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
};
lime_graphics_opengl_GL.framebufferTexture2D = function(target,attachment,textarget,texture,level) {
	lime_graphics_opengl_GL.context.framebufferTexture2D(target,attachment,textarget,texture,level);
};
lime_graphics_opengl_GL.frontFace = function(mode) {
	lime_graphics_opengl_GL.context.frontFace(mode);
};
lime_graphics_opengl_GL.generateMipmap = function(target) {
	lime_graphics_opengl_GL.context.generateMipmap(target);
};
lime_graphics_opengl_GL.getActiveAttrib = function(program,index) {
	return lime_graphics_opengl_GL.context.getActiveAttrib(program,index);
};
lime_graphics_opengl_GL.getActiveUniform = function(program,index) {
	return lime_graphics_opengl_GL.context.getActiveUniform(program,index);
};
lime_graphics_opengl_GL.getAttachedShaders = function(program) {
	return lime_graphics_opengl_GL.context.getAttachedShaders(program);
};
lime_graphics_opengl_GL.getAttribLocation = function(program,name) {
	return lime_graphics_opengl_GL.context.getAttribLocation(program,name);
};
lime_graphics_opengl_GL.getBufferParameter = function(target,pname) {
	return lime_graphics_opengl_GL.context.getBufferParameter(target,pname);
};
lime_graphics_opengl_GL.getContextAttributes = function() {
	return lime_graphics_opengl_GL.context.getContextAttributes();
};
lime_graphics_opengl_GL.getError = function() {
	return lime_graphics_opengl_GL.context.getError();
};
lime_graphics_opengl_GL.getExtension = function(name) {
	return lime_graphics_opengl_GL.context.getExtension(name);
};
lime_graphics_opengl_GL.getFramebufferAttachmentParameter = function(target,attachment,pname) {
	return lime_graphics_opengl_GL.context.getFramebufferAttachmentParameter(target,attachment,pname);
};
lime_graphics_opengl_GL.getParameter = function(pname) {
	return lime_graphics_opengl_GL.context.getParameter(pname);
};
lime_graphics_opengl_GL.getProgramInfoLog = function(program) {
	return lime_graphics_opengl_GL.context.getProgramInfoLog(program);
};
lime_graphics_opengl_GL.getProgramParameter = function(program,pname) {
	return lime_graphics_opengl_GL.context.getProgramParameter(program,pname);
};
lime_graphics_opengl_GL.getRenderbufferParameter = function(target,pname) {
	return lime_graphics_opengl_GL.context.getRenderbufferParameter(target,pname);
};
lime_graphics_opengl_GL.getShaderInfoLog = function(shader) {
	return lime_graphics_opengl_GL.context.getShaderInfoLog(shader);
};
lime_graphics_opengl_GL.getShaderParameter = function(shader,pname) {
	return lime_graphics_opengl_GL.context.getShaderParameter(shader,pname);
};
lime_graphics_opengl_GL.getShaderPrecisionFormat = function(shadertype,precisiontype) {
	return lime_graphics_opengl_GL.context.getShaderPrecisionFormat(shadertype,precisiontype);
};
lime_graphics_opengl_GL.getShaderSource = function(shader) {
	return lime_graphics_opengl_GL.context.getShaderSource(shader);
};
lime_graphics_opengl_GL.getSupportedExtensions = function() {
	return lime_graphics_opengl_GL.context.getSupportedExtensions();
};
lime_graphics_opengl_GL.getTexParameter = function(target,pname) {
	return lime_graphics_opengl_GL.context.getTexParameter(target,pname);
};
lime_graphics_opengl_GL.getUniform = function(program,location) {
	return lime_graphics_opengl_GL.context.getUniform(program,location);
};
lime_graphics_opengl_GL.getUniformLocation = function(program,name) {
	return lime_graphics_opengl_GL.context.getUniformLocation(program,name);
};
lime_graphics_opengl_GL.getVertexAttrib = function(index,pname) {
	return lime_graphics_opengl_GL.context.getVertexAttrib(index,pname);
};
lime_graphics_opengl_GL.getVertexAttribOffset = function(index,pname) {
	return lime_graphics_opengl_GL.context.getVertexAttribOffset(index,pname);
};
lime_graphics_opengl_GL.hint = function(target,mode) {
	lime_graphics_opengl_GL.context.hint(target,mode);
};
lime_graphics_opengl_GL.isBuffer = function(buffer) {
	return lime_graphics_opengl_GL.context.isBuffer(buffer);
};
lime_graphics_opengl_GL.isContextLost = function() {
	return lime_graphics_opengl_GL.context.isContextLost();
};
lime_graphics_opengl_GL.isEnabled = function(cap) {
	return lime_graphics_opengl_GL.context.isEnabled(cap);
};
lime_graphics_opengl_GL.isFramebuffer = function(framebuffer) {
	return lime_graphics_opengl_GL.context.isFramebuffer(framebuffer);
};
lime_graphics_opengl_GL.isProgram = function(program) {
	return lime_graphics_opengl_GL.context.isProgram(program);
};
lime_graphics_opengl_GL.isRenderbuffer = function(renderbuffer) {
	return lime_graphics_opengl_GL.context.isRenderbuffer(renderbuffer);
};
lime_graphics_opengl_GL.isShader = function(shader) {
	return lime_graphics_opengl_GL.context.isShader(shader);
};
lime_graphics_opengl_GL.isTexture = function(texture) {
	return lime_graphics_opengl_GL.context.isTexture(texture);
};
lime_graphics_opengl_GL.lineWidth = function(width) {
	lime_graphics_opengl_GL.context.lineWidth(width);
};
lime_graphics_opengl_GL.linkProgram = function(program) {
	lime_graphics_opengl_GL.context.linkProgram(program);
};
lime_graphics_opengl_GL.pixelStorei = function(pname,param) {
	lime_graphics_opengl_GL.context.pixelStorei(pname,param);
};
lime_graphics_opengl_GL.polygonOffset = function(factor,units) {
	lime_graphics_opengl_GL.context.polygonOffset(factor,units);
};
lime_graphics_opengl_GL.readPixels = function(x,y,width,height,format,type,pixels) {
	lime_graphics_opengl_GL.context.readPixels(x,y,width,height,format,type,pixels);
};
lime_graphics_opengl_GL.renderbufferStorage = function(target,internalformat,width,height) {
	lime_graphics_opengl_GL.context.renderbufferStorage(target,internalformat,width,height);
};
lime_graphics_opengl_GL.sampleCoverage = function(value,invert) {
	lime_graphics_opengl_GL.context.sampleCoverage(value,invert);
};
lime_graphics_opengl_GL.scissor = function(x,y,width,height) {
	lime_graphics_opengl_GL.context.scissor(x,y,width,height);
};
lime_graphics_opengl_GL.shaderSource = function(shader,source) {
	lime_graphics_opengl_GL.context.shaderSource(shader,source);
};
lime_graphics_opengl_GL.stencilFunc = function(func,ref,mask) {
	lime_graphics_opengl_GL.context.stencilFunc(func,ref,mask);
};
lime_graphics_opengl_GL.stencilFuncSeparate = function(face,func,ref,mask) {
	lime_graphics_opengl_GL.context.stencilFuncSeparate(face,func,ref,mask);
};
lime_graphics_opengl_GL.stencilMask = function(mask) {
	lime_graphics_opengl_GL.context.stencilMask(mask);
};
lime_graphics_opengl_GL.stencilMaskSeparate = function(face,mask) {
	lime_graphics_opengl_GL.context.stencilMaskSeparate(face,mask);
};
lime_graphics_opengl_GL.stencilOp = function(fail,zfail,zpass) {
	lime_graphics_opengl_GL.context.stencilOp(fail,zfail,zpass);
};
lime_graphics_opengl_GL.stencilOpSeparate = function(face,fail,zfail,zpass) {
	lime_graphics_opengl_GL.context.stencilOpSeparate(face,fail,zfail,zpass);
};
lime_graphics_opengl_GL.texImage2D = function(target,level,internalformat,width,height,border,format,type,pixels) {
	lime_graphics_opengl_GL.context.texImage2D(target,level,internalformat,width,height,border,format,type,pixels);
};
lime_graphics_opengl_GL.texParameterf = function(target,pname,param) {
	lime_graphics_opengl_GL.context.texParameterf(target,pname,param);
};
lime_graphics_opengl_GL.texParameteri = function(target,pname,param) {
	lime_graphics_opengl_GL.context.texParameteri(target,pname,param);
};
lime_graphics_opengl_GL.texSubImage2D = function(target,level,xoffset,yoffset,width,height,format,type,pixels) {
	lime_graphics_opengl_GL.context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
};
lime_graphics_opengl_GL.uniform1f = function(location,x) {
	lime_graphics_opengl_GL.context.uniform1f(location,x);
};
lime_graphics_opengl_GL.uniform1fv = function(location,x) {
	lime_graphics_opengl_GL.context.uniform1fv(location,x);
};
lime_graphics_opengl_GL.uniform1i = function(location,x) {
	lime_graphics_opengl_GL.context.uniform1i(location,x);
};
lime_graphics_opengl_GL.uniform1iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform1iv(location,v);
};
lime_graphics_opengl_GL.uniform2f = function(location,x,y) {
	lime_graphics_opengl_GL.context.uniform2f(location,x,y);
};
lime_graphics_opengl_GL.uniform2fv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform2fv(location,v);
};
lime_graphics_opengl_GL.uniform2i = function(location,x,y) {
	lime_graphics_opengl_GL.context.uniform2i(location,x,y);
};
lime_graphics_opengl_GL.uniform2iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform2iv(location,v);
};
lime_graphics_opengl_GL.uniform3f = function(location,x,y,z) {
	lime_graphics_opengl_GL.context.uniform3f(location,x,y,z);
};
lime_graphics_opengl_GL.uniform3fv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform3fv(location,v);
};
lime_graphics_opengl_GL.uniform3i = function(location,x,y,z) {
	lime_graphics_opengl_GL.context.uniform3i(location,x,y,z);
};
lime_graphics_opengl_GL.uniform3iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform3iv(location,v);
};
lime_graphics_opengl_GL.uniform4f = function(location,x,y,z,w) {
	lime_graphics_opengl_GL.context.uniform4f(location,x,y,z,w);
};
lime_graphics_opengl_GL.uniform4fv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform4fv(location,v);
};
lime_graphics_opengl_GL.uniform4i = function(location,x,y,z,w) {
	lime_graphics_opengl_GL.context.uniform4i(location,x,y,z,w);
};
lime_graphics_opengl_GL.uniform4iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform4iv(location,v);
};
lime_graphics_opengl_GL.uniformMatrix2fv = function(location,transpose,v) {
	lime_graphics_opengl_GL.context.uniformMatrix2fv(location,transpose,v);
};
lime_graphics_opengl_GL.uniformMatrix3fv = function(location,transpose,v) {
	lime_graphics_opengl_GL.context.uniformMatrix3fv(location,transpose,v);
};
lime_graphics_opengl_GL.uniformMatrix4fv = function(location,transpose,v) {
	lime_graphics_opengl_GL.context.uniformMatrix4fv(location,transpose,v);
};
lime_graphics_opengl_GL.useProgram = function(program) {
	lime_graphics_opengl_GL.context.useProgram(program);
};
lime_graphics_opengl_GL.validateProgram = function(program) {
	lime_graphics_opengl_GL.context.validateProgram(program);
};
lime_graphics_opengl_GL.vertexAttrib1f = function(indx,x) {
	lime_graphics_opengl_GL.context.vertexAttrib1f(indx,x);
};
lime_graphics_opengl_GL.vertexAttrib1fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib1fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttrib2f = function(indx,x,y) {
	lime_graphics_opengl_GL.context.vertexAttrib2f(indx,x,y);
};
lime_graphics_opengl_GL.vertexAttrib2fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib2fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttrib3f = function(indx,x,y,z) {
	lime_graphics_opengl_GL.context.vertexAttrib3f(indx,x,y,z);
};
lime_graphics_opengl_GL.vertexAttrib3fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib3fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttrib4f = function(indx,x,y,z,w) {
	lime_graphics_opengl_GL.context.vertexAttrib4f(indx,x,y,z,w);
};
lime_graphics_opengl_GL.vertexAttrib4fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib4fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttribPointer = function(indx,size,type,normalized,stride,offset) {
	lime_graphics_opengl_GL.context.vertexAttribPointer(indx,size,type,normalized,stride,offset);
};
lime_graphics_opengl_GL.viewport = function(x,y,width,height) {
	lime_graphics_opengl_GL.context.viewport(x,y,width,height);
};
lime_graphics_opengl_GL.get_version = function() {
	return 2;
};
var lime_graphics_utils_ImageCanvasUtil = function() { };
$hxClasses["lime.graphics.utils.ImageCanvasUtil"] = lime_graphics_utils_ImageCanvasUtil;
lime_graphics_utils_ImageCanvasUtil.__name__ = ["lime","graphics","utils","ImageCanvasUtil"];
lime_graphics_utils_ImageCanvasUtil.colorTransform = function(image,rect,colorMatrix) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.colorTransform(image,rect,colorMatrix);
};
lime_graphics_utils_ImageCanvasUtil.convertToCanvas = function(image) {
	var buffer = image.buffer;
	if(buffer.__srcImage != null) {
		if(buffer.__srcCanvas == null) {
			lime_graphics_utils_ImageCanvasUtil.createCanvas(image,buffer.__srcImage.width,buffer.__srcImage.height);
			buffer.__srcContext.drawImage(buffer.__srcImage,0,0);
		}
		buffer.__srcImage = null;
	} else if(buffer.data != null && buffer.__srcCanvas == null) {
		lime_graphics_utils_ImageCanvasUtil.createCanvas(image,buffer.width,buffer.height);
		lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	} else if(buffer.data == null && buffer.__srcImageData != null) {
		buffer.data = buffer.__srcImageData.data;
	}
};
lime_graphics_utils_ImageCanvasUtil.convertToData = function(image) {
	if(image.buffer.data == null) {
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
		lime_graphics_utils_ImageCanvasUtil.sync(image,false);
		lime_graphics_utils_ImageCanvasUtil.createImageData(image);
		image.buffer.__srcCanvas = null;
		image.buffer.__srcContext = null;
	}
};
lime_graphics_utils_ImageCanvasUtil.copyChannel = function(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.createImageData(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.copyChannel(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
};
lime_graphics_utils_ImageCanvasUtil.copyPixels = function(image,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
	if(mergeAlpha == null) {
		mergeAlpha = false;
	}
	if(destPoint == null || destPoint.x >= image.width || destPoint.y >= image.height || sourceRect == null || sourceRect.width < 1 || sourceRect.height < 1) {
		return;
	}
	if(alphaImage != null && alphaImage.get_transparent()) {
		if(alphaPoint == null) {
			alphaPoint = new lime_math_Vector2();
		}
		var tempData = image.clone();
		tempData.copyChannel(alphaImage,new lime_math_Rectangle(alphaPoint.x,alphaPoint.y,sourceRect.width,sourceRect.height),new lime_math_Vector2(sourceRect.x,sourceRect.y),lime_graphics_ImageChannel.ALPHA,lime_graphics_ImageChannel.ALPHA);
		sourceImage = tempData;
	}
	lime_graphics_utils_ImageCanvasUtil.sync(image,true);
	if(!mergeAlpha) {
		if(image.get_transparent() && sourceImage.get_transparent()) {
			image.buffer.__srcContext.clearRect(destPoint.x + image.offsetX,destPoint.y + image.offsetY,sourceRect.width + image.offsetX,sourceRect.height + image.offsetY);
		}
	}
	lime_graphics_utils_ImageCanvasUtil.sync(sourceImage,false);
	if(sourceImage.buffer.get_src() != null) {
		image.buffer.__srcContext.drawImage(sourceImage.buffer.get_src(),sourceRect.x + sourceImage.offsetX | 0,sourceRect.y + sourceImage.offsetY | 0,sourceRect.width | 0,sourceRect.height | 0,destPoint.x + image.offsetX | 0,destPoint.y + image.offsetY | 0,sourceRect.width | 0,sourceRect.height | 0);
	}
};
lime_graphics_utils_ImageCanvasUtil.createCanvas = function(image,width,height) {
	var buffer = image.buffer;
	if(buffer.__srcCanvas == null) {
		buffer.__srcCanvas = window.document.createElement("canvas");
		buffer.__srcCanvas.width = width;
		buffer.__srcCanvas.height = height;
		if(!image.get_transparent()) {
			if(!image.get_transparent()) {
				buffer.__srcCanvas.setAttribute("moz-opaque","true");
			}
			buffer.__srcContext = buffer.__srcCanvas.getContext ("2d", { alpha: false });
		} else {
			buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
		}
		buffer.__srcContext.mozImageSmoothingEnabled = false;
		buffer.__srcContext.msImageSmoothingEnabled = false;
		buffer.__srcContext.imageSmoothingEnabled = false;
	}
};
lime_graphics_utils_ImageCanvasUtil.createImageData = function(image) {
	var buffer = image.buffer;
	if(buffer.__srcImageData == null) {
		if(buffer.data == null) {
			buffer.__srcImageData = buffer.__srcContext.getImageData(0,0,buffer.width,buffer.height);
		} else {
			buffer.__srcImageData = buffer.__srcContext.createImageData(buffer.width,buffer.height);
			buffer.__srcImageData.data.set(buffer.data);
		}
		var elements = buffer.__srcImageData.data.buffer;
		var this1;
		if(elements != null) {
			this1 = new Uint8Array(elements);
		} else {
			this1 = null;
		}
		buffer.data = this1;
	}
};
lime_graphics_utils_ImageCanvasUtil.fillRect = function(image,rect,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.sync(image,true);
	if(rect.x == 0 && rect.y == 0 && rect.width == image.width && rect.height == image.height) {
		if(image.get_transparent() && (color & 255) == 0) {
			image.buffer.__srcCanvas.width = image.buffer.width;
			return;
		}
	}
	var r;
	var g;
	var b;
	var a;
	if(format == 1) {
		r = color >> 16 & 255;
		g = color >> 8 & 255;
		b = color & 255;
		if(image.get_transparent()) {
			a = color >> 24 & 255;
		} else {
			a = 255;
		}
	} else {
		r = color >> 24 & 255;
		g = color >> 16 & 255;
		b = color >> 8 & 255;
		if(image.get_transparent()) {
			a = color & 255;
		} else {
			a = 255;
		}
	}
	image.buffer.__srcContext.fillStyle = "rgba(" + r + ", " + g + ", " + b + ", " + a / 255 + ")";
	image.buffer.__srcContext.fillRect(rect.x + image.offsetX,rect.y + image.offsetY,rect.width + image.offsetX,rect.height + image.offsetY);
};
lime_graphics_utils_ImageCanvasUtil.floodFill = function(image,x,y,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.floodFill(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixel = function(image,x,y,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	return lime_graphics_utils_ImageDataUtil.getPixel(image,x,y,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixel32 = function(image,x,y,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	return lime_graphics_utils_ImageDataUtil.getPixel32(image,x,y,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixels = function(image,rect,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	return lime_graphics_utils_ImageDataUtil.getPixels(image,rect,format);
};
lime_graphics_utils_ImageCanvasUtil.merge = function(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.createImageData(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.merge(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
};
lime_graphics_utils_ImageCanvasUtil.resize = function(image,newWidth,newHeight) {
	var buffer = image.buffer;
	if(buffer.__srcCanvas == null) {
		lime_graphics_utils_ImageCanvasUtil.createCanvas(image,newWidth,newHeight);
		buffer.__srcContext.drawImage(buffer.get_src(),0,0,newWidth,newHeight);
	} else {
		lime_graphics_utils_ImageCanvasUtil.sync(image,true);
		var sourceCanvas = buffer.__srcCanvas;
		buffer.__srcCanvas = null;
		lime_graphics_utils_ImageCanvasUtil.createCanvas(image,newWidth,newHeight);
		buffer.__srcContext.drawImage(sourceCanvas,0,0,newWidth,newHeight);
	}
};
lime_graphics_utils_ImageCanvasUtil.scroll = function(image,x,y) {
	if(x % image.width == 0 && y % image.height == 0) {
		return;
	}
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.sync(image,true);
	image.buffer.__srcContext.clearRect(x,y,image.width,image.height);
	image.buffer.__srcContext.drawImage(image.buffer.__srcCanvas,x,y);
};
lime_graphics_utils_ImageCanvasUtil.setPixel = function(image,x,y,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.setPixel(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.setPixel32 = function(image,x,y,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.setPixel32(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.setPixels = function(image,rect,bytes,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.setPixels(image,rect,bytes,format);
};
lime_graphics_utils_ImageCanvasUtil.sync = function(image,clear) {
	if(image.dirty && image.buffer.__srcImageData != null && image.type != lime_graphics_ImageType.DATA) {
		image.buffer.__srcContext.putImageData(image.buffer.__srcImageData,0,0);
		image.buffer.data = null;
		image.dirty = false;
	}
	if(clear) {
		image.buffer.__srcImageData = null;
		image.buffer.data = null;
	}
};
var lime_graphics_utils_ImageDataUtil = function() { };
$hxClasses["lime.graphics.utils.ImageDataUtil"] = lime_graphics_utils_ImageDataUtil;
lime_graphics_utils_ImageDataUtil.__name__ = ["lime","graphics","utils","ImageDataUtil"];
lime_graphics_utils_ImageDataUtil.colorTransform = function(image,rect,colorMatrix) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var format = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var alphaTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable(colorMatrix);
	var redTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable(colorMatrix);
	var greenTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable(colorMatrix);
	var blueTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable(colorMatrix);
	var row;
	var offset;
	var pixel;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		var y = _g1++;
		row = dataView.offset + dataView.stride * y;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			offset = row + x * 4;
			switch(format) {
			case 0:
				pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
				break;
			case 1:
				pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
				break;
			case 2:
				pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
				break;
			}
			if(premultiplied) {
				if((pixel & 255) != 0 && (pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
					pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
				}
			}
			pixel = (redTable[pixel >> 24 & 255] & 255) << 24 | (greenTable[pixel >> 16 & 255] & 255) << 16 | (blueTable[pixel >> 8 & 255] & 255) << 8 | alphaTable[pixel & 255] & 255;
			if(premultiplied) {
				if((pixel & 255) == 0) {
					if(pixel != 0) {
						pixel = 0;
					}
				} else if((pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
					pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
				}
			}
			switch(format) {
			case 0:
				data[offset] = pixel >> 24 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 8 & 255;
				data[offset + 3] = pixel & 255;
				break;
			case 1:
				data[offset] = pixel & 255;
				data[offset + 1] = pixel >> 24 & 255;
				data[offset + 2] = pixel >> 16 & 255;
				data[offset + 3] = pixel >> 8 & 255;
				break;
			case 2:
				data[offset] = pixel >> 8 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 24 & 255;
				data[offset + 3] = pixel & 255;
				break;
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.copyChannel = function(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
	var destIdx;
	switch(destChannel[1]) {
	case 0:
		destIdx = 0;
		break;
	case 1:
		destIdx = 1;
		break;
	case 2:
		destIdx = 2;
		break;
	case 3:
		destIdx = 3;
		break;
	}
	var srcIdx;
	switch(sourceChannel[1]) {
	case 0:
		srcIdx = 0;
		break;
	case 1:
		srcIdx = 1;
		break;
	case 2:
		srcIdx = 2;
		break;
	case 3:
		srcIdx = 3;
		break;
	}
	var srcData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	if(srcData == null || destData == null) {
		return;
	}
	var srcView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,srcView.width,srcView.height));
	var srcFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var srcPremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var srcPosition;
	var destPosition;
	var srcPixel;
	var destPixel;
	var value = 0;
	var _g1 = 0;
	var _g = destView.height;
	while(_g1 < _g) {
		var y = _g1++;
		srcPosition = srcView.offset + srcView.stride * y;
		destPosition = destView.offset + destView.stride * y;
		var _g3 = 0;
		var _g2 = destView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			switch(srcFormat) {
			case 0:
				srcPixel = (srcData[srcPosition] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition + 2] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			case 1:
				srcPixel = (srcData[srcPosition + 1] & 255) << 24 | (srcData[srcPosition + 2] & 255) << 16 | (srcData[srcPosition + 3] & 255) << 8 | srcData[srcPosition] & 255;
				break;
			case 2:
				srcPixel = (srcData[srcPosition + 2] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			}
			if(srcPremultiplied) {
				if((srcPixel & 255) != 0 && (srcPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (srcPixel & 255);
					srcPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | srcPixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			case 1:
				destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
				break;
			case 2:
				destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			}
			if(destPremultiplied) {
				if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
					destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
				}
			}
			switch(srcIdx) {
			case 0:
				value = srcPixel >> 24 & 255;
				break;
			case 1:
				value = srcPixel >> 16 & 255;
				break;
			case 2:
				value = srcPixel >> 8 & 255;
				break;
			case 3:
				value = srcPixel & 255;
				break;
			}
			switch(destIdx) {
			case 0:
				destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
				break;
			case 1:
				destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
				break;
			case 2:
				destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value & 255) << 8 | destPixel & 255 & 255;
				break;
			case 3:
				destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value & 255;
				break;
			}
			if(destPremultiplied) {
				if((destPixel & 255) == 0) {
					if(destPixel != 0) {
						destPixel = 0;
					}
				} else if((destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
					destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destData[destPosition] = destPixel >> 24 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 8 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			case 1:
				destData[destPosition] = destPixel & 255;
				destData[destPosition + 1] = destPixel >> 24 & 255;
				destData[destPosition + 2] = destPixel >> 16 & 255;
				destData[destPosition + 3] = destPixel >> 8 & 255;
				break;
			case 2:
				destData[destPosition] = destPixel >> 8 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 24 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			}
			srcPosition += 4;
			destPosition += 4;
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.copyPixels = function(image,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
	if(mergeAlpha == null) {
		mergeAlpha = false;
	}
	var sourceData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	if(sourceData == null || destData == null) {
		return;
	}
	var sourceView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,sourceView.width,sourceView.height));
	var sourceFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var sourcePremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var sourcePosition;
	var destPosition;
	var sourcePixel;
	if(!mergeAlpha || !sourceImage.get_transparent()) {
		var _g1 = 0;
		var _g = destView.height;
		while(_g1 < _g) {
			var y = _g1++;
			sourcePosition = sourceView.offset + sourceView.stride * y;
			destPosition = destView.offset + destView.stride * y;
			var _g3 = 0;
			var _g2 = destView.width;
			while(_g3 < _g2) {
				var x = _g3++;
				switch(sourceFormat) {
				case 0:
					sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
					break;
				case 1:
					sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
					break;
				case 2:
					sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
					break;
				}
				if(sourcePremultiplied) {
					if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
						sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
					}
				}
				if(destPremultiplied) {
					if((sourcePixel & 255) == 0) {
						if(sourcePixel != 0) {
							sourcePixel = 0;
						}
					} else if((sourcePixel & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[sourcePixel & 255];
						sourcePixel = ((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | sourcePixel & 255 & 255;
					}
				}
				switch(destFormat) {
				case 0:
					destData[destPosition] = sourcePixel >> 24 & 255;
					destData[destPosition + 1] = sourcePixel >> 16 & 255;
					destData[destPosition + 2] = sourcePixel >> 8 & 255;
					destData[destPosition + 3] = sourcePixel & 255;
					break;
				case 1:
					destData[destPosition] = sourcePixel & 255;
					destData[destPosition + 1] = sourcePixel >> 24 & 255;
					destData[destPosition + 2] = sourcePixel >> 16 & 255;
					destData[destPosition + 3] = sourcePixel >> 8 & 255;
					break;
				case 2:
					destData[destPosition] = sourcePixel >> 8 & 255;
					destData[destPosition + 1] = sourcePixel >> 16 & 255;
					destData[destPosition + 2] = sourcePixel >> 24 & 255;
					destData[destPosition + 3] = sourcePixel & 255;
					break;
				}
				sourcePosition += 4;
				destPosition += 4;
			}
		}
	} else {
		var sourceAlpha;
		var destAlpha;
		var oneMinusSourceAlpha;
		var blendAlpha;
		var destPixel;
		if(alphaImage == null) {
			var _g11 = 0;
			var _g4 = destView.height;
			while(_g11 < _g4) {
				var y1 = _g11++;
				sourcePosition = sourceView.offset + sourceView.stride * y1;
				destPosition = destView.offset + destView.stride * y1;
				var _g31 = 0;
				var _g21 = destView.width;
				while(_g31 < _g21) {
					var x1 = _g31++;
					switch(sourceFormat) {
					case 0:
						sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					case 1:
						sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
						break;
					case 2:
						sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					}
					if(sourcePremultiplied) {
						if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
							sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					case 1:
						destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
						break;
					case 2:
						destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					}
					if(destPremultiplied) {
						if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
							destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
						}
					}
					sourceAlpha = (sourcePixel & 255) / 255.0;
					destAlpha = (destPixel & 255) / 255.0;
					oneMinusSourceAlpha = 1 - sourceAlpha;
					blendAlpha = sourceAlpha + destAlpha * oneMinusSourceAlpha;
					if(blendAlpha == 0) {
						destPixel = 0;
					} else {
						var value = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 24 & 255) * sourceAlpha + (destPixel >> 24 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)];
						destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						var value1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 16 & 255) * sourceAlpha + (destPixel >> 16 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)];
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value1 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						var value2 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 8 & 255) * sourceAlpha + (destPixel >> 8 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)];
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value2 & 255) << 8 | destPixel & 255 & 255;
						var value3 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(blendAlpha * 255.0)];
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value3 & 255;
					}
					if(destPremultiplied) {
						if((destPixel & 255) == 0) {
							if(destPixel != 0) {
								destPixel = 0;
							}
						} else if((destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
							destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destData[destPosition] = destPixel >> 24 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 8 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					case 1:
						destData[destPosition] = destPixel & 255;
						destData[destPosition + 1] = destPixel >> 24 & 255;
						destData[destPosition + 2] = destPixel >> 16 & 255;
						destData[destPosition + 3] = destPixel >> 8 & 255;
						break;
					case 2:
						destData[destPosition] = destPixel >> 8 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 24 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					}
					sourcePosition += 4;
					destPosition += 4;
				}
			}
		} else {
			if(alphaPoint == null) {
				alphaPoint = new lime_math_Vector2();
			}
			var alphaData = alphaImage.buffer.data;
			var alphaFormat = alphaImage.buffer.format;
			var alphaPremultiplied = alphaImage.buffer.premultiplied;
			var alphaView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(alphaImage,new lime_math_Rectangle(alphaPoint.x,alphaPoint.y,destView.width,destView.height));
			var alphaPosition;
			var alphaPixel;
			var _g12 = 0;
			var _g5 = alphaView.height;
			while(_g12 < _g5) {
				var y2 = _g12++;
				sourcePosition = sourceView.offset + sourceView.stride * y2;
				destPosition = destView.offset + destView.stride * y2;
				alphaPosition = alphaView.offset + alphaView.stride * y2;
				var _g32 = 0;
				var _g22 = alphaView.width;
				while(_g32 < _g22) {
					var x2 = _g32++;
					switch(sourceFormat) {
					case 0:
						sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					case 1:
						sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
						break;
					case 2:
						sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					}
					if(sourcePremultiplied) {
						if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
							sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					case 1:
						destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
						break;
					case 2:
						destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					}
					if(destPremultiplied) {
						if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
							destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
						}
					}
					switch(alphaFormat) {
					case 0:
						alphaPixel = (alphaData[alphaPosition] & 255) << 24 | (alphaData[alphaPosition + 1] & 255) << 16 | (alphaData[alphaPosition + 2] & 255) << 8 | alphaData[alphaPosition + 3] & 255;
						break;
					case 1:
						alphaPixel = (alphaData[alphaPosition + 1] & 255) << 24 | (alphaData[alphaPosition + 2] & 255) << 16 | (alphaData[alphaPosition + 3] & 255) << 8 | alphaData[alphaPosition] & 255;
						break;
					case 2:
						alphaPixel = (alphaData[alphaPosition + 2] & 255) << 24 | (alphaData[alphaPosition + 1] & 255) << 16 | (alphaData[alphaPosition] & 255) << 8 | alphaData[alphaPosition + 3] & 255;
						break;
					}
					if(alphaPremultiplied) {
						if((alphaPixel & 255) != 0 && (alphaPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (alphaPixel & 255);
							alphaPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((alphaPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((alphaPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((alphaPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | alphaPixel & 255 & 255;
						}
					}
					sourceAlpha = (alphaPixel & 255) / 255;
					destAlpha = (destPixel & 255) / 255;
					oneMinusSourceAlpha = 1 - sourceAlpha;
					blendAlpha = sourceAlpha + destAlpha * oneMinusSourceAlpha;
					if(blendAlpha == 0) {
						destPixel = 0;
					} else {
						var value4 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 24 & 255) * sourceAlpha + (destPixel >> 24 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)];
						destPixel = (value4 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						var value5 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 16 & 255) * sourceAlpha + (destPixel >> 16 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)];
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value5 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						var value6 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 8 & 255) * sourceAlpha + (destPixel >> 8 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)];
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value6 & 255) << 8 | destPixel & 255 & 255;
						var value7 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(blendAlpha * 255.0)];
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value7 & 255;
					}
					if(destPremultiplied) {
						if((destPixel & 255) == 0) {
							if(destPixel != 0) {
								destPixel = 0;
							}
						} else if((destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
							destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destData[destPosition] = destPixel >> 24 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 8 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					case 1:
						destData[destPosition] = destPixel & 255;
						destData[destPosition + 1] = destPixel >> 24 & 255;
						destData[destPosition + 2] = destPixel >> 16 & 255;
						destData[destPosition + 3] = destPixel >> 8 & 255;
						break;
					case 2:
						destData[destPosition] = destPixel >> 8 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 24 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					}
					sourcePosition += 4;
					destPosition += 4;
				}
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.fillRect = function(image,rect,color,format) {
	var fillColor;
	switch(format) {
	case 1:
		var argb = color;
		var this1 = 0;
		var rgba = this1;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		fillColor = rgba;
		break;
	case 2:
		var bgra = color;
		var this2 = 0;
		var rgba1 = this2;
		rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		fillColor = rgba1;
		break;
	default:
		fillColor = color;
	}
	if(!image.get_transparent()) {
		fillColor = (fillColor >> 24 & 255 & 255) << 24 | (fillColor >> 16 & 255 & 255) << 16 | (fillColor >> 8 & 255 & 255) << 8 | 255;
	}
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var format1 = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var row;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		var y = _g1++;
		row = dataView.offset + dataView.stride * y;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			var offset = row + x * 4;
			if(premultiplied) {
				if((fillColor & 255) == 0) {
					if(fillColor != 0) {
						fillColor = 0;
					}
				} else if((fillColor & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[fillColor & 255];
					fillColor = ((fillColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((fillColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((fillColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | fillColor & 255 & 255;
				}
			}
			switch(format1) {
			case 0:
				data[offset] = fillColor >> 24 & 255;
				data[offset + 1] = fillColor >> 16 & 255;
				data[offset + 2] = fillColor >> 8 & 255;
				data[offset + 3] = fillColor & 255;
				break;
			case 1:
				data[offset] = fillColor & 255;
				data[offset + 1] = fillColor >> 24 & 255;
				data[offset + 2] = fillColor >> 16 & 255;
				data[offset + 3] = fillColor >> 8 & 255;
				break;
			case 2:
				data[offset] = fillColor >> 8 & 255;
				data[offset + 1] = fillColor >> 16 & 255;
				data[offset + 2] = fillColor >> 24 & 255;
				data[offset + 3] = fillColor & 255;
				break;
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.floodFill = function(image,x,y,color,format) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	if(format == 1) {
		color = (color & 16777215) << 8 | color >> 24 & 255;
	}
	var format1 = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var fillColor = color;
	var hitColor;
	var offset = (y + image.offsetY) * (image.buffer.width * 4) + (x + image.offsetX) * 4;
	switch(format1) {
	case 0:
		hitColor = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		hitColor = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		hitColor = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((hitColor & 255) != 0 && (hitColor & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (hitColor & 255);
			hitColor = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((hitColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((hitColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((hitColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | hitColor & 255 & 255;
		}
	}
	if(!image.get_transparent()) {
		fillColor = (fillColor >> 24 & 255 & 255) << 24 | (fillColor >> 16 & 255 & 255) << 16 | (fillColor >> 8 & 255 & 255) << 8 | 255;
		hitColor = (hitColor >> 24 & 255 & 255) << 24 | (hitColor >> 16 & 255 & 255) << 16 | (hitColor >> 8 & 255 & 255) << 8 | 255;
	}
	if(fillColor == hitColor) {
		return;
	}
	var dx = [0,-1,1,0];
	var dy = [-1,0,0,1];
	var minX = -image.offsetX;
	var minY = -image.offsetY;
	var maxX = minX + image.width;
	var maxY = minY + image.height;
	var queue = [];
	queue.push(x);
	queue.push(y);
	var curPointX;
	var curPointY;
	var nextPointX;
	var nextPointY;
	var nextPointOffset;
	var readColor;
	while(queue.length > 0) {
		curPointY = queue.pop();
		curPointX = queue.pop();
		var _g = 0;
		while(_g < 4) {
			var i = _g++;
			nextPointX = curPointX + dx[i];
			nextPointY = curPointY + dy[i];
			if(nextPointX < minX || nextPointY < minY || nextPointX >= maxX || nextPointY >= maxY) {
				continue;
			}
			nextPointOffset = (nextPointY * image.width + nextPointX) * 4;
			switch(format1) {
			case 0:
				readColor = (data[nextPointOffset] & 255) << 24 | (data[nextPointOffset + 1] & 255) << 16 | (data[nextPointOffset + 2] & 255) << 8 | data[nextPointOffset + 3] & 255;
				break;
			case 1:
				readColor = (data[nextPointOffset + 1] & 255) << 24 | (data[nextPointOffset + 2] & 255) << 16 | (data[nextPointOffset + 3] & 255) << 8 | data[nextPointOffset] & 255;
				break;
			case 2:
				readColor = (data[nextPointOffset + 2] & 255) << 24 | (data[nextPointOffset + 1] & 255) << 16 | (data[nextPointOffset] & 255) << 8 | data[nextPointOffset + 3] & 255;
				break;
			}
			if(premultiplied) {
				if((readColor & 255) != 0 && (readColor & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (readColor & 255);
					readColor = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((readColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((readColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((readColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | readColor & 255 & 255;
				}
			}
			if(readColor == hitColor) {
				if(premultiplied) {
					if((fillColor & 255) == 0) {
						if(fillColor != 0) {
							fillColor = 0;
						}
					} else if((fillColor & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[fillColor & 255];
						fillColor = ((fillColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((fillColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((fillColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | fillColor & 255 & 255;
					}
				}
				switch(format1) {
				case 0:
					data[nextPointOffset] = fillColor >> 24 & 255;
					data[nextPointOffset + 1] = fillColor >> 16 & 255;
					data[nextPointOffset + 2] = fillColor >> 8 & 255;
					data[nextPointOffset + 3] = fillColor & 255;
					break;
				case 1:
					data[nextPointOffset] = fillColor & 255;
					data[nextPointOffset + 1] = fillColor >> 24 & 255;
					data[nextPointOffset + 2] = fillColor >> 16 & 255;
					data[nextPointOffset + 3] = fillColor >> 8 & 255;
					break;
				case 2:
					data[nextPointOffset] = fillColor >> 8 & 255;
					data[nextPointOffset + 1] = fillColor >> 16 & 255;
					data[nextPointOffset + 2] = fillColor >> 24 & 255;
					data[nextPointOffset + 3] = fillColor & 255;
					break;
				}
				queue.push(nextPointX);
				queue.push(nextPointY);
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.getColorBoundsRect = function(image,mask,color,findColor,format) {
	if(findColor == null) {
		findColor = true;
	}
	var left = image.width + 1;
	var right = 0;
	var top = image.height + 1;
	var bottom = 0;
	var _color;
	var _mask;
	switch(format) {
	case 1:
		var argb = color;
		var this1 = 0;
		var rgba = this1;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		_color = rgba;
		var argb1 = mask;
		var this2 = 0;
		var rgba1 = this2;
		rgba1 = (argb1 >> 16 & 255 & 255) << 24 | (argb1 >> 8 & 255 & 255) << 16 | (argb1 & 255 & 255) << 8 | argb1 >> 24 & 255 & 255;
		_mask = rgba1;
		break;
	case 2:
		var bgra = color;
		var this3 = 0;
		var rgba2 = this3;
		rgba2 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		_color = rgba2;
		var bgra1 = mask;
		var this4 = 0;
		var rgba3 = this4;
		rgba3 = (bgra1 >> 8 & 255 & 255) << 24 | (bgra1 >> 16 & 255 & 255) << 16 | (bgra1 >> 24 & 255 & 255) << 8 | bgra1 & 255 & 255;
		_mask = rgba3;
		break;
	default:
		_color = color;
		_mask = mask;
	}
	if(!image.get_transparent()) {
		_color = (_color >> 24 & 255 & 255) << 24 | (_color >> 16 & 255 & 255) << 16 | (_color >> 8 & 255 & 255) << 8 | 255;
		_mask = (_mask >> 24 & 255 & 255) << 24 | (_mask >> 16 & 255 & 255) << 16 | (_mask >> 8 & 255 & 255) << 8 | 255;
	}
	var pixel;
	var hit;
	var _g1 = 0;
	var _g = image.width;
	while(_g1 < _g) {
		var x = _g1++;
		hit = false;
		var _g3 = 0;
		var _g2 = image.height;
		while(_g3 < _g2) {
			var y = _g3++;
			pixel = image.getPixel32(x,y,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(x < left) {
					left = x;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var ix;
	var _g11 = 0;
	var _g4 = image.width;
	while(_g11 < _g4) {
		var x1 = _g11++;
		ix = image.width - 1 - x1;
		hit = false;
		var _g31 = 0;
		var _g21 = image.height;
		while(_g31 < _g21) {
			var y1 = _g31++;
			pixel = image.getPixel32(ix,y1,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(ix > right) {
					right = ix;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var _g12 = 0;
	var _g5 = image.height;
	while(_g12 < _g5) {
		var y2 = _g12++;
		hit = false;
		var _g32 = 0;
		var _g22 = image.width;
		while(_g32 < _g22) {
			var x2 = _g32++;
			pixel = image.getPixel32(x2,y2,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(y2 < top) {
					top = y2;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var iy;
	var _g13 = 0;
	var _g6 = image.height;
	while(_g13 < _g6) {
		var y3 = _g13++;
		iy = image.height - 1 - y3;
		hit = false;
		var _g33 = 0;
		var _g23 = image.width;
		while(_g33 < _g23) {
			var x3 = _g33++;
			pixel = image.getPixel32(x3,iy,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(iy > bottom) {
					bottom = iy;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var w = right - left;
	var h = bottom - top;
	if(w > 0) {
		++w;
	}
	if(h > 0) {
		++h;
	}
	if(w < 0) {
		w = 0;
	}
	if(h < 0) {
		h = 0;
	}
	if(left == right) {
		w = 1;
	}
	if(top == bottom) {
		h = 1;
	}
	if(left > image.width) {
		left = 0;
	}
	if(top > image.height) {
		top = 0;
	}
	return new lime_math_Rectangle(left,top,w,h);
};
lime_graphics_utils_ImageDataUtil.getPixel = function(image,x,y,format) {
	var pixel;
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	var premultiplied = image.buffer.premultiplied;
	switch(image.buffer.format) {
	case 0:
		pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((pixel & 255) != 0 && (pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
			pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
		}
	}
	pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 0;
	switch(format) {
	case 1:
		var this1 = 0;
		var argb = this1;
		argb = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
		return argb;
	case 2:
		var this2 = 0;
		var bgra = this2;
		bgra = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
		return bgra;
	default:
		return pixel;
	}
};
lime_graphics_utils_ImageDataUtil.getPixel32 = function(image,x,y,format) {
	var pixel;
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	var premultiplied = image.buffer.premultiplied;
	switch(image.buffer.format) {
	case 0:
		pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((pixel & 255) != 0 && (pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
			pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
		}
	}
	switch(format) {
	case 1:
		var this1 = 0;
		var argb = this1;
		argb = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
		return argb;
	case 2:
		var this2 = 0;
		var bgra = this2;
		bgra = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
		return bgra;
	default:
		return pixel;
	}
};
lime_graphics_utils_ImageDataUtil.getPixels = function(image,rect,format) {
	if(image.buffer.data == null) {
		return null;
	}
	var length = rect.width * rect.height | 0;
	var bytes = new haxe_io_Bytes(new ArrayBuffer(length * 4));
	var data = image.buffer.data;
	var sourceFormat = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var position;
	var argb;
	var bgra;
	var pixel;
	var destPosition = 0;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		var y = _g1++;
		position = dataView.offset + dataView.stride * y;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			switch(sourceFormat) {
			case 0:
				pixel = (data[position] & 255) << 24 | (data[position + 1] & 255) << 16 | (data[position + 2] & 255) << 8 | data[position + 3] & 255;
				break;
			case 1:
				pixel = (data[position + 1] & 255) << 24 | (data[position + 2] & 255) << 16 | (data[position + 3] & 255) << 8 | data[position] & 255;
				break;
			case 2:
				pixel = (data[position + 2] & 255) << 24 | (data[position + 1] & 255) << 16 | (data[position] & 255) << 8 | data[position + 3] & 255;
				break;
			}
			if(premultiplied) {
				if((pixel & 255) != 0 && (pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
					pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
				}
			}
			switch(format) {
			case 1:
				var this1 = 0;
				var argb1 = this1;
				argb1 = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
				argb = argb1;
				pixel = argb;
				break;
			case 2:
				var this2 = 0;
				var bgra1 = this2;
				bgra1 = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
				bgra = bgra1;
				pixel = bgra;
				break;
			default:
			}
			bytes.b[destPosition++] = pixel >> 24 & 255 & 255;
			bytes.b[destPosition++] = pixel >> 16 & 255 & 255;
			bytes.b[destPosition++] = pixel >> 8 & 255 & 255;
			bytes.b[destPosition++] = pixel & 255 & 255;
			position += 4;
		}
	}
	return bytes;
};
lime_graphics_utils_ImageDataUtil.merge = function(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
	if(image.buffer.data == null || sourceImage.buffer.data == null) {
		return;
	}
	var sourceView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,sourceView.width,sourceView.height));
	var sourceData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	var sourceFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var sourcePremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var sourcePosition;
	var destPosition;
	var sourcePixel;
	var destPixel;
	var _g1 = 0;
	var _g = destView.height;
	while(_g1 < _g) {
		var y = _g1++;
		sourcePosition = sourceView.offset + sourceView.stride * y;
		destPosition = destView.offset + destView.stride * y;
		var _g3 = 0;
		var _g2 = destView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			switch(sourceFormat) {
			case 0:
				sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
				break;
			case 1:
				sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
				break;
			case 2:
				sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
				break;
			}
			if(sourcePremultiplied) {
				if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
					sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			case 1:
				destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
				break;
			case 2:
				destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			}
			if(destPremultiplied) {
				if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
					destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
				}
			}
			var value = ((sourcePixel >> 24 & 255) * redMultiplier + (destPixel >> 24 & 255) * (256 - redMultiplier)) / 256 | 0;
			destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
			var value1 = ((sourcePixel >> 16 & 255) * greenMultiplier + (destPixel >> 16 & 255) * (256 - greenMultiplier)) / 256 | 0;
			destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value1 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
			var value2 = ((sourcePixel >> 8 & 255) * blueMultiplier + (destPixel >> 8 & 255) * (256 - blueMultiplier)) / 256 | 0;
			destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value2 & 255) << 8 | destPixel & 255 & 255;
			var value3 = ((sourcePixel & 255) * alphaMultiplier + (destPixel & 255) * (256 - alphaMultiplier)) / 256 | 0;
			destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value3 & 255;
			if(destPremultiplied) {
				if((destPixel & 255) == 0) {
					if(destPixel != 0) {
						destPixel = 0;
					}
				} else if((destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
					destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destData[destPosition] = destPixel >> 24 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 8 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			case 1:
				destData[destPosition] = destPixel & 255;
				destData[destPosition + 1] = destPixel >> 24 & 255;
				destData[destPosition + 2] = destPixel >> 16 & 255;
				destData[destPosition + 3] = destPixel >> 8 & 255;
				break;
			case 2:
				destData[destPosition] = destPixel >> 8 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 24 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			}
			sourcePosition += 4;
			destPosition += 4;
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.multiplyAlpha = function(image) {
	var data = image.buffer.data;
	if(data == null || !image.buffer.transparent) {
		return;
	}
	var format = image.buffer.format;
	var length = data.length / 4 | 0;
	var pixel;
	var _g1 = 0;
	var _g = length;
	while(_g1 < _g) {
		var i = _g1++;
		var offset = i * 4;
		switch(format) {
		case 0:
			pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
			break;
		case 1:
			pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
			break;
		case 2:
			pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
			break;
		}
		var offset1 = i * 4;
		if((pixel & 255) == 0) {
			if(pixel != 0) {
				pixel = 0;
			}
		} else if((pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
			pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
		}
		switch(format) {
		case 0:
			data[offset1] = pixel >> 24 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 8 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		case 1:
			data[offset1] = pixel & 255;
			data[offset1 + 1] = pixel >> 24 & 255;
			data[offset1 + 2] = pixel >> 16 & 255;
			data[offset1 + 3] = pixel >> 8 & 255;
			break;
		case 2:
			data[offset1] = pixel >> 8 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 24 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		}
	}
	image.buffer.premultiplied = true;
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.resize = function(image,newWidth,newHeight) {
	var buffer = image.buffer;
	if(buffer.width == newWidth && buffer.height == newHeight) {
		return;
	}
	var elements = newWidth * newHeight * 4;
	var this1;
	if(elements != null) {
		this1 = new Uint8Array(elements);
	} else {
		this1 = null;
	}
	var newBuffer = new lime_graphics_ImageBuffer(this1,newWidth,newHeight);
	var imageWidth = image.width;
	var imageHeight = image.height;
	var data = image.get_data();
	var newData = newBuffer.data;
	var sourceIndex;
	var sourceIndexX;
	var sourceIndexY;
	var sourceIndexXY;
	var index;
	var sourceX;
	var sourceY;
	var u;
	var v;
	var uRatio;
	var vRatio;
	var uOpposite;
	var vOpposite;
	var _g1 = 0;
	var _g = newHeight;
	while(_g1 < _g) {
		var y = _g1++;
		var _g3 = 0;
		var _g2 = newWidth;
		while(_g3 < _g2) {
			var x = _g3++;
			u = (x + 0.5) / newWidth * imageWidth - 0.5;
			v = (y + 0.5) / newHeight * imageHeight - 0.5;
			sourceX = u | 0;
			sourceY = v | 0;
			sourceIndex = (sourceY * imageWidth + sourceX) * 4;
			if(sourceX < imageWidth - 1) {
				sourceIndexX = sourceIndex + 4;
			} else {
				sourceIndexX = sourceIndex;
			}
			if(sourceY < imageHeight - 1) {
				sourceIndexY = sourceIndex + imageWidth * 4;
			} else {
				sourceIndexY = sourceIndex;
			}
			if(sourceIndexX != sourceIndex) {
				sourceIndexXY = sourceIndexY + 4;
			} else {
				sourceIndexXY = sourceIndexY;
			}
			index = (y * newWidth + x) * 4;
			uRatio = u - sourceX;
			vRatio = v - sourceY;
			uOpposite = 1 - uRatio;
			vOpposite = 1 - vRatio;
			newData[index] = (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY]) * uRatio) * vRatio | 0;
			newData[index + 1] = (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex + 1]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX + 1]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY + 1]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY + 1]) * uRatio) * vRatio | 0;
			newData[index + 2] = (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex + 2]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX + 2]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY + 2]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY + 2]) * uRatio) * vRatio | 0;
			if(data[sourceIndexX + 3] == 0 || data[sourceIndexY + 3] == 0 || data[sourceIndexXY + 3] == 0) {
				newData[index + 3] = 0;
			} else {
				newData[index + 3] = data[sourceIndex + 3];
			}
		}
	}
	buffer.data = newBuffer.data;
	buffer.width = newWidth;
	buffer.height = newHeight;
};
lime_graphics_utils_ImageDataUtil.resizeBuffer = function(image,newWidth,newHeight) {
	var buffer = image.buffer;
	var data = image.get_data();
	var elements = newWidth * newHeight * 4;
	var this1;
	if(elements != null) {
		this1 = new Uint8Array(elements);
	} else {
		this1 = null;
	}
	var newData = this1;
	var sourceIndex;
	var index;
	var _g1 = 0;
	var _g = buffer.height;
	while(_g1 < _g) {
		var y = _g1++;
		var _g3 = 0;
		var _g2 = buffer.width;
		while(_g3 < _g2) {
			var x = _g3++;
			sourceIndex = (y * buffer.width + x) * 4;
			index = (y * newWidth + x) * 4;
			newData[index] = data[sourceIndex];
			newData[index + 1] = data[sourceIndex + 1];
			newData[index + 2] = data[sourceIndex + 2];
			newData[index + 3] = data[sourceIndex + 3];
		}
	}
	buffer.data = newData;
	buffer.width = newWidth;
	buffer.height = newHeight;
};
lime_graphics_utils_ImageDataUtil.setFormat = function(image,format) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var index;
	var a16;
	var length = data.length / 4 | 0;
	var r1;
	var g1;
	var b1;
	var a1;
	var r2;
	var g2;
	var b2;
	var a2;
	var r;
	var g;
	var b;
	var a;
	var _g = image.get_format();
	switch(_g) {
	case 0:
		r1 = 0;
		g1 = 1;
		b1 = 2;
		a1 = 3;
		break;
	case 1:
		r1 = 1;
		g1 = 2;
		b1 = 3;
		a1 = 0;
		break;
	case 2:
		r1 = 2;
		g1 = 1;
		b1 = 0;
		a1 = 3;
		break;
	}
	switch(format) {
	case 0:
		r2 = 0;
		g2 = 1;
		b2 = 2;
		a2 = 3;
		break;
	case 1:
		r2 = 1;
		g2 = 2;
		b2 = 3;
		a2 = 0;
		break;
	case 2:
		r2 = 2;
		g2 = 1;
		b2 = 0;
		a2 = 3;
		break;
	}
	var _g2 = 0;
	var _g1 = length;
	while(_g2 < _g1) {
		var i = _g2++;
		index = i * 4;
		r = data[index + r1];
		g = data[index + g1];
		b = data[index + b1];
		a = data[index + a1];
		data[index + r2] = r;
		data[index + g2] = g;
		data[index + b2] = b;
		data[index + a2] = a;
	}
	image.buffer.format = format;
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.setPixel = function(image,x,y,color,format) {
	var pixel;
	switch(format) {
	case 1:
		var argb = color;
		var this1 = 0;
		var rgba = this1;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		pixel = rgba;
		break;
	case 2:
		var bgra = color;
		var this2 = 0;
		var rgba1 = this2;
		rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		pixel = rgba1;
		break;
	default:
		pixel = color;
	}
	var this3 = 0;
	var source = this3;
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	var premultiplied = image.buffer.premultiplied;
	switch(image.buffer.format) {
	case 0:
		source = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		source = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		source = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((source & 255) != 0 && (source & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (source & 255);
			source = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((source >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((source >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((source >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | source & 255 & 255;
		}
	}
	var value = source & 255;
	pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | value & 255;
	var data1 = image.buffer.data;
	var offset1 = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	if(image.buffer.premultiplied) {
		if((pixel & 255) == 0) {
			if(pixel != 0) {
				pixel = 0;
			}
		} else if((pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
			pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
		}
	}
	switch(image.buffer.format) {
	case 0:
		data1[offset1] = pixel >> 24 & 255;
		data1[offset1 + 1] = pixel >> 16 & 255;
		data1[offset1 + 2] = pixel >> 8 & 255;
		data1[offset1 + 3] = pixel & 255;
		break;
	case 1:
		data1[offset1] = pixel & 255;
		data1[offset1 + 1] = pixel >> 24 & 255;
		data1[offset1 + 2] = pixel >> 16 & 255;
		data1[offset1 + 3] = pixel >> 8 & 255;
		break;
	case 2:
		data1[offset1] = pixel >> 8 & 255;
		data1[offset1 + 1] = pixel >> 16 & 255;
		data1[offset1 + 2] = pixel >> 24 & 255;
		data1[offset1 + 3] = pixel & 255;
		break;
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.setPixel32 = function(image,x,y,color,format) {
	var pixel;
	switch(format) {
	case 1:
		var argb = color;
		var this1 = 0;
		var rgba = this1;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		pixel = rgba;
		break;
	case 2:
		var bgra = color;
		var this2 = 0;
		var rgba1 = this2;
		rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		pixel = rgba1;
		break;
	default:
		pixel = color;
	}
	if(!image.get_transparent()) {
		pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 255;
	}
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	if(image.buffer.premultiplied) {
		if((pixel & 255) == 0) {
			if(pixel != 0) {
				pixel = 0;
			}
		} else if((pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
			pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
		}
	}
	switch(image.buffer.format) {
	case 0:
		data[offset] = pixel >> 24 & 255;
		data[offset + 1] = pixel >> 16 & 255;
		data[offset + 2] = pixel >> 8 & 255;
		data[offset + 3] = pixel & 255;
		break;
	case 1:
		data[offset] = pixel & 255;
		data[offset + 1] = pixel >> 24 & 255;
		data[offset + 2] = pixel >> 16 & 255;
		data[offset + 3] = pixel >> 8 & 255;
		break;
	case 2:
		data[offset] = pixel >> 8 & 255;
		data[offset + 1] = pixel >> 16 & 255;
		data[offset + 2] = pixel >> 24 & 255;
		data[offset + 3] = pixel & 255;
		break;
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.setPixels = function(image,rect,bytes,format) {
	if(image.buffer.data == null) {
		return;
	}
	var data = image.buffer.data;
	var sourceFormat = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var row;
	var color;
	var pixel;
	var transparent = image.get_transparent();
	var dataPosition = 0;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		var y = _g1++;
		row = dataView.offset + dataView.stride * y;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			color = bytes.b[dataPosition + 3] | bytes.b[dataPosition + 2] << 8 | bytes.b[dataPosition + 1] << 16 | bytes.b[dataPosition] << 24;
			dataPosition += 4;
			switch(format) {
			case 1:
				var argb = color;
				var this1 = 0;
				var rgba = this1;
				rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
				pixel = rgba;
				break;
			case 2:
				var bgra = color;
				var this2 = 0;
				var rgba1 = this2;
				rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
				pixel = rgba1;
				break;
			default:
				pixel = color;
			}
			if(!transparent) {
				pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 255;
			}
			var offset = row + x * 4;
			if(premultiplied) {
				if((pixel & 255) == 0) {
					if(pixel != 0) {
						pixel = 0;
					}
				} else if((pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
					pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
				}
			}
			switch(sourceFormat) {
			case 0:
				data[offset] = pixel >> 24 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 8 & 255;
				data[offset + 3] = pixel & 255;
				break;
			case 1:
				data[offset] = pixel & 255;
				data[offset + 1] = pixel >> 24 & 255;
				data[offset + 2] = pixel >> 16 & 255;
				data[offset + 3] = pixel >> 8 & 255;
				break;
			case 2:
				data[offset] = pixel >> 8 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 24 & 255;
				data[offset + 3] = pixel & 255;
				break;
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.threshold = function(image,sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format) {
	var _color;
	var _mask;
	var _threshold;
	switch(format) {
	case 1:
		var argb = color;
		var this1 = 0;
		var rgba = this1;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		_color = rgba;
		var argb1 = mask;
		var this2 = 0;
		var rgba1 = this2;
		rgba1 = (argb1 >> 16 & 255 & 255) << 24 | (argb1 >> 8 & 255 & 255) << 16 | (argb1 & 255 & 255) << 8 | argb1 >> 24 & 255 & 255;
		_mask = rgba1;
		var argb2 = threshold;
		var this3 = 0;
		var rgba2 = this3;
		rgba2 = (argb2 >> 16 & 255 & 255) << 24 | (argb2 >> 8 & 255 & 255) << 16 | (argb2 & 255 & 255) << 8 | argb2 >> 24 & 255 & 255;
		_threshold = rgba2;
		break;
	case 2:
		var bgra = color;
		var this4 = 0;
		var rgba3 = this4;
		rgba3 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		_color = rgba3;
		var bgra1 = mask;
		var this5 = 0;
		var rgba4 = this5;
		rgba4 = (bgra1 >> 8 & 255 & 255) << 24 | (bgra1 >> 16 & 255 & 255) << 16 | (bgra1 >> 24 & 255 & 255) << 8 | bgra1 & 255 & 255;
		_mask = rgba4;
		var bgra2 = threshold;
		var this6 = 0;
		var rgba5 = this6;
		rgba5 = (bgra2 >> 8 & 255 & 255) << 24 | (bgra2 >> 16 & 255 & 255) << 16 | (bgra2 >> 24 & 255 & 255) << 8 | bgra2 & 255 & 255;
		_threshold = rgba5;
		break;
	default:
		_color = color;
		_mask = mask;
		_threshold = threshold;
	}
	var _operation;
	switch(operation) {
	case "!=":
		_operation = 0;
		break;
	case "<":
		_operation = 2;
		break;
	case "<=":
		_operation = 3;
		break;
	case "==":
		_operation = 1;
		break;
	case ">":
		_operation = 4;
		break;
	case ">=":
		_operation = 5;
		break;
	default:
		_operation = -1;
	}
	if(_operation == -1) {
		return 0;
	}
	var srcData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	if(srcData == null || destData == null) {
		return 0;
	}
	var hits = 0;
	var srcView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,srcView.width,srcView.height));
	var srcFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var srcPremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var srcPosition;
	var destPosition;
	var srcPixel;
	var destPixel;
	var pixelMask;
	var test;
	var value;
	var _g1 = 0;
	var _g = destView.height;
	while(_g1 < _g) {
		var y = _g1++;
		srcPosition = srcView.offset + srcView.stride * y;
		destPosition = destView.offset + destView.stride * y;
		var _g3 = 0;
		var _g2 = destView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			switch(srcFormat) {
			case 0:
				srcPixel = (srcData[srcPosition] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition + 2] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			case 1:
				srcPixel = (srcData[srcPosition + 1] & 255) << 24 | (srcData[srcPosition + 2] & 255) << 16 | (srcData[srcPosition + 3] & 255) << 8 | srcData[srcPosition] & 255;
				break;
			case 2:
				srcPixel = (srcData[srcPosition + 2] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			}
			if(srcPremultiplied) {
				if((srcPixel & 255) != 0 && (srcPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (srcPixel & 255);
					srcPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | srcPixel & 255 & 255;
				}
			}
			pixelMask = srcPixel & _mask;
			var tmp1;
			var tmp2;
			tmp1 = pixelMask >> 24 & 255;
			tmp2 = _threshold >> 24 & 255;
			if(tmp1 != tmp2) {
				if(tmp1 > tmp2) {
					value = 1;
				} else {
					value = -1;
				}
			} else {
				tmp1 = pixelMask >> 16 & 255;
				tmp2 = _threshold >> 16 & 255;
				if(tmp1 != tmp2) {
					if(tmp1 > tmp2) {
						value = 1;
					} else {
						value = -1;
					}
				} else {
					tmp1 = pixelMask >> 8 & 255;
					tmp2 = _threshold >> 8 & 255;
					if(tmp1 != tmp2) {
						if(tmp1 > tmp2) {
							value = 1;
						} else {
							value = -1;
						}
					} else {
						tmp1 = pixelMask & 255;
						tmp2 = _threshold & 255;
						if(tmp1 != tmp2) {
							if(tmp1 > tmp2) {
								value = 1;
							} else {
								value = -1;
							}
						} else {
							value = 0;
						}
					}
				}
			}
			switch(_operation) {
			case 0:
				test = value != 0;
				break;
			case 1:
				test = value == 0;
				break;
			case 2:
				test = value == -1;
				break;
			case 3:
				if(value != 0) {
					test = value == -1;
				} else {
					test = true;
				}
				break;
			case 4:
				test = value == 1;
				break;
			case 5:
				if(value != 0) {
					test = value == 1;
				} else {
					test = true;
				}
				break;
			default:
				test = false;
			}
			if(test) {
				if(destPremultiplied) {
					if((_color & 255) == 0) {
						if(_color != 0) {
							_color = 0;
						}
					} else if((_color & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[_color & 255];
						_color = ((_color >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((_color >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((_color >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | _color & 255 & 255;
					}
				}
				switch(destFormat) {
				case 0:
					destData[destPosition] = _color >> 24 & 255;
					destData[destPosition + 1] = _color >> 16 & 255;
					destData[destPosition + 2] = _color >> 8 & 255;
					destData[destPosition + 3] = _color & 255;
					break;
				case 1:
					destData[destPosition] = _color & 255;
					destData[destPosition + 1] = _color >> 24 & 255;
					destData[destPosition + 2] = _color >> 16 & 255;
					destData[destPosition + 3] = _color >> 8 & 255;
					break;
				case 2:
					destData[destPosition] = _color >> 8 & 255;
					destData[destPosition + 1] = _color >> 16 & 255;
					destData[destPosition + 2] = _color >> 24 & 255;
					destData[destPosition + 3] = _color & 255;
					break;
				}
				++hits;
			} else if(copySource) {
				if(destPremultiplied) {
					if((srcPixel & 255) == 0) {
						if(srcPixel != 0) {
							srcPixel = 0;
						}
					} else if((srcPixel & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[srcPixel & 255];
						srcPixel = ((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | srcPixel & 255 & 255;
					}
				}
				switch(destFormat) {
				case 0:
					destData[destPosition] = srcPixel >> 24 & 255;
					destData[destPosition + 1] = srcPixel >> 16 & 255;
					destData[destPosition + 2] = srcPixel >> 8 & 255;
					destData[destPosition + 3] = srcPixel & 255;
					break;
				case 1:
					destData[destPosition] = srcPixel & 255;
					destData[destPosition + 1] = srcPixel >> 24 & 255;
					destData[destPosition + 2] = srcPixel >> 16 & 255;
					destData[destPosition + 3] = srcPixel >> 8 & 255;
					break;
				case 2:
					destData[destPosition] = srcPixel >> 8 & 255;
					destData[destPosition + 1] = srcPixel >> 16 & 255;
					destData[destPosition + 2] = srcPixel >> 24 & 255;
					destData[destPosition + 3] = srcPixel & 255;
					break;
				}
			}
			srcPosition += 4;
			destPosition += 4;
		}
	}
	if(hits > 0) {
		image.dirty = true;
	}
	return hits;
};
lime_graphics_utils_ImageDataUtil.unmultiplyAlpha = function(image) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var format = image.buffer.format;
	var length = data.length / 4 | 0;
	var pixel;
	var _g1 = 0;
	var _g = length;
	while(_g1 < _g) {
		var i = _g1++;
		var offset = i * 4;
		switch(format) {
		case 0:
			pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
			break;
		case 1:
			pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
			break;
		case 2:
			pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
			break;
		}
		if((pixel & 255) != 0 && (pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
			pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
		}
		var offset1 = i * 4;
		switch(format) {
		case 0:
			data[offset1] = pixel >> 24 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 8 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		case 1:
			data[offset1] = pixel & 255;
			data[offset1 + 1] = pixel >> 24 & 255;
			data[offset1 + 2] = pixel >> 16 & 255;
			data[offset1 + 3] = pixel >> 8 & 255;
			break;
		case 2:
			data[offset1] = pixel >> 8 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 24 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		}
	}
	image.buffer.premultiplied = false;
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.__pixelCompare = function(n1,n2) {
	var tmp1;
	var tmp2;
	tmp1 = n1 >> 24 & 255;
	tmp2 = n2 >> 24 & 255;
	if(tmp1 != tmp2) {
		if(tmp1 > tmp2) {
			return 1;
		} else {
			return -1;
		}
	} else {
		tmp1 = n1 >> 16 & 255;
		tmp2 = n2 >> 16 & 255;
		if(tmp1 != tmp2) {
			if(tmp1 > tmp2) {
				return 1;
			} else {
				return -1;
			}
		} else {
			tmp1 = n1 >> 8 & 255;
			tmp2 = n2 >> 8 & 255;
			if(tmp1 != tmp2) {
				if(tmp1 > tmp2) {
					return 1;
				} else {
					return -1;
				}
			} else {
				tmp1 = n1 & 255;
				tmp2 = n2 & 255;
				if(tmp1 != tmp2) {
					if(tmp1 > tmp2) {
						return 1;
					} else {
						return -1;
					}
				} else {
					return 0;
				}
			}
		}
	}
};
var lime_graphics_utils__$ImageDataUtil_ImageDataView = function(image,rect) {
	this.image = image;
	if(rect == null) {
		this.rect = image.get_rect();
	} else {
		if(rect.x < 0) {
			rect.x = 0;
		}
		if(rect.y < 0) {
			rect.y = 0;
		}
		if(rect.x + rect.width > image.width) {
			rect.width = image.width - rect.x;
		}
		if(rect.y + rect.height > image.height) {
			rect.height = image.height - rect.y;
		}
		if(rect.width < 0) {
			rect.width = 0;
		}
		if(rect.height < 0) {
			rect.height = 0;
		}
		this.rect = rect;
	}
	this.stride = image.buffer.get_stride();
	this.x = Math.ceil(this.rect.x);
	this.y = Math.ceil(this.rect.y);
	this.width = Math.floor(this.rect.width);
	this.height = Math.floor(this.rect.height);
	this.offset = this.stride * (this.y + image.offsetY) + (this.x + image.offsetX) * 4;
};
$hxClasses["lime.graphics.utils._ImageDataUtil.ImageDataView"] = lime_graphics_utils__$ImageDataUtil_ImageDataView;
lime_graphics_utils__$ImageDataUtil_ImageDataView.__name__ = ["lime","graphics","utils","_ImageDataUtil","ImageDataView"];
lime_graphics_utils__$ImageDataUtil_ImageDataView.prototype = {
	clip: function(x,y,width,height) {
		this.rect.__contract(x,y,width,height);
		this.x = Math.ceil(this.rect.x);
		this.y = Math.ceil(this.rect.y);
		this.width = Math.floor(this.rect.width);
		this.height = Math.floor(this.rect.height);
		this.offset = this.stride * (this.y + this.image.offsetY) + (this.x + this.image.offsetX) * 4;
	}
	,row: function(y) {
		return this.offset + this.stride * y;
	}
	,__class__: lime_graphics_utils__$ImageDataUtil_ImageDataView
};
var lime_math__$ColorMatrix_ColorMatrix_$Impl_$ = {};
$hxClasses["lime.math._ColorMatrix.ColorMatrix_Impl_"] = lime_math__$ColorMatrix_ColorMatrix_$Impl_$;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__name__ = ["lime","math","_ColorMatrix","ColorMatrix_Impl_"];
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__properties__ = {set_redOffset:"set_redOffset",get_redOffset:"get_redOffset",set_redMultiplier:"set_redMultiplier",get_redMultiplier:"get_redMultiplier",set_greenOffset:"set_greenOffset",get_greenOffset:"get_greenOffset",set_greenMultiplier:"set_greenMultiplier",get_greenMultiplier:"get_greenMultiplier",set_color:"set_color",get_color:"get_color",set_blueOffset:"set_blueOffset",get_blueOffset:"get_blueOffset",set_blueMultiplier:"set_blueMultiplier",get_blueMultiplier:"get_blueMultiplier",set_alphaOffset:"set_alphaOffset",get_alphaOffset:"get_alphaOffset",set_alphaMultiplier:"set_alphaMultiplier",get_alphaMultiplier:"get_alphaMultiplier"};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$._new = function(data) {
	var this1;
	if(data != null && data.length == 20) {
		this1 = data;
	} else {
		var array = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__identity;
		var this2;
		if(array != null) {
			this2 = new Float32Array(array);
		} else {
			this2 = null;
		}
		this1 = this2;
	}
	return this1;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.clone = function(this1) {
	var this2;
	if(this1 != null) {
		this2 = new Float32Array(this1);
	} else {
		this2 = null;
	}
	return lime_math__$ColorMatrix_ColorMatrix_$Impl_$._new(this2);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.concat = function(this1,second) {
	var _g = this1;
	_g[0] += second[0];
	var _g1 = this1;
	_g1[6] += second[6];
	var _g2 = this1;
	_g2[12] += second[12];
	var _g3 = this1;
	_g3[18] += second[18];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.copyFrom = function(this1,other) {
	this1.set(other);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.identity = function(this1) {
	this1[0] = 1;
	this1[1] = 0;
	this1[2] = 0;
	this1[3] = 0;
	this1[4] = 0;
	this1[5] = 0;
	this1[6] = 1;
	this1[7] = 0;
	this1[8] = 0;
	this1[9] = 0;
	this1[10] = 0;
	this1[11] = 0;
	this1[12] = 1;
	this1[13] = 0;
	this1[14] = 0;
	this1[15] = 0;
	this1[16] = 0;
	this1[17] = 0;
	this1[18] = 1;
	this1[19] = 0;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable = function(this1) {
	var this2 = new Uint8Array(256);
	var table = this2;
	var multiplier = this1[18];
	var offset = this1[19] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable = function(this1) {
	var this2 = new Uint8Array(256);
	var table = this2;
	var multiplier = this1[12];
	var offset = this1[14] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable = function(this1) {
	var this2 = new Uint8Array(256);
	var table = this2;
	var multiplier = this1[6];
	var offset = this1[9] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable = function(this1) {
	var this2 = new Uint8Array(256);
	var table = this2;
	var multiplier = this1[0];
	var offset = this1[4] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform = function(this1) {
	return null;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_alphaMultiplier = function(this1) {
	return this1[18];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_alphaMultiplier = function(this1,value) {
	return this1[18] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_alphaOffset = function(this1) {
	return this1[19] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_alphaOffset = function(this1,value) {
	return this1[19] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_blueMultiplier = function(this1) {
	return this1[12];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_blueMultiplier = function(this1,value) {
	return this1[12] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_blueOffset = function(this1) {
	return this1[14] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_blueOffset = function(this1,value) {
	return this1[14] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_color = function(this1) {
	return (this1[4] * 255 | 0) << 16 | (this1[9] * 255 | 0) << 8 | (this1[14] * 255 | 0);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_color = function(this1,value) {
	this1[4] = (value >> 16 & 255) / 255;
	this1[9] = (value >> 8 & 255) / 255;
	this1[14] = (value & 255) / 255;
	this1[0] = 0;
	this1[6] = 0;
	this1[12] = 0;
	return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_color(this1);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_greenMultiplier = function(this1) {
	return this1[6];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_greenMultiplier = function(this1,value) {
	return this1[6] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_greenOffset = function(this1) {
	return this1[9] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_greenOffset = function(this1,value) {
	return this1[9] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_redMultiplier = function(this1) {
	return this1[0];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_redMultiplier = function(this1,value) {
	return this1[0] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_redOffset = function(this1) {
	return this1[4] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_redOffset = function(this1,value) {
	return this1[4] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get = function(this1,index) {
	return this1[index];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set = function(this1,index,value) {
	return this1[index] = value;
};
var lime_math_Matrix3 = function(a,b,c,d,tx,ty) {
	if(ty == null) {
		ty = 0;
	}
	if(tx == null) {
		tx = 0;
	}
	if(d == null) {
		d = 1;
	}
	if(c == null) {
		c = 0;
	}
	if(b == null) {
		b = 0;
	}
	if(a == null) {
		a = 1;
	}
	this.a = a;
	this.b = b;
	this.c = c;
	this.d = d;
	this.tx = tx;
	this.ty = ty;
};
$hxClasses["lime.math.Matrix3"] = lime_math_Matrix3;
lime_math_Matrix3.__name__ = ["lime","math","Matrix3"];
lime_math_Matrix3.prototype = {
	clone: function() {
		return new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
	}
	,concat: function(m) {
		var a1 = this.a * m.a + this.b * m.c;
		this.b = this.a * m.b + this.b * m.d;
		this.a = a1;
		var c1 = this.c * m.a + this.d * m.c;
		this.d = this.c * m.b + this.d * m.d;
		this.c = c1;
		var tx1 = this.tx * m.a + this.ty * m.c + m.tx;
		this.ty = this.tx * m.b + this.ty * m.d + m.ty;
		this.tx = tx1;
	}
	,copyColumnFrom: function(column,vector4) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			this.a = vector4.x;
			this.c = vector4.y;
		} else if(column == 1) {
			this.b = vector4.x;
			this.d = vector4.y;
		} else {
			this.tx = vector4.x;
			this.ty = vector4.y;
		}
	}
	,copyColumnTo: function(column,vector4) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			vector4.x = this.a;
			vector4.y = this.c;
			vector4.z = 0;
		} else if(column == 1) {
			vector4.x = this.b;
			vector4.y = this.d;
			vector4.z = 0;
		} else {
			vector4.x = this.tx;
			vector4.y = this.ty;
			vector4.z = 1;
		}
	}
	,copyFrom: function(sourceMatrix3) {
		this.a = sourceMatrix3.a;
		this.b = sourceMatrix3.b;
		this.c = sourceMatrix3.c;
		this.d = sourceMatrix3.d;
		this.tx = sourceMatrix3.tx;
		this.ty = sourceMatrix3.ty;
	}
	,copyRowFrom: function(row,vector4) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			this.a = vector4.x;
			this.c = vector4.y;
		} else if(row == 1) {
			this.b = vector4.x;
			this.d = vector4.y;
		} else {
			this.tx = vector4.x;
			this.ty = vector4.y;
		}
	}
	,copyRowTo: function(row,vector4) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			vector4.x = this.a;
			vector4.y = this.b;
			vector4.z = this.tx;
		} else if(row == 1) {
			vector4.x = this.c;
			vector4.y = this.d;
			vector4.z = this.ty;
		} else {
			vector4.x = 0;
			vector4.y = 0;
			vector4.z = 1;
		}
	}
	,createBox: function(scaleX,scaleY,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		this.a = scaleX;
		this.d = scaleY;
		this.b = rotation;
		this.tx = tx;
		this.ty = ty;
	}
	,createGradientBox: function(width,height,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		this.a = width / 1638.4;
		this.d = height / 1638.4;
		if(rotation != 0) {
			var cos = Math.cos(rotation);
			var sin = Math.sin(rotation);
			this.b = sin * this.d;
			this.c = -sin * this.a;
			this.a *= cos;
			this.d *= cos;
		} else {
			this.b = 0;
			this.c = 0;
		}
		this.tx = tx + width / 2;
		this.ty = ty + height / 2;
	}
	,equals: function(Matrix3) {
		if(Matrix3 != null && this.tx == Matrix3.tx && this.ty == Matrix3.ty && this.a == Matrix3.a && this.b == Matrix3.b && this.c == Matrix3.c) {
			return this.d == Matrix3.d;
		} else {
			return false;
		}
	}
	,deltaTransformVector2: function(Vector2) {
		return new lime_math_Vector2(Vector2.x * this.a + Vector2.y * this.c,Vector2.x * this.b + Vector2.y * this.d);
	}
	,identity: function() {
		this.a = 1;
		this.b = 0;
		this.c = 0;
		this.d = 1;
		this.tx = 0;
		this.ty = 0;
	}
	,invert: function() {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			this.a = this.b = this.c = this.d = 0;
			this.tx = -this.tx;
			this.ty = -this.ty;
		} else {
			norm = 1.0 / norm;
			var a1 = this.d * norm;
			this.d = this.a * norm;
			this.a = a1;
			this.b *= -norm;
			this.c *= -norm;
			var tx1 = -this.a * this.tx - this.c * this.ty;
			this.ty = -this.b * this.tx - this.d * this.ty;
			this.tx = tx1;
		}
		return this;
	}
	,mult: function(m) {
		var result = new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
		result.concat(m);
		return result;
	}
	,rotate: function(theta) {
		var cos = Math.cos(theta);
		var sin = Math.sin(theta);
		var a1 = this.a * cos - this.b * sin;
		this.b = this.a * sin + this.b * cos;
		this.a = a1;
		var c1 = this.c * cos - this.d * sin;
		this.d = this.c * sin + this.d * cos;
		this.c = c1;
		var tx1 = this.tx * cos - this.ty * sin;
		this.ty = this.tx * sin + this.ty * cos;
		this.tx = tx1;
	}
	,scale: function(sx,sy) {
		this.a *= sx;
		this.b *= sy;
		this.c *= sx;
		this.d *= sy;
		this.tx *= sx;
		this.ty *= sy;
	}
	,setRotation: function(theta,scale) {
		if(scale == null) {
			scale = 1;
		}
		this.a = Math.cos(theta) * scale;
		this.c = Math.sin(theta) * scale;
		this.b = -this.c;
		this.d = this.a;
	}
	,setTo: function(a,b,c,d,tx,ty) {
		this.a = a;
		this.b = b;
		this.c = c;
		this.d = d;
		this.tx = tx;
		this.ty = ty;
	}
	,to3DString: function(roundPixels) {
		if(roundPixels == null) {
			roundPixels = false;
		}
		if(roundPixels) {
			return "Matrix33d(" + this.a + ", " + this.b + ", " + "0, 0, " + this.c + ", " + this.d + ", " + "0, 0, 0, 0, 1, 0, " + (this.tx | 0) + ", " + (this.ty | 0) + ", 0, 1)";
		} else {
			return "Matrix33d(" + this.a + ", " + this.b + ", " + "0, 0, " + this.c + ", " + this.d + ", " + "0, 0, 0, 0, 1, 0, " + this.tx + ", " + this.ty + ", 0, 1)";
		}
	}
	,toMozString: function() {
		return "Matrix3(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + "px, " + this.ty + "px)";
	}
	,toString: function() {
		return "Matrix3(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + ", " + this.ty + ")";
	}
	,transformVector2: function(pos) {
		return new lime_math_Vector2(pos.x * this.a + pos.y * this.c + this.tx,pos.x * this.b + pos.y * this.d + this.ty);
	}
	,translate: function(dx,dy) {
		this.tx += dx;
		this.ty += dy;
	}
	,__cleanValues: function() {
		this.a = Math.round(this.a * 1000) / 1000;
		this.b = Math.round(this.b * 1000) / 1000;
		this.c = Math.round(this.c * 1000) / 1000;
		this.d = Math.round(this.d * 1000) / 1000;
		this.tx = Math.round(this.tx * 10) / 10;
		this.ty = Math.round(this.ty * 10) / 10;
	}
	,__transformX: function(pos) {
		return pos.x * this.a + pos.y * this.c + this.tx;
	}
	,__transformY: function(pos) {
		return pos.x * this.b + pos.y * this.d + this.ty;
	}
	,__translateTransformed: function(pos) {
		this.tx = pos.x * this.a + pos.y * this.c + this.tx;
		this.ty = pos.x * this.b + pos.y * this.d + this.ty;
	}
	,__class__: lime_math_Matrix3
};
var lime_math__$Matrix4_Matrix4_$Impl_$ = {};
$hxClasses["lime.math._Matrix4.Matrix4_Impl_"] = lime_math__$Matrix4_Matrix4_$Impl_$;
lime_math__$Matrix4_Matrix4_$Impl_$.__name__ = ["lime","math","_Matrix4","Matrix4_Impl_"];
lime_math__$Matrix4_Matrix4_$Impl_$.__properties__ = {set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"};
lime_math__$Matrix4_Matrix4_$Impl_$._new = function(data) {
	var this1;
	if(data != null && data.length == 16) {
		this1 = data;
	} else {
		var array = lime_math__$Matrix4_Matrix4_$Impl_$.__identity;
		var this2;
		if(array != null) {
			this2 = new Float32Array(array);
		} else {
			this2 = null;
		}
		this1 = this2;
	}
	return this1;
};
lime_math__$Matrix4_Matrix4_$Impl_$.append = function(this1,lhs) {
	var m111 = this1[0];
	var m121 = this1[4];
	var m131 = this1[8];
	var m141 = this1[12];
	var m112 = this1[1];
	var m122 = this1[5];
	var m132 = this1[9];
	var m142 = this1[13];
	var m113 = this1[2];
	var m123 = this1[6];
	var m133 = this1[10];
	var m143 = this1[14];
	var m114 = this1[3];
	var m124 = this1[7];
	var m134 = this1[11];
	var m144 = this1[15];
	var m211 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,0);
	var m221 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,4);
	var m231 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,8);
	var m241 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,12);
	var m212 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,1);
	var m222 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,5);
	var m232 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,9);
	var m242 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,13);
	var m213 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,2);
	var m223 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,6);
	var m233 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,10);
	var m243 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,14);
	var m214 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,3);
	var m224 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,7);
	var m234 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,11);
	var m244 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,15);
	this1[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
	this1[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
	this1[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
	this1[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
	this1[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
	this1[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
	this1[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
	this1[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
	this1[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
	this1[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
	this1[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
	this1[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
	this1[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
	this1[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
	this1[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
	this1[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendRotation = function(this1,degrees,axis,pivotPoint) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$.getAxisRotation(axis.x,axis.y,axis.z,degrees);
	if(pivotPoint != null) {
		var p = pivotPoint;
		lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation(m,p.x,p.y,p.z);
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.append(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendScale = function(this1,xScale,yScale,zScale) {
	var array = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
	var this2;
	if(array != null) {
		this2 = new Float32Array(array);
	} else {
		this2 = null;
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.append(this1,lime_math__$Matrix4_Matrix4_$Impl_$._new(this2));
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation = function(this1,x,y,z) {
	this1[12] += x;
	this1[13] += y;
	this1[14] += z;
};
lime_math__$Matrix4_Matrix4_$Impl_$.clone = function(this1) {
	var this2;
	if(this1 != null) {
		this2 = new Float32Array(this1);
	} else {
		this2 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this2);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyColumnFrom = function(this1,column,vector) {
	switch(column) {
	case 0:
		this1[0] = vector.x;
		this1[1] = vector.y;
		this1[2] = vector.z;
		this1[3] = vector.w;
		break;
	case 1:
		this1[4] = vector.x;
		this1[5] = vector.y;
		this1[6] = vector.z;
		this1[7] = vector.w;
		break;
	case 2:
		this1[8] = vector.x;
		this1[9] = vector.y;
		this1[10] = vector.z;
		this1[11] = vector.w;
		break;
	case 3:
		this1[12] = vector.x;
		this1[13] = vector.y;
		this1[14] = vector.z;
		this1[15] = vector.w;
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Column " + column + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyColumnTo = function(this1,column,vector) {
	switch(column) {
	case 0:
		vector.x = this1[0];
		vector.y = this1[1];
		vector.z = this1[2];
		vector.w = this1[3];
		break;
	case 1:
		vector.x = this1[4];
		vector.y = this1[5];
		vector.z = this1[6];
		vector.w = this1[7];
		break;
	case 2:
		vector.x = this1[8];
		vector.y = this1[9];
		vector.z = this1[10];
		vector.w = this1[11];
		break;
	case 3:
		vector.x = this1[12];
		vector.y = this1[13];
		vector.z = this1[14];
		vector.w = this1[15];
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Column " + column + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyFrom = function(this1,other) {
	this1.set(other);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copythisFrom = function(this1,array,index,transposeValues) {
	if(transposeValues == null) {
		transposeValues = false;
	}
	if(index == null) {
		index = 0;
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
	var l = array.length - index;
	var _g1 = 0;
	var _g = l;
	while(_g1 < _g) {
		var c = _g1++;
		this1[c] = array[c + index];
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copythisTo = function(this1,array,index,transposeValues) {
	if(transposeValues == null) {
		transposeValues = false;
	}
	if(index == null) {
		index = 0;
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
	var l = this1.length;
	var _g1 = 0;
	var _g = l;
	while(_g1 < _g) {
		var c = _g1++;
		array[c + index] = this1[c];
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyRowFrom = function(this1,row,vector) {
	switch(row) {
	case 0:
		this1[0] = vector.x;
		this1[4] = vector.y;
		this1[8] = vector.z;
		this1[12] = vector.w;
		break;
	case 1:
		this1[1] = vector.x;
		this1[5] = vector.y;
		this1[9] = vector.z;
		this1[13] = vector.w;
		break;
	case 2:
		this1[2] = vector.x;
		this1[6] = vector.y;
		this1[10] = vector.z;
		this1[14] = vector.w;
		break;
	case 3:
		this1[3] = vector.x;
		this1[7] = vector.y;
		this1[11] = vector.z;
		this1[15] = vector.w;
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Row " + Std.string(_$UInt_UInt_$Impl_$.toFloat(row)) + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.create2D = function(x,y,scale,rotation) {
	if(rotation == null) {
		rotation = 0;
	}
	if(scale == null) {
		scale = 1;
	}
	var theta = rotation * Math.PI / 180.0;
	var c = Math.cos(theta);
	var s = Math.sin(theta);
	var array = [c * scale,-s * scale,0,0,s * scale,c * scale,0,0,0,0,1,0,x,y,0,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.createABCD = function(a,b,c,d,tx,ty) {
	var array = [a,b,0,0,c,d,0,0,0,0,1,0,tx,ty,0,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho = function(x0,x1,y0,y1,zNear,zFar) {
	var sx = 1.0 / (x1 - x0);
	var sy = 1.0 / (y1 - y0);
	var sz = 1.0 / (zFar - zNear);
	var array = [2.0 * sx,0,0,0,0,2.0 * sy,0,0,0,0,-2.0 * sz,0,-(x0 + x1) * sx,-(y0 + y1) * sy,-(zNear + zFar) * sz,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyRowTo = function(this1,row,vector) {
	switch(row) {
	case 0:
		vector.x = this1[0];
		vector.y = this1[4];
		vector.z = this1[8];
		vector.w = this1[12];
		break;
	case 1:
		vector.x = this1[1];
		vector.y = this1[5];
		vector.z = this1[9];
		vector.w = this1[13];
		break;
	case 2:
		vector.x = this1[2];
		vector.y = this1[6];
		vector.z = this1[10];
		vector.w = this1[14];
		break;
	case 3:
		vector.x = this1[3];
		vector.y = this1[7];
		vector.z = this1[11];
		vector.w = this1[15];
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Row " + row + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyToMatrix4 = function(this1,other) {
	(js_Boot.__cast(other , Float32Array)).set(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.deltaTransformVector = function(this1,v) {
	var x = v.x;
	var y = v.y;
	var z = v.z;
	return new lime_math_Vector4(x * this1[0] + y * this1[4] + z * this1[8] + this1[3],x * this1[1] + y * this1[5] + z * this1[9] + this1[7],x * this1[2] + y * this1[6] + z * this1[10] + this1[11],0);
};
lime_math__$Matrix4_Matrix4_$Impl_$.identity = function(this1) {
	this1[0] = 1;
	this1[1] = 0;
	this1[2] = 0;
	this1[3] = 0;
	this1[4] = 0;
	this1[5] = 1;
	this1[6] = 0;
	this1[7] = 0;
	this1[8] = 0;
	this1[9] = 0;
	this1[10] = 1;
	this1[11] = 0;
	this1[12] = 0;
	this1[13] = 0;
	this1[14] = 0;
	this1[15] = 1;
};
lime_math__$Matrix4_Matrix4_$Impl_$.interpolate = function(thisMat,toMat,percent) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
	var _g = 0;
	while(_g < 16) {
		var i = _g++;
		lime_math__$Matrix4_Matrix4_$Impl_$.set(m,i,lime_math__$Matrix4_Matrix4_$Impl_$.get(thisMat,i) + (lime_math__$Matrix4_Matrix4_$Impl_$.get(toMat,i) - lime_math__$Matrix4_Matrix4_$Impl_$.get(thisMat,i)) * percent);
	}
	return m;
};
lime_math__$Matrix4_Matrix4_$Impl_$.interpolateTo = function(this1,toMat,percent) {
	var _g = 0;
	while(_g < 16) {
		var i = _g++;
		this1[i] += (lime_math__$Matrix4_Matrix4_$Impl_$.get(toMat,i) - this1[i]) * percent;
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.invert = function(this1) {
	var d = lime_math__$Matrix4_Matrix4_$Impl_$.get_determinant(this1);
	var invertable = Math.abs(d) > 0.00000000001;
	if(invertable) {
		d = 1 / d;
		var m11 = this1[0];
		var m21 = this1[4];
		var m31 = this1[8];
		var m41 = this1[12];
		var m12 = this1[1];
		var m22 = this1[5];
		var m32 = this1[9];
		var m42 = this1[13];
		var m13 = this1[2];
		var m23 = this1[6];
		var m33 = this1[10];
		var m43 = this1[14];
		var m14 = this1[3];
		var m24 = this1[7];
		var m34 = this1[11];
		var m44 = this1[15];
		this1[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
		this1[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
		this1[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
		this1[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
		this1[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
		this1[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
		this1[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
		this1[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
		this1[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
		this1[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
		this1[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
		this1[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
		this1[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
		this1[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
		this1[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
		this1[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
	}
	return invertable;
};
lime_math__$Matrix4_Matrix4_$Impl_$.pointAt = function(this1,pos,at,up) {
	if(at == null) {
		at = new lime_math_Vector4(0,0,-1);
	}
	if(up == null) {
		up = new lime_math_Vector4(0,-1,0);
	}
	var dir = new lime_math_Vector4(at.x - pos.x,at.y - pos.y,at.z - pos.z);
	var vup = new lime_math_Vector4(up.x,up.y,up.z,up.w);
	var right;
	var l = Math.sqrt(dir.x * dir.x + dir.y * dir.y + dir.z * dir.z);
	if(l != 0) {
		dir.x /= l;
		dir.y /= l;
		dir.z /= l;
	}
	var l1 = Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z);
	if(l1 != 0) {
		vup.x /= l1;
		vup.y /= l1;
		vup.z /= l1;
	}
	var dir2 = new lime_math_Vector4(dir.x,dir.y,dir.z,dir.w);
	var s = vup.x * dir.x + vup.y * dir.y + vup.z * dir.z;
	dir2.x *= s;
	dir2.y *= s;
	dir2.z *= s;
	vup = new lime_math_Vector4(vup.x - dir2.x,vup.y - dir2.y,vup.z - dir2.z);
	if(Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z) > 0) {
		var l2 = Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z);
		if(l2 != 0) {
			vup.x /= l2;
			vup.y /= l2;
			vup.z /= l2;
		}
	} else if(dir.x != 0) {
		vup = new lime_math_Vector4(-dir.y,dir.x,0);
	} else {
		vup = new lime_math_Vector4(1,0,0);
	}
	right = new lime_math_Vector4(vup.y * dir.z - vup.z * dir.y,vup.z * dir.x - vup.x * dir.z,vup.x * dir.y - vup.y * dir.x,1);
	var l3 = Math.sqrt(right.x * right.x + right.y * right.y + right.z * right.z);
	if(l3 != 0) {
		right.x /= l3;
		right.y /= l3;
		right.z /= l3;
	}
	this1[0] = right.x;
	this1[4] = right.y;
	this1[8] = right.z;
	this1[12] = 0.0;
	this1[1] = vup.x;
	this1[5] = vup.y;
	this1[9] = vup.z;
	this1[13] = 0.0;
	this1[2] = dir.x;
	this1[6] = dir.y;
	this1[10] = dir.z;
	this1[14] = 0.0;
	this1[3] = pos.x;
	this1[7] = pos.y;
	this1[11] = pos.z;
	this1[15] = 1.0;
};
lime_math__$Matrix4_Matrix4_$Impl_$.prepend = function(this1,rhs) {
	var m111 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,0);
	var m121 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,4);
	var m131 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,8);
	var m141 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,12);
	var m112 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,1);
	var m122 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,5);
	var m132 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,9);
	var m142 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,13);
	var m113 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,2);
	var m123 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,6);
	var m133 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,10);
	var m143 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,14);
	var m114 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,3);
	var m124 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,7);
	var m134 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,11);
	var m144 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,15);
	var m211 = this1[0];
	var m221 = this1[4];
	var m231 = this1[8];
	var m241 = this1[12];
	var m212 = this1[1];
	var m222 = this1[5];
	var m232 = this1[9];
	var m242 = this1[13];
	var m213 = this1[2];
	var m223 = this1[6];
	var m233 = this1[10];
	var m243 = this1[14];
	var m214 = this1[3];
	var m224 = this1[7];
	var m234 = this1[11];
	var m244 = this1[15];
	this1[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
	this1[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
	this1[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
	this1[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
	this1[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
	this1[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
	this1[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
	this1[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
	this1[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
	this1[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
	this1[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
	this1[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
	this1[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
	this1[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
	this1[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
	this1[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependRotation = function(this1,degrees,axis,pivotPoint) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$.getAxisRotation(axis.x,axis.y,axis.z,degrees);
	if(pivotPoint != null) {
		var p = pivotPoint;
		lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation(m,p.x,p.y,p.z);
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependScale = function(this1,xScale,yScale,zScale) {
	var array = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
	var this2;
	if(array != null) {
		this2 = new Float32Array(array);
	} else {
		this2 = null;
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,lime_math__$Matrix4_Matrix4_$Impl_$._new(this2));
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependTranslation = function(this1,x,y,z) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
	lime_math__$Matrix4_Matrix4_$Impl_$.set_position(m,new lime_math_Vector4(x,y,z));
	lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.transformVector = function(this1,v) {
	var x = v.x;
	var y = v.y;
	var z = v.z;
	return new lime_math_Vector4(x * this1[0] + y * this1[4] + z * this1[8] + this1[12],x * this1[1] + y * this1[5] + z * this1[9] + this1[13],x * this1[2] + y * this1[6] + z * this1[10] + this1[14],x * this1[3] + y * this1[7] + z * this1[11] + this1[15]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.transformVectors = function(this1,ain,aout) {
	var i = 0;
	while(i + 3 <= ain.length) {
		var x = ain[i];
		var y = ain[i + 1];
		var z = ain[i + 2];
		aout[i] = x * this1[0] + y * this1[4] + z * this1[8] + this1[12];
		aout[i + 1] = x * this1[1] + y * this1[5] + z * this1[9] + this1[13];
		aout[i + 2] = x * this1[2] + y * this1[6] + z * this1[10] + this1[14];
		i += 3;
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.transpose = function(this1) {
	var this2;
	if(this1 != null) {
		this2 = new Float32Array(this1);
	} else {
		this2 = null;
	}
	var othis = this2;
	this1[1] = othis[4];
	this1[2] = othis[8];
	this1[3] = othis[12];
	this1[4] = othis[1];
	this1[6] = othis[9];
	this1[7] = othis[13];
	this1[8] = othis[2];
	this1[9] = othis[6];
	this1[11] = othis[14];
	this1[12] = othis[3];
	this1[13] = othis[7];
	this1[14] = othis[11];
};
lime_math__$Matrix4_Matrix4_$Impl_$.getAxisRotation = function(x,y,z,degrees) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
	var a1 = new lime_math_Vector4(x,y,z);
	var rad = -degrees * (Math.PI / 180);
	var c = Math.cos(rad);
	var s = Math.sin(rad);
	var t = 1.0 - c;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,0,c + a1.x * a1.x * t);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,5,c + a1.y * a1.y * t);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,10,c + a1.z * a1.z * t);
	var tmp1 = a1.x * a1.y * t;
	var tmp2 = a1.z * s;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,4,tmp1 + tmp2);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,1,tmp1 - tmp2);
	tmp1 = a1.x * a1.z * t;
	tmp2 = a1.y * s;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,8,tmp1 - tmp2);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,2,tmp1 + tmp2);
	tmp1 = a1.y * a1.z * t;
	tmp2 = a1.x * s;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,9,tmp1 + tmp2);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,6,tmp1 - tmp2);
	return m;
};
lime_math__$Matrix4_Matrix4_$Impl_$.get_determinant = function(this1) {
	return (this1[0] * this1[5] - this1[4] * this1[1]) * (this1[10] * this1[15] - this1[14] * this1[11]) - (this1[0] * this1[9] - this1[8] * this1[1]) * (this1[6] * this1[15] - this1[14] * this1[7]) + (this1[0] * this1[13] - this1[12] * this1[1]) * (this1[6] * this1[11] - this1[10] * this1[7]) + (this1[4] * this1[9] - this1[8] * this1[5]) * (this1[2] * this1[15] - this1[14] * this1[3]) - (this1[4] * this1[13] - this1[12] * this1[5]) * (this1[2] * this1[11] - this1[10] * this1[3]) + (this1[8] * this1[13] - this1[12] * this1[9]) * (this1[2] * this1[7] - this1[6] * this1[3]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.get_position = function(this1) {
	return new lime_math_Vector4(this1[12],this1[13],this1[14]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.set_position = function(this1,val) {
	this1[12] = val.x;
	this1[13] = val.y;
	this1[14] = val.z;
	return val;
};
lime_math__$Matrix4_Matrix4_$Impl_$.get = function(this1,index) {
	return this1[index];
};
lime_math__$Matrix4_Matrix4_$Impl_$.set = function(this1,index,value) {
	this1[index] = value;
	return value;
};
var lime_math_Rectangle = function(x,y,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
	this.width = width;
	this.height = height;
};
$hxClasses["lime.math.Rectangle"] = lime_math_Rectangle;
lime_math_Rectangle.__name__ = ["lime","math","Rectangle"];
lime_math_Rectangle.prototype = {
	clone: function() {
		return new lime_math_Rectangle(this.x,this.y,this.width,this.height);
	}
	,contains: function(x,y) {
		if(x >= this.x && y >= this.y && x < this.get_right()) {
			return y < this.get_bottom();
		} else {
			return false;
		}
	}
	,containsPoint: function(point) {
		return this.contains(point.x,point.y);
	}
	,containsRect: function(rect) {
		if(rect.width <= 0 || rect.height <= 0) {
			if(rect.x > this.x && rect.y > this.y && rect.get_right() < this.get_right()) {
				return rect.get_bottom() < this.get_bottom();
			} else {
				return false;
			}
		} else if(rect.x >= this.x && rect.y >= this.y && rect.get_right() <= this.get_right()) {
			return rect.get_bottom() <= this.get_bottom();
		} else {
			return false;
		}
	}
	,copyFrom: function(sourceRect) {
		this.x = sourceRect.x;
		this.y = sourceRect.y;
		this.width = sourceRect.width;
		this.height = sourceRect.height;
	}
	,equals: function(toCompare) {
		if(toCompare != null && this.x == toCompare.x && this.y == toCompare.y && this.width == toCompare.width) {
			return this.height == toCompare.height;
		} else {
			return false;
		}
	}
	,inflate: function(dx,dy) {
		this.x -= dx;
		this.width += dx * 2;
		this.y -= dy;
		this.height += dy * 2;
	}
	,inflatePoint: function(point) {
		this.inflate(point.x,point.y);
	}
	,intersection: function(toIntersect) {
		var x0 = this.x < toIntersect.x ? toIntersect.x : this.x;
		var x1 = this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right();
		if(x1 <= x0) {
			return new lime_math_Rectangle();
		}
		var y0 = this.y < toIntersect.y ? toIntersect.y : this.y;
		var y1 = this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom();
		if(y1 <= y0) {
			return new lime_math_Rectangle();
		}
		return new lime_math_Rectangle(x0,y0,x1 - x0,y1 - y0);
	}
	,intersects: function(toIntersect) {
		var x0 = this.x < toIntersect.x ? toIntersect.x : this.x;
		var x1 = this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right();
		if(x1 <= x0) {
			return false;
		}
		var y0 = this.y < toIntersect.y ? toIntersect.y : this.y;
		var y1 = this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom();
		return y1 > y0;
	}
	,isEmpty: function() {
		if(!(this.width <= 0)) {
			return this.height <= 0;
		} else {
			return true;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,offsetPoint: function(point) {
		this.x += point.x;
		this.y += point.y;
	}
	,setEmpty: function() {
		this.x = this.y = this.width = this.height = 0;
	}
	,setTo: function(xa,ya,widtha,heighta) {
		this.x = xa;
		this.y = ya;
		this.width = widtha;
		this.height = heighta;
	}
	,transform: function(m) {
		var tx0 = m.a * this.x + m.c * this.y;
		var tx1 = tx0;
		var ty0 = m.b * this.x + m.d * this.y;
		var ty1 = ty0;
		var tx = m.a * (this.x + this.width) + m.c * this.y;
		var ty = m.b * (this.x + this.width) + m.d * this.y;
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * (this.x + this.width) + m.c * (this.y + this.height);
		ty = m.b * (this.x + this.width) + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * this.x + m.c * (this.y + this.height);
		ty = m.b * this.x + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		return new lime_math_Rectangle(tx0 + m.tx,ty0 + m.ty,tx1 - tx0,ty1 - ty0);
	}
	,union: function(toUnion) {
		if(this.width == 0 || this.height == 0) {
			return toUnion.clone();
		} else if(toUnion.width == 0 || toUnion.height == 0) {
			return this.clone();
		}
		var x0 = this.x > toUnion.x ? toUnion.x : this.x;
		var x1 = this.get_right() < toUnion.get_right() ? toUnion.get_right() : this.get_right();
		var y0 = this.y > toUnion.y ? toUnion.y : this.y;
		var y1 = this.get_bottom() < toUnion.get_bottom() ? toUnion.get_bottom() : this.get_bottom();
		return new lime_math_Rectangle(x0,y0,x1 - x0,y1 - y0);
	}
	,__contract: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			return;
		}
		if(this.x < x) {
			this.x = x;
		}
		if(this.y < y) {
			this.y = y;
		}
		if(this.get_right() > x + width) {
			this.width = x + width - this.x;
		}
		if(this.get_bottom() > y + height) {
			this.height = y + height - this.y;
		}
	}
	,__expand: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			this.x = x;
			this.y = y;
			this.width = width;
			this.height = height;
			return;
		}
		var cacheRight = this.get_right();
		var cacheBottom = this.get_bottom();
		if(this.x > x) {
			this.x = x;
		}
		if(this.y > y) {
			this.y = y;
		}
		if(cacheRight < x + width) {
			this.width = x + width - this.x;
		}
		if(cacheBottom < y + height) {
			this.height = y + height - this.y;
		}
	}
	,__toFlashRectangle: function() {
		return null;
	}
	,get_bottom: function() {
		return this.y + this.height;
	}
	,set_bottom: function(b) {
		this.height = b - this.y;
		return b;
	}
	,get_bottomRight: function() {
		return new lime_math_Vector2(this.x + this.width,this.y + this.height);
	}
	,set_bottomRight: function(p) {
		this.width = p.x - this.x;
		this.height = p.y - this.y;
		return p.clone();
	}
	,get_left: function() {
		return this.x;
	}
	,set_left: function(l) {
		this.width -= l - this.x;
		this.x = l;
		return l;
	}
	,get_right: function() {
		return this.x + this.width;
	}
	,set_right: function(r) {
		this.width = r - this.x;
		return r;
	}
	,get_size: function() {
		return new lime_math_Vector2(this.width,this.height);
	}
	,set_size: function(p) {
		this.width = p.x;
		this.height = p.y;
		return p.clone();
	}
	,get_top: function() {
		return this.y;
	}
	,set_top: function(t) {
		this.height -= t - this.y;
		this.y = t;
		return t;
	}
	,get_topLeft: function() {
		return new lime_math_Vector2(this.x,this.y);
	}
	,set_topLeft: function(p) {
		this.x = p.x;
		this.y = p.y;
		return p.clone();
	}
	,__class__: lime_math_Rectangle
	,__properties__: {set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}
};
var lime_math_Vector2 = function(x,y) {
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
};
$hxClasses["lime.math.Vector2"] = lime_math_Vector2;
lime_math_Vector2.__name__ = ["lime","math","Vector2"];
lime_math_Vector2.distance = function(pt1,pt2) {
	var dx = pt1.x - pt2.x;
	var dy = pt1.y - pt2.y;
	return Math.sqrt(dx * dx + dy * dy);
};
lime_math_Vector2.interpolate = function(pt1,pt2,f) {
	return new lime_math_Vector2(pt2.x + f * (pt1.x - pt2.x),pt2.y + f * (pt1.y - pt2.y));
};
lime_math_Vector2.polar = function(len,angle) {
	return new lime_math_Vector2(len * Math.cos(angle),len * Math.sin(angle));
};
lime_math_Vector2.prototype = {
	add: function(v) {
		return new lime_math_Vector2(v.x + this.x,v.y + this.y);
	}
	,clone: function() {
		return new lime_math_Vector2(this.x,this.y);
	}
	,equals: function(toCompare) {
		if(toCompare != null && toCompare.x == this.x) {
			return toCompare.y == this.y;
		} else {
			return false;
		}
	}
	,normalize: function(thickness) {
		if(this.x == 0 && this.y == 0) {
			return;
		} else {
			var norm = thickness / Math.sqrt(this.x * this.x + this.y * this.y);
			this.x *= norm;
			this.y *= norm;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,setTo: function(xa,ya) {
		this.x = xa;
		this.y = ya;
	}
	,subtract: function(v) {
		return new lime_math_Vector2(this.x - v.x,this.y - v.y);
	}
	,__toFlashPoint: function() {
		return null;
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,__class__: lime_math_Vector2
	,__properties__: {get_length:"get_length"}
};
var lime_math_Vector4 = function(x,y,z,w) {
	if(w == null) {
		w = 0.;
	}
	if(z == null) {
		z = 0.;
	}
	if(y == null) {
		y = 0.;
	}
	if(x == null) {
		x = 0.;
	}
	this.w = w;
	this.x = x;
	this.y = y;
	this.z = z;
};
$hxClasses["lime.math.Vector4"] = lime_math_Vector4;
lime_math_Vector4.__name__ = ["lime","math","Vector4"];
lime_math_Vector4.__properties__ = {get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};
lime_math_Vector4.X_AXIS = null;
lime_math_Vector4.Y_AXIS = null;
lime_math_Vector4.Z_AXIS = null;
lime_math_Vector4.angleBetween = function(a,b) {
	var a0 = new lime_math_Vector4(a.x,a.y,a.z,a.w);
	var l = Math.sqrt(a0.x * a0.x + a0.y * a0.y + a0.z * a0.z);
	if(l != 0) {
		a0.x /= l;
		a0.y /= l;
		a0.z /= l;
	}
	var b0 = new lime_math_Vector4(b.x,b.y,b.z,b.w);
	var l1 = Math.sqrt(b0.x * b0.x + b0.y * b0.y + b0.z * b0.z);
	if(l1 != 0) {
		b0.x /= l1;
		b0.y /= l1;
		b0.z /= l1;
	}
	return Math.acos(a0.x * b0.x + a0.y * b0.y + a0.z * b0.z);
};
lime_math_Vector4.distance = function(pt1,pt2) {
	var x = pt2.x - pt1.x;
	var y = pt2.y - pt1.y;
	var z = pt2.z - pt1.z;
	return Math.sqrt(x * x + y * y + z * z);
};
lime_math_Vector4.get_X_AXIS = function() {
	return new lime_math_Vector4(1,0,0);
};
lime_math_Vector4.get_Y_AXIS = function() {
	return new lime_math_Vector4(0,1,0);
};
lime_math_Vector4.get_Z_AXIS = function() {
	return new lime_math_Vector4(0,0,1);
};
lime_math_Vector4.prototype = {
	add: function(a) {
		return new lime_math_Vector4(this.x + a.x,this.y + a.y,this.z + a.z);
	}
	,clone: function() {
		return new lime_math_Vector4(this.x,this.y,this.z,this.w);
	}
	,copyFrom: function(sourceVector4) {
		this.x = sourceVector4.x;
		this.y = sourceVector4.y;
		this.z = sourceVector4.z;
	}
	,crossProduct: function(a) {
		return new lime_math_Vector4(this.y * a.z - this.z * a.y,this.z * a.x - this.x * a.z,this.x * a.y - this.y * a.x,1);
	}
	,decrementBy: function(a) {
		this.x -= a.x;
		this.y -= a.y;
		this.z -= a.z;
	}
	,dotProduct: function(a) {
		return this.x * a.x + this.y * a.y + this.z * a.z;
	}
	,equals: function(toCompare,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z) {
			if(!(!allFour)) {
				return this.w == toCompare.w;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,incrementBy: function(a) {
		this.x += a.x;
		this.y += a.y;
		this.z += a.z;
	}
	,nearEquals: function(toCompare,tolerance,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(Math.abs(this.x - toCompare.x) < tolerance && Math.abs(this.y - toCompare.y) < tolerance && Math.abs(this.z - toCompare.z) < tolerance) {
			if(!(!allFour)) {
				return Math.abs(this.w - toCompare.w) < tolerance;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,negate: function() {
		this.x *= -1;
		this.y *= -1;
		this.z *= -1;
	}
	,normalize: function() {
		var l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
		if(l != 0) {
			this.x /= l;
			this.y /= l;
			this.z /= l;
		}
		return l;
	}
	,project: function() {
		this.x /= this.w;
		this.y /= this.w;
		this.z /= this.w;
	}
	,scaleBy: function(s) {
		this.x *= s;
		this.y *= s;
		this.z *= s;
	}
	,setTo: function(xa,ya,za) {
		this.x = xa;
		this.y = ya;
		this.z = za;
	}
	,subtract: function(a) {
		return new lime_math_Vector4(this.x - a.x,this.y - a.y,this.z - a.z);
	}
	,toString: function() {
		return "Vector4(" + this.x + ", " + this.y + ", " + this.z + ")";
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
	}
	,get_lengthSquared: function() {
		return this.x * this.x + this.y * this.y + this.z * this.z;
	}
	,__class__: lime_math_Vector4
	,__properties__: {get_lengthSquared:"get_lengthSquared",get_length:"get_length"}
};
var lime_math_color__$ARGB_ARGB_$Impl_$ = {};
$hxClasses["lime.math.color._ARGB.ARGB_Impl_"] = lime_math_color__$ARGB_ARGB_$Impl_$;
lime_math_color__$ARGB_ARGB_$Impl_$.__name__ = ["lime","math","color","_ARGB","ARGB_Impl_"];
lime_math_color__$ARGB_ARGB_$Impl_$.__properties__ = {set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"};
lime_math_color__$ARGB_ARGB_$Impl_$.a16 = null;
lime_math_color__$ARGB_ARGB_$Impl_$.unmult = null;
lime_math_color__$ARGB_ARGB_$Impl_$._new = function(argb) {
	if(argb == null) {
		argb = 0;
	}
	var this1 = argb;
	return this1;
};
lime_math_color__$ARGB_ARGB_$Impl_$.create = function(a,r,g,b) {
	var this1 = 0;
	var argb = this1;
	argb = (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.multiplyAlpha = function(this1) {
	if((this1 >> 24 & 255) == 0) {
		this1 = 0;
	} else if((this1 >> 24 & 255) != 255) {
		lime_math_color__$ARGB_ARGB_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 >> 24 & 255];
		this1 = (this1 >> 24 & 255 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 8 | (this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255;
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	switch(format) {
	case 0:
		this1 = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 1:
		this1 = (data[offset + 2] & 255) << 24 | (data[offset + 3] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 1] & 255;
		break;
	case 2:
		this1 = (data[offset + 1] & 255) << 24 | (data[offset] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset + 2] & 255;
		break;
	}
	if(premultiplied) {
		if((this1 >> 24 & 255) != 0 && (this1 >> 24 & 255) != 255) {
			lime_math_color__$ARGB_ARGB_$Impl_$.unmult = 255.0 / (this1 >> 24 & 255);
			this1 = (this1 >> 24 & 255 & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 8 | lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255;
		}
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.set = function(this1,a,r,g,b) {
	this1 = (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.unmultiplyAlpha = function(this1) {
	if((this1 >> 24 & 255) != 0 && (this1 >> 24 & 255) != 255) {
		lime_math_color__$ARGB_ARGB_$Impl_$.unmult = 255.0 / (this1 >> 24 & 255);
		this1 = (this1 >> 24 & 255 & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 8 | lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255;
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	if(premultiplied) {
		if((this1 >> 24 & 255) == 0) {
			this1 = 0;
		} else if((this1 >> 24 & 255) != 255) {
			lime_math_color__$ARGB_ARGB_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 >> 24 & 255];
			this1 = (this1 >> 24 & 255 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 8 | (this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255;
		}
	}
	switch(format) {
	case 0:
		data[offset] = this1 >> 16 & 255;
		data[offset + 1] = this1 >> 8 & 255;
		data[offset + 2] = this1 & 255;
		data[offset + 3] = this1 >> 24 & 255;
		break;
	case 1:
		data[offset] = this1 >> 24 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 8 & 255;
		data[offset + 3] = this1 & 255;
		break;
	case 2:
		data[offset] = this1 & 255;
		data[offset + 1] = this1 >> 8 & 255;
		data[offset + 2] = this1 >> 16 & 255;
		data[offset + 3] = this1 >> 24 & 255;
		break;
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.__fromBGRA = function(bgra) {
	var this1 = 0;
	var argb = this1;
	argb = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.__fromRGBA = function(rgba) {
	var this1 = 0;
	var argb = this1;
	argb = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_a = function(this1) {
	return this1 >> 24 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_a = function(this1,value) {
	this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_b = function(this1) {
	return this1 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_b = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
	return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_g = function(this1) {
	return this1 >> 8 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_g = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_r = function(this1) {
	return this1 >> 16 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_r = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
var lime_math_color__$BGRA_BGRA_$Impl_$ = {};
$hxClasses["lime.math.color._BGRA.BGRA_Impl_"] = lime_math_color__$BGRA_BGRA_$Impl_$;
lime_math_color__$BGRA_BGRA_$Impl_$.__name__ = ["lime","math","color","_BGRA","BGRA_Impl_"];
lime_math_color__$BGRA_BGRA_$Impl_$.__properties__ = {set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"};
lime_math_color__$BGRA_BGRA_$Impl_$.a16 = null;
lime_math_color__$BGRA_BGRA_$Impl_$.unmult = null;
lime_math_color__$BGRA_BGRA_$Impl_$._new = function(bgra) {
	if(bgra == null) {
		bgra = 0;
	}
	var this1 = bgra;
	return this1;
};
lime_math_color__$BGRA_BGRA_$Impl_$.create = function(b,g,r,a) {
	var this1 = 0;
	var bgra = this1;
	bgra = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | a & 255;
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.multiplyAlpha = function(this1) {
	if((this1 & 255) == 0) {
		this1 = 0;
	} else if((this1 & 255) != 255) {
		lime_math_color__$BGRA_BGRA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
		this1 = ((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	switch(format) {
	case 0:
		this1 = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		this1 = (data[offset + 3] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 1] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		this1 = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((this1 & 255) != 0 && (this1 & 255) != 255) {
			lime_math_color__$BGRA_BGRA_$Impl_$.unmult = 255.0 / (this1 & 255);
			this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
		}
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.set = function(this1,b,g,r,a) {
	this1 = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | a & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.unmultiplyAlpha = function(this1) {
	if((this1 & 255) != 0 && (this1 & 255) != 255) {
		lime_math_color__$BGRA_BGRA_$Impl_$.unmult = 255.0 / (this1 & 255);
		this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	if(premultiplied) {
		if((this1 & 255) == 0) {
			this1 = 0;
		} else if((this1 & 255) != 255) {
			lime_math_color__$BGRA_BGRA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
			this1 = ((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
		}
	}
	switch(format) {
	case 0:
		data[offset] = this1 >> 8 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 24 & 255;
		data[offset + 3] = this1 & 255;
		break;
	case 1:
		data[offset] = this1 & 255;
		data[offset + 1] = this1 >> 8 & 255;
		data[offset + 2] = this1 >> 16 & 255;
		data[offset + 3] = this1 >> 24 & 255;
		break;
	case 2:
		data[offset] = this1 >> 24 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 8 & 255;
		data[offset + 3] = this1 & 255;
		break;
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.__fromARGB = function(argb) {
	var this1 = 0;
	var bgra = this1;
	bgra = (argb & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb >> 16 & 255 & 255) << 8 | argb >> 24 & 255 & 255;
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.__fromRGBA = function(rgba) {
	var this1 = 0;
	var bgra = this1;
	bgra = (rgba >> 8 & 255 & 255) << 24 | (rgba >> 16 & 255 & 255) << 16 | (rgba >> 24 & 255 & 255) << 8 | rgba & 255 & 255;
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_a = function(this1) {
	return this1 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_a = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
	return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_b = function(this1) {
	return this1 >> 24 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_b = function(this1,value) {
	this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_g = function(this1) {
	return this1 >> 16 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_g = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_r = function(this1) {
	return this1 >> 8 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_r = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
	return value;
};
var lime_math_color__$RGBA_RGBA_$Impl_$ = {};
$hxClasses["lime.math.color._RGBA.RGBA_Impl_"] = lime_math_color__$RGBA_RGBA_$Impl_$;
lime_math_color__$RGBA_RGBA_$Impl_$.__name__ = ["lime","math","color","_RGBA","RGBA_Impl_"];
lime_math_color__$RGBA_RGBA_$Impl_$.__properties__ = {set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"};
lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16 = null;
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp = null;
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = null;
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = null;
lime_math_color__$RGBA_RGBA_$Impl_$._new = function(rgba) {
	if(rgba == null) {
		rgba = 0;
	}
	var this1 = rgba;
	return this1;
};
lime_math_color__$RGBA_RGBA_$Impl_$.create = function(r,g,b,a) {
	var this1 = 0;
	var rgba = this1;
	rgba = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | a & 255;
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.multiplyAlpha = function(this1) {
	if((this1 & 255) == 0) {
		if(this1 != 0) {
			this1 = 0;
		}
	} else if((this1 & 255) != 255) {
		lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
		this1 = ((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	switch(format) {
	case 0:
		this1 = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		this1 = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		this1 = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((this1 & 255) != 0 && (this1 & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (this1 & 255);
			this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
		}
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.set = function(this1,r,g,b,a) {
	this1 = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | a & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.unmultiplyAlpha = function(this1) {
	if((this1 & 255) != 0 && (this1 & 255) != 255) {
		lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (this1 & 255);
		this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	if(premultiplied) {
		if((this1 & 255) == 0) {
			if(this1 != 0) {
				this1 = 0;
			}
		} else if((this1 & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
			this1 = ((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
		}
	}
	switch(format) {
	case 0:
		data[offset] = this1 >> 24 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 8 & 255;
		data[offset + 3] = this1 & 255;
		break;
	case 1:
		data[offset] = this1 & 255;
		data[offset + 1] = this1 >> 24 & 255;
		data[offset + 2] = this1 >> 16 & 255;
		data[offset + 3] = this1 >> 8 & 255;
		break;
	case 2:
		data[offset] = this1 >> 8 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 24 & 255;
		data[offset + 3] = this1 & 255;
		break;
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.__fromARGB = function(argb) {
	var this1 = 0;
	var rgba = this1;
	rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.__fromBGRA = function(bgra) {
	var this1 = 0;
	var rgba = this1;
	rgba = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_a = function(this1) {
	return this1 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_a = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
	return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_b = function(this1) {
	return this1 >> 8 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_b = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_g = function(this1) {
	return this1 >> 16 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_g = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_r = function(this1) {
	return this1 >> 24 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_r = function(this1,value) {
	this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
var lime_net_HTTPRequest = function() {
	this.promise = new lime_app_Promise();
};
$hxClasses["lime.net.HTTPRequest"] = lime_net_HTTPRequest;
lime_net_HTTPRequest.__name__ = ["lime","net","HTTPRequest"];
lime_net_HTTPRequest.prototype = {
	load: function(url) {
		var _gthis = this;
		this.bytesLoaded = 0;
		this.bytesTotal = 0;
		var request = new XMLHttpRequest();
		request.addEventListener("progress",$bind(this,this.request_onProgress),false);
		request.onreadystatechange = function() {
			if(request.readyState != 4) {
				return;
			}
			if(request.status != null && request.status >= 200 && request.status <= 400) {
				_gthis.bytes = lime_utils_Bytes.ofData(request.response);
				_gthis.promise.complete(_gthis.bytes);
			} else {
				_gthis.promise.error(request.status);
			}
		};
		request.open("GET",url,true);
		request.responseType = "arraybuffer";
		request.send("");
		return this.promise.future;
	}
	,curl_onProgress: function(dltotal,dlnow,uptotal,upnow) {
		if(upnow > this.bytesLoaded || dlnow > this.bytesLoaded || uptotal > this.bytesTotal || dltotal > this.bytesTotal) {
			if(upnow > this.bytesLoaded) {
				this.bytesLoaded = upnow | 0;
			}
			if(dlnow > this.bytesLoaded) {
				this.bytesLoaded = dlnow | 0;
			}
			if(uptotal > this.bytesTotal) {
				this.bytesTotal = uptotal | 0;
			}
			if(dltotal > this.bytesTotal) {
				this.bytesTotal = dltotal | 0;
			}
			this.promise.progress(this.bytesLoaded / this.bytesTotal);
		}
		return 0;
	}
	,curl_onWrite: function(output,size,nmemb) {
		var cacheBytes = this.bytes;
		this.bytes = lime_utils_Bytes.alloc(this.bytes.length + output.length);
		this.bytes.blit(0,cacheBytes,0,cacheBytes.length);
		this.bytes.blit(cacheBytes.length,output,0,output.length);
		return size * nmemb;
	}
	,request_onProgress: function(event) {
		this.promise.progress(event.loaded / event.total);
	}
	,__class__: lime_net_HTTPRequest
};
var lime_net_curl__$CURL_CURL_$Impl_$ = {};
$hxClasses["lime.net.curl._CURL.CURL_Impl_"] = lime_net_curl__$CURL_CURL_$Impl_$;
lime_net_curl__$CURL_CURL_$Impl_$.__name__ = ["lime","net","curl","_CURL","CURL_Impl_"];
lime_net_curl__$CURL_CURL_$Impl_$.getDate = function(date,now) {
	return 0;
};
lime_net_curl__$CURL_CURL_$Impl_$.globalCleanup = function() {
};
lime_net_curl__$CURL_CURL_$Impl_$.globalInit = function(flags) {
	return 0;
};
lime_net_curl__$CURL_CURL_$Impl_$.version = function() {
	return null;
};
lime_net_curl__$CURL_CURL_$Impl_$.versionInfo = function(type) {
	return null;
};
lime_net_curl__$CURL_CURL_$Impl_$.intGt = function(a,b) {
	return a > b;
};
var lime_net_curl_CURLEasy = function() { };
$hxClasses["lime.net.curl.CURLEasy"] = lime_net_curl_CURLEasy;
lime_net_curl_CURLEasy.__name__ = ["lime","net","curl","CURLEasy"];
lime_net_curl_CURLEasy.cleanup = function(handle) {
};
lime_net_curl_CURLEasy.duphandle = function(handle) {
	return 0;
};
lime_net_curl_CURLEasy.escape = function(handle,url,length) {
	return null;
};
lime_net_curl_CURLEasy.getinfo = function(handle,info) {
	return null;
};
lime_net_curl_CURLEasy.init = function() {
	return 0;
};
lime_net_curl_CURLEasy.pause = function(handle,bitMask) {
	return 0;
};
lime_net_curl_CURLEasy.perform = function(handle) {
	return 0;
};
lime_net_curl_CURLEasy.reset = function(handle) {
};
lime_net_curl_CURLEasy.setopt = function(handle,option,parameter) {
	return 0;
};
lime_net_curl_CURLEasy.strerror = function(code) {
	return null;
};
lime_net_curl_CURLEasy.unescape = function(handle,url,inLength,outLength) {
	return null;
};
lime_net_curl_CURLEasy.__writeCallback = function(callback,output,size,nmemb) {
	return 0;
};
var lime_system_BackgroundWorker = function() {
	this.onProgress = new lime_app_Event_$Dynamic_$Void();
	this.onError = new lime_app_Event_$Dynamic_$Void();
	this.onComplete = new lime_app_Event_$Dynamic_$Void();
	this.doWork = new lime_app_Event_$Dynamic_$Void();
};
$hxClasses["lime.system.BackgroundWorker"] = lime_system_BackgroundWorker;
lime_system_BackgroundWorker.__name__ = ["lime","system","BackgroundWorker"];
lime_system_BackgroundWorker.prototype = {
	cancel: function() {
		this.canceled = true;
	}
	,run: function(message) {
		this.canceled = false;
		this.__runMessage = message;
		this.__doWork();
	}
	,sendComplete: function(message) {
		if(!this.canceled) {
			this.canceled = true;
			this.onComplete.dispatch(message);
		}
	}
	,sendError: function(message) {
		if(!this.canceled) {
			this.canceled = true;
			this.onError.dispatch(message);
		}
	}
	,sendProgress: function(message) {
		if(!this.canceled) {
			this.onProgress.dispatch(message);
		}
	}
	,__doWork: function() {
		this.doWork.dispatch(this.__runMessage);
	}
	,__update: function(deltaTime) {
	}
	,__class__: lime_system_BackgroundWorker
};
var lime_system_CFFI = function() { };
$hxClasses["lime.system.CFFI"] = lime_system_CFFI;
lime_system_CFFI.__name__ = ["lime","system","CFFI"];
lime_system_CFFI.available = null;
lime_system_CFFI.enabled = null;
lime_system_CFFI.load = function(library,method,args,lazy) {
	if(lazy == null) {
		lazy = false;
	}
	if(args == null) {
		args = 0;
	}
	if(!lime_system_CFFI.enabled) {
		return Reflect.makeVarArgs(function(__) {
			return { };
		});
	}
	var result = null;
	return result;
};
lime_system_CFFI.__findHaxelib = function(library) {
	return "";
};
lime_system_CFFI.__loaderTrace = function(message) {
};
lime_system_CFFI.__sysName = function() {
	return null;
};
lime_system_CFFI.__tryLoad = function(name,library,func,args) {
	return null;
};
var lime_system__$CFFIPointer_CFFIPointer_$Impl_$ = {};
$hxClasses["lime.system._CFFIPointer.CFFIPointer_Impl_"] = lime_system__$CFFIPointer_CFFIPointer_$Impl_$;
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.__name__ = ["lime","system","_CFFIPointer","CFFIPointer_Impl_"];
lime_system__$CFFIPointer_CFFIPointer_$Impl_$._new = function(handle) {
	var this1 = handle;
	return this1;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get = function(this1) {
	var tmp = this1 != null;
	return 0;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.equals = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) == b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.equalsPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) == lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThan = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanOrEqual = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanOrEqualPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThan = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanOrEqual = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanOrEqualPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.notEquals = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) != b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.notEqualsPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) != lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
var lime_system_Clipboard = function() { };
$hxClasses["lime.system.Clipboard"] = lime_system_Clipboard;
lime_system_Clipboard.__name__ = ["lime","system","Clipboard"];
lime_system_Clipboard.__properties__ = {set_text:"set_text",get_text:"get_text"};
lime_system_Clipboard.get_text = function() {
	return null;
};
lime_system_Clipboard.set_text = function(value) {
	return null;
};
var lime_system_Display = function() {
};
$hxClasses["lime.system.Display"] = lime_system_Display;
lime_system_Display.__name__ = ["lime","system","Display"];
lime_system_Display.prototype = {
	__class__: lime_system_Display
};
var lime_system_DisplayMode = function(width,height,refreshRate,pixelFormat) {
	this.width = width;
	this.height = height;
	this.refreshRate = refreshRate;
	this.pixelFormat = pixelFormat;
};
$hxClasses["lime.system.DisplayMode"] = lime_system_DisplayMode;
lime_system_DisplayMode.__name__ = ["lime","system","DisplayMode"];
lime_system_DisplayMode.prototype = {
	__class__: lime_system_DisplayMode
};
var lime_system_Endian = $hxClasses["lime.system.Endian"] = { __ename__ : ["lime","system","Endian"], __constructs__ : ["LITTLE_ENDIAN","BIG_ENDIAN"] };
lime_system_Endian.LITTLE_ENDIAN = ["LITTLE_ENDIAN",0];
lime_system_Endian.LITTLE_ENDIAN.toString = $estr;
lime_system_Endian.LITTLE_ENDIAN.__enum__ = lime_system_Endian;
lime_system_Endian.BIG_ENDIAN = ["BIG_ENDIAN",1];
lime_system_Endian.BIG_ENDIAN.toString = $estr;
lime_system_Endian.BIG_ENDIAN.__enum__ = lime_system_Endian;
var lime_system_System = function() { };
$hxClasses["lime.system.System"] = lime_system_System;
lime_system_System.__name__ = ["lime","system","System"];
lime_system_System.__properties__ = {get_userDirectory:"get_userDirectory",get_numDisplays:"get_numDisplays",get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"};
lime_system_System.applicationDirectory = null;
lime_system_System.applicationStorageDirectory = null;
lime_system_System.desktopDirectory = null;
lime_system_System.disableCFFI = null;
lime_system_System.documentsDirectory = null;
lime_system_System.endianness = null;
lime_system_System.fontsDirectory = null;
lime_system_System.numDisplays = null;
lime_system_System.userDirectory = null;
lime_system_System.embed = $hx_exports["lime"]["embed"] = function(element,width,height,background,assetsPrefix) {
	var htmlElement = null;
	if(typeof(element) == "string") {
		htmlElement = window.document.getElementById(js_Boot.__cast(element , String));
	} else if(element == null) {
		htmlElement = window.document.createElement("div");
	} else {
		htmlElement = element;
	}
	var color = null;
	if(background != null) {
		background = StringTools.replace(background,"#","");
		if(background.indexOf("0x") > -1) {
			color = Std.parseInt(background);
		} else {
			color = Std.parseInt("0x" + background);
		}
	}
	if(width == null) {
		width = 0;
	}
	if(height == null) {
		height = 0;
	}
	ApplicationMain.config.windows[0].background = color;
	ApplicationMain.config.windows[0].element = htmlElement;
	ApplicationMain.config.windows[0].width = width;
	ApplicationMain.config.windows[0].height = height;
	ApplicationMain.config.assetsPrefix = assetsPrefix;
	ApplicationMain.create();
};
lime_system_System.exit = function(code) {
};
lime_system_System.getDisplay = function(id) {
	if(id == 0) {
		var display = new lime_system_Display();
		display.id = 0;
		display.name = "Generic Display";
		display.dpi = 96;
		display.currentMode = new lime_system_DisplayMode(window.screen.width,window.screen.height,60,1);
		display.supportedModes = [display.currentMode];
		display.bounds = new lime_math_Rectangle(0,0,display.currentMode.width,display.currentMode.height);
		return display;
	}
	return null;
};
lime_system_System.getTimer = function() {
	return new Date().getTime();
};
lime_system_System.load = function(library,method,args,lazy) {
	if(lazy == null) {
		lazy = false;
	}
	if(args == null) {
		args = 0;
	}
	return lime_system_CFFI.load(library,method,args,lazy);
};
lime_system_System.get_allowScreenTimeout = function() {
	return true;
};
lime_system_System.set_allowScreenTimeout = function(value) {
	return true;
};
lime_system_System.get_applicationDirectory = function() {
	return null;
};
lime_system_System.get_applicationStorageDirectory = function() {
	var company = "MyCompany";
	var file = "MyApplication";
	if(lime_app_Application.current != null && lime_app_Application.current.config != null) {
		if(lime_app_Application.current.config.company != null) {
			company = lime_app_Application.current.config.company;
		}
		if(lime_app_Application.current.config.file != null) {
			file = lime_app_Application.current.config.file;
		}
	}
	return null;
};
lime_system_System.get_desktopDirectory = function() {
	return null;
};
lime_system_System.get_documentsDirectory = function() {
	return null;
};
lime_system_System.get_fontsDirectory = function() {
	return null;
};
lime_system_System.get_numDisplays = function() {
	return 1;
};
lime_system_System.get_userDirectory = function() {
	return null;
};
lime_system_System.get_endianness = function() {
	return lime_system_Endian.LITTLE_ENDIAN;
};
var lime_system_ThreadPool = function(minThreads,maxThreads) {
	if(maxThreads == null) {
		maxThreads = 1;
	}
	if(minThreads == null) {
		minThreads = 0;
	}
	this.onProgress = new lime_app_Event_$Dynamic_$Void();
	this.onError = new lime_app_Event_$Dynamic_$Void();
	this.onComplete = new lime_app_Event_$Dynamic_$Void();
	this.doWork = new lime_app_Event_$Dynamic_$Void();
	this.minThreads = minThreads;
	this.maxThreads = maxThreads;
	this.currentThreads = 0;
};
$hxClasses["lime.system.ThreadPool"] = lime_system_ThreadPool;
lime_system_ThreadPool.__name__ = ["lime","system","ThreadPool"];
lime_system_ThreadPool.prototype = {
	queue: function(state) {
		this.doWork.dispatch(state);
	}
	,sendComplete: function(state) {
		this.onComplete.dispatch(state);
	}
	,sendError: function(state) {
		this.onError.dispatch(state);
	}
	,sendProgress: function(state) {
		this.onProgress.dispatch(state);
	}
	,__class__: lime_system_ThreadPool
};
var lime_system__$ThreadPool_ThreadPoolMessageType = $hxClasses["lime.system._ThreadPool.ThreadPoolMessageType"] = { __ename__ : ["lime","system","_ThreadPool","ThreadPoolMessageType"], __constructs__ : ["COMPLETE","ERROR","EXIT","PROGRESS","WORK"] };
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE = ["COMPLETE",0];
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR = ["ERROR",1];
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT = ["EXIT",2];
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS = ["PROGRESS",3];
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.WORK = ["WORK",4];
lime_system__$ThreadPool_ThreadPoolMessageType.WORK.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.WORK.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
var lime_system__$ThreadPool_ThreadPoolMessage = function(type,state) {
	this.type = type;
	this.state = state;
};
$hxClasses["lime.system._ThreadPool.ThreadPoolMessage"] = lime_system__$ThreadPool_ThreadPoolMessage;
lime_system__$ThreadPool_ThreadPoolMessage.__name__ = ["lime","system","_ThreadPool","ThreadPoolMessage"];
lime_system__$ThreadPool_ThreadPoolMessage.prototype = {
	__class__: lime_system__$ThreadPool_ThreadPoolMessage
};
var lime_text__$Glyph_Glyph_$Impl_$ = {};
$hxClasses["lime.text._Glyph.Glyph_Impl_"] = lime_text__$Glyph_Glyph_$Impl_$;
lime_text__$Glyph_Glyph_$Impl_$.__name__ = ["lime","text","_Glyph","Glyph_Impl_"];
lime_text__$Glyph_Glyph_$Impl_$._new = function(i) {
	var this1 = i;
	return this1;
};
var lime_text_GlyphMetrics = function() {
};
$hxClasses["lime.text.GlyphMetrics"] = lime_text_GlyphMetrics;
lime_text_GlyphMetrics.__name__ = ["lime","text","GlyphMetrics"];
lime_text_GlyphMetrics.prototype = {
	__class__: lime_text_GlyphMetrics
};
var lime_text_GlyphPosition = function(glyph,advance,offset) {
	this.glyph = glyph;
	this.advance = advance;
	if(offset != null) {
		this.offset = offset;
	} else {
		this.offset = new lime_math_Vector2();
	}
};
$hxClasses["lime.text.GlyphPosition"] = lime_text_GlyphPosition;
lime_text_GlyphPosition.__name__ = ["lime","text","GlyphPosition"];
lime_text_GlyphPosition.prototype = {
	__class__: lime_text_GlyphPosition
};
var lime_text__$TextDirection_TextDirection_$Impl_$ = {};
$hxClasses["lime.text._TextDirection.TextDirection_Impl_"] = lime_text__$TextDirection_TextDirection_$Impl_$;
lime_text__$TextDirection_TextDirection_$Impl_$.__name__ = ["lime","text","_TextDirection","TextDirection_Impl_"];
lime_text__$TextDirection_TextDirection_$Impl_$.__properties__ = {get_vertical:"get_vertical",get_horizontal:"get_horizontal",get_forward:"get_forward",get_backward:"get_backward"};
lime_text__$TextDirection_TextDirection_$Impl_$.reverse = function(this1) {
	this1 ^= 1;
};
lime_text__$TextDirection_TextDirection_$Impl_$.toString = function(this1) {
	switch(this1) {
	case 4:
		return "leftToRight";
	case 5:
		return "rightToLeft";
	case 6:
		return "topToBottom";
	case 7:
		return "bottomToTop";
	default:
		return "";
	}
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_backward = function(this1) {
	return (this1 & -3) == 5;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_forward = function(this1) {
	return (this1 & -3) == 4;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_horizontal = function(this1) {
	return (this1 & -2) == 4;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_vertical = function(this1) {
	return (this1 & -2) == 6;
};
var lime_text_TextLayout = function(text,font,size,direction,script,language) {
	if(language == null) {
		language = "en";
	}
	if(script == null) {
		script = "Zyyy";
	}
	if(direction == null) {
		direction = 4;
	}
	if(size == null) {
		size = 12;
	}
	if(text == null) {
		text = "";
	}
	this.set_text(text);
	this.set_font(font);
	this.set_size(size);
	this.__direction = direction;
	this.__script = script;
	this.__language = language;
	this.positions = [];
	this.__dirty = true;
};
$hxClasses["lime.text.TextLayout"] = lime_text_TextLayout;
lime_text_TextLayout.__name__ = ["lime","text","TextLayout"];
lime_text_TextLayout.prototype = {
	__position: function() {
		this.positions = [];
	}
	,get_positions: function() {
		if(this.__dirty) {
			this.__dirty = false;
			this.__position();
		}
		return this.positions;
	}
	,get_direction: function() {
		return this.__direction;
	}
	,set_direction: function(value) {
		if(value == this.__direction) {
			return value;
		}
		this.__direction = value;
		this.__dirty = true;
		return value;
	}
	,set_font: function(value) {
		if(value == this.font) {
			return value;
		}
		this.font = value;
		this.__dirty = true;
		return value;
	}
	,get_glyphs: function() {
		var glyphs = [];
		var _g = 0;
		var _g1 = this.get_positions();
		while(_g < _g1.length) {
			var position = _g1[_g];
			++_g;
			glyphs.push(position.glyph);
		}
		return glyphs;
	}
	,get_language: function() {
		return this.__language;
	}
	,set_language: function(value) {
		if(value == this.__language) {
			return value;
		}
		this.__language = value;
		this.__dirty = true;
		return value;
	}
	,get_script: function() {
		return this.__script;
	}
	,set_script: function(value) {
		if(value == this.__script) {
			return value;
		}
		this.__script = value;
		this.__dirty = true;
		return value;
	}
	,set_size: function(value) {
		if(value == this.size) {
			return value;
		}
		this.size = value;
		this.__dirty = true;
		return value;
	}
	,set_text: function(value) {
		if(value == this.text) {
			return value;
		}
		this.text = value;
		this.__dirty = true;
		return value;
	}
	,__class__: lime_text_TextLayout
	,__properties__: {set_text:"set_text",set_size:"set_size",set_script:"set_script",get_script:"get_script",get_positions:"get_positions",set_language:"set_language",get_language:"get_language",get_glyphs:"get_glyphs",set_font:"set_font",set_direction:"set_direction",get_direction:"get_direction"}
};
var lime_text__$TextScript_TextScript_$Impl_$ = {};
$hxClasses["lime.text._TextScript.TextScript_Impl_"] = lime_text__$TextScript_TextScript_$Impl_$;
lime_text__$TextScript_TextScript_$Impl_$.__name__ = ["lime","text","_TextScript","TextScript_Impl_"];
lime_text__$TextScript_TextScript_$Impl_$.__properties__ = {get_rightToLeft:"get_rightToLeft"};
lime_text__$TextScript_TextScript_$Impl_$.get_rightToLeft = function(this1) {
	switch(this1) {
	case "Arab":case "Armi":case "Avst":case "Cprt":case "Hebr":case "Khar":case "Lydi":case "Mand":case "Nkoo":case "Orkh":case "Phli":case "Phlp":case "Phnx":case "Samr":case "Sarb":case "Syrc":case "Thaa":
		return true;
	default:
		return false;
	}
};
var lime_ui_Gamepad = function(id) {
	this.onDisconnect = new lime_app_Event_$Void_$Void();
	this.onButtonUp = new lime_app_Event_$lime_$ui_$GamepadButton_$Void();
	this.onButtonDown = new lime_app_Event_$lime_$ui_$GamepadButton_$Void();
	this.onAxisMove = new lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void();
	this.id = id;
	this.connected = true;
};
$hxClasses["lime.ui.Gamepad"] = lime_ui_Gamepad;
lime_ui_Gamepad.__name__ = ["lime","ui","Gamepad"];
lime_ui_Gamepad.addMappings = function(mappings) {
};
lime_ui_Gamepad.__connect = function(id) {
	if(!lime_ui_Gamepad.devices.h.hasOwnProperty(id)) {
		var gamepad = new lime_ui_Gamepad(id);
		lime_ui_Gamepad.devices.h[id] = gamepad;
		lime_ui_Gamepad.onConnect.dispatch(gamepad);
	}
};
lime_ui_Gamepad.__disconnect = function(id) {
	var gamepad = lime_ui_Gamepad.devices.h[id];
	if(gamepad != null) {
		gamepad.connected = false;
	}
	lime_ui_Gamepad.devices.remove(id);
	if(gamepad != null) {
		gamepad.onDisconnect.dispatch();
	}
};
lime_ui_Gamepad.prototype = {
	get_guid: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		return devices[this.id].id;
	}
	,get_name: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		return devices[this.id].id;
	}
	,__class__: lime_ui_Gamepad
	,__properties__: {get_name:"get_name",get_guid:"get_guid"}
};
var lime_ui__$GamepadAxis_GamepadAxis_$Impl_$ = {};
$hxClasses["lime.ui._GamepadAxis.GamepadAxis_Impl_"] = lime_ui__$GamepadAxis_GamepadAxis_$Impl_$;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.__name__ = ["lime","ui","_GamepadAxis","GamepadAxis_Impl_"];
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.toString = function(this1) {
	switch(this1) {
	case 0:
		return "LEFT_X";
	case 1:
		return "LEFT_Y";
	case 2:
		return "RIGHT_X";
	case 3:
		return "RIGHT_Y";
	case 4:
		return "TRIGGER_LEFT";
	case 5:
		return "TRIGGER_RIGHT";
	default:
		return "UNKNOWN (" + this1 + ")";
	}
};
var lime_ui__$GamepadButton_GamepadButton_$Impl_$ = {};
$hxClasses["lime.ui._GamepadButton.GamepadButton_Impl_"] = lime_ui__$GamepadButton_GamepadButton_$Impl_$;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.__name__ = ["lime","ui","_GamepadButton","GamepadButton_Impl_"];
lime_ui__$GamepadButton_GamepadButton_$Impl_$.toString = function(this1) {
	switch(this1) {
	case 0:
		return "A";
	case 1:
		return "B";
	case 2:
		return "X";
	case 3:
		return "Y";
	case 4:
		return "BACK";
	case 5:
		return "GUIDE";
	case 6:
		return "START";
	case 7:
		return "LEFT_STICK";
	case 8:
		return "RIGHT_STICK";
	case 9:
		return "LEFT_SHOULDER";
	case 10:
		return "RIGHT_SHOULDER";
	case 11:
		return "DPAD_UP";
	case 12:
		return "DPAD_DOWN";
	case 13:
		return "DPAD_LEFT";
	case 14:
		return "DPAD_RIGHT";
	default:
		return "UNKNOWN (" + this1 + ")";
	}
};
var lime_ui_Joystick = function(id) {
	this.onTrackballMove = new lime_app_Event_$Int_$Float_$Void();
	this.onHatMove = new lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void();
	this.onDisconnect = new lime_app_Event_$Void_$Void();
	this.onButtonUp = new lime_app_Event_$Int_$Void();
	this.onButtonDown = new lime_app_Event_$Int_$Void();
	this.onAxisMove = new lime_app_Event_$Int_$Float_$Void();
	this.id = id;
	this.connected = true;
};
$hxClasses["lime.ui.Joystick"] = lime_ui_Joystick;
lime_ui_Joystick.__name__ = ["lime","ui","Joystick"];
lime_ui_Joystick.__connect = function(id) {
	if(!lime_ui_Joystick.devices.h.hasOwnProperty(id)) {
		var joystick = new lime_ui_Joystick(id);
		lime_ui_Joystick.devices.h[id] = joystick;
		lime_ui_Joystick.onConnect.dispatch(joystick);
	}
};
lime_ui_Joystick.__disconnect = function(id) {
	var joystick = lime_ui_Joystick.devices.h[id];
	if(joystick != null) {
		joystick.connected = false;
	}
	lime_ui_Joystick.devices.remove(id);
	if(joystick != null) {
		joystick.onDisconnect.dispatch();
	}
};
lime_ui_Joystick.__getDeviceData = function() {
	if(navigator.getGamepads) {
		return navigator.getGamepads();
	} else if(navigator.webkitGetGamepads) {
		return navigator.webkitGetGamepads();
	} else {
		return null;
	}
};
lime_ui_Joystick.prototype = {
	get_guid: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		return devices[this.id].id;
	}
	,get_name: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		return devices[this.id].id;
	}
	,get_numAxes: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		return devices[this.id].axes.length;
	}
	,get_numButtons: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		return devices[this.id].buttons.length;
	}
	,get_numHats: function() {
		return 0;
	}
	,get_numTrackballs: function() {
		return 0;
	}
	,__class__: lime_ui_Joystick
	,__properties__: {get_numTrackballs:"get_numTrackballs",get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}
};
var lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$ = {};
$hxClasses["lime.ui._JoystickHatPosition.JoystickHatPosition_Impl_"] = lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.__name__ = ["lime","ui","_JoystickHatPosition","JoystickHatPosition_Impl_"];
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.__properties__ = {set_up:"set_up",get_up:"get_up",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_down:"set_down",get_down:"get_down",set_center:"set_center",get_center:"get_center"};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$._new = function(value) {
	var this1 = value;
	return this1;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_center = function(this1) {
	return this1 == 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_center = function(this1,value) {
	if(value) {
		this1 = 0;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_down = function(this1) {
	return (this1 & 4) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_down = function(this1,value) {
	if(value) {
		this1 |= 4;
	} else {
		this1 &= 268435455 - 4;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_left = function(this1) {
	return (this1 & 8) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_left = function(this1,value) {
	if(value) {
		this1 |= 8;
	} else {
		this1 &= 268435455 - 8;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_right = function(this1) {
	return (this1 & 2) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_right = function(this1,value) {
	if(value) {
		this1 |= 2;
	} else {
		this1 &= 268435455 - 2;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_up = function(this1) {
	return (this1 & 1) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_up = function(this1,value) {
	if(value) {
		this1 |= 1;
	} else {
		this1 &= 268435455 - 1;
	}
	return value;
};
var lime_ui__$KeyCode_KeyCode_$Impl_$ = {};
$hxClasses["lime.ui._KeyCode.KeyCode_Impl_"] = lime_ui__$KeyCode_KeyCode_$Impl_$;
lime_ui__$KeyCode_KeyCode_$Impl_$.__name__ = ["lime","ui","_KeyCode","KeyCode_Impl_"];
lime_ui__$KeyCode_KeyCode_$Impl_$.gt = function(a,b) {
	return a > b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.gte = function(a,b) {
	return a >= b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.lt = function(a,b) {
	return a < b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.lte = function(a,b) {
	return a <= b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.plus = function(a,b) {
	return a + b;
};
var lime_ui__$KeyModifier_KeyModifier_$Impl_$ = {};
$hxClasses["lime.ui._KeyModifier.KeyModifier_Impl_"] = lime_ui__$KeyModifier_KeyModifier_$Impl_$;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.__name__ = ["lime","ui","_KeyModifier","KeyModifier_Impl_"];
lime_ui__$KeyModifier_KeyModifier_$Impl_$.__properties__ = {set_shiftKey:"set_shiftKey",get_shiftKey:"get_shiftKey",set_numLock:"set_numLock",get_numLock:"get_numLock",set_metaKey:"set_metaKey",get_metaKey:"get_metaKey",set_ctrlKey:"set_ctrlKey",get_ctrlKey:"get_ctrlKey",set_capsLock:"set_capsLock",get_capsLock:"get_capsLock",set_altKey:"set_altKey",get_altKey:"get_altKey"};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey = function(this1) {
	if((this1 & 256) <= 0) {
		return (this1 & 512) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_altKey = function(this1,value) {
	if(value) {
		this1 |= 768;
	} else {
		this1 &= 268435455 - 768;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_capsLock = function(this1) {
	if((this1 & 8192) <= 0) {
		return (this1 & 8192) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_capsLock = function(this1,value) {
	if(value) {
		this1 |= 8192;
	} else {
		this1 &= 268435455 - 8192;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey = function(this1) {
	if((this1 & 64) <= 0) {
		return (this1 & 128) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_ctrlKey = function(this1,value) {
	if(value) {
		this1 |= 192;
	} else {
		this1 &= 268435455 - 192;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey = function(this1) {
	if((this1 & 1024) <= 0) {
		return (this1 & 2048) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_metaKey = function(this1,value) {
	if(value) {
		this1 |= 3072;
	} else {
		this1 &= 268435455 - 3072;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_numLock = function(this1) {
	if((this1 & 4096) <= 0) {
		return (this1 & 4096) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_numLock = function(this1,value) {
	if(value) {
		this1 |= 4096;
	} else {
		this1 &= 268435455 - 4096;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey = function(this1) {
	if((this1 & 1) <= 0) {
		return (this1 & 2) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_shiftKey = function(this1,value) {
	if(value) {
		this1 |= 3;
	} else {
		this1 &= 268435455 - 3;
	}
	return value;
};
var lime_ui_Mouse = function() { };
$hxClasses["lime.ui.Mouse"] = lime_ui_Mouse;
lime_ui_Mouse.__name__ = ["lime","ui","Mouse"];
lime_ui_Mouse.__properties__ = {set_lock:"set_lock",get_lock:"get_lock",set_cursor:"set_cursor",get_cursor:"get_cursor"};
lime_ui_Mouse.hide = function() {
	lime__$backend_html5_HTML5Mouse.hide();
};
lime_ui_Mouse.show = function() {
	lime__$backend_html5_HTML5Mouse.show();
};
lime_ui_Mouse.warp = function(x,y,window) {
	lime__$backend_html5_HTML5Mouse.warp(x,y,window);
};
lime_ui_Mouse.get_cursor = function() {
	return lime__$backend_html5_HTML5Mouse.get_cursor();
};
lime_ui_Mouse.set_cursor = function(value) {
	return lime__$backend_html5_HTML5Mouse.set_cursor(value);
};
lime_ui_Mouse.get_lock = function() {
	return lime__$backend_html5_HTML5Mouse.get_lock();
};
lime_ui_Mouse.set_lock = function(value) {
	return lime__$backend_html5_HTML5Mouse.set_lock(value);
};
var lime_ui_MouseCursor = $hxClasses["lime.ui.MouseCursor"] = { __ename__ : ["lime","ui","MouseCursor"], __constructs__ : ["ARROW","CROSSHAIR","DEFAULT","MOVE","POINTER","RESIZE_NESW","RESIZE_NS","RESIZE_NWSE","RESIZE_WE","TEXT","WAIT","WAIT_ARROW","CUSTOM"] };
lime_ui_MouseCursor.ARROW = ["ARROW",0];
lime_ui_MouseCursor.ARROW.toString = $estr;
lime_ui_MouseCursor.ARROW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.CROSSHAIR = ["CROSSHAIR",1];
lime_ui_MouseCursor.CROSSHAIR.toString = $estr;
lime_ui_MouseCursor.CROSSHAIR.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.DEFAULT = ["DEFAULT",2];
lime_ui_MouseCursor.DEFAULT.toString = $estr;
lime_ui_MouseCursor.DEFAULT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.MOVE = ["MOVE",3];
lime_ui_MouseCursor.MOVE.toString = $estr;
lime_ui_MouseCursor.MOVE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.POINTER = ["POINTER",4];
lime_ui_MouseCursor.POINTER.toString = $estr;
lime_ui_MouseCursor.POINTER.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NESW = ["RESIZE_NESW",5];
lime_ui_MouseCursor.RESIZE_NESW.toString = $estr;
lime_ui_MouseCursor.RESIZE_NESW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NS = ["RESIZE_NS",6];
lime_ui_MouseCursor.RESIZE_NS.toString = $estr;
lime_ui_MouseCursor.RESIZE_NS.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NWSE = ["RESIZE_NWSE",7];
lime_ui_MouseCursor.RESIZE_NWSE.toString = $estr;
lime_ui_MouseCursor.RESIZE_NWSE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_WE = ["RESIZE_WE",8];
lime_ui_MouseCursor.RESIZE_WE.toString = $estr;
lime_ui_MouseCursor.RESIZE_WE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.TEXT = ["TEXT",9];
lime_ui_MouseCursor.TEXT.toString = $estr;
lime_ui_MouseCursor.TEXT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.WAIT = ["WAIT",10];
lime_ui_MouseCursor.WAIT.toString = $estr;
lime_ui_MouseCursor.WAIT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.WAIT_ARROW = ["WAIT_ARROW",11];
lime_ui_MouseCursor.WAIT_ARROW.toString = $estr;
lime_ui_MouseCursor.WAIT_ARROW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.CUSTOM = ["CUSTOM",12];
lime_ui_MouseCursor.CUSTOM.toString = $estr;
lime_ui_MouseCursor.CUSTOM.__enum__ = lime_ui_MouseCursor;
var lime_ui_Touch = function(x,y,id,dx,dy,pressure,device) {
	this.x = x;
	this.y = y;
	this.id = id;
	this.dx = dx;
	this.dy = dy;
	this.pressure = pressure;
	this.device = device;
};
$hxClasses["lime.ui.Touch"] = lime_ui_Touch;
lime_ui_Touch.__name__ = ["lime","ui","Touch"];
lime_ui_Touch.prototype = {
	__class__: lime_ui_Touch
};
var lime_ui_Window = function(config) {
	this.onTextInput = new lime_app_Event_$String_$Void();
	this.onTextEdit = new lime_app_Event_$String_$Int_$Int_$Void();
	this.onRestore = new lime_app_Event_$Void_$Void();
	this.onResize = new lime_app_Event_$Int_$Int_$Void();
	this.onMove = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseWheel = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseUp = new lime_app_Event_$Float_$Float_$Int_$Void();
	this.onMouseMoveRelative = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseMove = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseDown = new lime_app_Event_$Float_$Float_$Int_$Void();
	this.onMinimize = new lime_app_Event_$Void_$Void();
	this.onLeave = new lime_app_Event_$Void_$Void();
	this.onKeyUp = new lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void();
	this.onKeyDown = new lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void();
	this.onFullscreen = new lime_app_Event_$Void_$Void();
	this.onFocusOut = new lime_app_Event_$Void_$Void();
	this.onFocusIn = new lime_app_Event_$Void_$Void();
	this.onEnter = new lime_app_Event_$Void_$Void();
	this.onDropFile = new lime_app_Event_$String_$Void();
	this.onDeactivate = new lime_app_Event_$Void_$Void();
	this.onCreate = new lime_app_Event_$Void_$Void();
	this.onClose = new lime_app_Event_$Void_$Void();
	this.onActivate = new lime_app_Event_$Void_$Void();
	this.config = config;
	this.__width = 0;
	this.__height = 0;
	this.__fullscreen = false;
	this.__scale = 1;
	this.__x = 0;
	this.__y = 0;
	this.__title = "";
	this.id = -1;
	if(config != null) {
		if(Object.prototype.hasOwnProperty.call(config,"width")) {
			this.__width = config.width;
		}
		if(Object.prototype.hasOwnProperty.call(config,"height")) {
			this.__height = config.height;
		}
		if(Object.prototype.hasOwnProperty.call(config,"x")) {
			this.__x = config.x;
		}
		if(Object.prototype.hasOwnProperty.call(config,"y")) {
			this.__y = config.y;
		}
		if(Object.prototype.hasOwnProperty.call(config,"fullscreen")) {
			this.__fullscreen = config.fullscreen;
		}
		if(Object.prototype.hasOwnProperty.call(config,"borderless")) {
			this.__borderless = config.borderless;
		}
		if(Object.prototype.hasOwnProperty.call(config,"resizable")) {
			this.__resizable = config.resizable;
		}
		if(Object.prototype.hasOwnProperty.call(config,"title")) {
			this.__title = config.title;
		}
	}
	this.backend = new lime__$backend_html5_HTML5Window(this);
};
$hxClasses["lime.ui.Window"] = lime_ui_Window;
lime_ui_Window.__name__ = ["lime","ui","Window"];
lime_ui_Window.prototype = {
	alert: function(message,title) {
		this.backend.alert(message,title);
	}
	,close: function() {
		this.backend.close();
	}
	,create: function(application) {
		this.application = application;
		this.backend.create(application);
		if(this.renderer != null) {
			this.renderer.create();
		}
	}
	,focus: function() {
		this.backend.focus();
	}
	,move: function(x,y) {
		this.backend.move(x,y);
		this.__x = x;
		this.__y = y;
	}
	,resize: function(width,height) {
		this.backend.resize(width,height);
		this.__width = width;
		this.__height = height;
	}
	,setIcon: function(image) {
		if(image == null) {
			return;
		}
		this.backend.setIcon(image);
	}
	,toString: function() {
		return "[object Window]";
	}
	,get_display: function() {
		return this.backend.getDisplay();
	}
	,get_borderless: function() {
		return this.__borderless;
	}
	,set_borderless: function(value) {
		return this.__borderless = this.backend.setBorderless(value);
	}
	,get_enableTextEvents: function() {
		return this.backend.getEnableTextEvents();
	}
	,set_enableTextEvents: function(value) {
		return this.backend.setEnableTextEvents(value);
	}
	,get_fullscreen: function() {
		return this.__fullscreen;
	}
	,set_fullscreen: function(value) {
		return this.__fullscreen = this.backend.setFullscreen(value);
	}
	,get_height: function() {
		return this.__height;
	}
	,set_height: function(value) {
		this.resize(this.__width,value);
		return this.__height;
	}
	,get_maximized: function() {
		return this.__maximized;
	}
	,set_maximized: function(value) {
		this.__minimized = false;
		return this.__maximized = this.backend.setMaximized(value);
	}
	,get_minimized: function() {
		return this.__minimized;
	}
	,set_minimized: function(value) {
		this.__maximized = false;
		return this.__minimized = this.backend.setMinimized(value);
	}
	,get_resizable: function() {
		return this.__resizable;
	}
	,set_resizable: function(value) {
		this.__resizable = this.backend.setResizable(value);
		return this.__resizable;
	}
	,get_scale: function() {
		return this.__scale;
	}
	,get_title: function() {
		return this.__title;
	}
	,set_title: function(value) {
		return this.__title = this.backend.setTitle(this.__title);
	}
	,get_width: function() {
		return this.__width;
	}
	,set_width: function(value) {
		this.resize(value,this.__height);
		return this.__width;
	}
	,get_x: function() {
		return this.__x;
	}
	,set_x: function(value) {
		this.move(value,this.__y);
		return this.__x;
	}
	,get_y: function() {
		return this.__y;
	}
	,set_y: function(value) {
		this.move(this.__x,value);
		return this.__y;
	}
	,__class__: lime_ui_Window
	,__properties__: {set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_title:"set_title",get_title:"get_title",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_minimized:"set_minimized",get_minimized:"get_minimized",set_maximized:"set_maximized",get_maximized:"get_maximized",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_enableTextEvents:"set_enableTextEvents",get_enableTextEvents:"get_enableTextEvents",get_display:"get_display",set_borderless:"set_borderless",get_borderless:"get_borderless"}
};
var lime_utils_TAError = $hxClasses["lime.utils.TAError"] = { __ename__ : ["lime","utils","TAError"], __constructs__ : ["RangeError"] };
lime_utils_TAError.RangeError = ["RangeError",0];
lime_utils_TAError.RangeError.toString = $estr;
lime_utils_TAError.RangeError.__enum__ = lime_utils_TAError;
var lime_utils_Bytes = function(length,bytesData) {
	haxe_io_Bytes.call(this,bytesData);
};
$hxClasses["lime.utils.Bytes"] = lime_utils_Bytes;
lime_utils_Bytes.__name__ = ["lime","utils","Bytes"];
lime_utils_Bytes.alloc = function(length) {
	var bytes = new haxe_io_Bytes(new ArrayBuffer(length));
	return new lime_utils_Bytes(bytes.length,bytes.b.bufferValue);
};
lime_utils_Bytes.fastGet = function(b,pos) {
	return b.bytes[pos];
};
lime_utils_Bytes.ofData = function(b) {
	var bytes = haxe_io_Bytes.ofData(b);
	return new lime_utils_Bytes(bytes.length,bytes.b.bufferValue);
};
lime_utils_Bytes.ofString = function(s) {
	var bytes = haxe_io_Bytes.ofString(s);
	return new lime_utils_Bytes(bytes.length,bytes.b.bufferValue);
};
lime_utils_Bytes.readFile = function(path) {
	return null;
};
lime_utils_Bytes.lime_bytes_from_data_pointer = function(data,length) {
	return lime_utils_Bytes.cffi_lime_bytes_from_data_pointer(data,length);
};
lime_utils_Bytes.lime_bytes_get_data_pointer = function(data) {
	return lime_utils_Bytes.cffi_lime_bytes_get_data_pointer(data);
};
lime_utils_Bytes.lime_bytes_read_file = function(path) {
	return lime_utils_Bytes.cffi_lime_bytes_read_file(path);
};
lime_utils_Bytes.__super__ = haxe_io_Bytes;
lime_utils_Bytes.prototype = $extend(haxe_io_Bytes.prototype,{
	__class__: lime_utils_Bytes
});
var lime_utils__$Float32Array_Float32Array_$Impl_$ = {};
$hxClasses["lime.utils._Float32Array.Float32Array_Impl_"] = lime_utils__$Float32Array_Float32Array_$Impl_$;
lime_utils__$Float32Array_Float32Array_$Impl_$.__name__ = ["lime","utils","_Float32Array","Float32Array_Impl_"];
lime_utils__$Float32Array_Float32Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$Float32Array_Float32Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$Float32Array_Float32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Float32Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Float32Array(bytes.b.bufferValue,byteOffset);
	}
	return new Float32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Float32Array_Float32Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Float32Array_Float32Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "Float32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils_GLUtils = function() { };
$hxClasses["lime.utils.GLUtils"] = lime_utils_GLUtils;
lime_utils_GLUtils.__name__ = ["lime","utils","GLUtils"];
lime_utils_GLUtils.compileShader = function(source,type) {
	var shader = lime_graphics_opengl_GL.context.createShader(type);
	lime_graphics_opengl_GL.context.shaderSource(shader,source);
	lime_graphics_opengl_GL.context.compileShader(shader);
	if(lime_graphics_opengl_GL.context.getShaderParameter(shader,35713) == 0) {
		switch(type) {
		case 35632:
			throw new js__$Boot_HaxeError("Error compiling fragment shader");
			break;
		case 35633:
			throw new js__$Boot_HaxeError("Error compiling vertex shader");
			break;
		default:
			throw new js__$Boot_HaxeError("Error compiling unknown shader type");
		}
	}
	return shader;
};
lime_utils_GLUtils.createProgram = function(vertexSource,fragmentSource) {
	var vertexShader = lime_utils_GLUtils.compileShader(vertexSource,35633);
	var fragmentShader = lime_utils_GLUtils.compileShader(fragmentSource,35632);
	var program = lime_graphics_opengl_GL.context.createProgram();
	lime_graphics_opengl_GL.context.attachShader(program,vertexShader);
	lime_graphics_opengl_GL.context.attachShader(program,fragmentShader);
	lime_graphics_opengl_GL.context.linkProgram(program);
	if(lime_graphics_opengl_GL.context.getProgramParameter(program,35714) == 0) {
		throw new js__$Boot_HaxeError("Unable to initialize the shader program.");
	}
	return program;
};
var lime_utils__$Int16Array_Int16Array_$Impl_$ = {};
$hxClasses["lime.utils._Int16Array.Int16Array_Impl_"] = lime_utils__$Int16Array_Int16Array_$Impl_$;
lime_utils__$Int16Array_Int16Array_$Impl_$.__name__ = ["lime","utils","_Int16Array","Int16Array_Impl_"];
lime_utils__$Int16Array_Int16Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$Int16Array_Int16Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$Int16Array_Int16Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Int16Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Int16Array(bytes.b.bufferValue,byteOffset);
	}
	return new Int16Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int16Array_Int16Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int16Array_Int16Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "Int16Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils__$Int32Array_Int32Array_$Impl_$ = {};
$hxClasses["lime.utils._Int32Array.Int32Array_Impl_"] = lime_utils__$Int32Array_Int32Array_$Impl_$;
lime_utils__$Int32Array_Int32Array_$Impl_$.__name__ = ["lime","utils","_Int32Array","Int32Array_Impl_"];
lime_utils__$Int32Array_Int32Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$Int32Array_Int32Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$Int32Array_Int32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Int32Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Int32Array(bytes.b.bufferValue,byteOffset);
	}
	return new Int32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int32Array_Int32Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int32Array_Int32Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "Int32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils_LZMA = function() { };
$hxClasses["lime.utils.LZMA"] = lime_utils_LZMA;
lime_utils_LZMA.__name__ = ["lime","utils","LZMA"];
lime_utils_LZMA.decode = function(bytes) {
	return null;
};
lime_utils_LZMA.encode = function(bytes) {
	return null;
};
var lime_utils__$UInt16Array_UInt16Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt16Array.UInt16Array_Impl_"] = lime_utils__$UInt16Array_UInt16Array_$Impl_$;
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__name__ = ["lime","utils","_UInt16Array","UInt16Array_Impl_"];
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Uint16Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Uint16Array(bytes.b.bufferValue,byteOffset);
	}
	return new Uint16Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "UInt16Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils__$UInt32Array_UInt32Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt32Array.UInt32Array_Impl_"] = lime_utils__$UInt32Array_UInt32Array_$Impl_$;
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__name__ = ["lime","utils","_UInt32Array","UInt32Array_Impl_"];
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Uint32Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Uint32Array(bytes.b.bufferValue,byteOffset);
	}
	return new Uint32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "UInt32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils__$UInt8Array_UInt8Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt8Array.UInt8Array_Impl_"] = lime_utils__$UInt8Array_UInt8Array_$Impl_$;
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__name__ = ["lime","utils","_UInt8Array","UInt8Array_Impl_"];
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		return new Uint8Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Uint8Array(bytes.b.bufferValue,byteOffset);
	}
	return new Uint8Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "UInt8Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var openfl_IAssetCache = function() { };
$hxClasses["openfl.IAssetCache"] = openfl_IAssetCache;
openfl_IAssetCache.__name__ = ["openfl","IAssetCache"];
openfl_IAssetCache.prototype = {
	__class__: openfl_IAssetCache
	,__properties__: {set_enabled:"set_enabled",get_enabled:"get_enabled"}
};
var openfl_AssetCache = function() {
	this.__enabled = true;
	this.bitmapData = new haxe_ds_StringMap();
	this.font = new haxe_ds_StringMap();
	this.sound = new haxe_ds_StringMap();
};
$hxClasses["openfl.AssetCache"] = openfl_AssetCache;
openfl_AssetCache.__name__ = ["openfl","AssetCache"];
openfl_AssetCache.__interfaces__ = [openfl_IAssetCache];
openfl_AssetCache.prototype = {
	clear: function(prefix) {
		if(prefix == null) {
			this.bitmapData = new haxe_ds_StringMap();
			this.font = new haxe_ds_StringMap();
			this.sound = new haxe_ds_StringMap();
		} else {
			var keys = this.bitmapData.keys();
			var key = keys;
			while(key.hasNext()) {
				var key1 = key.next();
				if(StringTools.startsWith(key1,prefix)) {
					this.bitmapData.remove(key1);
				}
			}
			var keys1 = this.font.keys();
			var key2 = keys1;
			while(key2.hasNext()) {
				var key3 = key2.next();
				if(StringTools.startsWith(key3,prefix)) {
					this.font.remove(key3);
				}
			}
			var keys2 = this.sound.keys();
			var key4 = keys2;
			while(key4.hasNext()) {
				var key5 = key4.next();
				if(StringTools.startsWith(key5,prefix)) {
					this.sound.remove(key5);
				}
			}
		}
	}
	,getBitmapData: function(id) {
		var _this = this.bitmapData;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,getFont: function(id) {
		var _this = this.font;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,getSound: function(id) {
		var _this = this.sound;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,hasBitmapData: function(id) {
		var _this = this.bitmapData;
		if(__map_reserved[id] != null) {
			return _this.existsReserved(id);
		} else {
			return _this.h.hasOwnProperty(id);
		}
	}
	,hasFont: function(id) {
		var _this = this.font;
		if(__map_reserved[id] != null) {
			return _this.existsReserved(id);
		} else {
			return _this.h.hasOwnProperty(id);
		}
	}
	,hasSound: function(id) {
		var _this = this.sound;
		if(__map_reserved[id] != null) {
			return _this.existsReserved(id);
		} else {
			return _this.h.hasOwnProperty(id);
		}
	}
	,removeBitmapData: function(id) {
		return this.bitmapData.remove(id);
	}
	,removeFont: function(id) {
		return this.font.remove(id);
	}
	,removeSound: function(id) {
		return this.sound.remove(id);
	}
	,setBitmapData: function(id,bitmapData) {
		var _this = this.bitmapData;
		if(__map_reserved[id] != null) {
			_this.setReserved(id,bitmapData);
		} else {
			_this.h[id] = bitmapData;
		}
	}
	,setFont: function(id,font) {
		var _this = this.font;
		if(__map_reserved[id] != null) {
			_this.setReserved(id,font);
		} else {
			_this.h[id] = font;
		}
	}
	,setSound: function(id,sound) {
		var _this = this.sound;
		if(__map_reserved[id] != null) {
			_this.setReserved(id,sound);
		} else {
			_this.h[id] = sound;
		}
	}
	,get_enabled: function() {
		return this.__enabled;
	}
	,set_enabled: function(value) {
		return this.__enabled = value;
	}
	,__class__: openfl_AssetCache
	,__properties__: {set_enabled:"set_enabled",get_enabled:"get_enabled"}
};
var openfl_Assets = function() { };
$hxClasses["openfl.Assets"] = openfl_Assets;
openfl_Assets.__name__ = ["openfl","Assets"];
openfl_Assets.addEventListener = function(type,listener,useCapture,priority,useWeakReference) {
	if(useWeakReference == null) {
		useWeakReference = false;
	}
	if(priority == null) {
		priority = 0;
	}
	if(useCapture == null) {
		useCapture = false;
	}
	if(!lime_Assets.onChange.has(openfl_Assets.LimeAssets_onChange)) {
		lime_Assets.onChange.add(openfl_Assets.LimeAssets_onChange);
	}
	openfl_Assets.dispatcher.addEventListener(type,listener,useCapture,priority,useWeakReference);
};
openfl_Assets.dispatchEvent = function(event) {
	return openfl_Assets.dispatcher.dispatchEvent(event);
};
openfl_Assets.exists = function(id,type) {
	return lime_Assets.exists(id,type);
};
openfl_Assets.getBitmapData = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasBitmapData(id)) {
		var bitmapData = openfl_Assets.cache.getBitmapData(id);
		if(openfl_Assets.isValidBitmapData(bitmapData)) {
			return bitmapData;
		}
	}
	var image = lime_Assets.getImage(id,false);
	if(image != null) {
		var bitmapData1 = openfl_display_BitmapData.fromImage(image);
		if(useCache && openfl_Assets.cache.get_enabled()) {
			openfl_Assets.cache.setBitmapData(id,bitmapData1);
		}
		return bitmapData1;
	}
	return null;
};
openfl_Assets.getBytes = function(id) {
	return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(lime_Assets.getBytes(id));
};
openfl_Assets.getFont = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasFont(id)) {
		return openfl_Assets.cache.getFont(id);
	}
	var limeFont = lime_Assets.getFont(id,false);
	if(limeFont != null) {
		var font = openfl_text_Font.__fromLimeFont(limeFont);
		if(useCache && openfl_Assets.cache.get_enabled()) {
			openfl_Assets.cache.setFont(id,font);
		}
		return font;
	}
	return new openfl_text_Font();
};
openfl_Assets.getLibrary = function(name) {
	return lime_Assets.getLibrary(name);
};
openfl_Assets.getMovieClip = function(id) {
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = openfl_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"MOVIE_CLIP")) {
			if(library.isLocal(symbolName,"MOVIE_CLIP")) {
				return library.getMovieClip(symbolName);
			} else {
				haxe_Log.trace("[openfl.Assets] MovieClip asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 223, className : "openfl.Assets", methodName : "getMovieClip"});
			}
		} else {
			haxe_Log.trace("[openfl.Assets] There is no MovieClip asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 229, className : "openfl.Assets", methodName : "getMovieClip"});
		}
	} else {
		haxe_Log.trace("[openfl.Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 235, className : "openfl.Assets", methodName : "getMovieClip"});
	}
	return null;
};
openfl_Assets.getMusic = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	var path = lime_Assets.getPath(id);
	if(path != null) {
		return new openfl_media_Sound(new openfl_net_URLRequest(path));
	}
	return null;
};
openfl_Assets.getPath = function(id) {
	return lime_Assets.getPath(id);
};
openfl_Assets.getSound = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasSound(id)) {
		var sound = openfl_Assets.cache.getSound(id);
		if(openfl_Assets.isValidSound(sound)) {
			return sound;
		}
	}
	var path = lime_Assets.getPath(id);
	if(path != null) {
		return new openfl_media_Sound(new openfl_net_URLRequest(path));
	}
	return null;
};
openfl_Assets.getText = function(id) {
	return lime_Assets.getText(id);
};
openfl_Assets.hasEventListener = function(type) {
	return openfl_Assets.dispatcher.hasEventListener(type);
};
openfl_Assets.isLocal = function(id,type,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled()) {
		if(type == "IMAGE" || type == null) {
			if(openfl_Assets.cache.hasBitmapData(id)) {
				return true;
			}
		}
		if(type == "FONT" || type == null) {
			if(openfl_Assets.cache.hasFont(id)) {
				return true;
			}
		}
		if(type == "SOUND" || type == "MUSIC" || type == null) {
			if(openfl_Assets.cache.hasSound(id)) {
				return true;
			}
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = openfl_Assets.getLibrary(libraryName);
	if(library != null) {
		return library.isLocal(symbolName,type);
	}
	return false;
};
openfl_Assets.isValidBitmapData = function(bitmapData) {
	if(bitmapData != null) {
		return bitmapData.image != null;
	} else {
		return false;
	}
};
openfl_Assets.isValidSound = function(sound) {
	return true;
};
openfl_Assets.list = function(type) {
	return lime_Assets.list(type);
};
openfl_Assets.loadBitmapData = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	var promise = new lime_app_Promise();
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasBitmapData(id)) {
		var bitmapData = openfl_Assets.cache.getBitmapData(id);
		if(openfl_Assets.isValidBitmapData(bitmapData)) {
			promise.complete(bitmapData);
			return promise.future;
		}
	}
	lime_Assets.loadImage(id,false).onComplete(function(image) {
		if(image != null) {
			var bitmapData1 = openfl_display_BitmapData.fromImage(image);
			if(useCache && openfl_Assets.cache.get_enabled()) {
				openfl_Assets.cache.setBitmapData(id,bitmapData1);
			}
			promise.complete(bitmapData1);
		} else {
			promise.error("[Assets] Could not load Image \"" + id + "\"");
		}
	}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
	return promise.future;
};
openfl_Assets.loadBytes = function(id,handler) {
	var promise = new lime_app_Promise();
	var future = lime_Assets.loadBytes(id);
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
		future.onComplete(function(bytes) {
			promise.complete(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes));
		});
		future.onProgress(function(progress) {
			promise.progress(progress);
		});
		future.onError(function(msg) {
			promise.error(msg);
		});
	}
	return promise.future;
};
openfl_Assets.loadFont = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	var promise = new lime_app_Promise();
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasFont(id)) {
		var tmp = openfl_Assets.cache.getFont(id);
		promise.complete(tmp);
		return promise.future;
	}
	lime_Assets.loadFont(id).onComplete(function(limeFont) {
		var font = openfl_text_Font.__fromLimeFont(limeFont);
		if(useCache && openfl_Assets.cache.get_enabled()) {
			openfl_Assets.cache.setFont(id,font);
		}
		promise.complete(font);
	}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
	return promise.future;
};
openfl_Assets.loadLibrary = function(name,handler) {
	var future = lime_Assets.loadLibrary(name);
	if(handler != null) {
		future.onComplete(handler);
		future.onError(function(_) {
			handler(null);
		});
	}
	return future;
};
openfl_Assets.loadMusic = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	return new lime_app_Future(function() {
		return openfl_Assets.getMusic(id,useCache);
	});
};
openfl_Assets.loadMovieClip = function(id,handler) {
	var promise = new lime_app_Promise();
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = openfl_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"MOVIE_CLIP")) {
			promise.completeWith(library.loadMovieClip(symbolName));
		} else {
			promise.error("[Assets] There is no MovieClip asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
openfl_Assets.loadSound = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	return new lime_app_Future(function() {
		return openfl_Assets.getSound(id,useCache);
	});
};
openfl_Assets.loadText = function(id,handler) {
	var future = lime_Assets.loadText(id);
	if(handler != null) {
		future.onComplete(handler);
		future.onError(function(_) {
			handler(null);
		});
	}
	return future;
};
openfl_Assets.registerLibrary = function(name,library) {
	lime_Assets.registerLibrary(name,library);
};
openfl_Assets.removeEventListener = function(type,listener,capture) {
	if(capture == null) {
		capture = false;
	}
	openfl_Assets.dispatcher.removeEventListener(type,listener,capture);
};
openfl_Assets.resolveClass = function(name) {
	return Type.resolveClass(name);
};
openfl_Assets.resolveEnum = function(name) {
	var value = Type.resolveEnum(name);
	return value;
};
openfl_Assets.unloadLibrary = function(name) {
	lime_Assets.unloadLibrary(name);
};
openfl_Assets.LimeAssets_onChange = function() {
	openfl_Assets.dispatchEvent(new openfl_events_Event("change"));
};
var openfl_AssetLibrary = function() {
	lime_AssetLibrary.call(this);
};
$hxClasses["openfl.AssetLibrary"] = openfl_AssetLibrary;
openfl_AssetLibrary.__name__ = ["openfl","AssetLibrary"];
openfl_AssetLibrary.__super__ = lime_AssetLibrary;
openfl_AssetLibrary.prototype = $extend(lime_AssetLibrary.prototype,{
	getMovieClip: function(id) {
		return null;
	}
	,loadMovieClip: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getMovieClip(id);
		});
	}
	,__class__: openfl_AssetLibrary
});
var openfl_display_MovieClip = function() {
	openfl_display_Sprite.call(this);
	this.__currentFrame = 0;
	this.__currentLabels = [];
	this.__totalFrames = 0;
	this.enabled = true;
};
$hxClasses["openfl.display.MovieClip"] = openfl_display_MovieClip;
openfl_display_MovieClip.__name__ = ["openfl","display","MovieClip"];
openfl_display_MovieClip.__super__ = openfl_display_Sprite;
openfl_display_MovieClip.prototype = $extend(openfl_display_Sprite.prototype,{
	addFrameScript: function(index,method) {
		if(method != null) {
			if(this.__frameScripts == null) {
				this.__frameScripts = new haxe_ds_IntMap();
			}
			this.__frameScripts.h[index] = method;
		} else if(this.__frameScripts != null) {
			this.__frameScripts.remove(index);
		}
	}
	,gotoAndPlay: function(frame,scene) {
	}
	,gotoAndStop: function(frame,scene) {
	}
	,nextFrame: function() {
	}
	,play: function() {
	}
	,prevFrame: function() {
	}
	,stop: function() {
	}
	,get_currentFrame: function() {
		return this.__currentFrame;
	}
	,get_currentFrameLabel: function() {
		return this.__currentFrameLabel;
	}
	,get_currentLabel: function() {
		return this.__currentLabel;
	}
	,get_currentLabels: function() {
		return this.__currentLabels;
	}
	,get_framesLoaded: function() {
		return this.__totalFrames;
	}
	,get_totalFrames: function() {
		return this.__totalFrames;
	}
	,__class__: openfl_display_MovieClip
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_framesLoaded:"get_framesLoaded",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})
});
var openfl_Lib = function() { };
$hxClasses["openfl.Lib"] = openfl_Lib;
openfl_Lib.__name__ = ["openfl","Lib"];
openfl_Lib.application = null;
openfl_Lib["as"] = function(v,c) {
	if(js_Boot.__instanceof(v,c)) {
		return v;
	} else {
		return null;
	}
};
openfl_Lib.attach = function(name) {
	return new openfl_display_MovieClip();
};
openfl_Lib.embed = $hx_exports["openfl"]["embed"] = function(elementName,width,height,background,assetsPrefix) {
	lime_system_System.embed(elementName,width,height,background,assetsPrefix);
};
openfl_Lib.getTimer = function() {
	return lime_system_System.getTimer();
};
openfl_Lib.getURL = function(request,target) {
	if(target == null) {
		target = "_blank";
	}
	window.open(request.url,target);
};
openfl_Lib.notImplemented = function(api) {
	var _this = openfl_Lib.__sentWarnings;
	if(!(__map_reserved[api] != null ? _this.existsReserved(api) : _this.h.hasOwnProperty(api))) {
		var _this1 = openfl_Lib.__sentWarnings;
		if(__map_reserved[api] != null) {
			_this1.setReserved(api,true);
		} else {
			_this1.h[api] = true;
		}
		haxe_Log.trace("Warning: " + api + " is not implemented",{ fileName : "Lib.hx", lineNumber : 113, className : "openfl.Lib", methodName : "notImplemented"});
	}
};
openfl_Lib.preventDefaultTouchMove = function() {
	window.document.addEventListener("touchmove",function(evt) {
		evt.preventDefault();
	},false);
};
openfl_Lib.trace = function(arg) {
	haxe_Log.trace(arg,{ fileName : "Lib.hx", lineNumber : 144, className : "openfl.Lib", methodName : "trace"});
};
var openfl__$Vector_Vector_$Impl_$ = {};
$hxClasses["openfl._Vector.Vector_Impl_"] = openfl__$Vector_Vector_$Impl_$;
openfl__$Vector_Vector_$Impl_$.__name__ = ["openfl","_Vector","Vector_Impl_"];
openfl__$Vector_Vector_$Impl_$.__properties__ = {set_fixed:"set_fixed",get_fixed:"get_fixed",set_length:"set_length",get_length:"get_length"};
openfl__$Vector_Vector_$Impl_$._new = function(length,fixed) {
	if(fixed == null) {
		fixed = false;
	}
	if(length == null) {
		length = 0;
	}
	var this1 = new openfl_VectorData();
	var this2 = new Array(length);
	this1.data = this2;
	this1.length = length;
	this1.fixed = fixed;
	return this1;
};
openfl__$Vector_Vector_$Impl_$.concat = function(this1,a) {
	var vectorData = new openfl_VectorData();
	vectorData.length = a != null ? this1.length + a.length : this1.length;
	vectorData.fixed = false;
	var length = vectorData.length;
	var this2 = new Array(length);
	vectorData.data = this2;
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
	if(a != null) {
		haxe_ds__$Vector_Vector_$Impl_$.blit(a.data,0,vectorData.data,this1.length,a.length);
	}
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.copy = function(this1) {
	var vectorData = new openfl_VectorData();
	vectorData.length = this1.length;
	vectorData.fixed = this1.fixed;
	var length = this1.length;
	var this2 = new Array(length);
	vectorData.data = this2;
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.iterator = function(this1) {
	return new openfl_VectorDataIterator(this1);
};
openfl__$Vector_Vector_$Impl_$.join = function(this1,sep) {
	var output = "";
	var _g1 = 0;
	var _g = this1.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(i > 0) {
			output += sep;
		}
		output += Std.string(this1.data[i]);
	}
	return output;
};
openfl__$Vector_Vector_$Impl_$.pop = function(this1) {
	var value = null;
	if(!this1.fixed) {
		if(this1.length > 0) {
			this1.length--;
			value = this1.data[this1.length];
		}
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.push = function(this1,x) {
	if(!this1.fixed) {
		this1.length++;
		if(this1.data.length < this1.length) {
			var length = this1.data.length + 10;
			var this2 = new Array(length);
			var data = this2;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
			this1.data = data;
		}
		this1.data[this1.length - 1] = x;
	}
	return this1.length;
};
openfl__$Vector_Vector_$Impl_$.reverse = function(this1) {
	var length = this1.length;
	var this2 = new Array(length);
	var data = this2;
	var _g1 = 0;
	var _g = this1.length;
	while(_g1 < _g) {
		var i = _g1++;
		data[this1.length - 1 - i] = this1.data[i];
	}
	this1.data = data;
};
openfl__$Vector_Vector_$Impl_$.shift = function(this1) {
	if(!this1.fixed && this1.length > 0) {
		this1.length--;
		var value = this1.data[0];
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,1,this1.data,0,this1.length);
		return value;
	}
	return null;
};
openfl__$Vector_Vector_$Impl_$.unshift = function(this1,x) {
	if(!this1.fixed) {
		this1.length++;
		if(this1.data.length < this1.length) {
			var length = this1.length + 10;
			var this2 = new Array(length);
			var data = this2;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,1,this1.data.length);
			this1.data = data;
		} else {
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,this1.data,1,this1.length - 1);
		}
		this1.data[0] = x;
	}
};
openfl__$Vector_Vector_$Impl_$.slice = function(this1,pos,end) {
	if(end == null) {
		end = 0;
	}
	if(pos == null) {
		pos = 0;
	}
	if(pos < 0) {
		pos += this1.length;
	}
	if(end <= 0) {
		end += this1.length;
	}
	if(end > this1.length) {
		end = this1.length;
	}
	var length = end - pos;
	if(length <= 0 || length > this1.length) {
		length = this1.length;
	}
	var vectorData = new openfl_VectorData();
	vectorData.length = end - pos;
	vectorData.fixed = true;
	var this2 = new Array(length);
	vectorData.data = this2;
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos,vectorData.data,0,length);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.sort = function(this1,f) {
	var array = this1.data.slice(0);
	array.sort(f);
	this1.data = array.slice(0);
};
openfl__$Vector_Vector_$Impl_$.splice = function(this1,pos,len) {
	if(pos < 0) {
		pos += this1.length;
	}
	if(pos + len > this1.length) {
		len = this1.length - pos;
	}
	if(len < 0) {
		len = 0;
	}
	var vectorData = new openfl_VectorData();
	vectorData.length = len;
	vectorData.fixed = false;
	var this2 = new Array(len);
	vectorData.data = this2;
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos,vectorData.data,0,len);
	if(len > 0) {
		this1.length -= len;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos + len,this1.data,pos,this1.length - pos);
	}
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.toString = function(this1) {
	return this1.data.slice(0).toString();
};
openfl__$Vector_Vector_$Impl_$.indexOf = function(this1,x,from) {
	if(from == null) {
		from = 0;
	}
	var value = -1;
	var _g1 = from;
	var _g = this1.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(this1.data[i] == x) {
			value = i;
			break;
		}
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.lastIndexOf = function(this1,x,from) {
	if(from == null) {
		from = 0;
	}
	var value = -1;
	var i = this1.length - 1;
	while(i >= from) {
		if(this1.data[i] == x) {
			value = i;
			break;
		}
		--i;
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.ofArray = function(a) {
	var vectorData = new openfl_VectorData();
	vectorData.length = a.length;
	vectorData.fixed = true;
	vectorData.data = a.slice(0);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.convert = function(v) {
	return v;
};
openfl__$Vector_Vector_$Impl_$.get = function(this1,index) {
	return this1.data[index];
};
openfl__$Vector_Vector_$Impl_$.set = function(this1,key,value) {
	if(!this1.fixed) {
		if(key >= this1.length) {
			this1.length = key + 1;
		}
		if(this1.data.length < this1.length) {
			var length = this1.data.length + 10;
			var this2 = new Array(length);
			var data = this2;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
			this1.data = data;
		}
	}
	return this1.data[key] = value;
};
openfl__$Vector_Vector_$Impl_$.fromArray = function(value) {
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.toArray = function(this1) {
	var value = [];
	var _g1 = 0;
	var _g = this1.data.length;
	while(_g1 < _g) {
		var i = _g1++;
		value.push(this1.data[i]);
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.fromHaxeVector = function(value) {
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value;
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.toHaxeVector = function(this1) {
	return this1.data;
};
openfl__$Vector_Vector_$Impl_$.fromVectorData = function(value) {
	return value;
};
openfl__$Vector_Vector_$Impl_$.toVectorData = function(this1) {
	return this1;
};
openfl__$Vector_Vector_$Impl_$.get_length = function(this1) {
	return this1.length;
};
openfl__$Vector_Vector_$Impl_$.set_length = function(this1,value) {
	if(!this1.fixed) {
		if(value > this1.length) {
			var this2 = new Array(value);
			var data = this2;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,Math.min(this1.data.length,value) | 0);
			this1.data = data;
		}
		this1.length = value;
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.get_fixed = function(this1) {
	return this1.fixed;
};
openfl__$Vector_Vector_$Impl_$.set_fixed = function(this1,value) {
	return this1.fixed = value;
};
var openfl_VectorDataIterator = function(data) {
	this.index = 0;
	this.vectorData = data;
};
$hxClasses["openfl.VectorDataIterator"] = openfl_VectorDataIterator;
openfl_VectorDataIterator.__name__ = ["openfl","VectorDataIterator"];
openfl_VectorDataIterator.prototype = {
	hasNext: function() {
		return this.index < this.vectorData.length;
	}
	,next: function() {
		return this.vectorData.data[this.index++];
	}
	,__class__: openfl_VectorDataIterator
};
var openfl__$internal_renderer_AbstractMaskManager = function(renderSession) {
	this.renderSession = renderSession;
};
$hxClasses["openfl._internal.renderer.AbstractMaskManager"] = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_AbstractMaskManager.__name__ = ["openfl","_internal","renderer","AbstractMaskManager"];
openfl__$internal_renderer_AbstractMaskManager.prototype = {
	pushMask: function(mask) {
	}
	,pushRect: function(rect,transform) {
	}
	,popMask: function() {
	}
	,popRect: function() {
	}
	,saveState: function() {
	}
	,restoreState: function() {
	}
	,__class__: openfl__$internal_renderer_AbstractMaskManager
};
var openfl__$internal_renderer_AbstractRenderer = function(width,height) {
	this.width = width;
	this.height = height;
};
$hxClasses["openfl._internal.renderer.AbstractRenderer"] = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_AbstractRenderer.__name__ = ["openfl","_internal","renderer","AbstractRenderer"];
openfl__$internal_renderer_AbstractRenderer.prototype = {
	render: function(stage) {
	}
	,renderShape: function(shape) {
	}
	,setViewport: function(x,y,width,height) {
	}
	,resize: function(width,height) {
	}
	,__class__: openfl__$internal_renderer_AbstractRenderer
};
var openfl__$internal_renderer_DrawCommandBuffer = function() {
	this.types = [];
	this.b = [];
	this.i = [];
	this.f = [];
	this.o = [];
	this.ff = [];
	this.ii = [];
	this.ts = [];
};
$hxClasses["openfl._internal.renderer.DrawCommandBuffer"] = openfl__$internal_renderer_DrawCommandBuffer;
openfl__$internal_renderer_DrawCommandBuffer.__name__ = ["openfl","_internal","renderer","DrawCommandBuffer"];
openfl__$internal_renderer_DrawCommandBuffer.prototype = {
	append: function(other) {
		var data = new openfl__$internal_renderer_DrawCommandReader(other);
		var _g = 0;
		var _g1 = other.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:
				var c = data.readBeginBitmapFill();
				this.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
				break;
			case 1:
				var c1 = data.readBeginFill();
				this.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1),openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1));
				break;
			case 2:
				var c2 = data.readBeginGradientFill();
				this.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c2));
				break;
			case 3:
				var c3 = data.readCubicCurveTo();
				this.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
				break;
			case 4:
				var c4 = data.readCurveTo();
				this.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
				break;
			case 5:
				var c5 = data.readDrawCircle();
				this.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
				break;
			case 6:
				var c6 = data.readDrawEllipse();
				this.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
				break;
			case 7:
				var c7 = data.readDrawPath();
				this.drawPath(openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands(c7),openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c7),openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_winding(c7));
				break;
			case 8:
				var c8 = data.readDrawRect();
				this.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c8));
				break;
			case 9:
				var c9 = data.readDrawRoundRect();
				this.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c9));
				break;
			case 10:
				var c10 = data.readDrawTiles();
				this.drawTiles(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_shader(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c10));
				break;
			case 11:
				var c11 = data.readDrawTriangles();
				this.drawTriangles(openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c11),openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c11),openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c11),openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c11));
				break;
			case 12:
				var c12 = data.readEndFill();
				this.endFill();
				break;
			case 13:
				var c13 = data.readLineBitmapStyle();
				this.lineBitmapStyle(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c13),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c13),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c13),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth(c13));
				break;
			case 14:
				var c14 = data.readLineGradientStyle();
				this.lineGradientStyle(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c14),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c14));
				break;
			case 15:
				var c15 = data.readLineStyle();
				this.lineStyle(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c15),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c15));
				break;
			case 16:
				var c16 = data.readLineTo();
				this.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c16),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c16));
				break;
			case 17:
				var c17 = data.readMoveTo();
				this.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c17),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c17));
				break;
			case 18:
				var c18 = data.readOverrideMatrix();
				this.overrideMatrix(openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix(c18));
				break;
			default:
			}
		}
		data.destroy();
		return other;
	}
	,beginBitmapFill: function(bitmap,matrix,repeat,smooth) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL);
		this.o.push(bitmap);
		this.o.push(matrix);
		this.b.push(repeat);
		this.b.push(smooth);
	}
	,beginFill: function(color,alpha) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_FILL);
		this.i.push(color);
		this.f.push(alpha);
	}
	,beginGradientFill: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL);
		this.o.push(type);
		this.ii.push(colors);
		this.ff.push(alphas);
		this.ii.push(ratios);
		this.o.push(matrix);
		this.o.push(spreadMethod);
		this.o.push(interpolationMethod);
		this.f.push(focalPointRatio);
	}
	,clear: function() {
		this.types.splice(0,this.types.length);
		this.b.splice(0,this.b.length);
		this.i.splice(0,this.i.length);
		this.f.splice(0,this.f.length);
		this.o.splice(0,this.o.length);
		this.ff.splice(0,this.ff.length);
		this.ii.splice(0,this.ii.length);
		this.ts.splice(0,this.ts.length);
	}
	,copy: function() {
		var copy = new openfl__$internal_renderer_DrawCommandBuffer();
		copy.append(this);
		return copy;
	}
	,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO);
		this.f.push(controlX1);
		this.f.push(controlY1);
		this.f.push(controlX2);
		this.f.push(controlY2);
		this.f.push(anchorX);
		this.f.push(anchorY);
	}
	,curveTo: function(controlX,controlY,anchorX,anchorY) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.CURVE_TO);
		this.f.push(controlX);
		this.f.push(controlY);
		this.f.push(anchorX);
		this.f.push(anchorY);
	}
	,destroy: function() {
		this.clear();
		this.types = null;
		this.b = null;
		this.i = null;
		this.f = null;
		this.o = null;
		this.ff = null;
		this.ii = null;
		this.ts = null;
	}
	,drawCircle: function(x,y,radius) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE);
		this.f.push(x);
		this.f.push(y);
		this.f.push(radius);
	}
	,drawEllipse: function(x,y,width,height) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE);
		this.f.push(x);
		this.f.push(y);
		this.f.push(width);
		this.f.push(height);
	}
	,drawPath: function(commands,data,winding) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_PATH);
		this.o.push(commands);
		this.o.push(data);
		this.o.push(winding);
	}
	,drawRect: function(x,y,width,height) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_RECT);
		this.f.push(x);
		this.f.push(y);
		this.f.push(width);
		this.f.push(height);
	}
	,drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT);
		this.f.push(x);
		this.f.push(y);
		this.f.push(width);
		this.f.push(height);
		this.f.push(ellipseWidth);
		this.o.push(ellipseHeight);
	}
	,drawTiles: function(sheet,tileData,smooth,flags,shader,count) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_TILES);
		this.ts.push(sheet);
		this.ff.push(tileData);
		this.b.push(smooth);
		this.i.push(flags);
		this.o.push(shader);
		this.i.push(count);
	}
	,drawTriangles: function(vertices,indices,uvtData,culling) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES);
		this.o.push(vertices);
		this.o.push(indices);
		this.o.push(uvtData);
		this.o.push(culling);
	}
	,endFill: function() {
		this.types.push(openfl__$internal_renderer_DrawCommandType.END_FILL);
	}
	,lineBitmapStyle: function(bitmap,matrix,repeat,smooth) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE);
		this.o.push(bitmap);
		this.o.push(matrix);
		this.b.push(repeat);
		this.b.push(smooth);
	}
	,lineGradientStyle: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE);
		this.o.push(type);
		this.ii.push(colors);
		this.ff.push(alphas);
		this.ii.push(ratios);
		this.o.push(matrix);
		this.o.push(spreadMethod);
		this.o.push(interpolationMethod);
		this.f.push(focalPointRatio);
	}
	,lineStyle: function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_STYLE);
		this.o.push(thickness);
		this.i.push(color);
		this.f.push(alpha);
		this.b.push(pixelHinting);
		this.o.push(scaleMode);
		this.o.push(caps);
		this.o.push(joints);
		this.f.push(miterLimit);
	}
	,lineTo: function(x,y) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_TO);
		this.f.push(x);
		this.f.push(y);
	}
	,moveTo: function(x,y) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.MOVE_TO);
		this.f.push(x);
		this.f.push(y);
	}
	,overrideMatrix: function(matrix) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX);
		this.o.push(matrix);
	}
	,get_length: function() {
		return this.types.length;
	}
	,__class__: openfl__$internal_renderer_DrawCommandBuffer
	,__properties__: {get_length:"get_length"}
};
var openfl__$internal_renderer_DrawCommandReader = function(buffer) {
	this.buffer = buffer;
	this.bPos = this.iPos = this.fPos = this.oPos = this.ffPos = this.iiPos = this.tsPos = 0;
	this.prev = openfl__$internal_renderer_DrawCommandType.UNKNOWN;
};
$hxClasses["openfl._internal.renderer.DrawCommandReader"] = openfl__$internal_renderer_DrawCommandReader;
openfl__$internal_renderer_DrawCommandReader.__name__ = ["openfl","_internal","renderer","DrawCommandReader"];
openfl__$internal_renderer_DrawCommandReader.prototype = {
	advance: function() {
		var _g = this.prev;
		switch(_g[1]) {
		case 0:
			this.oPos += 2;
			this.bPos += 2;
			break;
		case 1:
			this.iPos += 1;
			this.fPos += 1;
			break;
		case 2:
			this.oPos += 4;
			this.iiPos += 2;
			this.ffPos += 1;
			this.fPos += 1;
			break;
		case 3:
			this.fPos += 6;
			break;
		case 4:
			this.fPos += 4;
			break;
		case 5:
			this.fPos += 3;
			break;
		case 6:
			this.fPos += 4;
			break;
		case 7:
			this.oPos += 3;
			break;
		case 8:
			this.fPos += 4;
			break;
		case 9:
			this.fPos += 5;
			this.oPos += 1;
			break;
		case 10:
			this.tsPos += 1;
			this.ffPos += 1;
			this.bPos += 1;
			this.iPos += 2;
			this.oPos += 1;
			break;
		case 11:
			this.oPos += 4;
			break;
		case 12:
			break;
		case 13:
			this.oPos += 2;
			this.bPos += 2;
			break;
		case 14:
			this.oPos += 4;
			this.iiPos += 2;
			this.ffPos += 1;
			this.fPos += 1;
			break;
		case 15:
			this.oPos += 4;
			this.iPos += 1;
			this.fPos += 2;
			this.bPos += 1;
			break;
		case 16:
			this.fPos += 2;
			break;
		case 17:
			this.fPos += 2;
			break;
		case 18:
			this.oPos += 1;
			break;
		default:
		}
	}
	,bool: function(index) {
		return this.buffer.b[this.bPos + index];
	}
	,destroy: function() {
		this.buffer = null;
		this.reset();
	}
	,fArr: function(index) {
		return this.buffer.ff[this.ffPos + index];
	}
	,'float': function(index) {
		return this.buffer.f[this.fPos + index];
	}
	,iArr: function(index) {
		return this.buffer.ii[this.iiPos + index];
	}
	,'int': function(index) {
		return this.buffer.i[this.iPos + index];
	}
	,obj: function(index) {
		return this.buffer.o[this.oPos + index];
	}
	,readBeginBitmapFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$._new(this);
	}
	,readBeginFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$._new(this);
	}
	,readBeginGradientFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$._new(this);
	}
	,readCubicCurveTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$._new(this);
	}
	,readCurveTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$._new(this);
	}
	,readDrawCircle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
		return openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$._new(this);
	}
	,readDrawEllipse: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
		return openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$._new(this);
	}
	,readDrawPath: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_PATH;
		return openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$._new(this);
	}
	,readDrawRect: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
		return openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$._new(this);
	}
	,readDrawRoundRect: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
		return openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$._new(this);
	}
	,readDrawTiles: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TILES;
		return openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$._new(this);
	}
	,readDrawTriangles: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;
		return openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$._new(this);
	}
	,readEndFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$._new(this);
	}
	,readLineBitmapStyle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
		return openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$._new(this);
	}
	,readLineGradientStyle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
		return openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$._new(this);
	}
	,readLineStyle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
		return openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$._new(this);
	}
	,readLineTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$._new(this);
	}
	,readMoveTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$._new(this);
	}
	,readOverrideMatrix: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX;
		return openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$._new(this);
	}
	,reset: function() {
		this.bPos = this.iPos = this.fPos = this.oPos = this.ffPos = this.iiPos = this.tsPos = 0;
	}
	,skip: function(type) {
		this.advance();
		this.prev = type;
	}
	,tileSheet: function(index) {
		return this.buffer.ts[this.tsPos + index];
	}
	,__class__: openfl__$internal_renderer_DrawCommandReader
};
var openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginBitmapFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginBitmapFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.__properties__ = {get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth = function(this1) {
	return this1.bool(1);
};
var openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.__properties__ = {get_alpha:"get_alpha",get_color:"get_color"};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color = function(this1) {
	return this1["int"](0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha = function(this1) {
	return this1["float"](0);
};
var openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginGradientFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginGradientFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.__properties__ = {get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors = function(this1) {
	return this1.iArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas = function(this1) {
	return this1.fArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios = function(this1) {
	return this1.iArr(1);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod = function(this1) {
	return this1.obj(3);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio = function(this1) {
	return this1["float"](0);
};
var openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.CubicCurveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","CubicCurveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.__properties__ = {get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY2:"get_controlY2",get_controlX2:"get_controlX2",get_controlY1:"get_controlY1",get_controlX1:"get_controlX1"};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1 = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1 = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2 = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2 = function(this1) {
	return this1["float"](3);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX = function(this1) {
	return this1["float"](4);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY = function(this1) {
	return this1["float"](5);
};
var openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.CurveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","CurveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.__properties__ = {get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY:"get_controlY",get_controlX:"get_controlX"};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY = function(this1) {
	return this1["float"](3);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawCircleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawCircleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.__properties__ = {get_radius:"get_radius",get_y:"get_y",get_x:"get_x"};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius = function(this1) {
	return this1["float"](2);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawEllipseView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawEllipseView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.__properties__ = {get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height = function(this1) {
	return this1["float"](3);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawPathView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawPathView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.__properties__ = {get_winding:"get_winding",get_data:"get_data",get_commands:"get_commands"};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_winding = function(this1) {
	return this1.obj(2);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawRectView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawRectView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.__properties__ = {get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height = function(this1) {
	return this1["float"](3);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawRoundRectView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawRoundRectView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.__properties__ = {get_ellipseHeight:"get_ellipseHeight",get_ellipseWidth:"get_ellipseWidth",get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height = function(this1) {
	return this1["float"](3);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth = function(this1) {
	return this1["float"](4);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight = function(this1) {
	return this1.obj(0);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawTilesView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawTilesView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.__properties__ = {get_count:"get_count",get_shader:"get_shader",get_flags:"get_flags",get_smooth:"get_smooth",get_tileData:"get_tileData",get_sheet:"get_sheet"};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet = function(this1) {
	return this1.tileSheet(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData = function(this1) {
	return this1.fArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags = function(this1) {
	return this1["int"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_shader = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count = function(this1) {
	return this1["int"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawTrianglesView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawTrianglesView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.__properties__ = {get_culling:"get_culling",get_uvtData:"get_uvtData",get_indices:"get_indices",get_vertices:"get_vertices"};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling = function(this1) {
	return this1.obj(3);
};
var openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.EndFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","EndFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
var openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineBitmapStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineBitmapStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.__properties__ = {get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth = function(this1) {
	return this1.bool(1);
};
var openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineGradientStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineGradientStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.__properties__ = {get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors = function(this1) {
	return this1.iArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas = function(this1) {
	return this1.fArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios = function(this1) {
	return this1.iArr(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod = function(this1) {
	return this1.obj(3);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio = function(this1) {
	return this1["float"](0);
};
var openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.__properties__ = {get_miterLimit:"get_miterLimit",get_joints:"get_joints",get_caps:"get_caps",get_scaleMode:"get_scaleMode",get_pixelHinting:"get_pixelHinting",get_alpha:"get_alpha",get_color:"get_color",get_thickness:"get_thickness"};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color = function(this1) {
	return this1["int"](0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints = function(this1) {
	return this1.obj(3);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit = function(this1) {
	return this1["float"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.__properties__ = {get_y:"get_y",get_x:"get_x"};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.MoveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","MoveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.__properties__ = {get_y:"get_y",get_x:"get_x"};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.OverrideMatrixView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","OverrideMatrixView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.__properties__ = {get_matrix:"get_matrix"};
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$._new = function(d) {
	var this1 = d;
	return this1;
};
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(0);
};
var openfl__$internal_renderer_DrawCommandType = $hxClasses["openfl._internal.renderer.DrawCommandType"] = { __ename__ : ["openfl","_internal","renderer","DrawCommandType"], __constructs__ : ["BEGIN_BITMAP_FILL","BEGIN_FILL","BEGIN_GRADIENT_FILL","CUBIC_CURVE_TO","CURVE_TO","DRAW_CIRCLE","DRAW_ELLIPSE","DRAW_PATH","DRAW_RECT","DRAW_ROUND_RECT","DRAW_TILES","DRAW_TRIANGLES","END_FILL","LINE_BITMAP_STYLE","LINE_GRADIENT_STYLE","LINE_STYLE","LINE_TO","MOVE_TO","OVERRIDE_MATRIX","UNKNOWN"] };
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL = ["BEGIN_BITMAP_FILL",0];
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL = ["BEGIN_FILL",1];
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL = ["BEGIN_GRADIENT_FILL",2];
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO = ["CUBIC_CURVE_TO",3];
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.CURVE_TO = ["CURVE_TO",4];
openfl__$internal_renderer_DrawCommandType.CURVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.CURVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE = ["DRAW_CIRCLE",5];
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE = ["DRAW_ELLIPSE",6];
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_PATH = ["DRAW_PATH",7];
openfl__$internal_renderer_DrawCommandType.DRAW_PATH.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_PATH.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_RECT = ["DRAW_RECT",8];
openfl__$internal_renderer_DrawCommandType.DRAW_RECT.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_RECT.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT = ["DRAW_ROUND_RECT",9];
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_TILES = ["DRAW_TILES",10];
openfl__$internal_renderer_DrawCommandType.DRAW_TILES.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_TILES.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES = ["DRAW_TRIANGLES",11];
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.END_FILL = ["END_FILL",12];
openfl__$internal_renderer_DrawCommandType.END_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.END_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE = ["LINE_BITMAP_STYLE",13];
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE = ["LINE_GRADIENT_STYLE",14];
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_STYLE = ["LINE_STYLE",15];
openfl__$internal_renderer_DrawCommandType.LINE_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_TO = ["LINE_TO",16];
openfl__$internal_renderer_DrawCommandType.LINE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.MOVE_TO = ["MOVE_TO",17];
openfl__$internal_renderer_DrawCommandType.MOVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.MOVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX = ["OVERRIDE_MATRIX",18];
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.toString = $estr;
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.UNKNOWN = ["UNKNOWN",19];
openfl__$internal_renderer_DrawCommandType.UNKNOWN.toString = $estr;
openfl__$internal_renderer_DrawCommandType.UNKNOWN.__enum__ = openfl__$internal_renderer_DrawCommandType;
var openfl__$internal_renderer_GraphicsPaths = function() { };
$hxClasses["openfl._internal.renderer.GraphicsPaths"] = openfl__$internal_renderer_GraphicsPaths;
openfl__$internal_renderer_GraphicsPaths.__name__ = ["openfl","_internal","renderer","GraphicsPaths"];
openfl__$internal_renderer_GraphicsPaths.ellipse = function(points,x,y,rx,ry,segmentCount) {
	var seg = Math.PI * 2 / segmentCount;
	var _g1 = 0;
	var _g = segmentCount + 1;
	while(_g1 < _g) {
		var i = _g1++;
		points.push(x + Math.sin(seg * i) * rx);
		points.push(y + Math.cos(seg * i) * ry);
	}
};
openfl__$internal_renderer_GraphicsPaths.cubicCurveTo = function(points,cx,cy,cx2,cy2,x,y) {
	var n = 20;
	var dt = 0;
	var dt2 = 0;
	var dt3 = 0;
	var t2 = 0;
	var t3 = 0;
	var fromX = points[points.length - 2];
	var fromY = points[points.length - 1];
	var px = 0;
	var py = 0;
	var tmp = 0;
	var _g1 = 1;
	var _g = n + 1;
	while(_g1 < _g) {
		var i = _g1++;
		tmp = i / n;
		dt = 1 - tmp;
		dt2 = dt * dt;
		dt3 = dt2 * dt;
		t2 = tmp * tmp;
		t3 = t2 * tmp;
		px = dt3 * fromX + 3 * dt2 * tmp * cx + 3 * dt * t2 * cx2 + t3 * x;
		py = dt3 * fromY + 3 * dt2 * tmp * cy + 3 * dt * t2 * cy2 + t3 * y;
		points.push(px);
		points.push(py);
	}
};
openfl__$internal_renderer_GraphicsPaths.curveTo = function(points,cx,cy,x,y) {
	var xa = 0;
	var ya = 0;
	var n = 20;
	var fromX = points[points.length - 2];
	var fromY = points[points.length - 1];
	var px = 0;
	var py = 0;
	var tmp = 0;
	var _g1 = 1;
	var _g = n + 1;
	while(_g1 < _g) {
		var i = _g1++;
		tmp = i / n;
		xa = fromX + (cx - fromX) * tmp;
		ya = fromY + (cy - fromY) * tmp;
		px = xa + (cx + (x - cx) * tmp - xa) * tmp;
		py = ya + (cy + (y - cy) * tmp - ya) * tmp;
		points.push(px);
		points.push(py);
	}
};
openfl__$internal_renderer_GraphicsPaths.roundRectangle = function(points,x,y,width,height,rx,ry) {
	var xe = x + width;
	var ye = y + height;
	var cx1 = -rx + rx * openfl__$internal_renderer_GraphicsPaths.SIN45;
	var cx2 = -rx + rx * openfl__$internal_renderer_GraphicsPaths.TAN22;
	var cy1 = -ry + ry * openfl__$internal_renderer_GraphicsPaths.SIN45;
	var cy2 = -ry + ry * openfl__$internal_renderer_GraphicsPaths.TAN22;
	points.push(xe);
	points.push(ye - ry);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe,ye + cy2,xe + cx1,ye + cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe + cx2,ye,xe - rx,ye);
	points.push(x + rx);
	points.push(ye);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x - cx2,ye,x - cx1,ye + cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x,ye + cy2,x,ye - ry);
	points.push(x);
	points.push(y + ry);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x,y - cy2,x - cx1,y - cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x - cx2,y,x + rx,y);
	points.push(xe - rx);
	points.push(y);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe + cx2,y,xe + cx1,y - cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe,y - cy2,xe,y + ry);
	points.push(xe);
	points.push(ye - ry);
};
var openfl__$internal_renderer_PolyK = function() { };
$hxClasses["openfl._internal.renderer.PolyK"] = openfl__$internal_renderer_PolyK;
openfl__$internal_renderer_PolyK.__name__ = ["openfl","_internal","renderer","PolyK"];
openfl__$internal_renderer_PolyK.triangulate = function(tgs,p) {
	var sign = true;
	var n = p.length >> 1;
	if(n < 3) {
		return [];
	}
	var _g = [];
	var _g2 = 0;
	var _g1 = n;
	while(_g2 < _g1) {
		var i = _g2++;
		_g.push(i);
	}
	var avl = _g;
	var i1 = 0;
	var al = n;
	var earFound = false;
	while(al > 3) {
		var i0 = avl[i1 % al];
		var i11 = avl[(i1 + 1) % al];
		var i2 = avl[(i1 + 2) % al];
		var ax = p[2 * i0];
		var ay = p[2 * i0 + 1];
		var bx = p[2 * i11];
		var by = p[2 * i11 + 1];
		var cx = p[2 * i2];
		var cy = p[2 * i2 + 1];
		earFound = false;
		if(openfl__$internal_renderer_PolyK._convex(ax,ay,bx,by,cx,cy,sign)) {
			earFound = true;
			var _g21 = 0;
			var _g11 = al;
			while(_g21 < _g11) {
				var j = _g21++;
				var vi = avl[j];
				if(vi == i0 || vi == i11 || vi == i2) {
					continue;
				}
				if(openfl__$internal_renderer_PolyK._PointInTriangle(p[2 * vi],p[2 * vi + 1],ax,ay,bx,by,cx,cy)) {
					earFound = false;
					break;
				}
			}
		}
		if(earFound) {
			tgs.push(i0);
			tgs.push(i11);
			tgs.push(i2);
			avl.splice((i1 + 1) % al,1);
			--al;
			i1 = 0;
		} else if(i1++ > 3 * al) {
			if(sign) {
				tgs = [];
				var _g12 = [];
				var _g3 = 0;
				var _g22 = n;
				while(_g3 < _g22) {
					var k = _g3++;
					_g12.push(k);
				}
				avl = _g12;
				i1 = 0;
				al = n;
				sign = false;
			} else {
				haxe_Log.trace("Warning: shape too complex to fill",{ fileName : "PolyK.hx", lineNumber : 104, className : "openfl._internal.renderer.PolyK", methodName : "triangulate"});
				return [];
			}
		}
	}
	tgs.push(avl[0]);
	tgs.push(avl[1]);
	tgs.push(avl[2]);
	return tgs;
};
openfl__$internal_renderer_PolyK._PointInTriangle = function(px,py,ax,ay,bx,by,cx,cy) {
	var v0x = cx - ax | 0;
	var v0y = cy - ay | 0;
	var v1x = bx - ax | 0;
	var v1y = by - ay | 0;
	var v2x = px - ax | 0;
	var v2y = py - ay | 0;
	var dot00 = v0x * v0x + v0y * v0y;
	var dot01 = v0x * v1x + v0y * v1y;
	var dot02 = v0x * v2x + v0y * v2y;
	var dot11 = v1x * v1x + v1y * v1y;
	var dot12 = v1x * v2x + v1y * v2y;
	var invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
	var u = (dot11 * dot02 - dot01 * dot12) * invDenom;
	var v = (dot00 * dot12 - dot01 * dot02) * invDenom;
	if(u >= 0 && v >= 0) {
		return u + v < 1;
	} else {
		return false;
	}
};
openfl__$internal_renderer_PolyK._convex = function(ax,ay,bx,by,cx,cy,sign) {
	return (ay - by) * (cx - bx) + (bx - ax) * (cy - by) >= 0 == sign;
};
var openfl__$internal_renderer_RenderSession = function() {
	this.activeTextures = 0;
};
$hxClasses["openfl._internal.renderer.RenderSession"] = openfl__$internal_renderer_RenderSession;
openfl__$internal_renderer_RenderSession.__name__ = ["openfl","_internal","renderer","RenderSession"];
openfl__$internal_renderer_RenderSession.prototype = {
	__class__: openfl__$internal_renderer_RenderSession
};
var openfl__$internal_renderer_cairo_CairoBitmap = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoBitmap"] = openfl__$internal_renderer_cairo_CairoBitmap;
openfl__$internal_renderer_cairo_CairoBitmap.__name__ = ["openfl","_internal","renderer","cairo","CairoBitmap"];
openfl__$internal_renderer_cairo_CairoBitmap.render = function(bitmap,renderSession) {
	if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) {
		return;
	}
	var cairo = renderSession.cairo;
	if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
		if(bitmap.__mask != null) {
			renderSession.maskManager.pushMask(bitmap.__mask);
		}
		var transform = bitmap.__renderTransform;
		var scrollRect = bitmap.get_scrollRect();
		if(renderSession.roundPixels) {
			var matrix = transform.__toMatrix3();
			matrix.tx = Math.round(matrix.tx);
			matrix.ty = Math.round(matrix.ty);
			cairo.set_matrix(matrix);
		} else {
			cairo.set_matrix(transform.__toMatrix3());
		}
		var surface = bitmap.bitmapData.getSurface();
		if(surface != null) {
			var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(surface);
			lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter(pattern,bitmap.smoothing ? 1 : 3);
			if(scrollRect != null) {
				cairo.pushGroup();
				cairo.set_source(pattern);
				cairo.newPath();
				cairo.rectangle(scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
				cairo.fill();
				cairo.popGroupToSource();
			} else {
				cairo.set_source(pattern);
			}
			if(bitmap.__worldAlpha == 1) {
				cairo.paint();
			} else {
				cairo.paintWithAlpha(bitmap.__worldAlpha);
			}
		}
		if(bitmap.__mask != null) {
			renderSession.maskManager.popMask();
		}
	}
};
var openfl__$internal_renderer_cairo_CairoGraphics = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoGraphics"] = openfl__$internal_renderer_cairo_CairoGraphics;
openfl__$internal_renderer_cairo_CairoGraphics.__name__ = ["openfl","_internal","renderer","cairo","CairoGraphics"];
openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
openfl__$internal_renderer_cairo_CairoGraphics.bitmapRepeat = null;
openfl__$internal_renderer_cairo_CairoGraphics.bounds = null;
openfl__$internal_renderer_cairo_CairoGraphics.cairo = null;
openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = null;
openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.graphics = null;
openfl__$internal_renderer_cairo_CairoGraphics.hasFill = null;
openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = null;
openfl__$internal_renderer_cairo_CairoGraphics.hitTesting = null;
openfl__$internal_renderer_cairo_CairoGraphics.inversePendingMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = null;
openfl__$internal_renderer_cairo_CairoGraphics.closePath = function() {
	if(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern == null) {
		return;
	}
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern);
	if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
		openfl__$internal_renderer_cairo_CairoGraphics.cairo.strokePreserve();
	}
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
};
openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
	var pattern = null;
	switch(type) {
	case 0:
		if(matrix == null) {
			matrix = new openfl_geom_Matrix();
		}
		var point1 = matrix.transformPoint(new openfl_geom_Point(-819.2,0));
		var point2 = matrix.transformPoint(new openfl_geom_Point(819.2,0));
		point1.x += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
		point2.x += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
		point1.y += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
		point2.y += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
		pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createLinear(point1.x,point1.y,point2.x,point2.y);
		break;
	case 1:
		if(matrix == null) {
			matrix = new openfl_geom_Matrix();
		}
		var point = matrix.transformPoint(new openfl_geom_Point(1638.4,0));
		var x = matrix.tx + openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
		var y = matrix.ty + openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
		pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRadial(x,y,0,x,y,(point.x - matrix.tx) / 2);
		break;
	}
	var _g1 = 0;
	var _g = colors.length;
	while(_g1 < _g) {
		var i = _g1++;
		var rgb = colors[i];
		var alpha = alphas[i];
		var r = ((rgb & 16711680) >>> 16) / 255;
		var g = ((rgb & 65280) >>> 8) / 255;
		var b = (rgb & 255) / 255;
		var ratio = ratios[i] / 255;
		if(ratio < 0) {
			ratio = 0;
		}
		if(ratio > 1) {
			ratio = 1;
		}
		lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGBA(pattern,ratio,r,g,b,alpha);
	}
	var mat = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_matrix(pattern);
	mat.tx = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
	mat.ty = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
	lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix(pattern,mat);
	return pattern;
};
openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern = function(bitmapFill,matrix,bitmapRepeat) {
	var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(bitmapFill.getSurface());
	if(bitmapRepeat) {
		lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_extend(pattern,1);
	}
	openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = matrix;
	return pattern;
};
openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect = function(x,y,width,height,ellipseWidth,ellipseHeight) {
	if(ellipseHeight == null) {
		ellipseHeight = ellipseWidth;
	}
	ellipseWidth *= 0.5;
	ellipseHeight *= 0.5;
	if(ellipseWidth > width / 2) {
		ellipseWidth = width / 2;
	}
	if(ellipseHeight > height / 2) {
		ellipseHeight = height / 2;
	}
	var xe = x + width;
	var ye = y + height;
	var cx1 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_cairo_CairoGraphics.SIN45;
	var cx2 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_cairo_CairoGraphics.TAN22;
	var cy1 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_cairo_CairoGraphics.SIN45;
	var cy2 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_cairo_CairoGraphics.TAN22;
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(xe,ye - ellipseHeight);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe,ye + cy2,xe + cx1,ye + cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe + cx2,ye,xe - ellipseWidth,ye);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x + ellipseWidth,ye);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x - cx2,ye,x - cx1,ye + cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x,ye + cy2,x,ye - ellipseHeight);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x,y + ellipseHeight);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x,y - cy2,x - cx1,y - cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x - cx2,y,x + ellipseWidth,y);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(xe - ellipseWidth,y);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe + cx2,y,xe + cx1,y - cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe,y - cy2,xe,y + ellipseHeight);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(xe,ye - ellipseHeight);
};
openfl__$internal_renderer_cairo_CairoGraphics.endFill = function() {
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
	openfl__$internal_renderer_cairo_CairoGraphics.playCommands(openfl__$internal_renderer_cairo_CairoGraphics.fillCommands,false);
	openfl__$internal_renderer_cairo_CairoGraphics.fillCommands.clear();
};
openfl__$internal_renderer_cairo_CairoGraphics.endStroke = function() {
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
	openfl__$internal_renderer_cairo_CairoGraphics.playCommands(openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands,true);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
	openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands.clear();
};
openfl__$internal_renderer_cairo_CairoGraphics.hitTest = function(graphics,x,y) {
	return false;
};
openfl__$internal_renderer_cairo_CairoGraphics.isCCW = function(x1,y1,x2,y2,x3,y3) {
	return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_cairo_CairoGraphics.normalizeUVT = function(uvt,skipT) {
	if(skipT == null) {
		skipT = false;
	}
	var max = -Infinity;
	var tmp = -Infinity;
	var len = uvt.length;
	var _g1 = 1;
	var _g = len + 1;
	while(_g1 < _g) {
		var t = _g1++;
		if(skipT && t % 3 == 0) {
			continue;
		}
		tmp = uvt.data[t - 1];
		if(max < tmp) {
			max = tmp;
		}
	}
	var this1 = new openfl_VectorData();
	var this2 = new Array(0);
	this1.data = this2;
	this1.length = 0;
	this1.fixed = false;
	var result = this1;
	var _g11 = 1;
	var _g2 = len + 1;
	while(_g11 < _g2) {
		var t1 = _g11++;
		if(skipT && t1 % 3 == 0) {
			continue;
		}
		var x = uvt.data[t1 - 1] / max;
		if(!result.fixed) {
			result.length++;
			if(result.data.length < result.length) {
				var length = result.data.length + 10;
				var this3 = new Array(length);
				var data = this3;
				haxe_ds__$Vector_Vector_$Impl_$.blit(result.data,0,data,0,result.data.length);
				result.data = data;
			}
			result.data[result.length - 1] = x;
		}
	}
	return { max : max, uvt : result};
};
openfl__$internal_renderer_cairo_CairoGraphics.playCommands = function(commands,stroke) {
	if(stroke == null) {
		stroke = false;
	}
	if(commands.get_length() == 0) {
		return;
	}
	openfl__$internal_renderer_cairo_CairoGraphics.bounds = openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds;
	var offsetX = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
	var offsetY = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
	var positionX = 0.0;
	var positionY = 0.0;
	var closeGap = false;
	var startX = 0.0;
	var startY = 0.0;
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_fillRule(1);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_antialias(3);
	var hasPath = false;
	var data = new openfl__$internal_renderer_DrawCommandReader(commands);
	var _g = 0;
	var _g1 = commands.types;
	try {
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:
				var c = data.readBeginBitmapFill();
				openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c));
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c);
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapRepeat = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c);
				openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
				break;
			case 1:
				var c1 = data.readBeginFill();
				if(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) < 0.005) {
					openfl__$internal_renderer_cairo_CairoGraphics.hasFill = false;
				} else {
					if(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern != null) {
						openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
					}
					openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA(((openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 16711680) >>> 16) / 255,((openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 65280) >>> 8) / 255,(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 255) / 255,openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1));
					openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
				}
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
				break;
			case 2:
				var c2 = data.readBeginGradientFill();
				if(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern != null) {
					openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
				}
				openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c2));
				openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
				break;
			case 3:
				var c3 = data.readCubicCurveTo();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3) - offsetY);
				break;
			case 4:
				var c4 = data.readCurveTo();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4) - offsetY);
				break;
			case 5:
				var c5 = data.readDrawCircle();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5) - offsetX + openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5) - offsetY);
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.arc(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5),0,Math.PI * 2);
				break;
			case 6:
				var c6 = data.readDrawEllipse();
				hasPath = true;
				var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6);
				var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6);
				x -= offsetX;
				y -= offsetY;
				var kappa = .5522848;
				var ox = width / 2 * kappa;
				var oy = height / 2 * kappa;
				var xe = x + width;
				var ye = y + height;
				var xm = x + width / 2;
				var ym = y + height / 2;
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(x,ym);
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(x,ym - oy,xm - ox,y,xm,y);
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(xm + ox,y,xe,ym - oy,xe,ym);
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(xe,ym + oy,xm + ox,ye,xm,ye);
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(xm - ox,ye,x,ym + oy,x,ym);
				break;
			case 8:
				var c7 = data.readDrawRect();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.rectangle(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
				break;
			case 9:
				var c8 = data.readDrawRoundRect();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
				break;
			case 10:
				var c9 = data.readDrawTiles();
				var useScale = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 1) > 0;
				var useRotation = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 2) > 0;
				var offsetX1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
				var offsetY1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
				var useTransform = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 16) > 0;
				var useRGB = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 4) > 0;
				var useAlpha = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 8) > 0;
				var useRect = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 32) > 0;
				var useOrigin = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 64) > 0;
				var useBlendAdd = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 65536) > 0;
				var useBlendOverlay = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 4194304) > 0;
				if(useTransform) {
					useScale = false;
					useRotation = false;
				}
				var scaleIndex = 0;
				var rotationIndex = 0;
				var rgbIndex = 0;
				var alphaIndex = 0;
				var transformIndex = 0;
				var numValues = 3;
				if(useRect) {
					if(useOrigin) {
						numValues = 8;
					} else {
						numValues = 6;
					}
				}
				if(useScale) {
					scaleIndex = numValues;
					++numValues;
				}
				if(useRotation) {
					rotationIndex = numValues;
					++numValues;
				}
				if(useTransform) {
					transformIndex = numValues;
					numValues += 4;
				}
				if(useRGB) {
					rgbIndex = numValues;
					numValues += 3;
				}
				if(useAlpha) {
					alphaIndex = numValues;
					++numValues;
				}
				var totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9).length;
				if(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9) >= 0 && totalCount > openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9)) {
					totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9);
				}
				var itemCount = totalCount / numValues | 0;
				var index = 0;
				var rect = null;
				var center = null;
				var previousTileID = -1;
				var surface;
				openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.__sync();
				surface = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.getSurface();
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.save();
				if(useBlendAdd) {
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_operator(12);
				}
				if(useBlendOverlay) {
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_operator(16);
				}
				while(index < totalCount) {
					var i = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2] | 0;
					var tileID = !useRect ? i : -1;
					if(!useRect && tileID != previousTileID) {
						rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__tileRects[tileID];
						center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__centerPoints[tileID];
						previousTileID = tileID;
					} else if(useRect) {
						rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__rectTile;
						rect.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 3],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 4],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 5]);
						center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__point;
						if(useOrigin) {
							center.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 6],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 7]);
						} else {
							center.setTo(0,0);
						}
					}
					if(rect != null && rect.width > 0 && rect.height > 0 && center != null) {
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.identityMatrix();
						if(useTransform) {
							var matrix = new lime_math_Matrix3(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 1],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 3],0,0);
							openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_matrix(matrix);
						}
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.translate(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index] - offsetX1,openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 1] - offsetY1);
						if(useRotation) {
							openfl__$internal_renderer_cairo_CairoGraphics.cairo.rotate(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + rotationIndex]);
						}
						if(useScale) {
							var scale = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + scaleIndex];
							openfl__$internal_renderer_cairo_CairoGraphics.cairo.scale(scale,scale);
						}
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.setSourceSurface(surface,0,0);
						if(useAlpha) {
							if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
								openfl__$internal_renderer_cairo_CairoGraphics.cairo.paintWithAlpha(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + alphaIndex]);
							}
						} else if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
							openfl__$internal_renderer_cairo_CairoGraphics.cairo.paint();
						}
					}
					index += numValues;
				}
				if(useBlendAdd || useBlendOverlay) {
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_operator(2);
				}
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.restore();
				break;
			case 11:
				var c10 = data.readDrawTriangles();
				var v = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c10);
				var ind = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c10);
				var uvt = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10);
				var colorFill = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill == null;
				if(colorFill && uvt != null) {
					throw "__break__";
				}
				var width1 = 0;
				var height1 = 0;
				if(!colorFill) {
					if(uvt == null) {
						var this1 = new openfl_VectorData();
						var this2 = new Array(0);
						this1.data = this2;
						this1.length = 0;
						this1.fixed = false;
						uvt = this1;
						var _g3 = 0;
						var _g2 = v.length / 2 | 0;
						while(_g3 < _g2) {
							var i1 = _g3++;
							var x1 = v.data[i1 * 2] / openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.width;
							if(!uvt.fixed) {
								uvt.length++;
								if(uvt.data.length < uvt.length) {
									var length = uvt.data.length + 10;
									var this3 = new Array(length);
									var data1 = this3;
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data1,0,uvt.data.length);
									uvt.data = data1;
								}
								uvt.data[uvt.length - 1] = x1;
							}
							var x2 = v.data[i1 * 2 + 1] / openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.height;
							if(!uvt.fixed) {
								uvt.length++;
								if(uvt.data.length < uvt.length) {
									var length1 = uvt.data.length + 10;
									var this4 = new Array(length1);
									var data2 = this4;
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data2,0,uvt.data.length);
									uvt.data = data2;
								}
								uvt.data[uvt.length - 1] = x2;
							}
						}
					}
					var skipT = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10).length != v.length;
					var normalizedUVT = openfl__$internal_renderer_cairo_CairoGraphics.normalizeUVT(uvt,skipT);
					var maxUVT = normalizedUVT.max;
					uvt = normalizedUVT.uvt;
					if(maxUVT > 1) {
						width1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.width | 0;
						height1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.height | 0;
					} else {
						width1 = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.width;
						height1 = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.height;
					}
				}
				var i2 = 0;
				var l = ind.length;
				var a_;
				var b_;
				var c_;
				var iax;
				var iay;
				var ibx;
				var iby;
				var icx;
				var icy;
				var x11;
				var y1;
				var x21;
				var y2;
				var x3;
				var y3;
				var uvx1;
				var uvy1;
				var uvx2;
				var uvy2;
				var uvx3;
				var uvy3;
				var denom;
				var t1;
				var t2;
				var t3;
				var t4;
				var dx;
				var dy;
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_antialias(1);
				while(i2 < l) {
					a_ = i2;
					b_ = i2 + 1;
					c_ = i2 + 2;
					iax = ind.data[a_] * 2;
					iay = ind.data[a_] * 2 + 1;
					ibx = ind.data[b_] * 2;
					iby = ind.data[b_] * 2 + 1;
					icx = ind.data[c_] * 2;
					icy = ind.data[c_] * 2 + 1;
					x11 = v.data[iax];
					y1 = v.data[iay];
					x21 = v.data[ibx];
					y2 = v.data[iby];
					x3 = v.data[icx];
					y3 = v.data[icy];
					var _g21 = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c10);
					switch(_g21) {
					case 0:
						if((x21 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0) {
							i2 += 3;
							continue;
						}
						break;
					case 2:
						if(!((x21 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0)) {
							i2 += 3;
							continue;
						}
						break;
					default:
					}
					if(colorFill) {
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(x11,y1);
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x21,y2);
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x3,y3);
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
						if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
							openfl__$internal_renderer_cairo_CairoGraphics.cairo.fillPreserve();
						}
						i2 += 3;
						continue;
					}
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.identityMatrix();
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(x11,y1);
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x21,y2);
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x3,y3);
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
					uvx1 = uvt.data[iax] * width1;
					uvx2 = uvt.data[ibx] * width1;
					uvx3 = uvt.data[icx] * width1;
					uvy1 = uvt.data[iay] * height1;
					uvy2 = uvt.data[iby] * height1;
					uvy3 = uvt.data[icy] * height1;
					denom = uvx1 * (uvy3 - uvy2) - uvx2 * uvy3 + uvx3 * uvy2 + (uvx2 - uvx3) * uvy1;
					if(denom == 0) {
						i2 += 3;
						continue;
					}
					t1 = -(uvy1 * (x3 - x21) - uvy2 * x3 + uvy3 * x21 + (uvy2 - uvy3) * x11) / denom;
					t2 = (uvy2 * y3 + uvy1 * (y2 - y3) - uvy3 * y2 + (uvy3 - uvy2) * y1) / denom;
					t3 = (uvx1 * (x3 - x21) - uvx2 * x3 + uvx3 * x21 + (uvx2 - uvx3) * x11) / denom;
					t4 = -(uvx2 * y3 + uvx1 * (y2 - y3) - uvx3 * y2 + (uvx3 - uvx2) * y1) / denom;
					dx = (uvx1 * (uvy3 * x21 - uvy2 * x3) + uvy1 * (uvx2 * x3 - uvx3 * x21) + (uvx3 * uvy2 - uvx2 * uvy3) * x11) / denom;
					dy = (uvx1 * (uvy3 * y2 - uvy2 * y3) + uvy1 * (uvx2 * y3 - uvx3 * y2) + (uvx3 * uvy2 - uvx2 * uvy3) * y1) / denom;
					var matrix1 = new lime_math_Matrix3(t1,t2,t3,t4,dx,dy);
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_matrix(matrix1);
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern);
					if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.fill();
					}
					i2 += 3;
				}
				break;
			case 13:
				var c11 = data.readLineBitmapStyle();
				if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
					openfl__$internal_renderer_cairo_CairoGraphics.closePath();
				}
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(positionX - offsetX,positionY - offsetY);
				openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c11));
				openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
				break;
			case 14:
				var c12 = data.readLineGradientStyle();
				if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
					openfl__$internal_renderer_cairo_CairoGraphics.closePath();
				}
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(positionX - offsetX,positionY - offsetY);
				openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c12));
				openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
				break;
			case 15:
				var c13 = data.readLineStyle();
				if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
					openfl__$internal_renderer_cairo_CairoGraphics.closePath();
				}
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(positionX - offsetX,positionY - offsetY);
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13) == null) {
					openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = false;
				} else {
					openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineWidth(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13) > 0 ? openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13) : 1);
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c13) == null) {
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineJoin(1);
					} else {
						var tmp = openfl__$internal_renderer_cairo_CairoGraphics.cairo;
						var _g22 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c13);
						var tmp1;
						switch(_g22) {
						case 0:
							tmp1 = 2;
							break;
						case 1:
							tmp1 = 0;
							break;
						default:
							tmp1 = 1;
						}
						tmp.set_lineJoin(tmp1);
					}
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c13) == null) {
						openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineCap(1);
					} else {
						var tmp2 = openfl__$internal_renderer_cairo_CairoGraphics.cairo;
						var _g23 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c13);
						var tmp3;
						switch(_g23) {
						case 0:
							tmp3 = 0;
							break;
						case 2:
							tmp3 = 2;
							break;
						default:
							tmp3 = 1;
						}
						tmp2.set_lineCap(tmp3);
					}
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_miterLimit(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c13));
					var r = ((openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13) & 16711680) >>> 16) / 255;
					var g = ((openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13) & 65280) >>> 8) / 255;
					var b = (openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13) & 255) / 255;
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c13) == 1) {
						openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGB(r,g,b);
					} else {
						openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA(r,g,b,openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c13));
					}
				}
				break;
			case 16:
				var c14 = data.readLineTo();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14) - offsetX,openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14);
				positionY = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14);
				break;
			case 17:
				var c15 = data.readMoveTo();
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15) - offsetX,openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15);
				positionY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15);
				closeGap = true;
				startX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15);
				startY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15);
				break;
			default:
				data.skip(type);
			}
		}
	} catch( e ) { if( e != "__break__" ) throw e; }
	data.destroy();
	if(hasPath) {
		if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
			if(openfl__$internal_renderer_cairo_CairoGraphics.hasFill && closeGap) {
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(startX - offsetX,startY - offsetY);
			} else if(closeGap && positionX == startX && positionY == startY) {
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
			}
			openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern);
			if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.strokePreserve();
			}
		}
		if(!stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasFill) {
			openfl__$internal_renderer_cairo_CairoGraphics.cairo.translate(-openfl__$internal_renderer_cairo_CairoGraphics.bounds.x,-openfl__$internal_renderer_cairo_CairoGraphics.bounds.y);
			if(openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix != null) {
				var matrix2 = openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix.clone();
				matrix2.invert();
				if(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix != null) {
					matrix2.concat(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix);
				}
				lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern,matrix2.__toMatrix3());
			}
			openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern);
			if(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix != null) {
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.transform(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix.__toMatrix3());
				if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
					openfl__$internal_renderer_cairo_CairoGraphics.cairo.fillPreserve();
				}
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.transform(openfl__$internal_renderer_cairo_CairoGraphics.inversePendingMatrix.__toMatrix3());
			} else if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
				openfl__$internal_renderer_cairo_CairoGraphics.cairo.fillPreserve();
			}
			openfl__$internal_renderer_cairo_CairoGraphics.cairo.translate(openfl__$internal_renderer_cairo_CairoGraphics.bounds.x,openfl__$internal_renderer_cairo_CairoGraphics.bounds.y);
			openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
		}
	}
};
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo = function(cx,cy,x,y) {
	var current = null;
	if(!openfl__$internal_renderer_cairo_CairoGraphics.cairo.get_hasCurrentPoint()) {
		openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(cx,cy);
		current = new lime_math_Vector2(cx,cy);
	} else {
		current = openfl__$internal_renderer_cairo_CairoGraphics.cairo.get_currentPoint();
	}
	var cx1 = current.x + 0.66666666666666663 * (cx - current.x);
	var cy1 = current.y + 0.66666666666666663 * (cy - current.y);
	var cx2 = x + 0.66666666666666663 * (cx - x);
	var cy2 = y + 0.66666666666666663 * (cy - y);
	openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(cx1,cy1,cx2,cy2,x,y);
};
openfl__$internal_renderer_cairo_CairoGraphics.render = function(graphics,renderSession) {
};
openfl__$internal_renderer_cairo_CairoGraphics.renderMask = function(graphics,renderSession) {
	if(graphics.__commands.get_length() != 0) {
		var cairo = renderSession.cairo;
		var positionX = 0.0;
		var positionY = 0.0;
		var offsetX = 0;
		var offsetY = 0;
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 3:
				var c = data.readCubicCurveTo();
				cairo.curveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				positionY = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				break;
			case 4:
				var c1 = data.readCurveTo();
				openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c1) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c1) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1);
				positionY = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1);
				break;
			case 5:
				var c2 = data.readDrawCircle();
				cairo.arc(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c2) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c2) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c2),0,Math.PI * 2);
				break;
			case 6:
				var c3 = data.readDrawEllipse();
				var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c3);
				var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c3);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c3);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c3);
				x -= offsetX;
				y -= offsetY;
				var kappa = .5522848;
				var ox = width / 2 * kappa;
				var oy = height / 2 * kappa;
				var xe = x + width;
				var ye = y + height;
				var xm = x + width / 2;
				var ym = y + height / 2;
				cairo.moveTo(x,ym);
				cairo.curveTo(x,ym - oy,xm - ox,y,xm,y);
				cairo.curveTo(xm + ox,y,xe,ym - oy,xe,ym);
				cairo.curveTo(xe,ym + oy,xm + ox,ye,xm,ye);
				cairo.curveTo(xm - ox,ye,x,ym + oy,x,ym);
				break;
			case 8:
				var c4 = data.readDrawRect();
				cairo.rectangle(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c4) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c4),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c4));
				break;
			case 9:
				var c5 = data.readDrawRoundRect();
				openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c5) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c5) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c5));
				break;
			case 16:
				var c6 = data.readLineTo();
				cairo.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6) - offsetX,openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6);
				positionY = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6);
				break;
			case 17:
				var c7 = data.readMoveTo();
				cairo.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7);
				positionY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7);
				break;
			default:
				data.skip(type);
			}
		}
		data.destroy();
	}
};
var openfl__$internal_renderer_cairo_CairoMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.cairo.CairoMaskManager"] = openfl__$internal_renderer_cairo_CairoMaskManager;
openfl__$internal_renderer_cairo_CairoMaskManager.__name__ = ["openfl","_internal","renderer","cairo","CairoMaskManager"];
openfl__$internal_renderer_cairo_CairoMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_cairo_CairoMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	pushMask: function(mask) {
		var cairo = this.renderSession.cairo;
		cairo.save();
		var transform = mask.__getWorldTransform();
		cairo.set_matrix(transform.__toMatrix3());
		cairo.newPath();
		mask.__renderCairoMask(this.renderSession);
		cairo.clip();
	}
	,pushRect: function(rect,transform) {
		var cairo = this.renderSession.cairo;
		cairo.save();
		cairo.set_matrix(new lime_math_Matrix3(transform.a,transform.c,transform.b,transform.d,transform.tx,transform.ty));
		cairo.newPath();
		cairo.rectangle(rect.x,rect.y,rect.width,rect.height);
		cairo.clip();
	}
	,popMask: function() {
		this.renderSession.cairo.restore();
	}
	,popRect: function() {
		this.renderSession.cairo.restore();
	}
	,__class__: openfl__$internal_renderer_cairo_CairoMaskManager
});
var openfl__$internal_renderer_cairo_CairoRenderer = function(width,height,cairo) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.cairo = cairo;
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.cairo = cairo;
	this.renderSession.roundPixels = true;
	this.renderSession.renderer = this;
	this.renderSession.maskManager = new openfl__$internal_renderer_cairo_CairoMaskManager(this.renderSession);
};
$hxClasses["openfl._internal.renderer.cairo.CairoRenderer"] = openfl__$internal_renderer_cairo_CairoRenderer;
openfl__$internal_renderer_cairo_CairoRenderer.__name__ = ["openfl","_internal","renderer","cairo","CairoRenderer"];
openfl__$internal_renderer_cairo_CairoRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_cairo_CairoRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
		this.cairo.identityMatrix();
		if(stage.__clearBeforeRender) {
			this.cairo.setSourceRGB(stage.__colorSplit[0],stage.__colorSplit[1],stage.__colorSplit[2]);
			this.cairo.paint();
		}
		stage.__renderCairo(this.renderSession);
	}
	,renderDisplayObject: function(object) {
		this.cairo.identityMatrix();
		object.__renderCairo(this.renderSession);
	}
	,__class__: openfl__$internal_renderer_cairo_CairoRenderer
});
var openfl__$internal_renderer_cairo_CairoShape = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoShape"] = openfl__$internal_renderer_cairo_CairoShape;
openfl__$internal_renderer_cairo_CairoShape.__name__ = ["openfl","_internal","renderer","cairo","CairoShape"];
openfl__$internal_renderer_cairo_CairoShape.render = function(shape,renderSession) {
};
var openfl__$internal_renderer_cairo_CairoTextField = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoTextField"] = openfl__$internal_renderer_cairo_CairoTextField;
openfl__$internal_renderer_cairo_CairoTextField.__name__ = ["openfl","_internal","renderer","cairo","CairoTextField"];
openfl__$internal_renderer_cairo_CairoTextField.render = function(textField,renderSession) {
};
var openfl__$internal_renderer_canvas_CanvasBitmap = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasBitmap"] = openfl__$internal_renderer_canvas_CanvasBitmap;
openfl__$internal_renderer_canvas_CanvasBitmap.__name__ = ["openfl","_internal","renderer","canvas","CanvasBitmap"];
openfl__$internal_renderer_canvas_CanvasBitmap.render = function(bitmap,renderSession) {
	if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) {
		return;
	}
	var context = renderSession.context;
	if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
		if(bitmap.__mask != null) {
			renderSession.maskManager.pushMask(bitmap.__mask);
		}
		bitmap.bitmapData.__sync();
		context.globalAlpha = bitmap.__worldAlpha;
		var transform = bitmap.__renderTransform;
		var scrollRect = bitmap.get_scrollRect();
		if(renderSession.roundPixels) {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
		} else {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		}
		if(!bitmap.smoothing) {
			context.mozImageSmoothingEnabled = false;
			context.msImageSmoothingEnabled = false;
			context.imageSmoothingEnabled = false;
		}
		if(scrollRect == null) {
			context.drawImage(bitmap.bitmapData.image.get_src(),0,0);
		} else {
			context.drawImage(bitmap.bitmapData.image.get_src(),scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height,scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
		}
		if(!bitmap.smoothing) {
			context.mozImageSmoothingEnabled = true;
			context.msImageSmoothingEnabled = true;
			context.imageSmoothingEnabled = true;
		}
		if(bitmap.__mask != null) {
			renderSession.maskManager.popMask();
		}
	}
};
var openfl__$internal_renderer_canvas_CanvasGraphics = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasGraphics"] = openfl__$internal_renderer_canvas_CanvasGraphics;
openfl__$internal_renderer_canvas_CanvasGraphics.__name__ = ["openfl","_internal","renderer","canvas","CanvasGraphics"];
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapStroke = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bounds = null;
openfl__$internal_renderer_canvas_CanvasGraphics.graphics = null;
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = null;
openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = null;
openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = null;
openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = null;
openfl__$internal_renderer_canvas_CanvasGraphics.context = null;
openfl__$internal_renderer_canvas_CanvasGraphics.closePath = function() {
	if(openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle == null) {
		return;
	}
	openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
	openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
	openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
};
openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill = function(bitmap,bitmapRepeat) {
	bitmap.__sync();
	return openfl__$internal_renderer_canvas_CanvasGraphics.context.createPattern(bitmap.image.get_src(),bitmapRepeat ? "repeat" : "no-repeat");
};
openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
	var gradientFill = null;
	switch(type) {
	case 0:
		var matrix1 = matrix != null ? matrix : new openfl_geom_Matrix();
		var point1 = matrix1.transformPoint(new openfl_geom_Point(-819.2,0));
		var point2 = matrix1.transformPoint(new openfl_geom_Point(819.2,0));
		gradientFill = openfl__$internal_renderer_canvas_CanvasGraphics.context.createLinearGradient(point1.x,point1.y,point2.x,point2.y);
		break;
	case 1:
		if(matrix == null) {
			matrix = new openfl_geom_Matrix();
		}
		var point = matrix.transformPoint(new openfl_geom_Point(1638.4,0));
		gradientFill = openfl__$internal_renderer_canvas_CanvasGraphics.context.createRadialGradient(matrix.tx,matrix.ty,0,matrix.tx,matrix.ty,(point.x - matrix.tx) / 2);
		break;
	}
	var _g1 = 0;
	var _g = colors.length;
	while(_g1 < _g) {
		var i = _g1++;
		var rgb = colors[i];
		var alpha = alphas[i];
		var r = (rgb & 16711680) >>> 16;
		var g = (rgb & 65280) >>> 8;
		var b = rgb & 255;
		var ratio = ratios[i] / 255;
		if(ratio < 0) {
			ratio = 0;
		}
		if(ratio > 1) {
			ratio = 1;
		}
		gradientFill.addColorStop(ratio,"rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")");
	}
	return gradientFill;
};
openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas = function(bitmap,repeat,width,height) {
	var canvas = window.document.createElement("canvas");
	var context = canvas.getContext("2d");
	canvas.width = width;
	canvas.height = height;
	var tmp = bitmap.image.get_src();
	context.fillStyle = context.createPattern(tmp,repeat ? "repeat" : "no-repeat");
	context.beginPath();
	context.moveTo(0,0);
	context.lineTo(0,height);
	context.lineTo(width,height);
	context.lineTo(width,0);
	context.lineTo(0,0);
	context.closePath();
	if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
		context.fill();
	}
	return canvas;
};
openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect = function(x,y,width,height,ellipseWidth,ellipseHeight) {
	if(ellipseHeight == null) {
		ellipseHeight = ellipseWidth;
	}
	ellipseWidth *= 0.5;
	ellipseHeight *= 0.5;
	if(ellipseWidth > width / 2) {
		ellipseWidth = width / 2;
	}
	if(ellipseHeight > height / 2) {
		ellipseHeight = height / 2;
	}
	var xe = x + width;
	var ye = y + height;
	var cx1 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;
	var cx2 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;
	var cy1 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;
	var cy2 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;
	openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(xe,ye - ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe,ye + cy2,xe + cx1,ye + cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe + cx2,ye,xe - ellipseWidth,ye);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x + ellipseWidth,ye);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x - cx2,ye,x - cx1,ye + cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x,ye + cy2,x,ye - ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x,y + ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x,y - cy2,x - cx1,y - cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x - cx2,y,x + ellipseWidth,y);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(xe - ellipseWidth,y);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe + cx2,y,xe + cx1,y - cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe,y - cy2,xe,y + ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(xe,ye - ellipseHeight);
};
openfl__$internal_renderer_canvas_CanvasGraphics.endFill = function() {
	openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
	openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands,false);
	openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
};
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke = function() {
	openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
	openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands,true);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
	openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
};
openfl__$internal_renderer_canvas_CanvasGraphics.hitTest = function(graphics,x,y) {
	if(graphics.__commands.get_length() == 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds == null || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width <= 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height <= 0) {
		return false;
	} else {
		openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = true;
		x -= openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
		y -= openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
		if(graphics.__canvas == null) {
			graphics.__canvas = window.document.createElement("canvas");
			graphics.__context = graphics.__canvas.getContext("2d");
		}
		openfl__$internal_renderer_canvas_CanvasGraphics.context = graphics.__context;
		openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
		openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
		openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
		openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:case 1:case 2:
				openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
				openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
					data.destroy();
					return true;
				}
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
					data.destroy();
					return true;
				}
				if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL) {
					var c = data.readBeginBitmapFill();
					openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
					openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
				} else if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL) {
					var c1 = data.readBeginGradientFill();
					openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
					openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
				} else {
					var c2 = data.readBeginFill();
					openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),1);
					openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),1);
				}
				break;
			case 3:
				var c3 = data.readCubicCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
				break;
			case 4:
				var c4 = data.readCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
				break;
			case 5:
				var c5 = data.readDrawCircle();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
				break;
			case 6:
				var c6 = data.readDrawEllipse();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
				break;
			case 8:
				var c7 = data.readDrawRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
				break;
			case 9:
				var c8 = data.readDrawRoundRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
				break;
			case 12:
				data.readEndFill();
				openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
				openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
					data.destroy();
					return true;
				}
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
					data.destroy();
					return true;
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
				openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
				break;
			case 13:
				var c9 = data.readLineBitmapStyle();
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c9),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c9),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c9),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth(c9));
				break;
			case 14:
				var c10 = data.readLineGradientStyle();
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c10));
				break;
			case 15:
				var c11 = data.readLineStyle();
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11),1,openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c11));
				break;
			case 16:
				var c12 = data.readLineTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12));
				break;
			case 17:
				var c13 = data.readMoveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13));
				break;
			default:
				data.skip(type);
			}
		}
		if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length() > 0) {
			openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
		}
		if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length() > 0) {
			openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
		}
		data.destroy();
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
			return true;
		}
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
			return true;
		}
	}
	return false;
};
openfl__$internal_renderer_canvas_CanvasGraphics.isCCW = function(x1,y1,x2,y2,x3,y3) {
	return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT = function(uvt,skipT) {
	if(skipT == null) {
		skipT = false;
	}
	var max = -Infinity;
	var tmp = -Infinity;
	var len = uvt.length;
	var _g1 = 1;
	var _g = len + 1;
	while(_g1 < _g) {
		var t = _g1++;
		if(skipT && t % 3 == 0) {
			continue;
		}
		tmp = uvt.data[t - 1];
		if(max < tmp) {
			max = tmp;
		}
	}
	var this1 = new openfl_VectorData();
	var this2 = new Array(0);
	this1.data = this2;
	this1.length = 0;
	this1.fixed = false;
	var result = this1;
	var _g11 = 1;
	var _g2 = len + 1;
	while(_g11 < _g2) {
		var t1 = _g11++;
		if(skipT && t1 % 3 == 0) {
			continue;
		}
		var x = uvt.data[t1 - 1] / max;
		if(!result.fixed) {
			result.length++;
			if(result.data.length < result.length) {
				var length = result.data.length + 10;
				var this3 = new Array(length);
				var data = this3;
				haxe_ds__$Vector_Vector_$Impl_$.blit(result.data,0,data,0,result.data.length);
				result.data = data;
			}
			result.data[result.length - 1] = x;
		}
	}
	return { max : max, uvt : result};
};
openfl__$internal_renderer_canvas_CanvasGraphics.playCommands = function(commands,stroke) {
	if(stroke == null) {
		stroke = false;
	}
	openfl__$internal_renderer_canvas_CanvasGraphics.bounds = openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__bounds;
	var offsetX = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
	var offsetY = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
	var positionX = 0.0;
	var positionY = 0.0;
	var closeGap = false;
	var startX = 0.0;
	var startY = 0.0;
	var data = new openfl__$internal_renderer_DrawCommandReader(commands);
	var _g = 0;
	var _g1 = commands.types;
	while(_g < _g1.length) {
		var type = _g1[_g];
		++_g;
		switch(type[1]) {
		case 0:
			var c = data.readBeginBitmapFill();
			var tmp = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(tmp,true);
			openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
			if(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c) != null) {
				openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c);
				openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c).clone();
				openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.invert();
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = null;
				openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = null;
			}
			break;
		case 1:
			var c1 = data.readBeginFill();
			if(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) < 0.005) {
				openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
			} else {
				if(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) == 1) {
					var tmp1 = StringTools.hex(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1),6);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = "#" + tmp1;
				} else {
					var r = (openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 16711680) >>> 16;
					var g = (openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 65280) >>> 8;
					var b = openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 255;
					var tmp2 = "rgba(" + r + ", " + g + ", " + b + ", " + openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = tmp2 + ")";
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
				openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
			}
			break;
		case 2:
			var c2 = data.readBeginGradientFill();
			var tmp3 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c2);
			var tmp4 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c2);
			var tmp5 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c2);
			var tmp6 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c2);
			var tmp7 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c2);
			var tmp8 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c2);
			var tmp9 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c2);
			var tmp10 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c2);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10);
			openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
			openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
			break;
		case 3:
			var c3 = data.readCubicCurveTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3) - offsetY);
			break;
		case 4:
			var c4 = data.readCurveTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4) - offsetY);
			break;
		case 5:
			var c5 = data.readDrawCircle();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5) - offsetX + openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5) - offsetY);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5),0,Math.PI * 2,true);
			break;
		case 6:
			var c6 = data.readDrawEllipse();
			var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6);
			var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6);
			var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6);
			var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6);
			x -= offsetX;
			y -= offsetY;
			var kappa = .5522848;
			var ox = width / 2 * kappa;
			var oy = height / 2 * kappa;
			var xe = x + width;
			var ye = y + height;
			var xm = x + width / 2;
			var ym = y + height / 2;
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x,ym);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x,ym - oy,xm - ox,y,xm,y);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm + ox,y,xe,ym - oy,xe,ym);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xe,ym + oy,xm + ox,ye,xm,ye);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm - ox,ye,x,ym + oy,x,ym);
			break;
		case 8:
			var c7 = data.readDrawRect();
			var optimizationUsed = false;
			if(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill != null) {
				var st = 0;
				var sr = 0;
				var sb = 0;
				var sl = 0;
				var canOptimizeMatrix = true;
				if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix != null) {
					if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b != 0 || openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c != 0) {
						canOptimizeMatrix = false;
					} else {
						var stl = openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.transformPoint(new openfl_geom_Point(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7)));
						var sbr = openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.transformPoint(new openfl_geom_Point(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7)));
						st = stl.y;
						sl = stl.x;
						sb = sbr.y;
						sr = sbr.x;
					}
				} else {
					st = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7);
					sl = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7);
					sb = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7);
					sr = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7);
				}
				if(canOptimizeMatrix && st >= 0 && sl >= 0 && sr <= openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width && sb <= openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height) {
					optimizationUsed = true;
					if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
						openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.image.get_src(),sl,st,sr - sl,sb - st,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
					}
				}
			}
			if(!optimizationUsed) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
			}
			break;
		case 9:
			var c8 = data.readDrawRoundRect();
			openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
			break;
		case 13:
			var c9 = data.readLineBitmapStyle();
			if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
				openfl__$internal_renderer_canvas_CanvasGraphics.closePath();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
			var tmp11 = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c9);
			var tmp12 = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c9);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(tmp11,tmp12);
			openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
			break;
		case 14:
			var c10 = data.readLineGradientStyle();
			if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
				openfl__$internal_renderer_canvas_CanvasGraphics.closePath();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
			var tmp13 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c10);
			var tmp14 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c10);
			var tmp15 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c10);
			var tmp16 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c10);
			var tmp17 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c10);
			var tmp18 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c10);
			var tmp19 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c10);
			var tmp20 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c10);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(tmp13,tmp14,tmp15,tmp16,tmp17,tmp18,tmp19,tmp20);
			openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
			break;
		case 15:
			var c11 = data.readLineStyle();
			if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
				if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
					openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
			if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) == null) {
				openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
			} else {
				var tmp21 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) > 0 ? openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) : 1;
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineWidth = tmp21;
				var tmp22 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11) == null ? "round" : openfl_display__$JointStyle_JointStyle_$Impl_$.toString(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11)).toLowerCase();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin = tmp22;
				var tmp23;
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11) == null) {
					tmp23 = "round";
				} else {
					var _g2 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11);
					if(_g2 == 0) {
						tmp23 = "butt";
					} else {
						tmp23 = openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11)).toLowerCase();
					}
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap = tmp23;
				openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c11);
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c11) == 1) {
					var tmp24 = StringTools.hex(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 16777215,6);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = "#" + tmp24;
				} else {
					var r1 = (openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 16711680) >>> 16;
					var g1 = (openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 65280) >>> 8;
					var b1 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 255;
					var tmp25 = "rgba(" + r1 + ", " + g1 + ", " + b1 + ", " + openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c11);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = tmp25 + ")";
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
			}
			break;
		case 16:
			var c12 = data.readLineTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12) - offsetX,openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12) - offsetY);
			positionX = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12);
			positionY = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12);
			break;
		case 17:
			var c13 = data.readMoveTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13) - offsetX,openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13) - offsetY);
			positionX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13);
			positionY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13);
			closeGap = true;
			startX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13);
			startY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13);
			break;
		default:
			data.skip(type);
		}
	}
	data.destroy();
	if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && closeGap) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(startX - offsetX,startY - offsetY);
		} else if(closeGap && positionX == startX && positionY == startY) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
		}
		if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
		}
	}
	if(!stroke) {
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill || openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);
			if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix != null) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.ty);
				if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
					openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.ty);
			} else if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
		}
	}
};
openfl__$internal_renderer_canvas_CanvasGraphics.render = function(graphics,renderSession) {
	var directRender = false;
	if(graphics.__dirty || directRender) {
		openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.graphics = graphics;
		openfl__$internal_renderer_canvas_CanvasGraphics.bounds = graphics.__bounds;
		if(!graphics.__visible || graphics.__commands.get_length() == 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds == null || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width <= 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height <= 0) {
			graphics.__canvas = null;
			graphics.__context = null;
			graphics.__bitmap = null;
		} else {
			if(directRender) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context = renderSession.context;
				openfl__$internal_renderer_canvas_CanvasGraphics.bounds.setTo(0,0,openfl__$internal_renderer_canvas_CanvasGraphics.context.canvas.width,openfl__$internal_renderer_canvas_CanvasGraphics.context.canvas.width);
			} else {
				if(graphics.__canvas == null) {
					graphics.__canvas = window.document.createElement("canvas");
					graphics.__context = graphics.__canvas.getContext("2d");
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context = graphics.__context;
				graphics.__canvas.width = Math.ceil(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width);
				graphics.__canvas.height = Math.ceil(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height);
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
			openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
			openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
			openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
			openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
			openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = false;
			var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
			var _g = 0;
			var _g1 = graphics.__commands.types;
			try {
				while(_g < _g1.length) {
					var type = _g1[_g];
					++_g;
					switch(type[1]) {
					case 0:case 1:case 2:
						openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
						if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL) {
							var c = data.readBeginBitmapFill();
							openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
							openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
						} else if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL) {
							var c1 = data.readBeginGradientFill();
							openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
							openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
						} else {
							var c2 = data.readBeginFill();
							openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c2));
							openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c2));
						}
						break;
					case 3:
						var c3 = data.readCubicCurveTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
						break;
					case 4:
						var c4 = data.readCurveTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
						break;
					case 5:
						var c5 = data.readDrawCircle();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
						break;
					case 6:
						var c6 = data.readDrawEllipse();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
						break;
					case 8:
						var c7 = data.readDrawRect();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
						break;
					case 9:
						var c8 = data.readDrawRoundRect();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
						break;
					case 10:
						var c9 = data.readDrawTiles();
						var useScale = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 1) > 0;
						var offsetX = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
						var offsetY = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
						var useRotation = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 2) > 0;
						var useTransform = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 16) > 0;
						var useRGB = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 4) > 0;
						var useAlpha = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 8) > 0;
						var useRect = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 32) > 0;
						var useOrigin = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 64) > 0;
						var useBlendAdd = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 65536) > 0;
						if(useTransform) {
							useScale = false;
							useRotation = false;
						}
						var scaleIndex = 0;
						var rotationIndex = 0;
						var rgbIndex = 0;
						var alphaIndex = 0;
						var transformIndex = 0;
						var numValues = 3;
						if(useRect) {
							if(useOrigin) {
								numValues = 8;
							} else {
								numValues = 6;
							}
						}
						if(useScale) {
							scaleIndex = numValues;
							++numValues;
						}
						if(useRotation) {
							rotationIndex = numValues;
							++numValues;
						}
						if(useTransform) {
							transformIndex = numValues;
							numValues += 4;
						}
						if(useRGB) {
							rgbIndex = numValues;
							numValues += 3;
						}
						if(useAlpha) {
							alphaIndex = numValues;
							++numValues;
						}
						var totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9).length;
						if(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9) >= 0 && totalCount > openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9)) {
							totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9);
						}
						var itemCount = totalCount / numValues | 0;
						var index = 0;
						var rect = null;
						var center = null;
						var previousTileID = -1;
						var surface;
						openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.__sync();
						surface = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.image.get_src();
						if(useBlendAdd) {
							openfl__$internal_renderer_canvas_CanvasGraphics.context.globalCompositeOperation = "lighter";
						}
						while(index < totalCount) {
							var tileID = !useRect ? openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2] | 0 : -1;
							if(!useRect && tileID != previousTileID) {
								rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__tileRects[tileID];
								center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__centerPoints[tileID];
								previousTileID = tileID;
							} else if(useRect) {
								rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__rectTile;
								rect.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 3],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 4],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 5]);
								center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__point;
								if(useOrigin) {
									center.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 6],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 7]);
								} else {
									center.setTo(0,0);
								}
							}
							if(rect != null && rect.width > 0 && rect.height > 0 && center != null) {
								openfl__$internal_renderer_canvas_CanvasGraphics.context.save();
								openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index] - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 1] - offsetY);
								if(useRotation) {
									openfl__$internal_renderer_canvas_CanvasGraphics.context.rotate(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + rotationIndex]);
								}
								var scale = 1.0;
								if(useScale) {
									scale = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + scaleIndex];
								}
								if(useTransform) {
									openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 1],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 3],0,0);
								}
								if(useAlpha) {
									var tmp = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
									openfl__$internal_renderer_canvas_CanvasGraphics.context.globalAlpha = tmp[index + alphaIndex];
								}
								openfl__$internal_renderer_canvas_CanvasGraphics.context.imageSmoothingEnabled = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth(c9);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(surface,rect.x,rect.y,rect.width,rect.height,-center.x * scale,-center.y * scale,rect.width * scale,rect.height * scale);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();
							}
							index += numValues;
						}
						if(useBlendAdd) {
							openfl__$internal_renderer_canvas_CanvasGraphics.context.globalCompositeOperation = "source-over";
						}
						break;
					case 11:
						openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
						var c10 = data.readDrawTriangles();
						var v = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c10);
						var ind = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c10);
						var uvt = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10);
						var pattern = null;
						var colorFill = openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill == null;
						if(colorFill && uvt != null) {
							throw "__break__";
						}
						if(!colorFill) {
							if(uvt == null) {
								var this1 = new openfl_VectorData();
								var this2 = new Array(0);
								this1.data = this2;
								this1.length = 0;
								this1.fixed = false;
								uvt = this1;
								var _g3 = 0;
								var _g2 = v.length / 2 | 0;
								while(_g3 < _g2) {
									var i = _g3++;
									var x = v.data[i * 2] / openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width;
									if(!uvt.fixed) {
										uvt.length++;
										if(uvt.data.length < uvt.length) {
											var length = uvt.data.length + 10;
											var this3 = new Array(length);
											var data1 = this3;
											haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data1,0,uvt.data.length);
											uvt.data = data1;
										}
										uvt.data[uvt.length - 1] = x;
									}
									var x1 = v.data[i * 2 + 1] / openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height;
									if(!uvt.fixed) {
										uvt.length++;
										if(uvt.data.length < uvt.length) {
											var length1 = uvt.data.length + 10;
											var this4 = new Array(length1);
											var data2 = this4;
											haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data2,0,uvt.data.length);
											uvt.data = data2;
										}
										uvt.data[uvt.length - 1] = x1;
									}
								}
							}
							var skipT = uvt.length != v.length;
							var normalizedUVT = openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT(uvt,skipT);
							var maxUVT = normalizedUVT.max;
							uvt = normalizedUVT.uvt;
							if(maxUVT > 1) {
								pattern = openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width | 0,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height | 0);
							} else {
								pattern = openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height);
							}
						}
						var i1 = 0;
						var l = ind.length;
						var a_;
						var b_;
						var c_;
						var iax;
						var iay;
						var ibx;
						var iby;
						var icx;
						var icy;
						var x11;
						var y1;
						var x2;
						var y2;
						var x3;
						var y3;
						var uvx1;
						var uvy1;
						var uvx2;
						var uvy2;
						var uvx3;
						var uvy3;
						var denom;
						var t1;
						var t2;
						var t3;
						var t4;
						var dx;
						var dy;
						while(i1 < l) {
							a_ = i1;
							b_ = i1 + 1;
							c_ = i1 + 2;
							iax = ind.data[a_] * 2;
							iay = ind.data[a_] * 2 + 1;
							ibx = ind.data[b_] * 2;
							iby = ind.data[b_] * 2 + 1;
							icx = ind.data[c_] * 2;
							icy = ind.data[c_] * 2 + 1;
							x11 = v.data[iax];
							y1 = v.data[iay];
							x2 = v.data[ibx];
							y2 = v.data[iby];
							x3 = v.data[icx];
							y3 = v.data[icy];
							var _g21 = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c10);
							switch(_g21) {
							case 0:
								if((x2 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0) {
									i1 += 3;
									continue;
								}
								break;
							case 2:
								if(!((x2 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0)) {
									i1 += 3;
									continue;
								}
								break;
							default:
							}
							if(colorFill) {
								openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
								openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x11,y1);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x2,y2);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x3,y3);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
								if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
									openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
								}
								i1 += 3;
								continue;
							}
							openfl__$internal_renderer_canvas_CanvasGraphics.context.save();
							openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
							openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x11,y1);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x2,y2);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x3,y3);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
							openfl__$internal_renderer_canvas_CanvasGraphics.context.clip();
							uvx1 = uvt.data[iax] * pattern.width;
							uvx2 = uvt.data[ibx] * pattern.width;
							uvx3 = uvt.data[icx] * pattern.width;
							uvy1 = uvt.data[iay] * pattern.height;
							uvy2 = uvt.data[iby] * pattern.height;
							uvy3 = uvt.data[icy] * pattern.height;
							denom = uvx1 * (uvy3 - uvy2) - uvx2 * uvy3 + uvx3 * uvy2 + (uvx2 - uvx3) * uvy1;
							if(denom == 0) {
								i1 += 3;
								continue;
							}
							t1 = -(uvy1 * (x3 - x2) - uvy2 * x3 + uvy3 * x2 + (uvy2 - uvy3) * x11) / denom;
							t2 = (uvy2 * y3 + uvy1 * (y2 - y3) - uvy3 * y2 + (uvy3 - uvy2) * y1) / denom;
							t3 = (uvx1 * (x3 - x2) - uvx2 * x3 + uvx3 * x2 + (uvx2 - uvx3) * x11) / denom;
							t4 = -(uvx2 * y3 + uvx1 * (y2 - y3) - uvx3 * y2 + (uvx3 - uvx2) * y1) / denom;
							dx = (uvx1 * (uvy3 * x2 - uvy2 * x3) + uvy1 * (uvx2 * x3 - uvx3 * x2) + (uvx3 * uvy2 - uvx2 * uvy3) * x11) / denom;
							dy = (uvx1 * (uvy3 * y2 - uvy2 * y3) + uvy1 * (uvx2 * y3 - uvx3 * y2) + (uvx3 * uvy2 - uvx2 * uvy3) * y1) / denom;
							openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(t1,t2,t3,t4,dx,dy);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(pattern,0,0);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();
							i1 += 3;
						}
						break;
					case 12:
						data.readEndFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
						openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
						openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
						break;
					case 13:
						var c11 = data.readLineBitmapStyle();
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth(c11));
						break;
					case 14:
						var c12 = data.readLineGradientStyle();
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c12));
						break;
					case 15:
						var c13 = data.readLineStyle();
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c13));
						break;
					case 16:
						var c14 = data.readLineTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14));
						break;
					case 17:
						var c15 = data.readMoveTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15));
						break;
					default:
						data.skip(type);
					}
				}
			} catch( e ) { if( e != "__break__" ) throw e; }
			if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length() > 0) {
				openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
			}
			if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length() > 0) {
				openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
			}
			data.destroy();
			graphics.__bitmap = openfl_display_BitmapData.fromCanvas(graphics.__canvas);
		}
		graphics.set___dirty(false);
	}
};
openfl__$internal_renderer_canvas_CanvasGraphics.renderMask = function(graphics,renderSession) {
	if(graphics.__commands.get_length() != 0) {
		openfl__$internal_renderer_canvas_CanvasGraphics.context = renderSession.context;
		var positionX = 0.0;
		var positionY = 0.0;
		var offsetX = 0;
		var offsetY = 0;
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 3:
				var c = data.readCubicCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				positionY = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c);
				break;
			case 4:
				var c1 = data.readCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c1) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c1) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1);
				positionY = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1);
				break;
			case 5:
				var c2 = data.readDrawCircle();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c2) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c2) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c2),0,Math.PI * 2,true);
				break;
			case 6:
				var c3 = data.readDrawEllipse();
				var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c3);
				var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c3);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c3);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c3);
				x -= offsetX;
				y -= offsetY;
				var kappa = .5522848;
				var ox = width / 2 * kappa;
				var oy = height / 2 * kappa;
				var xe = x + width;
				var ye = y + height;
				var xm = x + width / 2;
				var ym = y + height / 2;
				openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x,ym);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x,ym - oy,xm - ox,y,xm,y);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm + ox,y,xe,ym - oy,xe,ym);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xe,ym + oy,xm + ox,ye,xm,ye);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm - ox,ye,x,ym + oy,x,ym);
				break;
			case 8:
				var c4 = data.readDrawRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c4) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c4),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c4));
				break;
			case 9:
				var c5 = data.readDrawRoundRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c5) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c5) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c5));
				break;
			case 16:
				var c6 = data.readLineTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6) - offsetX,openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6);
				positionY = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6);
				break;
			case 17:
				var c7 = data.readMoveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7) - offsetY);
				positionX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7);
				positionY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7);
				break;
			default:
				data.skip(type);
			}
		}
		data.destroy();
	}
};
var openfl__$internal_renderer_canvas_CanvasMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.canvas.CanvasMaskManager"] = openfl__$internal_renderer_canvas_CanvasMaskManager;
openfl__$internal_renderer_canvas_CanvasMaskManager.__name__ = ["openfl","_internal","renderer","canvas","CanvasMaskManager"];
openfl__$internal_renderer_canvas_CanvasMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_canvas_CanvasMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	pushMask: function(mask) {
		var context = this.renderSession.context;
		context.save();
		var transform = mask.__getWorldTransform();
		context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		context.beginPath();
		mask.__renderCanvasMask(this.renderSession);
		context.clip();
	}
	,pushRect: function(rect,transform) {
		var context = this.renderSession.context;
		context.save();
		context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		context.beginPath();
		context.rect(rect.x,rect.y,rect.width,rect.height);
		context.clip();
	}
	,popMask: function() {
		this.renderSession.context.restore();
	}
	,popRect: function() {
		this.renderSession.context.restore();
	}
	,__class__: openfl__$internal_renderer_canvas_CanvasMaskManager
});
var openfl__$internal_renderer_canvas_CanvasRenderer = function(width,height,context) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.context = context;
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.context = context;
	this.renderSession.roundPixels = true;
	this.renderSession.renderer = this;
	this.renderSession.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(this.renderSession);
};
$hxClasses["openfl._internal.renderer.canvas.CanvasRenderer"] = openfl__$internal_renderer_canvas_CanvasRenderer;
openfl__$internal_renderer_canvas_CanvasRenderer.__name__ = ["openfl","_internal","renderer","canvas","CanvasRenderer"];
openfl__$internal_renderer_canvas_CanvasRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_canvas_CanvasRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
		this.context.setTransform(1,0,0,1,0,0);
		this.context.globalAlpha = 1;
		if(!stage.__transparent && stage.__clearBeforeRender) {
			this.context.fillStyle = stage.__colorString;
			this.context.fillRect(0,0,stage.stageWidth,stage.stageHeight);
		} else if(stage.__transparent && stage.__clearBeforeRender) {
			this.context.clearRect(0,0,stage.stageWidth,stage.stageHeight);
		}
		stage.__renderCanvas(this.renderSession);
	}
	,__class__: openfl__$internal_renderer_canvas_CanvasRenderer
});
var openfl__$internal_renderer_canvas_CanvasShape = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasShape"] = openfl__$internal_renderer_canvas_CanvasShape;
openfl__$internal_renderer_canvas_CanvasShape.__name__ = ["openfl","_internal","renderer","canvas","CanvasShape"];
openfl__$internal_renderer_canvas_CanvasShape.render = function(shape,renderSession) {
	if(!shape.__renderable || shape.__worldAlpha <= 0) {
		return;
	}
	var graphics = shape.__graphics;
	if(graphics != null) {
		openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
		if(graphics.__canvas != null) {
			var context = renderSession.context;
			var scrollRect = shape.get_scrollRect();
			if(graphics.__bounds.width > 0 && graphics.__bounds.height > 0 && (scrollRect == null || scrollRect.width > 0 && scrollRect.height > 0)) {
				if(shape.__mask != null) {
					renderSession.maskManager.pushMask(shape.__mask);
				}
				context.globalAlpha = shape.__worldAlpha;
				var transform = shape.__renderTransform;
				if(renderSession.roundPixels) {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
				} else {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
				}
				if(scrollRect == null) {
					context.drawImage(graphics.__canvas,graphics.__bounds.x,graphics.__bounds.y);
				} else {
					context.drawImage(graphics.__canvas,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height);
				}
				if(shape.__mask != null) {
					renderSession.maskManager.popMask();
				}
			}
		}
	}
};
var openfl__$internal_renderer_canvas_CanvasTextField = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasTextField"] = openfl__$internal_renderer_canvas_CanvasTextField;
openfl__$internal_renderer_canvas_CanvasTextField.__name__ = ["openfl","_internal","renderer","canvas","CanvasTextField"];
openfl__$internal_renderer_canvas_CanvasTextField.context = null;
openfl__$internal_renderer_canvas_CanvasTextField.disableInputMode = function(textEngine) {
};
openfl__$internal_renderer_canvas_CanvasTextField.enableInputMode = function(textEngine) {
	textEngine.__cursorPosition = -1;
	if(textEngine.__hiddenInput == null) {
		textEngine.__hiddenInput = window.document.createElement("input");
		var hiddenInput = textEngine.__hiddenInput;
		hiddenInput.type = "text";
		hiddenInput.style.position = "absolute";
		hiddenInput.style.opacity = "0";
		hiddenInput.style.color = "transparent";
		hiddenInput.style.left = "0px";
		hiddenInput.style.top = "50%";
		if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)) {
			hiddenInput.style.fontSize = "0px";
			hiddenInput.style.width = "0px";
			hiddenInput.style.height = "0px";
		} else {
			hiddenInput.style.width = "1px";
			hiddenInput.style.height = "1px";
		}
		hiddenInput.style.pointerEvents = "none";
		hiddenInput.style.zIndex = "-10000000";
		if(textEngine.maxChars > 0) {
			hiddenInput.maxLength = textEngine.maxChars;
		}
		window.document.body.appendChild(hiddenInput);
		hiddenInput.value = textEngine.text;
	}
};
openfl__$internal_renderer_canvas_CanvasTextField.render = function(textField,renderSession) {
	if(textField.__dirty) {
		var textEngine = textField.__textEngine;
		textField.__updateLayout();
		if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
			textField.__graphics.__canvas = null;
			textField.__graphics.__context = null;
			textField.__graphics.set___dirty(false);
			textField.__dirty = false;
		} else {
			var bounds = textEngine.bounds;
			if(textField.__graphics == null || textField.__graphics.__canvas == null) {
				if(textField.__graphics == null) {
					textField.__graphics = new openfl_display_Graphics();
				}
				textField.__graphics.__canvas = window.document.createElement("canvas");
				textField.__graphics.__context = textField.__graphics.__canvas.getContext("2d");
				textField.__graphics.__bounds = new openfl_geom_Rectangle(0,0,bounds.width,bounds.height);
			}
			var graphics = textField.__graphics;
			openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
			if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
				var text = textEngine.text;
				if(textEngine.displayAsPassword) {
					var length = text.length;
					var mask = "";
					var _g1 = 0;
					var _g = length;
					while(_g1 < _g) {
						var i = _g1++;
						mask += "*";
					}
					text = mask;
				}
				graphics.__canvas.width = Math.ceil(bounds.width);
				graphics.__canvas.height = Math.ceil(bounds.height);
				if(textEngine.antiAliasType != 0 || textEngine.gridFitType != 1) {
					graphics.__context.mozImageSmoothingEnabled = true;
					graphics.__context.msImageSmoothingEnabled = true;
					graphics.__context.imageSmoothingEnabled = true;
				} else {
					graphics.__context.mozImageSmoothingEnabled = false;
					graphics.__context.msImageSmoothingEnabled = false;
					graphics.__context.imageSmoothingEnabled = false;
				}
				if(textEngine.border || textEngine.background) {
					openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
					if(textEngine.background) {
						var tmp = StringTools.hex(textEngine.backgroundColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp;
						openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
					}
					if(textEngine.border) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
						var tmp1 = StringTools.hex(textEngine.borderColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp1;
						openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
					}
				}
				openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
				openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
				var scrollX = -textField.get_scrollH();
				var scrollY = 0.0;
				var _g11 = 0;
				var _g2 = textField.get_scrollV() - 1;
				while(_g11 < _g2) {
					var i1 = _g11++;
					scrollY -= textEngine.lineHeights[i1];
				}
				var advance;
				var offsetY = 0.0;
				var applyHack = new EReg("(iPad|iPhone|iPod|Firefox)","g").match(window.navigator.userAgent);
				var _g3 = 0;
				var _g12 = textEngine.layoutGroups;
				while(_g3 < _g12.length) {
					var group = _g12[_g3];
					++_g3;
					if(group.lineIndex < textField.get_scrollV() - 1) {
						continue;
					}
					if(group.lineIndex > textField.get_scrollV() + textEngine.bottomScrollV - 2) {
						break;
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
					var tmp2 = StringTools.hex(group.format.color,6);
					openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp2;
					if(applyHack) {
						offsetY = group.format.size * 0.185;
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
					if(textField.__caretIndex > -1 && textEngine.selectable) {
						if(textField.__selectionIndex == textField.__caretIndex) {
							if(textField.__showCursor && group.startIndex <= textField.__caretIndex && group.endIndex >= textField.__caretIndex) {
								advance = 0.0;
								var _g31 = 0;
								var _g21 = textField.__caretIndex - group.startIndex;
								while(_g31 < _g21) {
									var i2 = _g31++;
									if(group.advances.length <= i2) {
										break;
									}
									advance += group.advances[i2];
								}
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
							}
						} else if(group.startIndex <= textField.__caretIndex && group.endIndex >= textField.__caretIndex || group.startIndex <= textField.__selectionIndex && group.endIndex >= textField.__selectionIndex) {
							var selectionStart = Math.min(textField.__selectionIndex,textField.__caretIndex) | 0;
							var selectionEnd = Math.max(textField.__selectionIndex,textField.__caretIndex) | 0;
							if(group.startIndex > selectionStart) {
								selectionStart = group.startIndex;
							}
							if(group.endIndex < selectionEnd) {
								selectionEnd = group.endIndex;
							}
							var start;
							var end;
							start = textField.getCharBoundaries(selectionStart);
							if(selectionEnd >= textEngine.text.length) {
								end = textField.getCharBoundaries(textEngine.text.length - 1);
								end.x += end.width + 2;
							} else {
								end = textField.getCharBoundaries(selectionEnd);
							}
							if(start != null && end != null) {
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
							}
						}
					}
				}
			} else {
				graphics.__canvas.width = Math.ceil(bounds.width);
				graphics.__canvas.height = Math.ceil(bounds.height);
				if(textEngine.border || textEngine.background) {
					if(textEngine.border) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
					} else {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
					}
					if(textEngine.background) {
						var tmp3 = StringTools.hex(textEngine.backgroundColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp3;
						openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
					}
					if(textEngine.border) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
						openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
						var tmp4 = StringTools.hex(textEngine.borderColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp4;
						openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
					}
				}
			}
			graphics.__bitmap = openfl_display_BitmapData.fromCanvas(textField.__graphics.__canvas);
			textField.__dirty = false;
			graphics.set___dirty(false);
		}
	}
};
var openfl__$internal_renderer_console_ConsoleRenderer = function(width,height,ctx) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	throw new js__$Boot_HaxeError("ConsoleRenderer not supported");
};
$hxClasses["openfl._internal.renderer.console.ConsoleRenderer"] = openfl__$internal_renderer_console_ConsoleRenderer;
openfl__$internal_renderer_console_ConsoleRenderer.__name__ = ["openfl","_internal","renderer","console","ConsoleRenderer"];
openfl__$internal_renderer_console_ConsoleRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_console_ConsoleRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
	}
	,__class__: openfl__$internal_renderer_console_ConsoleRenderer
});
var openfl__$internal_renderer_dom_DOMBitmap = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMBitmap"] = openfl__$internal_renderer_dom_DOMBitmap;
openfl__$internal_renderer_dom_DOMBitmap.__name__ = ["openfl","_internal","renderer","dom","DOMBitmap"];
openfl__$internal_renderer_dom_DOMBitmap.render = function(bitmap,renderSession) {
	if(bitmap.stage != null && bitmap.__worldVisible && bitmap.__renderable && bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
		if(bitmap.bitmapData.image.buffer.__srcImage != null) {
			openfl__$internal_renderer_dom_DOMBitmap.renderImage(bitmap,renderSession);
		} else {
			openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(bitmap,renderSession);
		}
	} else {
		if(bitmap.__image != null) {
			renderSession.element.removeChild(bitmap.__image);
			bitmap.__image = null;
			bitmap.__style = null;
		}
		if(bitmap.__canvas != null) {
			renderSession.element.removeChild(bitmap.__canvas);
			bitmap.__canvas = null;
			bitmap.__style = null;
		}
	}
};
openfl__$internal_renderer_dom_DOMBitmap.renderCanvas = function(bitmap,renderSession) {
	if(bitmap.__image != null) {
		renderSession.element.removeChild(bitmap.__image);
		bitmap.__image = null;
	}
	if(bitmap.__canvas == null) {
		bitmap.__canvas = window.document.createElement("canvas");
		bitmap.__context = bitmap.__canvas.getContext("2d");
		if(!bitmap.smoothing) {
			bitmap.__context.mozImageSmoothingEnabled = false;
			bitmap.__context.msImageSmoothingEnabled = false;
			bitmap.__context.imageSmoothingEnabled = false;
		}
		openfl__$internal_renderer_dom_DOMRenderer.initializeElement(bitmap,bitmap.__canvas,renderSession);
	}
	bitmap.bitmapData.__sync();
	bitmap.__canvas.width = bitmap.bitmapData.width;
	bitmap.__canvas.height = bitmap.bitmapData.height;
	bitmap.__context.globalAlpha = bitmap.__worldAlpha;
	bitmap.__context.drawImage(bitmap.bitmapData.image.buffer.__srcCanvas,0,0);
	openfl__$internal_renderer_dom_DOMRenderer.applyStyle(bitmap,renderSession,true,false,true);
};
openfl__$internal_renderer_dom_DOMBitmap.renderImage = function(bitmap,renderSession) {
	if(bitmap.__canvas != null) {
		renderSession.element.removeChild(bitmap.__canvas);
		bitmap.__canvas = null;
	}
	if(bitmap.__image == null) {
		bitmap.__image = window.document.createElement("img");
		bitmap.__image.src = bitmap.bitmapData.image.buffer.__srcImage.src;
		openfl__$internal_renderer_dom_DOMRenderer.initializeElement(bitmap,bitmap.__image,renderSession);
	}
	openfl__$internal_renderer_dom_DOMRenderer.applyStyle(bitmap,renderSession,true,true,true);
};
var openfl__$internal_renderer_dom_DOMMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.dom.DOMMaskManager"] = openfl__$internal_renderer_dom_DOMMaskManager;
openfl__$internal_renderer_dom_DOMMaskManager.__name__ = ["openfl","_internal","renderer","dom","DOMMaskManager"];
openfl__$internal_renderer_dom_DOMMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_dom_DOMMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	pushMask: function(mask) {
	}
	,pushRect: function(rect,transform) {
	}
	,popMask: function() {
	}
	,__class__: openfl__$internal_renderer_dom_DOMMaskManager
});
var openfl__$internal_renderer_dom_DOMRenderer = function(width,height,element) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.element = element;
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.element = element;
	this.renderSession.roundPixels = true;
	var prefix = (function () {
		  var styles = window.getComputedStyle(document.documentElement, ''),
			pre = (Array.prototype.slice
			  .call(styles)
			  .join('') 
			  .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
			)[1],
			dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1];
		  return {
			dom: dom,
			lowercase: pre,
			css: '-' + pre + '-',
			js: pre[0].toUpperCase() + pre.substr(1)
		  };
		})();
	this.renderSession.vendorPrefix = prefix.lowercase;
	this.renderSession.transformProperty = prefix.lowercase == "webkit" ? "-webkit-transform" : "transform";
	this.renderSession.transformOriginProperty = prefix.lowercase == "webkit" ? "-webkit-transform-origin" : "transform-origin";
	this.renderSession.maskManager = new openfl__$internal_renderer_dom_DOMMaskManager(this.renderSession);
	this.renderSession.renderer = this;
};
$hxClasses["openfl._internal.renderer.dom.DOMRenderer"] = openfl__$internal_renderer_dom_DOMRenderer;
openfl__$internal_renderer_dom_DOMRenderer.__name__ = ["openfl","_internal","renderer","dom","DOMRenderer"];
openfl__$internal_renderer_dom_DOMRenderer.applyStyle = function(displayObject,renderSession,setTransform,setAlpha,setClip) {
	var style = displayObject.__style;
	if(setTransform && displayObject.__worldTransformChanged) {
		var _this = displayObject.__worldTransform;
		style.setProperty(renderSession.transformProperty,renderSession.roundPixels ? "matrix3d(" + _this.a + ", " + _this.b + ", 0, 0, " + _this.c + ", " + _this.d + ", 0, 0, 0, 0, 1, 0, " + (_this.tx | 0) + ", " + (_this.ty | 0) + ", 0, 1)" : "matrix3d(" + _this.a + ", " + _this.b + ", 0, 0, " + _this.c + ", " + _this.d + ", 0, 0, 0, 0, 1, 0, " + _this.tx + ", " + _this.ty + ", 0, 1)",null);
	}
	if(displayObject.__worldZ != ++renderSession.z) {
		displayObject.__worldZ = renderSession.z;
		style.setProperty("z-index",displayObject.__worldZ == null ? "null" : "" + displayObject.__worldZ,null);
	}
	if(setAlpha && displayObject.__worldAlphaChanged) {
		if(displayObject.__worldAlpha < 1) {
			style.setProperty("opacity",displayObject.__worldAlpha == null ? "null" : "" + displayObject.__worldAlpha,null);
		} else {
			style.removeProperty("opacity");
		}
	}
	if(setClip && displayObject.__worldClipChanged) {
		if(displayObject.__worldClip == null) {
			style.removeProperty("clip");
		} else {
			var clip = openfl_geom_Rectangle.__temp;
			var matrix = openfl_geom_Matrix.__temp;
			matrix.copyFrom(displayObject.__worldTransform);
			matrix.invert();
			displayObject.__worldClip.__transform(clip,matrix);
			style.setProperty("clip","rect(" + clip.y + "px, " + clip.get_right() + "px, " + clip.get_bottom() + "px, " + clip.x + "px)",null);
		}
	}
};
openfl__$internal_renderer_dom_DOMRenderer.initializeElement = function(displayObject,element,renderSession) {
	var style = displayObject.__style = element.style;
	style.setProperty("position","absolute",null);
	style.setProperty("top","0",null);
	style.setProperty("left","0",null);
	style.setProperty(renderSession.transformOriginProperty,"0 0 0",null);
	renderSession.element.appendChild(element);
	displayObject.__worldAlphaChanged = true;
	displayObject.__worldClipChanged = true;
	displayObject.__worldTransformChanged = true;
	displayObject.__worldVisibleChanged = true;
	displayObject.__worldZ = -1;
};
openfl__$internal_renderer_dom_DOMRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_dom_DOMRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
		this.element.style.background = stage.__colorString;
		this.renderSession.z = 1;
		stage.__renderDOM(this.renderSession);
	}
	,__class__: openfl__$internal_renderer_dom_DOMRenderer
});
var openfl__$internal_renderer_dom_DOMShape = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMShape"] = openfl__$internal_renderer_dom_DOMShape;
openfl__$internal_renderer_dom_DOMShape.__name__ = ["openfl","_internal","renderer","dom","DOMShape"];
openfl__$internal_renderer_dom_DOMShape.render = function(shape,renderSession) {
	var graphics = shape.__graphics;
	if(shape.stage != null && shape.__worldVisible && shape.__renderable && graphics != null) {
		if(graphics.__dirty || shape.__worldAlphaChanged || shape.__canvas == null && graphics.__canvas != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
			if(graphics.__canvas != null) {
				if(shape.__canvas == null) {
					shape.__canvas = window.document.createElement("canvas");
					shape.__context = shape.__canvas.getContext("2d");
					openfl__$internal_renderer_dom_DOMRenderer.initializeElement(shape,shape.__canvas,renderSession);
				}
				shape.__canvas.width = graphics.__canvas.width;
				shape.__canvas.height = graphics.__canvas.height;
				shape.__context.globalAlpha = shape.__worldAlpha;
				shape.__context.drawImage(graphics.__canvas,0,0);
			} else if(shape.__canvas != null) {
				renderSession.element.removeChild(shape.__canvas);
				shape.__canvas = null;
				shape.__style = null;
			}
		}
		if(shape.__canvas != null) {
			if(shape.__worldTransformChanged || graphics.__transformDirty) {
				graphics.__transformDirty = false;
				var transform = openfl_geom_Matrix.__temp;
				transform.identity();
				transform.translate(graphics.__bounds.x,graphics.__bounds.y);
				transform.concat(shape.__worldTransform);
				shape.__style.setProperty(renderSession.transformProperty,renderSession.roundPixels ? "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + (transform.tx | 0) + ", " + (transform.ty | 0) + ", 0, 1)" : "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + transform.tx + ", " + transform.ty + ", 0, 1)",null);
			}
			openfl__$internal_renderer_dom_DOMRenderer.applyStyle(shape,renderSession,false,false,true);
		}
	} else if(shape.__canvas != null) {
		renderSession.element.removeChild(shape.__canvas);
		shape.__canvas = null;
		shape.__style = null;
	}
};
var openfl__$internal_renderer_dom_DOMTextField = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMTextField"] = openfl__$internal_renderer_dom_DOMTextField;
openfl__$internal_renderer_dom_DOMTextField.__name__ = ["openfl","_internal","renderer","dom","DOMTextField"];
openfl__$internal_renderer_dom_DOMTextField.measureText = function(textField) {
	var textEngine = textField.__textEngine;
	var div = textField.__div;
	if(div == null) {
		div = window.document.createElement("div");
		var _this_r = new RegExp("\n","g".split("u").join(""));
		div.innerHTML = textEngine.text.replace(_this_r,"<br>");
		div.style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
		div.style.setProperty("pointer-events","none",null);
		div.style.position = "absolute";
		div.style.top = "110%";
		window.document.body.appendChild(div);
	}
	textEngine.__measuredWidth = div.clientWidth;
	if(textField.__div == null) {
		div.style.width = Std.string(textEngine.width - 4) + "px";
	}
	textEngine.__measuredHeight = div.clientHeight;
	if(textField.__div == null) {
		window.document.body.removeChild(div);
	}
};
openfl__$internal_renderer_dom_DOMTextField.render = function(textField,renderSession) {
	var textEngine = textField.__textEngine;
	if(textField.stage != null && textField.__worldVisible && textField.__renderable) {
		if(textField.__dirty || textField.__div == null) {
			if(textEngine.text != "" || textEngine.background || textEngine.border || textEngine.type == 1) {
				if(textField.__div == null) {
					textField.__div = window.document.createElement("div");
					openfl__$internal_renderer_dom_DOMRenderer.initializeElement(textField,textField.__div,renderSession);
					textField.__style.setProperty("outline","none",null);
					textField.__div.addEventListener("input",function(event) {
						event.preventDefault();
						if(textField.get_htmlText() != textField.__div.innerHTML) {
							textField.set_htmlText(textField.__div.innerHTML);
							textField.__dirty = false;
						}
					},true);
				}
				if(textEngine.selectable) {
					textField.__style.setProperty("cursor","text",null);
				} else {
					textField.__style.setProperty("cursor","inherit",null);
				}
				textField.__div.contentEditable = textEngine.type == 1;
				var style = textField.__style;
				textField.__div.innerHTML = textEngine.text;
				if(textEngine.background) {
					style.setProperty("background-color","#" + StringTools.hex(textEngine.backgroundColor,6),null);
				} else {
					style.removeProperty("background-color");
				}
				if(textEngine.border) {
					style.setProperty("border","solid 1px #" + StringTools.hex(textEngine.borderColor,6),null);
				} else {
					style.removeProperty("border");
				}
				style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
				style.setProperty("color","#" + StringTools.hex(textField.__textFormat.color,6),null);
				if(textEngine.autoSize != 2) {
					style.setProperty("width","auto",null);
				} else {
					style.setProperty("width",textEngine.width + "px",null);
				}
				style.setProperty("height",textEngine.height + "px",null);
				var _g = textField.__textFormat.align;
				switch(_g) {
				case 0:
					style.setProperty("text-align","center",null);
					break;
				case 4:
					style.setProperty("text-align","right",null);
					break;
				default:
					style.setProperty("text-align","left",null);
				}
				textField.__dirty = false;
			} else if(textField.__div != null) {
				renderSession.element.removeChild(textField.__div);
				textField.__div = null;
			}
		}
		if(textField.__div != null) {
			openfl__$internal_renderer_dom_DOMRenderer.applyStyle(textField,renderSession,true,true,false);
		}
	} else if(textField.__div != null) {
		renderSession.element.removeChild(textField.__div);
		textField.__div = null;
		textField.__style = null;
	}
};
var openfl__$internal_renderer_opengl_GLBitmap = function() { };
$hxClasses["openfl._internal.renderer.opengl.GLBitmap"] = openfl__$internal_renderer_opengl_GLBitmap;
openfl__$internal_renderer_opengl_GLBitmap.__name__ = ["openfl","_internal","renderer","opengl","GLBitmap"];
openfl__$internal_renderer_opengl_GLBitmap.render = function(bitmap,renderSession) {
	if(!bitmap.__renderable || bitmap.__worldAlpha <= 0 || bitmap.bitmapData == null || !bitmap.bitmapData.__isValid) {
		return;
	}
	renderSession.spriteBatch.renderBitmapData(bitmap.bitmapData,bitmap.smoothing,bitmap.__renderTransform,bitmap.__worldColorTransform,bitmap.__worldAlpha,bitmap.__blendMode,bitmap.__shader,bitmap.pixelSnapping);
};
openfl__$internal_renderer_opengl_GLBitmap.pushFramebuffer = function(renderSession,texture,viewPort,smoothing,transparent,clearBuffer,powerOfTwo) {
	if(powerOfTwo == null) {
		powerOfTwo = true;
	}
	if(clearBuffer == null) {
		clearBuffer = false;
	}
	if(transparent == null) {
		transparent = true;
	}
	var gl = renderSession.gl;
	if(gl == null) {
		return null;
	}
	var renderer = renderSession.renderer;
	var spritebatch = renderSession.spriteBatch;
	var x = viewPort.x | 0;
	var y = viewPort.y | 0;
	var width = viewPort.width | 0;
	var height = viewPort.height | 0;
	spritebatch.finish();
	if(openfl__$internal_renderer_opengl_GLBitmap.fbData.length <= 0) {
		openfl__$internal_renderer_opengl_GLBitmap.fbData.push({ texture : null, viewPort : null, transparent : renderer.transparent});
	}
	if(texture == null) {
		texture = new openfl__$internal_renderer_opengl_utils_PingPongTexture(gl,width,height,smoothing,powerOfTwo);
	}
	texture.resize(width,height);
	renderer.transparent = transparent;
	renderSession.maskManager.saveState();
	gl.bindFramebuffer(gl.FRAMEBUFFER,(texture.__swapped ? texture.__texture1 : texture.__texture0).frameBuffer);
	renderer.setViewport(x,y,width,height);
	gl.colorMask(true,true,true,true);
	renderSession.blendModeManager.setBlendMode(10);
	if(clearBuffer) {
		(texture.__swapped ? texture.__texture1 : texture.__texture0).clear(0,0,0,0,null);
	}
	openfl__$internal_renderer_opengl_GLBitmap.fbData.push({ texture : texture, viewPort : viewPort, transparent : transparent});
	return texture;
};
openfl__$internal_renderer_opengl_GLBitmap.drawBitmapDrawable = function(renderSession,target,source,matrix,colorTransform,blendMode,clipRect) {
	var data = openfl__$internal_renderer_opengl_GLBitmap.fbData[openfl__$internal_renderer_opengl_GLBitmap.fbData.length - 1];
	if(data == null) {
		throw new js__$Boot_HaxeError("No data to draw to");
	}
	var gl = renderSession.gl;
	if(gl == null) {
		return;
	}
	var viewPort = data.viewPort;
	var renderer = renderSession.renderer;
	var spritebatch = renderSession.spriteBatch;
	var drawTarget = target != null;
	var tmpRect = clipRect == null ? new openfl_geom_Rectangle(viewPort.x,viewPort.y,viewPort.width,viewPort.height) : clipRect.clone();
	spritebatch.begin(renderSession,drawTarget ? null : tmpRect);
	if(drawTarget) {
		target.__worldTransform.identity();
		var m = target.__worldTransform;
		var height = viewPort.height;
		var tx = m.tx;
		var ty = m.ty;
		m.tx = 0;
		m.ty = 0;
		m.scale(1,-1);
		m.translate(0,height);
		m.tx += tx;
		m.ty -= ty;
		target.__renderGL(renderSession);
		spritebatch.stop();
		if(target.__texture != null) {
			gl.deleteTexture(target.__texture);
		}
		target.__texture = null;
		spritebatch.start(tmpRect);
	}
	var ctCache = source.__worldColorTransform;
	var blendModeCache = source.__blendMode;
	var cached = source.__cacheAsBitmap;
	var m1 = matrix != null ? matrix.clone() : new openfl_geom_Matrix();
	var height1 = viewPort.height;
	var tx1 = m1.tx;
	var ty1 = m1.ty;
	m1.tx = 0;
	m1.ty = 0;
	m1.scale(1,-1);
	m1.translate(0,height1);
	m1.tx += tx1;
	m1.ty -= ty1;
	source.__worldColorTransform = colorTransform != null ? colorTransform : new openfl_geom_ColorTransform();
	source.__blendMode = blendMode;
	openfl_display_DisplayObject.__cacheAsBitmapMode = true;
	source.__updateTransforms(m1);
	source.__updateChildren(false);
	source.__cacheAsBitmap = false;
	source.__renderGL(renderSession);
	source.__cacheAsBitmap = cached;
	source.__worldColorTransform = ctCache;
	source.__blendMode = blendModeCache;
	openfl_display_DisplayObject.__cacheAsBitmapMode = false;
	source.__updateTransforms();
	source.__updateChildren(false);
};
openfl__$internal_renderer_opengl_GLBitmap.popFramebuffer = function(renderSession,image) {
	var gl = renderSession.gl;
	if(gl == null) {
		return;
	}
	renderSession.spriteBatch.finish();
	openfl__$internal_renderer_opengl_GLBitmap.fbData.pop();
	var data = openfl__$internal_renderer_opengl_GLBitmap.fbData[openfl__$internal_renderer_opengl_GLBitmap.fbData.length - 1];
	if(data == null) {
		throw new js__$Boot_HaxeError("oh");
	}
	var x;
	var y;
	var width;
	var height;
	if(data.viewPort == null) {
		y = 0;
		x = y;
		width = renderSession.renderer.width;
		height = renderSession.renderer.height;
	} else {
		x = Math.floor(data.viewPort.x);
		y = Math.floor(data.viewPort.y);
		width = Math.ceil(data.viewPort.width);
		height = Math.ceil(data.viewPort.height);
	}
	if(image != null) {
		if(image.width != width || image.height != height) {
			image.resize(width,height);
		}
		gl.readPixels(x,y,width,height,gl.RGBA,gl.UNSIGNED_BYTE,image.buffer.data);
		image.dirty = false;
		image.set_premultiplied(true);
	}
	var tmp;
	if(data.texture == null) {
		tmp = renderSession.defaultFramebuffer;
	} else {
		var _this = data.texture;
		tmp = (_this.__swapped ? _this.__texture1 : _this.__texture0).frameBuffer;
	}
	gl.bindFramebuffer(gl.FRAMEBUFFER,tmp);
	renderSession.renderer.setViewport(x,y,width,height);
	renderSession.renderer.transparent = data.transparent;
	renderSession.maskManager.restoreState();
};
openfl__$internal_renderer_opengl_GLBitmap.flipMatrix = function(m,height) {
	var tx = m.tx;
	var ty = m.ty;
	m.tx = 0;
	m.ty = 0;
	m.scale(1,-1);
	m.translate(0,height);
	m.tx += tx;
	m.ty -= ty;
};
var openfl__$internal_renderer_opengl_GLRenderer = function(width,height,gl,transparent,antialias,preserveDrawingBuffer) {
	if(preserveDrawingBuffer == null) {
		preserveDrawingBuffer = false;
	}
	if(antialias == null) {
		antialias = false;
	}
	if(transparent == null) {
		transparent = false;
	}
	if(height == null) {
		height = 600;
	}
	if(width == null) {
		width = 800;
	}
	this.vpHeight = 0;
	this.vpWidth = 0;
	this.vpY = 0;
	this.vpX = 0;
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.transparent = transparent;
	this.preserveDrawingBuffer = preserveDrawingBuffer;
	this.width = width;
	this.height = height;
	this.viewport = new openfl_geom_Rectangle();
	this.options = { alpha : transparent, antialias : antialias, premultipliedAlpha : transparent, stencil : true, preserveDrawingBuffer : preserveDrawingBuffer};
	this._glContextId = openfl__$internal_renderer_opengl_GLRenderer.glContextId++;
	this.gl = gl;
	this.defaultFramebuffer = null;
	openfl__$internal_renderer_opengl_GLRenderer.glContexts[this._glContextId] = gl;
	this.projectionMatrix = new openfl_geom_Matrix();
	this.projection = new openfl_geom_Point();
	this.projection.x = this.width / 2;
	this.projection.y = -this.height / 2;
	this.offset = new openfl_geom_Point(0,0);
	this.resize(this.width,this.height);
	this.contextLost = false;
	this.shaderManager = new openfl__$internal_renderer_opengl_utils_ShaderManager(gl);
	this.spriteBatch = new openfl__$internal_renderer_opengl_utils_SpriteBatch(gl);
	this.filterManager = new openfl__$internal_renderer_opengl_utils_FilterManager(gl,this.transparent);
	this.stencilManager = new openfl__$internal_renderer_opengl_utils_StencilManager(gl);
	this.blendModeManager = new openfl__$internal_renderer_opengl_utils_BlendModeManager(gl);
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.gl = this.gl;
	this.renderSession.drawCount = 0;
	this.renderSession.shaderManager = this.shaderManager;
	this.renderSession.filterManager = this.filterManager;
	this.renderSession.blendModeManager = this.blendModeManager;
	this.renderSession.spriteBatch = this.spriteBatch;
	this.renderSession.stencilManager = this.stencilManager;
	this.renderSession.renderer = this;
	this.renderSession.defaultFramebuffer = this.defaultFramebuffer;
	this.renderSession.projectionMatrix = this.projectionMatrix;
	this.maskManager = new openfl__$internal_renderer_opengl_utils_GLMaskManager(this.renderSession);
	this.renderSession.maskManager = this.maskManager;
	this.shaderManager.setShader(this.shaderManager.defaultShader);
	gl.disable(gl.DEPTH_TEST);
	gl.disable(gl.CULL_FACE);
	gl.enable(gl.BLEND);
	gl.colorMask(true,true,true,this.transparent);
};
$hxClasses["openfl._internal.renderer.opengl.GLRenderer"] = openfl__$internal_renderer_opengl_GLRenderer;
openfl__$internal_renderer_opengl_GLRenderer.__name__ = ["openfl","_internal","renderer","opengl","GLRenderer"];
openfl__$internal_renderer_opengl_GLRenderer.renderBitmap = function(shape,renderSession,smooth) {
	if(smooth == null) {
		smooth = true;
	}
	if(!shape.__renderable || shape.__worldAlpha <= 0) {
		return;
	}
	if(shape.__graphics == null || shape.__graphics.__bitmap == null) {
		return;
	}
	var rect = openfl_geom_Rectangle.__temp;
	var matrix = openfl_geom_Matrix.__temp;
	rect.setEmpty();
	matrix.identity();
	shape.__getBounds(rect,matrix);
	var bitmap = shape.__graphics.__bitmap;
	matrix.translate(shape.__graphics.__bounds.x,shape.__graphics.__bounds.y);
	matrix.concat(shape.__renderTransform);
	renderSession.spriteBatch.renderBitmapData(bitmap,smooth,matrix,shape.__worldColorTransform,shape.__worldAlpha,shape.__blendMode,null,0);
};
openfl__$internal_renderer_opengl_GLRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_opengl_GLRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	destroy: function() {
		openfl__$internal_renderer_opengl_GLRenderer.glContexts[this._glContextId] = null;
		this.projection = null;
		this.offset = null;
		this.shaderManager.destroy();
		this.spriteBatch.destroy();
		this.maskManager.destroy();
		this.filterManager.destroy();
		this.shaderManager = null;
		this.spriteBatch = null;
		this.maskManager = null;
		this.filterManager = null;
		this.gl = null;
		this.renderSession = null;
	}
	,setViewport: function(x,y,width,height) {
		if(!(this.vpX == x && this.vpY == y && this.vpWidth == width && this.vpHeight == height)) {
			this.vpX = x;
			this.vpY = y;
			this.vpWidth = width;
			this.vpHeight = height;
			this.gl.viewport(x,y,width,height);
			this.setOrtho(x,y,width,height);
			this.viewport.setTo(x,y,width,height);
		}
	}
	,setOrtho: function(x,y,width,height) {
		var o = this.projectionMatrix;
		o.identity();
		o.a = 1 / width * 2;
		o.d = -1 / height * 2;
		o.tx = -1 - x * o.a;
		o.ty = 1 - y * o.d;
	}
	,handleContextLost: function(event) {
		event.preventDefault();
		this.contextLost = true;
	}
	,handleContextRestored: function() {
		var gl = this.gl;
		openfl__$internal_renderer_opengl_GLRenderer.glContextId++;
		this.shaderManager.setContext(gl);
		this.spriteBatch.setContext(gl);
		this.maskManager.setContext(gl);
		this.filterManager.setContext(gl);
		this.renderSession.gl = gl;
		this.defaultFramebuffer = null;
		gl.disable(gl.DEPTH_TEST);
		gl.disable(gl.CULL_FACE);
		gl.enable(gl.BLEND);
		gl.colorMask(true,true,true,this.transparent);
		this.setViewport(0,0,this.width,this.height);
		this.contextLost = false;
	}
	,render: function(stage) {
		if(this.contextLost) {
			return;
		}
		var gl = this.gl;
		this.setViewport(0,0,this.width,this.height);
		gl.bindFramebuffer(gl.FRAMEBUFFER,this.defaultFramebuffer);
		if(this.transparent) {
			gl.clearColor(0,0,0,0);
		} else {
			gl.clearColor(stage.__colorSplit[0],stage.__colorSplit[1],stage.__colorSplit[2],1);
		}
		gl.clear(gl.COLOR_BUFFER_BIT);
		this.renderDisplayObject(stage,this.projection);
	}
	,renderDisplayObject: function(displayObject,projection,buffer) {
		this.renderSession.blendModeManager.setBlendMode(10);
		this.renderSession.drawCount = 0;
		this.renderSession.currentBlendMode = null;
		this.spriteBatch.begin(this.renderSession);
		this.filterManager.begin(this.renderSession,buffer);
		displayObject.__renderGL(this.renderSession);
		this.spriteBatch.finish();
	}
	,resize: function(width,height) {
		this.width = width;
		this.height = height;
		openfl__$internal_renderer_AbstractRenderer.prototype.resize.call(this,width,height);
		this.setViewport(0,0,width,height);
		this.projection.x = width / 2;
		this.projection.y = -height / 2;
	}
	,__class__: openfl__$internal_renderer_opengl_GLRenderer
});
var openfl__$internal_renderer_opengl_shaders2_Shader = function(gl) {
	this.wrapT = 33071;
	this.wrapS = 33071;
	this.compiled = false;
	this.uniforms = new haxe_ds_StringMap();
	this.attributes = new haxe_ds_StringMap();
	this.ID = openfl__$internal_renderer_opengl_shaders2_Shader.UID++;
	this.gl = gl;
	this.program = null;
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.Shader"] = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_Shader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","Shader"];
openfl__$internal_renderer_opengl_shaders2_Shader.compileProgram = function(gl,vertexSrc,fragmentSrc) {
	var cache = openfl__$internal_renderer_opengl_utils_ShaderManager.compiledShadersCache;
	var key = haxe_crypto_Md5.encode(vertexSrc + fragmentSrc);
	if(__map_reserved[key] != null ? cache.existsReserved(key) : cache.h.hasOwnProperty(key)) {
		return __map_reserved[key] != null ? cache.getReserved(key) : cache.h[key];
	}
	var vertexShader = openfl__$internal_renderer_opengl_shaders2_Shader.compileShader(gl,vertexSrc,gl.VERTEX_SHADER);
	var fragmentShader = openfl__$internal_renderer_opengl_shaders2_Shader.compileShader(gl,fragmentSrc,gl.FRAGMENT_SHADER);
	var program = gl.createProgram();
	if(vertexShader != null && fragmentShader != null) {
		gl.attachShader(program,vertexShader);
		gl.attachShader(program,fragmentShader);
		gl.linkProgram(program);
		gl.deleteShader(vertexShader);
		gl.deleteShader(fragmentShader);
		if(gl.getProgramParameter(program,gl.LINK_STATUS) == 0) {
			haxe_Log.trace("Could not compile the program:\n\t" + gl.getProgramInfoLog(program),{ fileName : "Shader.hx", lineNumber : 226, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileProgram"});
			haxe_Log.trace("VERTEX:\n" + vertexSrc + "\nFRAGMENT:\n" + fragmentSrc,{ fileName : "Shader.hx", lineNumber : 227, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileProgram"});
			return null;
		}
	}
	if(__map_reserved[key] != null) {
		cache.setReserved(key,program);
	} else {
		cache.h[key] = program;
	}
	return program;
};
openfl__$internal_renderer_opengl_shaders2_Shader.compileShader = function(gl,shaderSrc,type) {
	var src = shaderSrc;
	var shader = gl.createShader(type);
	gl.shaderSource(shader,src);
	gl.compileShader(shader);
	if(gl.getShaderParameter(shader,gl.COMPILE_STATUS) == 0) {
		haxe_Log.trace("Could not compile the shader:\n\t" + gl.getShaderInfoLog(shader),{ fileName : "Shader.hx", lineNumber : 244, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileShader"});
		haxe_Log.trace(shaderSrc,{ fileName : "Shader.hx", lineNumber : 245, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileShader"});
		return null;
	}
	return shader;
};
openfl__$internal_renderer_opengl_shaders2_Shader.prototype = {
	init: function(force) {
		if(force == null) {
			force = false;
		}
		if(this.compiled && !force) {
			return;
		}
		if(this.vertexSrc != null) {
			this.vertexString = this.vertexSrc.join("\n");
		}
		if(this.fragmentSrc != null) {
			this.fragmentString = this.fragmentSrc.join("\n");
		}
		if(this.vertexString == null || this.fragmentString == null) {
			throw new js__$Boot_HaxeError("No vertex or fragment source provided");
		}
		this.program = openfl__$internal_renderer_opengl_shaders2_Shader.compileProgram(this.gl,this.vertexString,this.fragmentString);
		if(this.program != null) {
			this.compiled = true;
		}
	}
	,destroy: function() {
		if(this.program != null) {
			this.gl.deleteProgram(this.program);
		}
		this.compiled = false;
		this.attributes = null;
	}
	,applyData: function(shaderData,renderSession) {
		if(shaderData == null) {
			return;
		}
		var param;
		var u;
		var v;
		var bd;
		var key = shaderData.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			u = this.getUniformLocation(key1);
			param = __map_reserved[key1] != null ? shaderData.getReserved(key1) : shaderData.h[key1];
			if(param == null) {
				continue;
			}
			v = param.value;
			bd = param.bitmap;
			if(v == null && bd == null) {
				continue;
			}
			var _g = param.internalType;
			switch(_g) {
			case 1:
				var _g1 = param.size;
				switch(_g1) {
				case 1:
					this.gl.uniform1i(u,v[0] | 0);
					break;
				case 2:
					this.gl.uniform2i(u,v[0] | 0,v[1] | 0);
					break;
				case 3:
					this.gl.uniform3i(u,v[0] | 0,v[1] | 0,v[2] | 0);
					break;
				case 4:
					this.gl.uniform4i(u,v[0] | 0,v[1] | 0,v[2] | 0,v[3] | 0);
					break;
				}
				break;
			case 2:
				var _g2 = param.size;
				switch(_g2) {
				case 1:
					this.gl.uniform1f(u,v[0]);
					break;
				case 2:
					this.gl.uniform2f(u,v[0],v[1]);
					break;
				case 3:
					this.gl.uniform3f(u,v[0],v[1],v[2]);
					break;
				case 4:
					this.gl.uniform4f(u,v[0],v[1],v[2],v[3]);
					break;
				}
				break;
			case 3:
				var _g3 = param.size;
				switch(_g3) {
				case 2:
					var tmp = this.gl;
					var param1 = param.transpose;
					var array = param.value;
					var this1;
					if(array != null) {
						this1 = new Float32Array(array);
					} else {
						this1 = null;
					}
					tmp.uniformMatrix2fv(u,param1,this1);
					break;
				case 3:
					var tmp1 = this.gl;
					var param2 = param.transpose;
					var array1 = param.value;
					var this2;
					if(array1 != null) {
						this2 = new Float32Array(array1);
					} else {
						this2 = null;
					}
					tmp1.uniformMatrix3fv(u,param2,this2);
					break;
				case 4:
					var tmp2 = this.gl;
					var param3 = param.transpose;
					var array2 = param.value;
					var this3;
					if(array2 != null) {
						this3 = new Float32Array(array2);
					} else {
						this3 = null;
					}
					tmp2.uniformMatrix4fv(u,param3,this3);
					break;
				}
				break;
			case 4:
				if(bd == null || !bd.__isValid) {
					continue;
				}
				this.gl.activeTexture(this.gl.TEXTURE0 + renderSession.activeTextures);
				this.gl.bindTexture(this.gl.TEXTURE_2D,bd.getTexture(this.gl));
				this.gl.uniform1i(u,renderSession.activeTextures);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,param.smooth ? this.gl.LINEAR : this.gl.NEAREST);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,param.smooth ? this.gl.LINEAR : this.gl.NEAREST);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,param.repeatX);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,param.repeatY);
				renderSession.activeTextures++;
				break;
			default:
			}
		}
	}
	,getAttribLocation: function(attribute) {
		if(this.program == null) {
			throw new js__$Boot_HaxeError("Shader isn't initialized");
		}
		var _this = this.attributes;
		if(__map_reserved[attribute] != null ? _this.existsReserved(attribute) : _this.h.hasOwnProperty(attribute)) {
			var _this1 = this.attributes;
			if(__map_reserved[attribute] != null) {
				return _this1.getReserved(attribute);
			} else {
				return _this1.h[attribute];
			}
		} else {
			var location = this.gl.getAttribLocation(this.program,attribute);
			var _this2 = this.attributes;
			if(__map_reserved[attribute] != null) {
				_this2.setReserved(attribute,location);
			} else {
				_this2.h[attribute] = location;
			}
			return location;
		}
	}
	,getUniformLocation: function(uniform) {
		if(this.program == null) {
			throw new js__$Boot_HaxeError("Shader isn't initialized");
		}
		var _this = this.uniforms;
		if(__map_reserved[uniform] != null ? _this.existsReserved(uniform) : _this.h.hasOwnProperty(uniform)) {
			var _this1 = this.uniforms;
			if(__map_reserved[uniform] != null) {
				return _this1.getReserved(uniform);
			} else {
				return _this1.h[uniform];
			}
		} else {
			var location = this.gl.getUniformLocation(this.program,uniform);
			var _this2 = this.uniforms;
			if(__map_reserved[uniform] != null) {
				_this2.setReserved(uniform,location);
			} else {
				_this2.h[uniform] = location;
			}
			return location;
		}
	}
	,enableVertexAttribute: function(attribute,stride,offset) {
		var location = this.getAttribLocation(attribute.name);
		this.gl.enableVertexAttribArray(location);
		this.gl.vertexAttribPointer(location,attribute.components,attribute.type,attribute.normalized,stride,offset * 4);
	}
	,disableVertexAttribute: function(attribute,setDefault) {
		if(setDefault == null) {
			setDefault = true;
		}
		var location = this.getAttribLocation(attribute.name);
		this.gl.disableVertexAttribArray(location);
		if(setDefault) {
			var _g = attribute.components;
			switch(_g) {
			case 1:
				this.gl.vertexAttrib1fv(location,attribute.defaultValue.subarray(0,1));
				break;
			case 2:
				this.gl.vertexAttrib2fv(location,attribute.defaultValue.subarray(0,2));
				break;
			case 3:
				this.gl.vertexAttrib3fv(location,attribute.defaultValue.subarray(0,3));
				break;
			default:
				this.gl.vertexAttrib4fv(location,attribute.defaultValue.subarray(0,4));
			}
		}
	}
	,bindVertexArray: function(va) {
		var offset = 0;
		var stride = va.get_stride();
		var _g = 0;
		var _g1 = va.attributes;
		while(_g < _g1.length) {
			var attribute = _g1[_g];
			++_g;
			if(attribute.enabled) {
				this.enableVertexAttribute(attribute,stride,offset);
				var _g2 = attribute.type;
				var offset1;
				switch(_g2) {
				case 5120:case 5121:
					offset1 = 1;
					break;
				case 5122:case 5123:
					offset1 = 2;
					break;
				default:
					offset1 = 4;
				}
				offset += Math.floor(attribute.components * offset1 / 4);
			} else {
				this.disableVertexAttribute(attribute,true);
			}
		}
	}
	,unbindVertexArray: function(va) {
		var _g = 0;
		var _g1 = va.attributes;
		while(_g < _g1.length) {
			var attribute = _g1[_g];
			++_g;
			this.disableVertexAttribute(attribute,false);
		}
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_Shader
};
var openfl__$internal_renderer_opengl_shaders2_DefaultShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = openfl__$internal_renderer_opengl_shaders2_DefaultShader.VERTEX_SRC;
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","uniform sampler2D " + "openfl_uSampler0" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","uniform bool " + "openfl_uUseColorTransform" + ";","varying vec2 " + "openfl_vTexCoord" + ";","varying vec4 " + "openfl_vColor" + ";","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {","\tif(!" + "openfl_uUseColorTransform" + ") {","\t\treturn color * tint;","\t}","\tvec4 unmultiply;","\tif (color.a == 0.0) {","\t\tunmultiply = vec4(0.0, 0.0, 0.0, 0.0);","\t} else {","   \tunmultiply = vec4(color.rgb / color.a, color.a);","\t}","   vec4 result = unmultiply * tint * multiplier;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   vec4 tc = texture2D(" + "openfl_uSampler0" + ", " + "openfl_vTexCoord" + ");","   gl_FragColor = colorTransform(tc, " + "openfl_vColor" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.DefaultShader"] = openfl__$internal_renderer_opengl_shaders2_DefaultShader;
openfl__$internal_renderer_opengl_shaders2_DefaultShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","DefaultShader"];
openfl__$internal_renderer_opengl_shaders2_DefaultShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_DefaultShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getAttribLocation("openfl_aTexCoord0");
		this.getAttribLocation("openfl_aColor");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uSampler0");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
		this.getUniformLocation("openfl_uUseColorTransform");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_DefaultShader
});
var openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","attribute vec2 " + "openfl_aTexCoord0" + ";","attribute vec4 " + "openfl_aColor" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","varying vec2 vTexCoord;","varying vec4 vColor;","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vTexCoord = " + "openfl_aTexCoord0" + ";","   vColor = " + "openfl_aColor" + ".bgra;","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","uniform sampler2D " + "openfl_uSampler0" + ";","uniform vec3 " + "openfl_uColor" + ";","uniform bool " + "openfl_uUseTexture" + ";","uniform float " + "openfl_uAlpha" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","varying vec2 vTexCoord;","varying vec4 vColor;","vec4 tmp;","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {","   vec4 unmultiply = vec4(color.rgb / color.a, color.a);","   vec4 result = unmultiply * tint * multiplier;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   if(" + "openfl_uUseTexture" + ") {","       tmp = texture2D(" + "openfl_uSampler0" + ", vTexCoord);","   } else {","       tmp = vec4(" + "openfl_uColor" + ", 1.);","   }","   gl_FragColor = colorTransform(tmp, vColor, " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.DrawTrianglesShader"] = openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader;
openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","DrawTrianglesShader"];
openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getAttribLocation("openfl_aTexCoord0");
		this.getAttribLocation("openfl_aColor");
		this.getUniformLocation("openfl_uSampler0");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uColor");
		this.getUniformLocation("openfl_uAlpha");
		this.getUniformLocation("openfl_uUseTexture");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader
});
var openfl__$internal_renderer_opengl_shaders2_FillShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","uniform mat3 " + "openfl_uTranslationMatrix" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform vec4 " + "openfl_uColor" + ";","uniform float " + "openfl_uAlpha" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","varying vec4 vColor;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {","   vec4 result = color * multiplier;","   result.a *= alpha;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * " + "openfl_uTranslationMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vColor = colorTransform(" + "openfl_uColor" + ", " + "openfl_uAlpha" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","varying vec4 vColor;","void main(void) {","   gl_FragColor = vColor;","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.FillShader"] = openfl__$internal_renderer_opengl_shaders2_FillShader;
openfl__$internal_renderer_opengl_shaders2_FillShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","FillShader"];
openfl__$internal_renderer_opengl_shaders2_FillShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_FillShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getUniformLocation("openfl_uTranslationMatrix");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uColor");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_FillShader
});
var openfl__$internal_renderer_opengl_shaders2_PatternFillShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","uniform mat3 " + "openfl_uTranslationMatrix" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform mat3 " + "openfl_uPatternMatrix" + ";","varying vec2 vPosition;","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * " + "openfl_uTranslationMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vPosition = (" + "openfl_uPatternMatrix" + " * vec3(" + "openfl_aPosition" + ", 1)).xy;","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","uniform float " + "openfl_uAlpha" + ";","uniform vec2 " + "openfl_uPatternTL" + ";","uniform vec2 " + "openfl_uPatternBR" + ";","uniform sampler2D " + "openfl_uSampler0" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","varying vec2 vPosition;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {","   vec4 unmultiply = vec4(color.rgb / color.a, color.a);","   vec4 result = unmultiply * multiplier;","   result.a *= alpha;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   vec2 pos = mix(" + "openfl_uPatternTL" + ", " + "openfl_uPatternBR" + ", vPosition);","   vec4 tcol = texture2D(" + "openfl_uSampler0" + ", pos);","   gl_FragColor = colorTransform(tcol, " + "openfl_uAlpha" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.PatternFillShader"] = openfl__$internal_renderer_opengl_shaders2_PatternFillShader;
openfl__$internal_renderer_opengl_shaders2_PatternFillShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","PatternFillShader"];
openfl__$internal_renderer_opengl_shaders2_PatternFillShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_PatternFillShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getUniformLocation("openfl_uTranslationMatrix");
		this.getUniformLocation("openfl_uPatternMatrix");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uSampler0");
		this.getUniformLocation("openfl_uPatternTL");
		this.getUniformLocation("openfl_uPatternBR");
		this.getUniformLocation("openfl_uAlpha");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_PatternFillShader
});
var openfl__$internal_renderer_opengl_shaders2_PrimitiveShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","attribute vec4 " + "openfl_aColor" + ";","uniform mat3 " + "openfl_uTranslationMatrix" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","uniform float " + "openfl_uAlpha" + ";","varying vec4 vColor;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {","   vec4 result = color * multiplier;","   result.a *= alpha;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * " + "openfl_uTranslationMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vColor = colorTransform(" + "openfl_aColor" + ", " + "openfl_uAlpha" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","varying vec4 vColor;","void main(void) {","   gl_FragColor = vColor;","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.PrimitiveShader"] = openfl__$internal_renderer_opengl_shaders2_PrimitiveShader;
openfl__$internal_renderer_opengl_shaders2_PrimitiveShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","PrimitiveShader"];
openfl__$internal_renderer_opengl_shaders2_PrimitiveShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_PrimitiveShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getAttribLocation("openfl_aColor");
		this.getUniformLocation("openfl_uTranslationMatrix");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uAlpha");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_PrimitiveShader
});
var openfl__$internal_renderer_opengl_utils_BlendModeManager = function(gl) {
	this.gl = gl;
	this.currentBlendMode = null;
};
$hxClasses["openfl._internal.renderer.opengl.utils.BlendModeManager"] = openfl__$internal_renderer_opengl_utils_BlendModeManager;
openfl__$internal_renderer_opengl_utils_BlendModeManager.__name__ = ["openfl","_internal","renderer","opengl","utils","BlendModeManager"];
openfl__$internal_renderer_opengl_utils_BlendModeManager.prototype = {
	destroy: function() {
		this.gl = null;
	}
	,setBlendMode: function(blendMode,force) {
		if(force == null) {
			force = false;
		}
		if(blendMode == null) {
			blendMode = 10;
			force = true;
		}
		if(!force && this.currentBlendMode == blendMode) {
			return false;
		}
		this.currentBlendMode = blendMode;
		switch(blendMode) {
		case 0:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(1,1);
			break;
		case 9:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(774,771);
			break;
		case 12:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(1,769);
			break;
		case 14:
			this.gl.blendEquation(32779);
			this.gl.blendFunc(1,1);
			break;
		default:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(1,771);
		}
		return true;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_BlendModeManager
};
var openfl__$internal_renderer_opengl_utils_DrawPath = function(makeArray) {
	if(makeArray == null) {
		makeArray = true;
	}
	this.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
	this.points = null;
	this.winding = 0;
	this.isRemovable = true;
	this.fillIndex = 0;
	this.line = new openfl__$internal_renderer_opengl_utils_LineStyle();
	this.fill = openfl__$internal_renderer_opengl_utils_FillType.None;
	if(makeArray) {
		this.points = [];
	}
};
$hxClasses["openfl._internal.renderer.opengl.utils.DrawPath"] = openfl__$internal_renderer_opengl_utils_DrawPath;
openfl__$internal_renderer_opengl_utils_DrawPath.__name__ = ["openfl","_internal","renderer","opengl","utils","DrawPath"];
openfl__$internal_renderer_opengl_utils_DrawPath.getStack = function(graphics,gl) {
	return openfl__$internal_renderer_opengl_utils_PathBuiler.build(graphics,gl);
};
openfl__$internal_renderer_opengl_utils_DrawPath.prototype = {
	update: function(line,fill,fillIndex,winding) {
		this.updateLine(line);
		this.fill = fill;
		this.fillIndex = fillIndex;
		this.winding = winding;
	}
	,updateLine: function(line) {
		this.line.width = line.width;
		this.line.color = line.color;
		this.line.alpha = line.alpha == null ? 1 : line.alpha;
		this.line.scaleMode = line.scaleMode == null ? 2 : line.scaleMode;
		this.line.caps = line.caps == null ? 1 : line.caps;
		this.line.joints = line.joints == null ? 2 : line.joints;
		this.line.miterLimit = line.miterLimit;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_DrawPath
};
var openfl__$internal_renderer_opengl_utils_PathBuiler = function() { };
$hxClasses["openfl._internal.renderer.opengl.utils.PathBuiler"] = openfl__$internal_renderer_opengl_utils_PathBuiler;
openfl__$internal_renderer_opengl_utils_PathBuiler.__name__ = ["openfl","_internal","renderer","opengl","utils","PathBuiler"];
openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.__line = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.closePath = function() {
	var l = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null ? 0 : openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length;
	if(l <= 0) {
		return;
	}
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type == openfl__$internal_renderer_opengl_utils_GraphicType.Polygon && openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.fill != openfl__$internal_renderer_opengl_utils_FillType.None) {
		var sx = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[0];
		var sy = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[1];
		var ex = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[l - 2];
		var ey = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[l - 1];
		if(!(sx == ex && sy == ey)) {
			var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
			var push_point = true;
			if(points.length > 1) {
				var lastX = points[points.length - 2];
				var lastY = points[points.length - 1];
				if(lastX == sx && lastY == sy) {
					push_point = false;
				}
			}
			if(push_point == true) {
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(sx);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(sy);
			}
		}
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.endFill = function() {
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer_opengl_utils_FillType.None;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex++;
};
openfl__$internal_renderer_opengl_utils_PathBuiler.moveTo = function(x,y) {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
	} else {
		openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
	}
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x);
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y);
	openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
};
openfl__$internal_renderer_opengl_utils_PathBuiler.lineTo = function(x,y) {
	var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
	var push_point = true;
	if(points.length > 1) {
		var lastX = points[points.length - 2];
		var lastY = points[points.length - 1];
		if(lastX == x && lastY == y) {
			push_point = false;
		}
	}
	if(push_point == true) {
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y);
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.curveTo = function(cx,cy,x,y) {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
		if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
			openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
		} else {
			openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
		}
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
	}
	openfl__$internal_renderer_GraphicsPaths.curveTo(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points,cx,cy,x,y);
};
openfl__$internal_renderer_opengl_utils_PathBuiler.cubicCurveTo = function(cx,cy,cx2,cy2,x,y) {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
		if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
			openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
		} else {
			openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
		}
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
	}
	var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
	var n = 20;
	var dt = 0;
	var dt2 = 0;
	var dt3 = 0;
	var t2 = 0;
	var t3 = 0;
	var fromX = points[points.length - 2];
	var fromY = points[points.length - 1];
	var px = 0;
	var py = 0;
	var tmp = 0;
	var _g1 = 1;
	var _g = n + 1;
	while(_g1 < _g) {
		var i = _g1++;
		tmp = i / n;
		dt = 1 - tmp;
		dt2 = dt * dt;
		dt3 = dt2 * dt;
		t2 = tmp * tmp;
		t3 = t2 * tmp;
		px = dt3 * fromX + 3 * dt2 * tmp * cx + 3 * dt * t2 * cx2 + t3 * x;
		py = dt3 * fromY + 3 * dt2 * tmp * cy + 3 * dt * t2 * cy2 + t3 * y;
		points.push(px);
		points.push(py);
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.graphicDataPop = function() {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
	} else {
		openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.build = function(graphics,gl) {
	var glStack = null;
	var bounds = graphics.__bounds;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths = [];
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
	openfl__$internal_renderer_opengl_utils_PathBuiler.__line = new openfl__$internal_renderer_opengl_utils_LineStyle();
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer_opengl_utils_FillType.None;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex = 0;
	glStack = graphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId];
	if(glStack == null) {
		glStack = graphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId] = new openfl__$internal_renderer_opengl_utils_GLStack(gl);
	}
	if(!(!graphics.__visible || graphics.__commands.get_length() == 0 || bounds == null || bounds.width == 0 || bounds.height == 0)) {
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:
				var c = data.readBeginBitmapFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.endFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c) != null ? openfl__$internal_renderer_opengl_utils_FillType.Texture(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c)) : openfl__$internal_renderer_opengl_utils_FillType.None;
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [];
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				break;
			case 1:
				var c1 = data.readBeginFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.endFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) > 0 ? openfl__$internal_renderer_opengl_utils_FillType.Color(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 16777215,openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1)) : openfl__$internal_renderer_opengl_utils_FillType.None;
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [];
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				break;
			case 3:
				var c2 = data.readCubicCurveTo();
				var cx = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c2);
				var cy = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c2);
				var cx2 = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c2);
				var cy2 = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c2);
				var x = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c2);
				var y = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c2);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
				var n = 20;
				var dt = 0;
				var dt2 = 0;
				var dt3 = 0;
				var t2 = 0;
				var t3 = 0;
				var fromX = points[points.length - 2];
				var fromY = points[points.length - 1];
				var px = 0;
				var py = 0;
				var tmp = 0;
				var _g11 = 1;
				var _g2 = n + 1;
				while(_g11 < _g2) {
					var i = _g11++;
					tmp = i / n;
					dt = 1 - tmp;
					dt2 = dt * dt;
					dt3 = dt2 * dt;
					t2 = tmp * tmp;
					t3 = t2 * tmp;
					px = dt3 * fromX + 3 * dt2 * tmp * cx + 3 * dt * t2 * cx2 + t3 * x;
					py = dt3 * fromY + 3 * dt2 * tmp * cy + 3 * dt * t2 * cy2 + t3 * y;
					points.push(px);
					points.push(py);
				}
				break;
			case 4:
				var c3 = data.readCurveTo();
				var cx1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c3);
				var cy1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c3);
				var x1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c3);
				var y1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c3);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				openfl__$internal_renderer_GraphicsPaths.curveTo(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points,cx1,cy1,x1,y1);
				break;
			case 5:
				var c4 = data.readDrawCircle();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Circle;
				var tmp1 = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c4);
				var tmp2 = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c4);
				var tmp3 = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c4);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [tmp1,tmp2,tmp3];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 6:
				var c5 = data.readDrawEllipse();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse;
				var tmp4 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c5);
				var tmp5 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c5);
				var tmp6 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c5);
				var tmp7 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c5);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [tmp4,tmp5,tmp6,tmp7];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 7:
				var c6 = data.readDrawPath();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				var _g21 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_winding(c6);
				switch(_g21) {
				case "evenOdd":
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
					break;
				case "nonZero":
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 1;
					break;
				default:
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
				}
				var command;
				var cx3;
				var cy3;
				var cx21;
				var cy21;
				var ax;
				var ay;
				var idx = 0;
				var _g4 = 0;
				var _g3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands(c6).length;
				while(_g4 < _g3) {
					var i1 = _g4++;
					command = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands(c6).data[i1];
					switch(command) {
					case 1:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						idx += 2;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
						} else {
							openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
						}
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						break;
					case 2:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						idx += 2;
						var points1 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
						var push_point = true;
						if(points1.length > 1) {
							var lastX = points1[points1.length - 2];
							var lastY = points1[points1.length - 1];
							if(lastX == ax && lastY == ay) {
								push_point = false;
							}
						}
						if(push_point == true) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						}
						break;
					case 3:
						cx3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						cy3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						idx += 4;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
							if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
								openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
							} else {
								openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
							}
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						}
						openfl__$internal_renderer_GraphicsPaths.curveTo(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points,cx3,cy3,ax,ay);
						break;
					case 4:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						idx += 4;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
						} else {
							openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
						}
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						break;
					case 5:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						idx += 4;
						var points2 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
						var push_point1 = true;
						if(points2.length > 1) {
							var lastX1 = points2[points2.length - 2];
							var lastY1 = points2[points2.length - 1];
							if(lastX1 == ax && lastY1 == ay) {
								push_point1 = false;
							}
						}
						if(push_point1 == true) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						}
						break;
					case 6:
						cx3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						cy3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						cx21 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						cy21 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 4];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 5];
						idx += 6;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
							if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
								openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
							} else {
								openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
							}
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						}
						var points3 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
						var n1 = 20;
						var dt1 = 0;
						var dt21 = 0;
						var dt31 = 0;
						var t21 = 0;
						var t31 = 0;
						var fromX1 = points3[points3.length - 2];
						var fromY1 = points3[points3.length - 1];
						var px1 = 0;
						var py1 = 0;
						var tmp8 = 0;
						var _g12 = 1;
						var _g5 = n1 + 1;
						while(_g12 < _g5) {
							var i2 = _g12++;
							tmp8 = i2 / n1;
							dt1 = 1 - tmp8;
							dt21 = dt1 * dt1;
							dt31 = dt21 * dt1;
							t21 = tmp8 * tmp8;
							t31 = t21 * tmp8;
							px1 = dt31 * fromX1 + 3 * dt21 * tmp8 * cx3 + 3 * dt1 * t21 * cx21 + t31 * ax;
							py1 = dt31 * fromY1 + 3 * dt21 * tmp8 * cy3 + 3 * dt1 * t21 * cy21 + t31 * ay;
							points3.push(px1);
							points3.push(py1);
						}
						break;
					default:
					}
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
				break;
			case 8:
				var c7 = data.readDrawRect();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Rectangle(false);
				var tmp9 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7);
				var tmp10 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7);
				var tmp11 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7);
				var tmp12 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [tmp9,tmp10,tmp11,tmp12];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 9:
				var c8 = data.readDrawRoundRect();
				var x2 = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8);
				var y2 = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8);
				var rx = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8);
				var ry = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8);
				if(ry == null) {
					ry = rx;
				}
				rx *= 0.5;
				ry *= 0.5;
				if(rx > width / 2) {
					rx = width / 2;
				}
				if(ry > height / 2) {
					ry = height / 2;
				}
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Rectangle(true);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [x2,y2,width,height,rx,ry];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 10:
				var c9 = data.readDrawTiles();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex++;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath(false);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				var tmp13 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9);
				var tmp14 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
				var tmp15 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth(c9);
				var tmp16 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9);
				var tmp17 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_shader(c9);
				var tmp18 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.DrawTiles(tmp13,tmp14,tmp15,tmp16,tmp17,tmp18);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable = false;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 11:
				var c10 = data.readDrawTriangles();
				var uvtData = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10);
				var vertices = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c10);
				var indices = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c10);
				var culling = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c10);
				var isColor;
				var _g22 = openfl__$internal_renderer_opengl_utils_PathBuiler.__fill;
				if(_g22[1] == 1) {
					isColor = true;
				} else {
					isColor = false;
				}
				if(isColor && uvtData != null) {
					continue;
				}
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				if(uvtData == null) {
					var this1 = new openfl_VectorData();
					var this2 = new Array(0);
					this1.data = this2;
					this1.length = 0;
					this1.fixed = false;
					uvtData = this1;
					var _g31 = openfl__$internal_renderer_opengl_utils_PathBuiler.__fill;
					if(_g31[1] == 2) {
						var b = _g31[2];
						var _g41 = 0;
						var _g32 = vertices.length / 2 | 0;
						while(_g41 < _g32) {
							var i3 = _g41++;
							var x3 = vertices.data[i3 * 2] / b.width;
							if(!uvtData.fixed) {
								uvtData.length++;
								if(uvtData.data.length < uvtData.length) {
									var length = uvtData.data.length + 10;
									var this3 = new Array(length);
									var data1 = this3;
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvtData.data,0,data1,0,uvtData.data.length);
									uvtData.data = data1;
								}
								uvtData.data[uvtData.length - 1] = x3;
							}
							var x4 = vertices.data[i3 * 2 + 1] / b.height;
							if(!uvtData.fixed) {
								uvtData.length++;
								if(uvtData.data.length < uvtData.length) {
									var length1 = uvtData.data.length + 10;
									var this4 = new Array(length1);
									var data2 = this4;
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvtData.data,0,data2,0,uvtData.data.length);
									uvtData.data = data2;
								}
								uvtData.data[uvtData.length - 1] = x4;
							}
						}
					}
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.DrawTriangles(vertices,indices,uvtData,culling,null,0);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable = false;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 12:
				var c11 = data.readEndFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.endFill();
				break;
			case 15:
				var c12 = data.readLineStyle();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line = new openfl__$internal_renderer_opengl_utils_LineStyle();
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c12) == null || isNaN(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c12)) || openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c12) < 0) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__line.width = 0;
				} else if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c12) == 0) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__line.width = 1;
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__line.width = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c12);
				}
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.color = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c12);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.alpha = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c12);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.scaleMode = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c12);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.caps = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c12);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.joints = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c12);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.miterLimit = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c12);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 16:
				var c13 = data.readLineTo();
				var x5 = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c13);
				var y3 = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c13);
				var points4 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
				var push_point2 = true;
				if(points4.length > 1) {
					var lastX2 = points4[points4.length - 2];
					var lastY2 = points4[points4.length - 1];
					if(lastX2 == x5 && lastY2 == y3) {
						push_point2 = false;
					}
				}
				if(push_point2 == true) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x5);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y3);
				}
				break;
			case 17:
				var c14 = data.readMoveTo();
				var x6 = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c14);
				var y4 = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c14);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x6);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y4);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 18:
				var c15 = data.readOverrideMatrix();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				var tmp19 = openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix(c15);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.OverrideMatrix(tmp19);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable = false;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			default:
				data.skip(type);
			}
		}
		openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
		data.destroy();
	}
	graphics.__drawPaths = openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths;
	return glStack;
};
var openfl__$internal_renderer_opengl_utils_LineStyle = function() {
	this.width = 0;
	this.color = 0;
	this.alpha = 1;
	this.scaleMode = 2;
	this.caps = 1;
	this.joints = 2;
	this.miterLimit = 3;
};
$hxClasses["openfl._internal.renderer.opengl.utils.LineStyle"] = openfl__$internal_renderer_opengl_utils_LineStyle;
openfl__$internal_renderer_opengl_utils_LineStyle.__name__ = ["openfl","_internal","renderer","opengl","utils","LineStyle"];
openfl__$internal_renderer_opengl_utils_LineStyle.prototype = {
	__class__: openfl__$internal_renderer_opengl_utils_LineStyle
};
var openfl__$internal_renderer_opengl_utils_FillType = $hxClasses["openfl._internal.renderer.opengl.utils.FillType"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","FillType"], __constructs__ : ["None","Color","Texture","Gradient"] };
openfl__$internal_renderer_opengl_utils_FillType.None = ["None",0];
openfl__$internal_renderer_opengl_utils_FillType.None.toString = $estr;
openfl__$internal_renderer_opengl_utils_FillType.None.__enum__ = openfl__$internal_renderer_opengl_utils_FillType;
openfl__$internal_renderer_opengl_utils_FillType.Color = function(color,alpha) { var $x = ["Color",1,color,alpha]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_FillType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_FillType.Texture = function(bitmap,matrix,repeat,smooth) { var $x = ["Texture",2,bitmap,matrix,repeat,smooth]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_FillType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_FillType.Gradient = ["Gradient",3];
openfl__$internal_renderer_opengl_utils_FillType.Gradient.toString = $estr;
openfl__$internal_renderer_opengl_utils_FillType.Gradient.__enum__ = openfl__$internal_renderer_opengl_utils_FillType;
var openfl__$internal_renderer_opengl_utils_FilterManager = function(gl,transparent) {
	this.transparent = transparent;
	this.filterStack = [];
	this.offsetX = 0;
	this.offsetY = 0;
	this.setContext(gl);
};
$hxClasses["openfl._internal.renderer.opengl.utils.FilterManager"] = openfl__$internal_renderer_opengl_utils_FilterManager;
openfl__$internal_renderer_opengl_utils_FilterManager.__name__ = ["openfl","_internal","renderer","opengl","utils","FilterManager"];
openfl__$internal_renderer_opengl_utils_FilterManager.prototype = {
	applyFilterPass: function(filter,filterArea,width,height) {
	}
	,begin: function(renderSession,buffer) {
		this.renderSession = renderSession;
		this.defaultShader = renderSession.shaderManager.defaultShader;
		this.width = 0;
		this.height = 0;
		this.buffer = buffer;
	}
	,destroy: function() {
		var gl = this.gl;
		this.filterStack = null;
		this.offsetX = 0;
		this.offsetY = 0;
		var _g = 0;
		var _g1 = this.texturePool;
		while(_g < _g1.length) {
			var texture = _g1[_g];
			++_g;
			texture.destroy();
		}
		this.texturePool = null;
		gl.deleteBuffer(this.vertexBuffer);
		gl.deleteBuffer(this.uvBuffer);
		gl.deleteBuffer(this.colorBuffer);
		gl.deleteBuffer(this.indexBuffer);
	}
	,initShaderBuffers: function() {
		var gl = this.gl;
		this.vertexBuffer = gl.createBuffer();
		this.uvBuffer = gl.createBuffer();
		this.colorBuffer = gl.createBuffer();
		this.indexBuffer = gl.createBuffer();
		var array = [0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0];
		var this1;
		if(array != null) {
			this1 = new Float32Array(array);
		} else {
			this1 = null;
		}
		this.vertexArray = this1;
		gl.bindBuffer(gl.ARRAY_BUFFER,this.vertexBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,this.vertexArray,gl.STATIC_DRAW);
		var array1 = [0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0];
		var this2;
		if(array1 != null) {
			this2 = new Float32Array(array1);
		} else {
			this2 = null;
		}
		this.uvArray = this2;
		gl.bindBuffer(gl.ARRAY_BUFFER,this.uvBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,this.uvArray,gl.STATIC_DRAW);
		var array2 = [1.0,16777215,1.0,16777215,1.0,16777215,1.0,16777215];
		var this3;
		if(array2 != null) {
			this3 = new Float32Array(array2);
		} else {
			this3 = null;
		}
		this.colorArray = this3;
		gl.bindBuffer(gl.ARRAY_BUFFER,this.colorBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,this.colorArray,gl.STATIC_DRAW);
		gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		var gl1 = gl.ELEMENT_ARRAY_BUFFER;
		var array3 = [0,1,2,1,3,2];
		var this4;
		if(array3 != null) {
			this4 = new Uint16Array(array3);
		} else {
			this4 = null;
		}
		gl.bufferData(gl1,this4,gl.STATIC_DRAW);
	}
	,popFilter: function() {
	}
	,pushFilter: function(filterBlock) {
	}
	,setContext: function(gl) {
		this.gl = gl;
		this.texturePool = [];
		this.initShaderBuffers();
	}
	,__class__: openfl__$internal_renderer_opengl_utils_FilterManager
};
var openfl__$internal_renderer_opengl_utils_GLMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
	this.setContext(renderSession.gl);
	this.clips = [];
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLMaskManager"] = openfl__$internal_renderer_opengl_utils_GLMaskManager;
openfl__$internal_renderer_opengl_utils_GLMaskManager.__name__ = ["openfl","_internal","renderer","opengl","utils","GLMaskManager"];
openfl__$internal_renderer_opengl_utils_GLMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_opengl_utils_GLMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	destroy: function() {
		this.gl = null;
	}
	,pushRect: function(rect,transform) {
		if(rect == null) {
			return;
		}
		var m = transform.clone();
		var height = this.renderSession.renderer.viewport.height;
		var tx = m.tx;
		var ty = m.ty;
		m.tx = 0;
		m.ty = 0;
		m.scale(1,-1);
		m.translate(0,height);
		m.tx += tx;
		m.ty -= ty;
		var clip = rect.clone();
		clip.__transform(clip,m);
		if(this.currentClip != null) {
			clip = this.currentClip.intersection(clip);
		}
		var restartBatch = this.currentClip == null || clip.isEmpty() || this.currentClip.containsRect(clip);
		this.clips.push(clip);
		this.currentClip = clip;
		if(restartBatch) {
			this.renderSession.spriteBatch.stop();
			this.renderSession.spriteBatch.start(this.currentClip);
		}
	}
	,pushMask: function(mask) {
		this.renderSession.spriteBatch.stop();
		this.renderSession.stencilManager.pushMask(mask,this.renderSession);
		this.renderSession.spriteBatch.start(this.currentClip);
	}
	,popMask: function() {
		this.renderSession.spriteBatch.stop();
		this.renderSession.stencilManager.popMask(null,this.renderSession);
		this.renderSession.spriteBatch.start(this.currentClip);
	}
	,popRect: function() {
		this.renderSession.spriteBatch.stop();
		this.clips.pop();
		this.currentClip = this.clips[this.clips.length - 1];
		this.renderSession.spriteBatch.start(this.currentClip);
	}
	,saveState: function() {
		this.savedClip = this.currentClip;
		this.currentClip = null;
	}
	,restoreState: function() {
		this.currentClip = this.savedClip;
		this.savedClip = null;
	}
	,setContext: function(gl) {
		if(this.renderSession != null) {
			this.renderSession.gl = gl;
		}
		this.gl = gl;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLMaskManager
});
var openfl__$internal_renderer_opengl_utils_VertexAttribute = function(components,type,normalized,name,defaultValue) {
	if(normalized == null) {
		normalized = false;
	}
	this.enabled = true;
	this.normalized = false;
	this.components = components;
	this.type = type;
	this.normalized = normalized;
	this.name = name;
	if(defaultValue == null) {
		var this1;
		if(components != null) {
			this1 = new Float32Array(components);
		} else {
			this1 = null;
		}
		this.defaultValue = this1;
	} else {
		this.defaultValue = defaultValue;
	}
};
$hxClasses["openfl._internal.renderer.opengl.utils.VertexAttribute"] = openfl__$internal_renderer_opengl_utils_VertexAttribute;
openfl__$internal_renderer_opengl_utils_VertexAttribute.__name__ = ["openfl","_internal","renderer","opengl","utils","VertexAttribute"];
openfl__$internal_renderer_opengl_utils_VertexAttribute.prototype = {
	copy: function() {
		return new openfl__$internal_renderer_opengl_utils_VertexAttribute(this.components,this.type,this.normalized,this.name,this.defaultValue);
	}
	,getElementsBytes: function() {
		var _g = this.type;
		switch(_g) {
		case 5120:case 5121:
			return 1;
		case 5122:case 5123:
			return 2;
		default:
			return 4;
		}
	}
	,get_elements: function() {
		var _g = this.type;
		var tmp;
		switch(_g) {
		case 5120:case 5121:
			tmp = 1;
			break;
		case 5122:case 5123:
			tmp = 2;
			break;
		default:
			tmp = 4;
		}
		return Math.floor(this.components * tmp / 4);
	}
	,__class__: openfl__$internal_renderer_opengl_utils_VertexAttribute
	,__properties__: {get_elements:"get_elements"}
};
var openfl__$internal_renderer_opengl_utils_GraphicsRenderer = function() { };
$hxClasses["openfl._internal.renderer.opengl.utils.GraphicsRenderer"] = openfl__$internal_renderer_opengl_utils_GraphicsRenderer;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.__name__ = ["openfl","_internal","renderer","opengl","utils","GraphicsRenderer"];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastVertsBuffer = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastBucketMode = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastTexture = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastTextureRepeat = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastTextureSmooth = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.overrideMatrix = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildCircle = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var rectData = path.points;
	var x = rectData[0];
	var y = rectData[1];
	var rx = rectData[2];
	var ry = rectData.length == 3 ? rx : rectData[3];
	if(path.type == openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse) {
		rx /= 2;
		ry /= 2;
		x += rx;
		y += ry;
	}
	if(localCoords) {
		x -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
		y -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
	}
	var totalSegs = 40;
	var seg = Math.PI * 2 / totalSegs;
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	if(fill != null) {
		var verts = fill.verts;
		var indices = fill.indices;
		var vertPos = verts.length / 2 | 0;
		indices.push(vertPos);
		var _g1 = 0;
		var _g = totalSegs + 1;
		while(_g1 < _g) {
			var i = _g1++;
			verts.push(x);
			verts.push(y);
			verts.push(x + Math.sin(seg * i) * rx);
			verts.push(y + Math.cos(seg * i) * ry);
			indices.push(vertPos++);
			indices.push(vertPos++);
		}
		indices.push(vertPos - 1);
	}
	if(path.line.width > 0) {
		var tempPoints = path.points;
		path.points = [];
		var points = path.points;
		var seg1 = Math.PI * 2 / totalSegs;
		var _g11 = 0;
		var _g2 = totalSegs + 1;
		while(_g11 < _g2) {
			var i1 = _g11++;
			points.push(x + Math.sin(seg1 * i1) * rx);
			points.push(y + Math.cos(seg1 * i1) * ry);
		}
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
		path.points = tempPoints;
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildComplexPoly = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var bucket = null;
	if(path.points.length >= 6) {
		var points = path.points.slice();
		if(localCoords) {
			var _g1 = 0;
			var _g = points.length / 2 | 0;
			while(_g1 < _g) {
				var i = _g1++;
				points[i * 2] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
				points[i * 2 + 1] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
			}
		}
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
		var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
		fill.drawMode = glStack.gl.TRIANGLE_FAN;
		fill.verts = points;
		var indices = fill.indices;
		var length = points.length / 2 | 0;
		var _g11 = 0;
		var _g2 = length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			indices.push(i1);
		}
	}
	if(path.line.width > 0) {
		if(bucket == null) {
			bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
		}
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket,localCoords);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine = function(path,bucket,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var points = path.points;
	if(points.length == 0) {
		return;
	}
	var line = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Line);
	if(localCoords) {
		var _g1 = 0;
		var _g = points.length / 2 | 0;
		while(_g1 < _g) {
			var i = _g1++;
			points[i * 2] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			points[i * 2 + 1] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
		}
	}
	var firstPoint = new openfl_geom_Point(points[0],points[1]);
	var lastPoint = new openfl_geom_Point(points[points.length - 2 | 0],points[points.length - 1 | 0]);
	if(firstPoint.x == lastPoint.x && firstPoint.y == lastPoint.y) {
		points = points.slice();
		points.pop();
		points.pop();
		lastPoint = new openfl_geom_Point(points[points.length - 2 | 0],points[points.length - 1 | 0]);
		var midPointX = lastPoint.x + (firstPoint.x - lastPoint.x) * 0.5;
		var midPointY = lastPoint.y + (firstPoint.y - lastPoint.y) * 0.5;
		points.unshift(midPointY);
		points.unshift(midPointX);
		points.push(midPointX);
		points.push(midPointY);
	}
	var verts = line.verts;
	var indices = line.indices;
	var length = points.length / 2 | 0;
	var indexCount = points.length;
	var indexStart = verts.length / 6 | 0;
	var width = path.line.width / 2;
	var hex = path.line.color;
	var color = hex == null ? [1,1,1] : [(hex >> 16 & 255) / 255,(hex >> 8 & 255) / 255,(hex & 255) / 255];
	var alpha = path.line.alpha;
	var r = color[0];
	var g = color[1];
	var b = color[2];
	var px;
	var py;
	var p1x;
	var p1y;
	var p2x;
	var p2y;
	var p3x;
	var p3y;
	var perpx;
	var perpy;
	var perp2x;
	var perp2y;
	var perp3x;
	var perp3y;
	var a1;
	var b1;
	var c1;
	var a2;
	var b2;
	var c2;
	var denom;
	var pdist;
	var dist;
	p1x = points[0];
	p1y = points[1];
	p2x = points[2];
	p2y = points[3];
	perpx = -(p1y - p2y);
	perpy = p1x - p2x;
	dist = Math.sqrt(Math.abs(perpx * perpx + perpy * perpy));
	perpx /= dist;
	perpy /= dist;
	perpx *= width;
	perpy *= width;
	verts.push(p1x - perpx);
	verts.push(p1y - perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	verts.push(p1x + perpx);
	verts.push(p1y + perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	var _g11 = 1;
	var _g2 = length - 1;
	while(_g11 < _g2) {
		var i1 = _g11++;
		p1x = points[(i1 - 1) * 2];
		p1y = points[(i1 - 1) * 2 + 1];
		p2x = points[i1 * 2];
		p2y = points[i1 * 2 + 1];
		p3x = points[(i1 + 1) * 2];
		p3y = points[(i1 + 1) * 2 + 1];
		perpx = -(p1y - p2y);
		perpy = p1x - p2x;
		dist = Math.sqrt(Math.abs(perpx * perpx + perpy * perpy));
		perpx /= dist;
		perpy /= dist;
		perpx *= width;
		perpy *= width;
		perp2x = -(p2y - p3y);
		perp2y = p2x - p3x;
		dist = Math.sqrt(Math.abs(perp2x * perp2x + perp2y * perp2y));
		perp2x /= dist;
		perp2y /= dist;
		perp2x *= width;
		perp2y *= width;
		a1 = -perpy + p1y - (-perpy + p2y);
		b1 = -perpx + p2x - (-perpx + p1x);
		c1 = (-perpx + p1x) * (-perpy + p2y) - (-perpx + p2x) * (-perpy + p1y);
		a2 = -perp2y + p3y - (-perp2y + p2y);
		b2 = -perp2x + p2x - (-perp2x + p3x);
		c2 = (-perp2x + p3x) * (-perp2y + p2y) - (-perp2x + p2x) * (-perp2y + p3y);
		denom = a1 * b2 - a2 * b1;
		if(Math.abs(denom) < 0.1) {
			denom += 10.1;
			verts.push(p2x - perpx);
			verts.push(p2y - perpy);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x + perpx);
			verts.push(p2y + perpy);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			continue;
		}
		px = (b1 * c2 - b2 * c1) / denom;
		py = (a2 * c1 - a1 * c2) / denom;
		pdist = (px - p2x) * (px - p2x) + (py - p2y) + (py - p2y);
		if(pdist > 19600) {
			perp3x = perpx - perp2x;
			perp3y = perpy - perp2y;
			dist = Math.sqrt(Math.abs(perp3x * perp3x + perp3y * perp3y));
			perp3x /= dist;
			perp3y /= dist;
			perp3x *= width;
			perp3y *= width;
			verts.push(p2x - perp3x);
			verts.push(p2y - perp3y);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x + perp3x);
			verts.push(p2y + perp3y);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x - perp3x);
			verts.push(p2y - perp3y);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			++indexCount;
		} else {
			verts.push(px);
			verts.push(py);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x - (px - p2x));
			verts.push(p2y - (py - p2y));
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
		}
	}
	p1x = points[(length - 2) * 2];
	p1y = points[(length - 2) * 2 + 1];
	p2x = points[(length - 1) * 2];
	p2y = points[(length - 1) * 2 + 1];
	perpx = -(p1y - p2y);
	perpy = p1x - p2x;
	dist = Math.sqrt(Math.abs(perpx * perpx + perpy * perpy));
	if(!isFinite(dist)) {
		haxe_Log.trace(perpx * perpx + perpy * perpy,{ fileName : "GraphicsRenderer.hx", lineNumber : 407, className : "openfl._internal.renderer.opengl.utils.GraphicsRenderer", methodName : "buildLine"});
	}
	perpx /= dist;
	perpy /= dist;
	perpx *= width;
	perpy *= width;
	verts.push(p2x - perpx);
	verts.push(p2y - perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	verts.push(p2x + perpx);
	verts.push(p2y + perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	indices.push(indexStart);
	var _g12 = 0;
	var _g3 = indexCount;
	while(_g12 < _g3) {
		var i2 = _g12++;
		indices.push(indexStart++);
	}
	indices.push(indexStart - 1);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildPoly = function(path,glStack) {
	if(path.points.length < 6) {
		return;
	}
	var points = path.points;
	var l = points.length;
	var sx = points[0];
	var sy = points[1];
	var ex = points[l - 2];
	var ey = points[l - 1];
	if(sx != ex || sy != ey) {
		points.push(sx);
		points.push(sy);
	}
	var length = points.length / 2 | 0;
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	var verts = fill.verts;
	var indices = fill.indices;
	if(fill != null) {
		var triangles = [];
		openfl__$internal_renderer_PolyK.triangulate(triangles,points);
		var vertPos = verts.length / 2;
		var i = 0;
		while(i < triangles.length) {
			indices.push(triangles[i] + vertPos | 0);
			indices.push(triangles[i] + vertPos | 0);
			indices.push(triangles[i + 1] + vertPos | 0);
			indices.push(triangles[i + 2] + vertPos | 0);
			indices.push(triangles[i + 2] + vertPos | 0);
			i += 3;
		}
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i1 = _g1++;
			verts.push(points[i1 * 2]);
			verts.push(points[i1 * 2 + 1]);
		}
	}
	if(path.line.width > 0) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRectangle = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var rectData = path.points;
	var x = rectData[0];
	var y = rectData[1];
	var width = rectData[2];
	var height = rectData[3];
	if(localCoords) {
		x -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
		y -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
	}
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	if(fill != null) {
		var verts = fill.verts;
		var indices = fill.indices;
		var vertPos = verts.length / 2 | 0;
		verts.push(x);
		verts.push(y);
		verts.push(x + width);
		verts.push(y);
		verts.push(x);
		verts.push(y + height);
		verts.push(x + width);
		verts.push(y + height);
		indices.push(vertPos);
		indices.push(vertPos);
		indices.push(vertPos + 1);
		indices.push(vertPos + 2);
		indices.push(vertPos + 3);
		indices.push(vertPos + 3);
	}
	if(path.line.width > 0) {
		var tempPoints = path.points;
		path.points = [x,y,x + width,y,x + width,y + height,x,y + height,x,y];
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
		path.points = tempPoints;
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRoundedRectangle = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var points = path.points.slice();
	var x = points[0];
	var y = points[1];
	var width = points[2];
	var height = points[3];
	var rx = points[4];
	var ry = points[5];
	if(localCoords) {
		x -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
		y -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
	}
	var recPoints = [];
	openfl__$internal_renderer_GraphicsPaths.roundRectangle(recPoints,x,y,width,height,rx,ry);
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	if(fill != null) {
		var verts = fill.verts;
		var indices = fill.indices;
		var vecPos = verts.length / 2;
		var triangles = [];
		openfl__$internal_renderer_PolyK.triangulate(triangles,recPoints);
		var i = 0;
		while(i < triangles.length) {
			indices.push(triangles[i] + vecPos | 0);
			indices.push(triangles[i] + vecPos | 0);
			indices.push(triangles[i + 1] + vecPos | 0);
			indices.push(triangles[i + 2] + vecPos | 0);
			indices.push(triangles[i + 2] + vecPos | 0);
			i += 3;
		}
		i = 0;
		while(i < recPoints.length) {
			verts.push(recPoints[i]);
			verts.push(recPoints[++i]);
			++i;
		}
	}
	if(path.line.width > 0) {
		var tempPoints = path.points;
		path.points = recPoints;
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
		path.points = tempPoints;
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildDrawTriangles = function(path,object,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var args = path.type.slice(2);
	var vertices = args[0];
	var indices = args[1];
	var uvtData = args[2];
	var culling = args[3];
	var colors = args[4];
	var blendMode = args[5];
	var a;
	var b;
	var c;
	var d;
	var tx;
	var ty;
	if(localCoords) {
		a = 1.0;
		b = 0.0;
		c = 0.0;
		d = 1.0;
		tx = 0.0;
		ty = 0.0;
	} else {
		a = object.__worldTransform.a;
		b = object.__worldTransform.b;
		c = object.__worldTransform.c;
		d = object.__worldTransform.d;
		tx = object.__worldTransform.tx;
		ty = object.__worldTransform.ty;
	}
	var hasColors = colors != null && colors.length > 0;
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	var colorAttrib = fill.vertexArray.attributes[2];
	colorAttrib.enabled = hasColors;
	var array = [1,1,1,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	colorAttrib.defaultValue = this1;
	fill.rawVerts = true;
	fill.glLength = indices.length;
	fill.stride = fill.vertexArray.get_stride() / 4 | 0;
	var vertsLength = fill.glLength * fill.stride;
	var verts;
	if(fill.glVerts == null || fill.glVerts.length < vertsLength) {
		var this2;
		if(vertsLength != null) {
			this2 = new Float32Array(vertsLength);
		} else {
			this2 = null;
		}
		verts = this2;
		fill.glVerts = verts;
	} else {
		verts = fill.glVerts;
	}
	var buffer = verts.buffer;
	var this3;
	if(buffer != null) {
		this3 = new Uint32Array(buffer,0);
	} else {
		this3 = null;
	}
	var glColors = this3;
	var v0 = 0;
	var v1 = 0;
	var v2 = 0;
	var i0 = 0;
	var i1 = 0;
	var i2 = 0;
	var x0 = 0.0;
	var y0 = 0.0;
	var x1 = 0.0;
	var y1 = 0.0;
	var x2 = 0.0;
	var y2 = 0.0;
	var idx = 0;
	var _g1 = 0;
	var _g = indices.length / 3 | 0;
	while(_g1 < _g) {
		var i = _g1++;
		i0 = indices.data[i * 3];
		i1 = indices.data[i * 3 + 1];
		i2 = indices.data[i * 3 + 2];
		v0 = i0 * 2;
		v1 = i1 * 2;
		v2 = i2 * 2;
		x0 = vertices.data[v0];
		y0 = vertices.data[v0 + 1];
		x1 = vertices.data[v1];
		y1 = vertices.data[v1 + 1];
		x2 = vertices.data[v2];
		y2 = vertices.data[v2 + 1];
		if(localCoords) {
			x0 -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			y0 -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
			x1 -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			y1 -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
			x2 -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			y2 -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
		}
		switch(culling) {
		case 0:
			if((x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0) < 0) {
				continue;
			}
			break;
		case 2:
			if(!((x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0) < 0)) {
				continue;
			}
			break;
		default:
		}
		verts[idx++] = a * x0 + c * y0 + tx;
		verts[idx++] = b * x0 + d * y0 + ty;
		verts[idx++] = uvtData.data[v0];
		verts[idx++] = uvtData.data[v0 + 1];
		if(hasColors) {
			glColors[idx++] = colors.data[i0];
		}
		verts[idx++] = a * x1 + c * y1 + tx;
		verts[idx++] = b * x1 + d * y1 + ty;
		verts[idx++] = uvtData.data[v1];
		verts[idx++] = uvtData.data[v1 + 1];
		if(hasColors) {
			glColors[idx++] = colors.data[i1];
		}
		verts[idx++] = a * x2 + c * y2 + tx;
		verts[idx++] = b * x2 + d * y2 + ty;
		verts[idx++] = uvtData.data[v2];
		verts[idx++] = uvtData.data[v2 + 1];
		if(hasColors) {
			glColors[idx++] = colors.data[i2];
		}
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildDrawTiles = function(path,glStack) {
	openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.quadraticBezierCurve = function(fromX,fromY,cpX,cpY,toX,toY) {
	var xa;
	var ya;
	var xb;
	var yb;
	var x;
	var y;
	var n = 20;
	var points = [];
	var getPt = function(n1,n2,perc) {
		var diff = n2 - n1;
		return n1 + diff * perc;
	};
	var j = 0.0;
	var _g1 = 0;
	var _g = n + 1;
	while(_g1 < _g) {
		var i = _g1++;
		j = i / n;
		xa = getPt(fromX,cpX,j);
		ya = getPt(fromY,cpY,j);
		xb = getPt(cpX,toX,j);
		yb = getPt(cpY,toY,j);
		x = getPt(xa,xb,j);
		y = getPt(ya,yb,j);
		points.push(x);
		points.push(y);
	}
	return points;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render = function(object,renderSession) {
	var graphics = object.__graphics;
	var bounds = graphics.__bounds;
	var spritebatch = renderSession.spriteBatch;
	var dirty = graphics.__dirty;
	if(!graphics.__visible || graphics.__commands.get_length() == 0 || bounds == null || bounds.width == 0 || bounds.height == 0) {
		graphics.__glStack.splice(0,graphics.__glStack.length);
		return;
	}
	if(dirty) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.updateGraphics(object,object.__graphics,renderSession.gl,object.get_cacheAsBitmap());
	}
	openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderGraphics(object,renderSession,false);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderGraphics = function(object,renderSession,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var graphics = object.__graphics;
	var gl = renderSession.gl;
	var glStack = graphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId];
	if(glStack == null) {
		return;
	}
	var bucket;
	var translationMatrix;
	if(localCoords) {
		translationMatrix = openfl_geom_Matrix.__identity;
	} else {
		translationMatrix = object.__worldTransform;
	}
	var clipRect = renderSession.spriteBatch.clipRect;
	var batchDrawing = renderSession.spriteBatch.drawing;
	batchDrawing = renderSession.spriteBatch.drawing;
	var _g1 = 0;
	var _g = glStack.buckets.length;
	while(_g1 < _g) {
		var i = _g1++;
		batchDrawing = renderSession.spriteBatch.drawing;
		if(batchDrawing && !localCoords) {
			renderSession.spriteBatch.finish();
		}
		renderSession.blendModeManager.setBlendMode(object.__blendMode);
		if(clipRect != null) {
			gl.enable(gl.SCISSOR_TEST);
			gl.scissor(Math.floor(clipRect.x),Math.floor(clipRect.y),Math.floor(clipRect.width),Math.floor(clipRect.height));
		}
		bucket = glStack.buckets[i];
		var _g2 = bucket.mode;
		switch(_g2[1]) {
		case 1:case 2:
			renderSession.stencilManager.pushBucket(bucket,renderSession,translationMatrix.toArray(true));
			var shader = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareShader(bucket,renderSession,object,translationMatrix.toArray(true));
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderFill(bucket,shader,renderSession);
			renderSession.stencilManager.popBucket(object,bucket,renderSession);
			break;
		case 5:
			var shader1 = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareShader(bucket,renderSession,object,null);
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderDrawTriangles(bucket,shader1,renderSession);
			break;
		case 6:
			if(!batchDrawing) {
				renderSession.spriteBatch.begin(renderSession,clipRect);
			}
			var args = bucket.graphicType.slice(2);
			renderSession.spriteBatch.renderTiles(object,args[0],args[1],args[2],args[3],args[4],args[5]);
			renderSession.spriteBatch.finish();
			break;
		default:
		}
		var ct = object.__worldColorTransform;
		var _g3 = 0;
		var _g4 = bucket.lines;
		while(_g3 < _g4.length) {
			var line = _g4[_g3];
			++_g3;
			if(line != null && line.verts.length > 0) {
				var shader2 = renderSession.shaderManager.primitiveShader;
				renderSession.shaderManager.setShader(shader2);
				gl.uniformMatrix3fv(shader2.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix.toArray(true));
				gl.uniformMatrix3fv(shader2.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
				gl.uniform1f(shader2.getUniformLocation("openfl_uAlpha"),1);
				gl.uniform4f(shader2.getUniformLocation("openfl_uColorMultiplier"),ct.redMultiplier,ct.greenMultiplier,ct.blueMultiplier,ct.alphaMultiplier);
				gl.uniform4f(shader2.getUniformLocation("openfl_uColorOffset"),ct.redOffset / 255,ct.greenOffset / 255,ct.blueOffset / 255,ct.alphaOffset / 255);
				var _this = line.vertexArray;
				_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
				shader2.bindVertexArray(line.vertexArray);
				gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,line.indexBuffer);
				gl.drawElements(gl.TRIANGLE_STRIP,line.indices.length,gl.UNSIGNED_SHORT,0);
			}
		}
		if(clipRect != null) {
			gl.disable(gl.SCISSOR_TEST);
		}
		batchDrawing = renderSession.spriteBatch.drawing;
		if(!batchDrawing && !localCoords) {
			renderSession.spriteBatch.begin(renderSession,clipRect);
		}
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.updateGraphics = function(object,graphics,gl,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectPosition.setTo(object.get_x(),object.get_y());
	if(graphics.__bounds == null) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds = new openfl_geom_Rectangle();
	} else {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.copyFrom(graphics.__bounds);
	}
	var glStack = null;
	if(graphics.__dirty) {
		glStack = openfl__$internal_renderer_opengl_utils_DrawPath.getStack(graphics,gl);
	}
	graphics.set___dirty(false);
	var _g = 0;
	var _g1 = glStack.buckets;
	while(_g < _g1.length) {
		var data = _g1[_g];
		++_g;
		data.reset();
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bucketPool.push(data);
	}
	glStack.reset();
	var _g11 = glStack.lastIndex;
	var _g2 = graphics.__drawPaths.length;
	while(_g11 < _g2) {
		var i = _g11++;
		var path = graphics.__drawPaths[i];
		var _g21 = path.type;
		switch(_g21[1]) {
		case 0:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildComplexPoly(path,glStack,localCoords);
			break;
		case 1:
			var rounded = _g21[2];
			if(rounded) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRoundedRectangle(path,glStack,localCoords);
			} else {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRectangle(path,glStack,localCoords);
			}
			break;
		case 2:case 3:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildCircle(path,glStack,localCoords);
			break;
		case 4:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildDrawTriangles(path,object,glStack,localCoords);
			break;
		case 5:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
			break;
		case 6:
			var m = _g21[2];
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.overrideMatrix = m;
			break;
		}
		glStack.lastIndex++;
	}
	var _g3 = 0;
	var _g12 = glStack.buckets;
	while(_g3 < _g12.length) {
		var bucket = _g12[_g3];
		++_g3;
		if(bucket.uploadTileBuffer) {
			bucket.uploadTile(Math.ceil(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_left()),Math.ceil(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_top()),Math.floor(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_right()),Math.floor(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_bottom()));
		}
		bucket.optimize();
	}
	glStack.upload();
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket = function(path,glStack) {
	var bucket = null;
	var _g = path.fill;
	switch(_g[1]) {
	case 1:
		var a = _g[3];
		var c = _g[2];
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket(path.fillIndex,glStack,openfl__$internal_renderer_opengl_utils_BucketMode.Fill);
		bucket.color = c == null ? [1,1,1] : [(c >> 16 & 255) / 255,(c >> 8 & 255) / 255,(c & 255) / 255];
		bucket.color[3] = a;
		bucket.uploadTileBuffer = true;
		break;
	case 2:
		var s = _g[5];
		var r = _g[4];
		var m = _g[3];
		var b = _g[2];
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket(path.fillIndex,glStack,openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill);
		bucket.bitmap = b;
		bucket.textureRepeat = r;
		bucket.textureSmooth = s;
		bucket.texture = b.getTexture(glStack.gl);
		bucket.uploadTileBuffer = true;
		var pMatrix;
		if(m == null) {
			pMatrix = new openfl_geom_Matrix();
		} else {
			pMatrix = m.clone();
		}
		pMatrix.invert();
		pMatrix.scale(1 / b.width,1 / b.height);
		var tx = pMatrix.tx;
		var ty = pMatrix.ty;
		pMatrix.tx = 0;
		pMatrix.ty = 0;
		bucket.textureTL.x = tx;
		bucket.textureTL.y = ty;
		bucket.textureBR.x = tx + 1;
		bucket.textureBR.y = ty + 1;
		bucket.textureMatrix = pMatrix;
		break;
	default:
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket(path.fillIndex,glStack,openfl__$internal_renderer_opengl_utils_BucketMode.Line);
		bucket.uploadTileBuffer = false;
	}
	var _g1 = path.type;
	switch(_g1[1]) {
	case 4:
		bucket.mode = openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles;
		bucket.uploadTileBuffer = false;
		break;
	case 5:
		bucket.mode = openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles;
		bucket.uploadTileBuffer = false;
		break;
	default:
	}
	bucket.graphicType = path.type;
	bucket.overrideMatrix = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.overrideMatrix;
	return bucket;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.getBucket = function(glStack,mode) {
	var b = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bucketPool.pop();
	if(b == null) {
		b = new openfl__$internal_renderer_opengl_utils_GLBucket(glStack.gl);
	}
	b.mode = mode;
	glStack.buckets.push(b);
	return b;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket = function(fillIndex,glStack,mode) {
	var bucket = null;
	var _g = 0;
	var _g1 = glStack.buckets;
	while(_g < _g1.length) {
		var b = _g1[_g];
		++_g;
		if(b.fillIndex == fillIndex) {
			bucket = b;
			break;
		}
	}
	if(bucket == null) {
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.getBucket(glStack,mode);
	}
	bucket.dirty = true;
	bucket.fillIndex = fillIndex;
	return bucket;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareShader = function(bucket,renderSession,object,translationMatrix) {
	var gl = renderSession.gl;
	var shader = null;
	var _g = bucket.mode;
	switch(_g[1]) {
	case 1:
		shader = renderSession.shaderManager.fillShader;
		break;
	case 2:
		shader = renderSession.shaderManager.patternFillShader;
		break;
	case 5:
		shader = renderSession.shaderManager.drawTrianglesShader;
		break;
	default:
		shader = null;
	}
	if(shader == null) {
		return null;
	}
	var newShader = renderSession.shaderManager.setShader(shader);
	gl.uniform1f(shader.getUniformLocation("openfl_uAlpha"),object.__worldAlpha);
	gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
	var ct = object.__worldColorTransform;
	gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),ct.redMultiplier,ct.greenMultiplier,ct.blueMultiplier,ct.alphaMultiplier);
	gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),ct.redOffset / 255,ct.greenOffset / 255,ct.blueOffset / 255,ct.alphaOffset / 255);
	var _g1 = bucket.mode;
	switch(_g1[1]) {
	case 1:
		gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
		var tmp = shader.getUniformLocation("openfl_uColor");
		var array = bucket.color;
		var this1;
		if(array != null) {
			this1 = new Float32Array(array);
		} else {
			this1 = null;
		}
		gl.uniform4fv(tmp,this1);
		break;
	case 2:
		gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
		gl.uniform2f(shader.getUniformLocation("openfl_uPatternTL"),bucket.textureTL.x,bucket.textureTL.y);
		gl.uniform2f(shader.getUniformLocation("openfl_uPatternBR"),bucket.textureBR.x,bucket.textureBR.y);
		gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uPatternMatrix"),false,bucket.textureMatrix.toArray(true));
		break;
	case 5:
		if(bucket.texture != null) {
			gl.uniform1i(shader.getUniformLocation("openfl_uUseTexture"),1);
		} else {
			gl.uniform1i(shader.getUniformLocation("openfl_uUseTexture"),0);
			var tmp1 = shader.getUniformLocation("openfl_uColor");
			var array1 = bucket.color;
			var this2;
			if(array1 != null) {
				this2 = new Float32Array(array1);
			} else {
				this2 = null;
			}
			gl.uniform4fv(tmp1,this2);
		}
		break;
	default:
	}
	return shader;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderFill = function(bucket,shader,renderSession) {
	var gl = renderSession.gl;
	if(bucket.mode == openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill && bucket.texture != null) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bindTexture(gl,bucket);
	}
	gl.bindBuffer(gl.ARRAY_BUFFER,bucket.tileBuffer);
	gl.vertexAttribPointer(shader.getAttribLocation("openfl_aPosition"),4,gl.SHORT,false,0,0);
	gl.drawArrays(gl.TRIANGLE_STRIP,0,4);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderDrawTriangles = function(bucket,shader,renderSession) {
	var gl = renderSession.gl;
	var _g = 0;
	var _g1 = bucket.fills;
	while(_g < _g1.length) {
		var fill = _g1[_g];
		++_g;
		if(fill.available) {
			continue;
		}
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bindTexture(gl,bucket);
		var _this = fill.vertexArray;
		_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
		shader.bindVertexArray(fill.vertexArray);
		gl.drawArrays(gl.TRIANGLES,fill.glStart,fill.glLength);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bindTexture = function(gl,bucket) {
	gl.bindTexture(gl.TEXTURE_2D,bucket.texture);
	if(bucket.textureRepeat && bucket.bitmap.image.get_powerOfTwo()) {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.REPEAT);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.REPEAT);
	} else {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
	}
	if(bucket.textureSmooth) {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.LINEAR);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);
	} else {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.isCCW = function(x1,y1,x2,y2,x3,y3) {
	return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.hex2rgb = function(hex) {
	if(hex == null) {
		return [1,1,1];
	} else {
		return [(hex >> 16 & 255) / 255,(hex >> 8 & 255) / 255,(hex & 255) / 255];
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.hex2rgba = function(hex) {
	if(hex == null) {
		return [1,1,1,1];
	} else {
		return [(hex >> 16 & 255) / 255,(hex >> 8 & 255) / 255,(hex & 255) / 255,(hex >> 24 & 255) / 255];
	}
};
var openfl__$internal_renderer_opengl_utils_GLStack = function(gl) {
	this.lastIndex = 0;
	this.gl = gl;
	this.buckets = [];
	this.lastIndex = 0;
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLStack"] = openfl__$internal_renderer_opengl_utils_GLStack;
openfl__$internal_renderer_opengl_utils_GLStack.__name__ = ["openfl","_internal","renderer","opengl","utils","GLStack"];
openfl__$internal_renderer_opengl_utils_GLStack.prototype = {
	reset: function() {
		this.buckets = [];
		this.lastIndex = 0;
	}
	,upload: function() {
		var _g = 0;
		var _g1 = this.buckets;
		while(_g < _g1.length) {
			var bucket = _g1[_g];
			++_g;
			if(bucket.dirty) {
				bucket.upload();
			}
		}
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLStack
};
var openfl__$internal_renderer_opengl_utils_GLBucket = function(gl) {
	this.uploadTileBuffer = true;
	this.textureSmooth = true;
	this.textureRepeat = false;
	this.lines = [];
	this.fills = [];
	this.fillIndex = -1;
	this.gl = gl;
	this.color = [0,0,0];
	this.lastIndex = 0;
	this.alpha = 1;
	this.dirty = true;
	this.mode = openfl__$internal_renderer_opengl_utils_BucketMode.Fill;
	this.textureMatrix = new openfl_geom_Matrix();
	this.textureTL = new openfl_geom_Point();
	this.textureBR = new openfl_geom_Point(1,1);
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLBucket"] = openfl__$internal_renderer_opengl_utils_GLBucket;
openfl__$internal_renderer_opengl_utils_GLBucket.__name__ = ["openfl","_internal","renderer","opengl","utils","GLBucket"];
openfl__$internal_renderer_opengl_utils_GLBucket.prototype = {
	getData: function(type) {
		var data = type[1] == 1 ? this.fills : this.lines;
		var result = null;
		var remove = false;
		var _g = 0;
		while(_g < data.length) {
			var d = data[_g];
			++_g;
			if(d.available) {
				result = d;
				remove = true;
				break;
			}
		}
		if(result == null) {
			result = new openfl__$internal_renderer_opengl_utils_GLBucketData(this.gl);
		}
		result.available = false;
		result.parent = this;
		result.type = type;
		if(remove) {
			HxOverrides.remove(data,result);
		}
		data.push(result);
		switch(type[1]) {
		case 0:
			result.vertexArray.attributes = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.primitiveVertexAttributes;
			break;
		case 1:
			var _g1 = this.mode;
			switch(_g1[1]) {
			case 1:case 2:
				result.vertexArray.attributes = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.fillVertexAttributes;
				break;
			case 5:
				var tmp = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.drawTrianglesVertexAttributes.slice();
				result.vertexArray.attributes = tmp;
				result.vertexArray.attributes[2] = result.vertexArray.attributes[2].copy();
				break;
			default:
			}
			break;
		}
		return result;
	}
	,optimize: function() {
		var _gthis = this;
		var data = this.lines;
		if(data.length > 1) {
			var result = [];
			var tmp = null;
			var last = null;
			var idx = 0;
			var vi = 0;
			var ii = 0;
			var before = data.length;
			var _g = 0;
			while(_g < data.length) {
				var d = data[_g];
				++_g;
				if(d.available || d.rawVerts || d.rawIndices) {
					if(tmp != null) {
						result.push(tmp);
						tmp = null;
					}
					result.push(d);
					last = d;
					continue;
				}
				if(last == null || last.drawMode == d.drawMode) {
					if(tmp == null) {
						tmp = d;
					} else {
						vi = tmp.verts.length;
						ii = tmp.indices.length;
						var _g2 = 0;
						var _g1 = d.verts.length;
						while(_g2 < _g1) {
							var j = _g2++;
							tmp.verts[j + vi] = d.verts[j];
						}
						var _g21 = 0;
						var _g11 = d.indices.length;
						while(_g21 < _g11) {
							var j1 = _g21++;
							tmp.indices[j1 + ii] = d.indices[j1] + idx;
						}
					}
					idx = tmp.indices[tmp.indices.length - 1] + 1;
					last = d;
				} else {
					if(tmp != null) {
						result.push(tmp);
						tmp = null;
					}
					result.push(d);
					last = d;
					continue;
				}
			}
			if(result.length == 0 && tmp != null) {
				result.push(tmp);
			}
			if(result.length > 0) {
				if(openfl__$internal_renderer_opengl_utils_BucketDataType.Line[1] == 1) {
					_gthis.fills = result;
				} else {
					_gthis.lines = result;
				}
			}
		}
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this.fills;
		while(_g < _g1.length) {
			var fill = _g1[_g];
			++_g;
			fill.reset();
		}
		var _g2 = 0;
		var _g11 = this.lines;
		while(_g2 < _g11.length) {
			var line = _g11[_g2];
			++_g2;
			line.reset();
		}
		this.fillIndex = -1;
		this.uploadTileBuffer = true;
		this.graphicType = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
	}
	,uploadTile: function(x,y,w,h) {
		if(this.tileBuffer == null) {
			this.tileBuffer = this.gl.createBuffer();
		}
		this.tile = [x,y,0,0,w,y,1,0,x,h,0,1,w,h,1,1];
		var array = this.tile;
		var this1;
		if(array != null) {
			this1 = new Int16Array(array);
		} else {
			this1 = null;
		}
		this.glTile = this1;
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.tileBuffer);
		this.gl.bufferData(this.gl.ARRAY_BUFFER,this.glTile,this.gl.STATIC_DRAW);
	}
	,upload: function() {
		if(this.mode != openfl__$internal_renderer_opengl_utils_BucketMode.Line) {
			var _g = 0;
			var _g1 = this.fills;
			while(_g < _g1.length) {
				var fill = _g1[_g];
				++_g;
				if(!fill.available) {
					fill.upload();
				}
			}
		}
		var _g2 = 0;
		var _g11 = this.lines;
		while(_g2 < _g11.length) {
			var line = _g11[_g2];
			++_g2;
			if(!line.available) {
				line.upload();
			}
		}
		this.dirty = false;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLBucket
};
var openfl__$internal_renderer_opengl_utils_GLBucketData = function(gl) {
	this.available = false;
	this.rawIndices = false;
	this.stride = 0;
	this.rawVerts = false;
	this.lastVertsSize = 0;
	this.glStart = 0;
	this.glLength = 0;
	this.gl = gl;
	this.drawMode = gl.TRIANGLE_STRIP;
	this.verts = [];
	this.indices = [];
	this.vertexArray = new openfl__$internal_renderer_opengl_utils_VertexArray([]);
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLBucketData"] = openfl__$internal_renderer_opengl_utils_GLBucketData;
openfl__$internal_renderer_opengl_utils_GLBucketData.__name__ = ["openfl","_internal","renderer","opengl","utils","GLBucketData"];
openfl__$internal_renderer_opengl_utils_GLBucketData.prototype = {
	reset: function() {
		this.available = true;
		this.verts = [];
		this.indices = [];
		this.glLength = 0;
		this.glStart = 0;
		this.stride = 0;
		this.rawVerts = false;
		this.rawIndices = false;
		this.drawMode = this.gl.TRIANGLE_STRIP;
	}
	,upload: function() {
		if(this.rawVerts && this.glVerts != null && this.glVerts.length > 0 || this.verts.length > 0) {
			if(!this.rawVerts) {
				var array = this.verts;
				var this1;
				if(array != null) {
					this1 = new Float32Array(array);
				} else {
					this1 = null;
				}
				this.glVerts = this1;
			}
			this.vertexArray.buffer = this.glVerts.buffer;
			if(this.glVerts.length <= this.lastVertsSize) {
				var _this = this.vertexArray;
				_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
				var end = this.glLength * this.stride;
				if(this.glLength > 0 && this.lastVertsSize > end) {
					var view = this.glVerts.subarray(0,end);
					this.vertexArray.upload(view);
				} else {
					this.vertexArray.upload(this.glVerts);
				}
			} else {
				this.vertexArray.setContext(this.gl,this.glVerts);
				this.lastVertsSize = this.glVerts.length;
			}
		}
		if(this.glLength == 0 && (this.rawIndices && this.glIndices != null && this.glIndices.length > 0 || this.indices.length > 0)) {
			if(this.indexBuffer == null) {
				this.indexBuffer = this.gl.createBuffer();
			}
			if(!this.rawIndices) {
				var array1 = this.indices;
				var this2;
				if(array1 != null) {
					this2 = new Uint16Array(array1);
				} else {
					this2 = null;
				}
				this.glIndices = this2;
			}
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
			this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.glIndices,this.gl.STREAM_DRAW);
		}
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLBucketData
};
var openfl__$internal_renderer_opengl_utils_BucketMode = $hxClasses["openfl._internal.renderer.opengl.utils.BucketMode"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","BucketMode"], __constructs__ : ["None","Fill","PatternFill","Line","PatternLine","DrawTriangles","DrawTiles"] };
openfl__$internal_renderer_opengl_utils_BucketMode.None = ["None",0];
openfl__$internal_renderer_opengl_utils_BucketMode.None.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.None.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.Fill = ["Fill",1];
openfl__$internal_renderer_opengl_utils_BucketMode.Fill.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.Fill.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill = ["PatternFill",2];
openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.Line = ["Line",3];
openfl__$internal_renderer_opengl_utils_BucketMode.Line.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.Line.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternLine = ["PatternLine",4];
openfl__$internal_renderer_opengl_utils_BucketMode.PatternLine.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternLine.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles = ["DrawTriangles",5];
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles = ["DrawTiles",6];
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
var openfl__$internal_renderer_opengl_utils_BucketDataType = $hxClasses["openfl._internal.renderer.opengl.utils.BucketDataType"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","BucketDataType"], __constructs__ : ["Line","Fill"] };
openfl__$internal_renderer_opengl_utils_BucketDataType.Line = ["Line",0];
openfl__$internal_renderer_opengl_utils_BucketDataType.Line.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketDataType.Line.__enum__ = openfl__$internal_renderer_opengl_utils_BucketDataType;
openfl__$internal_renderer_opengl_utils_BucketDataType.Fill = ["Fill",1];
openfl__$internal_renderer_opengl_utils_BucketDataType.Fill.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketDataType.Fill.__enum__ = openfl__$internal_renderer_opengl_utils_BucketDataType;
var openfl__$internal_renderer_opengl_utils_GLGraphicsData = function(gl) {
	this.indices = [];
	this.data = [];
	this.lastIndex = 0;
	this.mode = 0;
	this.dirty = true;
	this.alpha = 1.0;
	this.tint = [1.0,1.0,1.0];
	this.gl = gl;
	this.dataBuffer = gl.createBuffer();
	this.indexBuffer = gl.createBuffer();
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLGraphicsData"] = openfl__$internal_renderer_opengl_utils_GLGraphicsData;
openfl__$internal_renderer_opengl_utils_GLGraphicsData.__name__ = ["openfl","_internal","renderer","opengl","utils","GLGraphicsData"];
openfl__$internal_renderer_opengl_utils_GLGraphicsData.prototype = {
	reset: function() {
		this.data = [];
		this.indices = [];
		this.lastIndex = 0;
	}
	,upload: function() {
		var elements = this.data;
		var this1;
		if(elements != null) {
			this1 = new Float32Array(elements);
		} else {
			this1 = null;
		}
		this.glData = this1;
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.dataBuffer);
		this.gl.bufferData(this.gl.ARRAY_BUFFER,this.glData,this.gl.STATIC_DRAW);
		var elements1 = this.indices;
		var this2;
		if(elements1 != null) {
			this2 = new Uint16Array(elements1);
		} else {
			this2 = null;
		}
		this.glIndices = this2;
		this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.glIndices,this.gl.STATIC_DRAW);
		this.dirty = false;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLGraphicsData
};
var openfl__$internal_renderer_opengl_utils_GraphicType = $hxClasses["openfl._internal.renderer.opengl.utils.GraphicType"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","GraphicType"], __constructs__ : ["Polygon","Rectangle","Circle","Ellipse","DrawTriangles","DrawTiles","OverrideMatrix"] };
openfl__$internal_renderer_opengl_utils_GraphicType.Polygon = ["Polygon",0];
openfl__$internal_renderer_opengl_utils_GraphicType.Polygon.toString = $estr;
openfl__$internal_renderer_opengl_utils_GraphicType.Polygon.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType;
openfl__$internal_renderer_opengl_utils_GraphicType.Rectangle = function(rounded) { var $x = ["Rectangle",1,rounded]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_GraphicType.Circle = ["Circle",2];
openfl__$internal_renderer_opengl_utils_GraphicType.Circle.toString = $estr;
openfl__$internal_renderer_opengl_utils_GraphicType.Circle.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType;
openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse = ["Ellipse",3];
openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse.toString = $estr;
openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType;
openfl__$internal_renderer_opengl_utils_GraphicType.DrawTriangles = function(vertices,indices,uvtData,culling,colors,blendMode) { var $x = ["DrawTriangles",4,vertices,indices,uvtData,culling,colors,blendMode]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_GraphicType.DrawTiles = function(sheet,tileData,smooth,flags,shader,count) { var $x = ["DrawTiles",5,sheet,tileData,smooth,flags,shader,count]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_GraphicType.OverrideMatrix = function(matrix) { var $x = ["OverrideMatrix",6,matrix]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
var openfl__$internal_renderer_opengl_utils_PingPongTexture = function(gl,width,height,smoothing,powerOfTwo) {
	if(powerOfTwo == null) {
		powerOfTwo = true;
	}
	if(smoothing == null) {
		smoothing = true;
	}
	this.__swapped = false;
	this.powerOfTwo = true;
	this.useOldTexture = false;
	this.gl = gl;
	this.width = width;
	this.height = height;
	this.smoothing = smoothing;
	this.powerOfTwo = powerOfTwo;
	var v = new openfl__$internal_renderer_opengl_utils_RenderTexture(gl,width,height,smoothing,powerOfTwo);
	if(this.__swapped) {
		this.__texture1 = v;
	} else {
		this.__texture0 = v;
	}
};
$hxClasses["openfl._internal.renderer.opengl.utils.PingPongTexture"] = openfl__$internal_renderer_opengl_utils_PingPongTexture;
openfl__$internal_renderer_opengl_utils_PingPongTexture.__name__ = ["openfl","_internal","renderer","opengl","utils","PingPongTexture"];
openfl__$internal_renderer_opengl_utils_PingPongTexture.prototype = {
	swap: function() {
		this.__swapped = !this.__swapped;
		if((this.__swapped ? this.__texture1 : this.__texture0) == null) {
			var v = new openfl__$internal_renderer_opengl_utils_RenderTexture(this.gl,this.width,this.height,this.smoothing,this.powerOfTwo);
			if(this.__swapped) {
				this.__texture1 = v;
			} else {
				this.__texture0 = v;
			}
		}
	}
	,clear: function(r,g,b,a,mask) {
		if(a == null) {
			a = 0;
		}
		if(b == null) {
			b = 0;
		}
		if(g == null) {
			g = 0;
		}
		if(r == null) {
			r = 0;
		}
		(this.__swapped ? this.__texture1 : this.__texture0).clear(r,g,b,a,mask);
	}
	,resize: function(width,height) {
		this.width = width;
		this.height = height;
		(this.__swapped ? this.__texture1 : this.__texture0).resize(width,height);
	}
	,destroy: function() {
		if(this.__texture0 != null) {
			this.__texture0.destroy();
			this.__texture0 = null;
		}
		if(this.__texture1 != null) {
			this.__texture1.destroy();
			this.__texture1 = null;
		}
		this.__swapped = false;
	}
	,get_renderTexture: function() {
		if(this.__swapped) {
			return this.__texture1;
		} else {
			return this.__texture0;
		}
	}
	,set_renderTexture: function(v) {
		if(this.__swapped) {
			return this.__texture1 = v;
		} else {
			return this.__texture0 = v;
		}
	}
	,get_oldRenderTexture: function() {
		if(this.__swapped) {
			return this.__texture0;
		} else {
			return this.__texture1;
		}
	}
	,set_oldRenderTexture: function(v) {
		if(this.__swapped) {
			return this.__texture0 = v;
		} else {
			return this.__texture1 = v;
		}
	}
	,get_framebuffer: function() {
		return (this.__swapped ? this.__texture1 : this.__texture0).frameBuffer;
	}
	,get_texture: function() {
		if(this.useOldTexture) {
			return (this.__swapped ? this.__texture0 : this.__texture1).texture;
		} else {
			return (this.__swapped ? this.__texture1 : this.__texture0).texture;
		}
	}
	,get___otherTexture: function() {
		if(this.__swapped) {
			return this.__texture0;
		} else {
			return this.__texture1;
		}
	}
	,__class__: openfl__$internal_renderer_opengl_utils_PingPongTexture
	,__properties__: {get___otherTexture:"get___otherTexture",get_texture:"get_texture",get_framebuffer:"get_framebuffer",set_oldRenderTexture:"set_oldRenderTexture",get_oldRenderTexture:"get_oldRenderTexture",set_renderTexture:"set_renderTexture",get_renderTexture:"get_renderTexture"}
};
var openfl__$internal_renderer_opengl_utils_RenderTexture = function(gl,width,height,smoothing,powerOfTwo) {
	if(powerOfTwo == null) {
		powerOfTwo = true;
	}
	if(smoothing == null) {
		smoothing = true;
	}
	this.powerOfTwo = true;
	this.gl = gl;
	this.powerOfTwo = powerOfTwo;
	this.frameBuffer = gl.createFramebuffer();
	this.texture = gl.createTexture();
	gl.bindTexture(gl.TEXTURE_2D,this.texture);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,smoothing ? gl.LINEAR : gl.NEAREST);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,smoothing ? gl.LINEAR : gl.NEAREST);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
	gl.bindFramebuffer(gl.FRAMEBUFFER,this.frameBuffer);
	gl.framebufferTexture2D(gl.FRAMEBUFFER,gl.COLOR_ATTACHMENT0,gl.TEXTURE_2D,this.texture,0);
	this.renderBuffer = gl.createRenderbuffer();
	gl.bindRenderbuffer(gl.RENDERBUFFER,this.renderBuffer);
	gl.framebufferRenderbuffer(gl.FRAMEBUFFER,gl.DEPTH_STENCIL_ATTACHMENT,gl.RENDERBUFFER,this.renderBuffer);
	this.resize(width,height);
};
$hxClasses["openfl._internal.renderer.opengl.utils.RenderTexture"] = openfl__$internal_renderer_opengl_utils_RenderTexture;
openfl__$internal_renderer_opengl_utils_RenderTexture.__name__ = ["openfl","_internal","renderer","opengl","utils","RenderTexture"];
openfl__$internal_renderer_opengl_utils_RenderTexture.prototype = {
	clear: function(r,g,b,a,mask) {
		if(a == null) {
			a = 0;
		}
		if(b == null) {
			b = 0;
		}
		if(g == null) {
			g = 0;
		}
		if(r == null) {
			r = 0;
		}
		this.gl.clearColor(r,g,b,a);
		this.gl.clear(mask == null ? this.gl.COLOR_BUFFER_BIT : mask);
	}
	,destroy: function() {
		if(this.frameBuffer != null) {
			this.gl.deleteFramebuffer(this.frameBuffer);
		}
		if(this.texture != null) {
			this.gl.deleteTexture(this.texture);
		}
		this.frameBuffer = null;
		this.texture = null;
	}
	,resize: function(width,height) {
		if(this.width == width && this.height == height) {
			return;
		}
		this.width = width;
		this.height = height;
		var pow2W = width;
		var pow2H = height;
		if(this.powerOfTwo) {
			var n = 1;
			while(n < width) n <<= 1;
			pow2W = n;
			var n1 = 1;
			while(n1 < height) n1 <<= 1;
			pow2H = n1;
		}
		var lastW = this.__width;
		var lastH = this.__height;
		this.__width = pow2W;
		this.__height = pow2H;
		this.createUVs();
		if(lastW == pow2W && lastH == pow2H) {
			return;
		}
		this.gl.bindTexture(this.gl.TEXTURE_2D,this.texture);
		this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.__width,this.__height,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null);
		this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.renderBuffer);
		this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_STENCIL,this.__width,this.__height);
	}
	,createUVs: function() {
		if(this.__uvData == null) {
			this.__uvData = new openfl_display_TextureUvs();
		}
		var w = this.width / this.__width;
		var h = this.height / this.__height;
		this.__uvData.x0 = 0;
		this.__uvData.y0 = 0;
		this.__uvData.x1 = w;
		this.__uvData.y1 = 0;
		this.__uvData.x2 = w;
		this.__uvData.y2 = h;
		this.__uvData.x3 = 0;
		this.__uvData.y3 = h;
	}
	,powOfTwo: function(value) {
		var n = 1;
		while(n < value) n <<= 1;
		return n;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_RenderTexture
};
var openfl__$internal_renderer_opengl_utils_ShaderManager = function(gl) {
	this.setContext(gl);
};
$hxClasses["openfl._internal.renderer.opengl.utils.ShaderManager"] = openfl__$internal_renderer_opengl_utils_ShaderManager;
openfl__$internal_renderer_opengl_utils_ShaderManager.__name__ = ["openfl","_internal","renderer","opengl","utils","ShaderManager"];
openfl__$internal_renderer_opengl_utils_ShaderManager.prototype = {
	setContext: function(gl) {
		this.gl = gl;
		this.defaultShader = new openfl__$internal_renderer_opengl_shaders2_DefaultShader(gl);
		this.fillShader = new openfl__$internal_renderer_opengl_shaders2_FillShader(gl);
		this.patternFillShader = new openfl__$internal_renderer_opengl_shaders2_PatternFillShader(gl);
		this.drawTrianglesShader = new openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader(gl);
		this.primitiveShader = new openfl__$internal_renderer_opengl_shaders2_PrimitiveShader(gl);
		this.setShader(this.defaultShader,true);
	}
	,destroy: function() {
		this.defaultShader.destroy();
		this.fillShader.destroy();
		this.patternFillShader.destroy();
		this.drawTrianglesShader.destroy();
		this.primitiveShader.destroy();
		this.gl = null;
	}
	,setShader: function(shader,force) {
		if(force == null) {
			force = false;
		}
		if(shader == null) {
			this.currentShader = null;
			this.gl.useProgram(null);
			return true;
		}
		if(this.currentShader != null && !force && this.currentShader.ID == shader.ID) {
			return false;
		}
		this.currentShader = shader;
		this.gl.useProgram(shader.program);
		return true;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_ShaderManager
};
var openfl__$internal_renderer_opengl_utils_SpriteBatch = function(gl,maxSprites) {
	if(maxSprites == null) {
		maxSprites = 2000;
	}
	this.colorTransform = new openfl_geom_ColorTransform();
	this.uvs = new openfl_display_TextureUvs();
	this.matrix = new openfl_geom_Matrix();
	this.lastEnableColor = true;
	this.enableColor = true;
	this.attributes = [];
	this.writtenVertexBytes = 0;
	this.drawing = false;
	this.dirty = true;
	this.states = [];
	this.maxSprites = maxSprites;
	this.attributes.push(new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition"));
	this.attributes.push(new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aTexCoord0"));
	this.attributes.push(new openfl__$internal_renderer_opengl_utils_VertexAttribute(4,5121,true,"openfl_aColor"));
	var array = [1,1,1,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	this.attributes[2].defaultValue = this1;
	this.maxElementsPerVertex = 0;
	var _g = 0;
	var _g1 = this.attributes;
	while(_g < _g1.length) {
		var a = _g1[_g];
		++_g;
		var tmp = this;
		var tmp1 = tmp.maxElementsPerVertex;
		var _g2 = a.type;
		var tmp2;
		switch(_g2) {
		case 5120:case 5121:
			tmp2 = 1;
			break;
		case 5122:case 5123:
			tmp2 = 2;
			break;
		default:
			tmp2 = 4;
		}
		tmp.maxElementsPerVertex = tmp1 + Math.floor(a.components * tmp2 / 4);
	}
	this.vertexArraySize = maxSprites * this.maxElementsPerVertex * 4 * 4;
	this.indexArraySize = maxSprites * 6;
	this.vertexArray = new openfl__$internal_renderer_opengl_utils_VertexArray(this.attributes,this.vertexArraySize,false);
	var buffer = this.vertexArray.buffer;
	var this2;
	if(buffer != null) {
		this2 = new Float32Array(buffer,0);
	} else {
		this2 = null;
	}
	this.positions = this2;
	var buffer1 = this.vertexArray.buffer;
	var this3;
	if(buffer1 != null) {
		this3 = new Uint32Array(buffer1,0);
	} else {
		this3 = null;
	}
	this.colors = this3;
	var elements = this.indexArraySize;
	var this4;
	if(elements != null) {
		this4 = new Uint16Array(elements);
	} else {
		this4 = null;
	}
	this.indices = this4;
	var i = 0;
	var j = 0;
	while(i < this.indexArraySize) {
		this.indices[i] = j;
		this.indices[i + 1] = j + 1;
		this.indices[i + 2] = j + 2;
		this.indices[i + 3] = j;
		this.indices[i + 4] = j + 2;
		this.indices[i + 5] = j + 3;
		i += 6;
		j += 4;
	}
	this.currentState = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
	this.dirty = true;
	this.drawing = false;
	this.batchedSprites = 0;
	this.setContext(gl);
};
$hxClasses["openfl._internal.renderer.opengl.utils.SpriteBatch"] = openfl__$internal_renderer_opengl_utils_SpriteBatch;
openfl__$internal_renderer_opengl_utils_SpriteBatch.__name__ = ["openfl","_internal","renderer","opengl","utils","SpriteBatch"];
openfl__$internal_renderer_opengl_utils_SpriteBatch.prototype = {
	destroy: function() {
		this.vertexArray.destroy();
		this.vertexArray = null;
		this.indices = null;
		this.gl.deleteBuffer(this.indexBuffer);
		this.currentState.destroy();
		var _g = 0;
		var _g1 = this.states;
		while(_g < _g1.length) {
			var state = _g1[_g];
			++_g;
			state.destroy();
		}
		this.colorTransform = null;
		this.gl = null;
	}
	,begin: function(renderSession,clipRect) {
		this.renderSession = renderSession;
		this.shader = renderSession.shaderManager.defaultShader;
		this.drawing = true;
		this.start(clipRect);
	}
	,finish: function() {
		this.stop();
		this.clipRect = null;
		this.drawing = false;
	}
	,start: function(clipRect) {
		if(!this.drawing) {
			this.stop();
		}
		this.dirty = true;
		this.clipRect = clipRect;
	}
	,stop: function() {
		this.flush();
	}
	,renderBitmapData: function(bitmapData,smoothing,matrix,ct,alpha,blendMode,flashShader,pixelSnapping,bgra) {
		if(bgra == null) {
			bgra = false;
		}
		if(alpha == null) {
			alpha = 1;
		}
		if(bitmapData == null) {
			return;
		}
		var texture = bitmapData.getTexture(this.gl);
		if(this.batchedSprites >= this.maxSprites) {
			this.flush();
		}
		var uvs = bitmapData.__uvData;
		if(uvs == null) {
			return;
		}
		if(flashShader != null) {
			flashShader.__init(this.gl);
			flashShader.__shader.wrapS = flashShader.repeatX;
			flashShader.__shader.wrapT = flashShader.repeatY;
			flashShader.__shader.smooth = flashShader.smooth;
			flashShader.__shader.blendMode = flashShader.blendMode;
			var objSize = flashShader.data.get(openfl_display_Shader.uObjectSize);
			var texSize = flashShader.data.get(openfl_display_Shader.uTextureSize);
			if(bitmapData != null) {
				objSize.value[0] = bitmapData.width;
				objSize.value[1] = bitmapData.height;
				if(bitmapData.__pingPongTexture != null) {
					var _this = bitmapData.__pingPongTexture;
					texSize.value[0] = (_this.__swapped ? _this.__texture1 : _this.__texture0).__width;
					var _this1 = bitmapData.__pingPongTexture;
					texSize.value[1] = (_this1.__swapped ? _this1.__texture1 : _this1.__texture0).__height;
				} else {
					texSize.value[0] = bitmapData.width;
					texSize.value[1] = bitmapData.height;
				}
			} else {
				objSize.value[0] = 0;
				objSize.value[1] = 0;
				texSize.value[0] = 0;
				texSize.value[1] = 0;
			}
		}
		var color = ((alpha * 255 | 0) & 255) << 24 | 16777215;
		this.enableColor = true;
		if(this.enableColor != this.lastEnableColor) {
			this.flush();
			this.lastEnableColor = this.enableColor;
		}
		this.attributes[2].enabled = this.lastEnableColor;
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var _g2 = a.type;
				var r1;
				switch(_g2) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a.components * r1 / 4);
			}
		}
		this.elementsPerVertex = r;
		var index = this.batchedSprites * 4 * this.elementsPerVertex;
		var width = bitmapData.width;
		var height = bitmapData.height;
		var a1 = matrix.a;
		var b = matrix.b;
		var c = matrix.c;
		var d = matrix.d;
		var tx = matrix.tx;
		var ty = matrix.ty;
		if(pixelSnapping == null || pixelSnapping == 2) {
			this.positions[index] = tx;
			this.positions[index + 1] = ty;
			this.positions[index + 5] = a1 * width + tx;
			this.positions[index + 6] = b * width + ty;
			this.positions[index + 10] = a1 * width + c * height + tx;
			this.positions[index + 11] = d * height + b * width + ty;
			this.positions[index + 15] = c * height + tx;
			this.positions[index + 16] = d * height + ty;
		} else {
			this.positions[index] = Math.round(tx);
			this.positions[index + 1] = Math.round(ty);
			this.positions[index + 5] = Math.round(a1 * width + tx);
			this.positions[index + 6] = Math.round(b * width + ty);
			this.positions[index + 10] = Math.round(a1 * width + c * height + tx);
			this.positions[index + 11] = Math.round(d * height + b * width + ty);
			this.positions[index + 15] = Math.round(c * height + tx);
			this.positions[index + 16] = Math.round(d * height + ty);
		}
		if(this.enableColor) {
			var val = this.colors[index + 19] = color;
			var val1 = this.colors[index + 14] = val;
			var val2 = this.colors[index + 9] = val1;
			this.colors[index + 4] = val2;
		}
		this.positions[index + 2] = uvs.x0;
		this.positions[index + 3] = uvs.y0;
		this.positions[index + 7] = uvs.x1;
		this.positions[index + 8] = uvs.y1;
		this.positions[index + 12] = uvs.x2;
		this.positions[index + 13] = uvs.y2;
		this.positions[index + 17] = uvs.x3;
		this.positions[index + 18] = uvs.y3;
		this.writtenVertexBytes = index + 20;
		var index1 = this.batchedSprites;
		var state = this.states[index1];
		if(state == null) {
			state = this.states[index1] = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
		}
		state.texture = texture;
		state.textureSmooth = smoothing;
		state.blendMode = blendMode;
		state.skipColorTransform = ct != null && ct.__isDefault();
		if(!state.skipColorTransform) {
			state.colorTransform.redMultiplier = ct.redMultiplier;
			state.colorTransform.greenMultiplier = ct.greenMultiplier;
			state.colorTransform.blueMultiplier = ct.blueMultiplier;
			state.colorTransform.alphaMultiplier = ct.alphaMultiplier;
			state.colorTransform.redOffset = ct.redOffset;
			state.colorTransform.greenOffset = ct.greenOffset;
			state.colorTransform.blueOffset = ct.blueOffset;
			state.colorTransform.alphaOffset = ct.alphaOffset;
		}
		state.skipColorTransformAlpha = true;
		if(flashShader == null) {
			state.shader = null;
			state.shaderData = null;
		} else {
			state.shader = flashShader.__shader;
			state.shaderData = flashShader.data;
		}
		this.batchedSprites++;
	}
	,renderTiles: function(object,sheet,tileData,smooth,flags,flashShader,count) {
		if(count == null) {
			count = -1;
		}
		if(flags == null) {
			flags = 0;
		}
		if(smooth == null) {
			smooth = false;
		}
		var texture = sheet.__bitmap.getTexture(this.gl);
		if(texture == null) {
			return;
		}
		var useScale = (flags & 1) > 0;
		var useRotation = (flags & 2) > 0;
		var useTransform = (flags & 16) > 0;
		var useRGB = (flags & 4) > 0;
		var useAlpha = (flags & 8) > 0;
		var useRect = (flags & 32) > 0;
		var useOrigin = (flags & 64) > 0;
		var useRGBOffset = (flags & 128) > 0;
		var blendMode;
		var _g = flags & 983040;
		switch(_g) {
		case 65536:
			blendMode = 0;
			break;
		case 131072:
			blendMode = 9;
			break;
		case 262144:
			blendMode = 12;
			break;
		case 524288:
			blendMode = 14;
			break;
		default:
			var _g1 = flags & 15728640;
			switch(_g1) {
			case 1048576:
				blendMode = 2;
				break;
			case 2097152:
				blendMode = 8;
				break;
			case 4194304:
				blendMode = 11;
				break;
			case 8388608:
				blendMode = 5;
				break;
			default:
				var _g2 = flags & 251658240;
				switch(_g2) {
				case 16777216:
					blendMode = 3;
					break;
				case 33554432:
					blendMode = 6;
					break;
				default:
					blendMode = 10;
				}
			}
		}
		if(useTransform) {
			useScale = false;
			useRotation = false;
		}
		var scaleIndex = 0;
		var rotationIndex = 0;
		var rgbIndex = 0;
		var rgbOffsetIndex = 0;
		var alphaIndex = 0;
		var transformIndex = 0;
		var numValues = 3;
		if(useRect) {
			if(useOrigin) {
				numValues = 8;
			} else {
				numValues = 6;
			}
		}
		if(useScale) {
			scaleIndex = numValues;
			++numValues;
		}
		if(useRotation) {
			rotationIndex = numValues;
			++numValues;
		}
		if(useTransform) {
			transformIndex = numValues;
			numValues += 4;
		}
		if(useRGB) {
			rgbIndex = numValues;
			numValues += 3;
		}
		if(useAlpha) {
			alphaIndex = numValues;
			++numValues;
		}
		if(useRGBOffset) {
			rgbOffsetIndex = numValues;
			numValues += 4;
		}
		var totalCount = tileData.length;
		if(count >= 0 && totalCount > count) {
			totalCount = count;
		}
		var itemCount = Math.ceil(totalCount / numValues);
		var iIndex = 0;
		var tileID = -1;
		var rect = sheet.__rectTile;
		var tileUV = sheet.__rectUV;
		var center = sheet.__point;
		var x = 0.0;
		var y = 0.0;
		var alpha = 1.0;
		var tint = 16777215;
		var color = -1;
		var scale = 1.0;
		var rotation = 0.0;
		var cosTheta = 1.0;
		var sinTheta = 0.0;
		var a = 0.0;
		var b = 0.0;
		var c = 0.0;
		var d = 0.0;
		var tx = 0.0;
		var ty = 0.0;
		var ox = 0.0;
		var oy = 0.0;
		var oMatrix = object.__worldTransform;
		var bIndex = 0;
		var tMa = 1.0;
		var tMb = 0.0;
		var tMc = 0.0;
		var tMd = 1.0;
		var tMtx = 0.0;
		var tMty = 0.0;
		var oMa = oMatrix.a;
		var oMb = oMatrix.b;
		var oMc = oMatrix.c;
		var oMd = oMatrix.d;
		var oMtx = oMatrix.tx;
		var oMty = oMatrix.ty;
		var rx = 0.0;
		var ry = 0.0;
		var rw = 0.0;
		var rh = 0.0;
		var tuvx = 0.0;
		var tuvy = 0.0;
		var tuvw = 0.0;
		var tuvh = 0.0;
		this.enableColor = true;
		if(this.enableColor != this.lastEnableColor) {
			this.flush();
			this.lastEnableColor = this.enableColor;
		}
		this.attributes[2].enabled = this.lastEnableColor;
		var r = 0;
		var _g3 = 0;
		var _g11 = this.attributes;
		while(_g3 < _g11.length) {
			var a1 = _g11[_g3];
			++_g3;
			if(a1.enabled) {
				var _g4 = a1.type;
				var r1;
				switch(_g4) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a1.components * r1 / 4);
			}
		}
		this.elementsPerVertex = r;
		if(flashShader != null) {
			flashShader.__init(this.gl);
			flashShader.__shader.wrapS = flashShader.repeatX;
			flashShader.__shader.wrapT = flashShader.repeatY;
			flashShader.__shader.smooth = flashShader.smooth;
			flashShader.__shader.blendMode = flashShader.blendMode;
			var objSize = flashShader.data.get(openfl_display_Shader.uObjectSize);
			var texSize = flashShader.data.get(openfl_display_Shader.uTextureSize);
			objSize.value[0] = 0;
			objSize.value[1] = 0;
			texSize.value[0] = 0;
			texSize.value[1] = 0;
		}
		while(iIndex < totalCount) {
			if(this.batchedSprites >= this.maxSprites) {
				this.flush();
			}
			x = tileData[iIndex];
			y = tileData[iIndex + 1];
			if(useRect) {
				tileID = -1;
				rect.x = tileData[iIndex + 2];
				rect.y = tileData[iIndex + 3];
				rect.width = tileData[iIndex + 4];
				rect.height = tileData[iIndex + 5];
				if(useOrigin) {
					center.x = tileData[iIndex + 6];
					center.y = tileData[iIndex + 7];
				} else {
					center.setTo(0,0);
				}
				rw = rect.width;
				rh = rect.height;
				tuvx = rect.get_left() / sheet.__bitmap.width;
				tuvy = rect.get_top() / sheet.__bitmap.height;
				tuvw = rect.get_right() / sheet.__bitmap.width;
				tuvh = rect.get_bottom() / sheet.__bitmap.height;
			} else {
				tileID = (tileData[iIndex + 2] == null ? 0 : tileData[iIndex + 2]) | 0;
				rect = sheet.__tileRects[tileID];
				center = sheet.__centerPoints[tileID];
				tileUV = sheet.__tileUVs[tileID];
				if(rect != null) {
					rw = rect.width;
					rh = rect.height;
					tuvx = tileUV.x;
					tuvy = tileUV.y;
					tuvw = tileUV.width;
					tuvh = tileUV.height;
				}
			}
			if(rect != null && rect.width > 0 && rect.height > 0 && center != null) {
				alpha = 1;
				tint = 16777215;
				scale = 1.0;
				rotation = 0.0;
				cosTheta = 1.0;
				sinTheta = 0.0;
				if(useAlpha) {
					alpha = tileData[iIndex + alphaIndex] * object.__worldAlpha;
				} else {
					alpha = object.__worldAlpha;
				}
				if(useRGB) {
					tint = (tileData[iIndex + rgbIndex] * 255 | 0) << 16 | (tileData[iIndex + rgbIndex + 1] * 255 | 0) << 8 | (tileData[iIndex + rgbIndex + 2] * 255 | 0);
				}
				var wct = object.__worldColorTransform;
				this.colorTransform.redMultiplier = wct.redMultiplier;
				this.colorTransform.greenMultiplier = wct.greenMultiplier;
				this.colorTransform.blueMultiplier = wct.blueMultiplier;
				this.colorTransform.alphaMultiplier = wct.alphaMultiplier;
				this.colorTransform.redOffset = wct.redOffset;
				this.colorTransform.greenOffset = wct.greenOffset;
				this.colorTransform.blueOffset = wct.blueOffset;
				this.colorTransform.alphaOffset = wct.alphaOffset;
				if(useRGBOffset) {
					this.colorTransform.redOffset += tileData[iIndex + rgbOffsetIndex];
					this.colorTransform.greenOffset += tileData[iIndex + rgbOffsetIndex + 1];
					this.colorTransform.blueOffset += tileData[iIndex + rgbOffsetIndex + 2];
					this.colorTransform.alphaOffset += tileData[iIndex + rgbOffsetIndex + 3];
				}
				if(useScale) {
					scale = tileData[iIndex + scaleIndex];
				}
				if(useRotation) {
					rotation = tileData[iIndex + rotationIndex];
					cosTheta = Math.cos(rotation);
					sinTheta = Math.sin(rotation);
				}
				if(useTransform) {
					a = tileData[iIndex + transformIndex];
					b = tileData[iIndex + transformIndex + 1];
					c = tileData[iIndex + transformIndex + 2];
					d = tileData[iIndex + transformIndex + 3];
				} else {
					a = scale * cosTheta;
					b = scale * sinTheta;
					c = -b;
					d = a;
				}
				ox = center.x * a + center.y * c;
				oy = center.x * b + center.y * d;
				tx = x - ox;
				ty = y - oy;
				tMa = (a * oMa + b * oMc) * rw;
				tMb = (a * oMb + b * oMd) * rw;
				tMc = (c * oMa + d * oMc) * rh;
				tMd = (c * oMb + d * oMd) * rh;
				tMtx = tx * oMa + ty * oMc + oMtx;
				tMty = tx * oMb + ty * oMd + oMty;
				bIndex = this.batchedSprites * 4 * this.elementsPerVertex;
				this.positions[bIndex] = tMtx;
				this.positions[bIndex + 1] = tMty;
				this.positions[bIndex + 5] = tMa + tMtx;
				this.positions[bIndex + 6] = tMb + tMty;
				this.positions[bIndex + 10] = tMa + tMc + tMtx;
				this.positions[bIndex + 11] = tMd + tMb + tMty;
				this.positions[bIndex + 15] = tMc + tMtx;
				this.positions[bIndex + 16] = tMd + tMty;
				var val = this.colors[bIndex + 19] = ((alpha * 255 | 0) & 255) << 24 | tint;
				var val1 = this.colors[bIndex + 14] = val;
				var val2 = this.colors[bIndex + 9] = val1;
				this.colors[bIndex + 4] = val2;
				this.positions[bIndex + 2] = tuvx;
				this.positions[bIndex + 3] = tuvy;
				this.positions[bIndex + 7] = tuvw;
				this.positions[bIndex + 8] = tuvy;
				this.positions[bIndex + 12] = tuvw;
				this.positions[bIndex + 13] = tuvh;
				this.positions[bIndex + 17] = tuvx;
				this.positions[bIndex + 18] = tuvh;
				this.writtenVertexBytes = bIndex + 20;
				var index = this.batchedSprites;
				var colorTransform = this.colorTransform;
				var state = this.states[index];
				if(state == null) {
					state = this.states[index] = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
				}
				state.texture = texture;
				state.textureSmooth = smooth;
				state.blendMode = blendMode;
				state.skipColorTransform = colorTransform != null && colorTransform.__isDefault();
				if(!state.skipColorTransform) {
					state.colorTransform.redMultiplier = colorTransform.redMultiplier;
					state.colorTransform.greenMultiplier = colorTransform.greenMultiplier;
					state.colorTransform.blueMultiplier = colorTransform.blueMultiplier;
					state.colorTransform.alphaMultiplier = colorTransform.alphaMultiplier;
					state.colorTransform.redOffset = colorTransform.redOffset;
					state.colorTransform.greenOffset = colorTransform.greenOffset;
					state.colorTransform.blueOffset = colorTransform.blueOffset;
					state.colorTransform.alphaOffset = colorTransform.alphaOffset;
				}
				state.skipColorTransformAlpha = false;
				if(flashShader == null) {
					state.shader = null;
					state.shaderData = null;
				} else {
					state.shader = flashShader.__shader;
					state.shaderData = flashShader.data;
				}
				this.batchedSprites++;
			}
			iIndex += numValues;
		}
	}
	,fillVertices: function(index,width,height,matrix,uvs,color,pixelSnapping) {
		if(color == null) {
			color = -1;
		}
		var a = matrix.a;
		var b = matrix.b;
		var c = matrix.c;
		var d = matrix.d;
		var tx = matrix.tx;
		var ty = matrix.ty;
		if(pixelSnapping == null || pixelSnapping == 2) {
			this.positions[index] = tx;
			this.positions[index + 1] = ty;
			this.positions[index + 5] = a * width + tx;
			this.positions[index + 6] = b * width + ty;
			this.positions[index + 10] = a * width + c * height + tx;
			this.positions[index + 11] = d * height + b * width + ty;
			this.positions[index + 15] = c * height + tx;
			this.positions[index + 16] = d * height + ty;
		} else {
			this.positions[index] = Math.round(tx);
			this.positions[index + 1] = Math.round(ty);
			this.positions[index + 5] = Math.round(a * width + tx);
			this.positions[index + 6] = Math.round(b * width + ty);
			this.positions[index + 10] = Math.round(a * width + c * height + tx);
			this.positions[index + 11] = Math.round(d * height + b * width + ty);
			this.positions[index + 15] = Math.round(c * height + tx);
			this.positions[index + 16] = Math.round(d * height + ty);
		}
		if(this.enableColor) {
			var val = this.colors[index + 19] = color;
			var val1 = this.colors[index + 14] = val;
			var val2 = this.colors[index + 9] = val1;
			this.colors[index + 4] = val2;
		}
		this.positions[index + 2] = uvs.x0;
		this.positions[index + 3] = uvs.y0;
		this.positions[index + 7] = uvs.x1;
		this.positions[index + 8] = uvs.y1;
		this.positions[index + 12] = uvs.x2;
		this.positions[index + 13] = uvs.y2;
		this.positions[index + 17] = uvs.x3;
		this.positions[index + 18] = uvs.y3;
		this.writtenVertexBytes = index + 20;
	}
	,enableAttributes: function(color) {
		if(color == null) {
			color = -1;
		}
		this.enableColor = color != -1;
		if(this.enableColor != this.lastEnableColor) {
			this.flush();
			this.lastEnableColor = this.enableColor;
		}
		this.attributes[2].enabled = this.lastEnableColor;
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var _g2 = a.type;
				var r1;
				switch(_g2) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a.components * r1 / 4);
			}
		}
		this.elementsPerVertex = r;
	}
	,flush: function() {
		if(this.batchedSprites == 0) {
			return;
		}
		if(this.clipRect != null) {
			this.gl.enable(this.gl.SCISSOR_TEST);
			this.gl.scissor(Math.floor(this.clipRect.x),Math.floor(this.clipRect.y),Math.ceil(this.clipRect.width),Math.ceil(this.clipRect.height));
		}
		if(this.dirty) {
			this.dirty = false;
			this.renderSession.activeTextures = 1;
			var _this = this.vertexArray;
			_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		}
		if(this.writtenVertexBytes > this.vertexArraySize * 0.5) {
			this.vertexArray.upload(this.positions);
		} else {
			var view = this.positions.subarray(0,this.writtenVertexBytes);
			this.vertexArray.upload(view);
		}
		var nextState;
		var batchSize = 0;
		var start = 0;
		this.currentState.shader = null;
		this.currentState.shaderData = null;
		this.currentState.texture = null;
		this.currentState.textureSmooth = false;
		this.currentState.blendMode = this.renderSession.blendModeManager.currentBlendMode;
		this.currentState.colorTransform = null;
		this.currentState.skipColorTransformAlpha = false;
		var _g1 = 0;
		var _g = this.batchedSprites;
		while(_g1 < _g) {
			var i = _g1++;
			nextState = this.states[i];
			this.currentState.skipColorTransformAlpha = nextState.skipColorTransformAlpha;
			var other = this.currentState;
			if(!((nextState.shader == null && other.shader == null || nextState.shader != null && other.shader != null && nextState.shader.ID == other.shader.ID) && nextState.texture == other.texture && nextState.textureSmooth == other.textureSmooth && nextState.blendMode == other.blendMode && (nextState.skipColorTransform && other.skipColorTransform || !nextState.skipColorTransform && !other.skipColorTransform && nextState.colorTransform.__equals(other.colorTransform,nextState.skipColorTransformAlpha)))) {
				this.renderBatch(this.currentState,batchSize,start);
				start = i;
				batchSize = 0;
				this.currentState.shader = nextState.shader;
				this.currentState.shaderData = nextState.shaderData;
				this.currentState.texture = nextState.texture;
				this.currentState.textureSmooth = nextState.textureSmooth;
				this.currentState.blendMode = nextState.blendMode;
				this.currentState.skipColorTransform = nextState.skipColorTransform;
				this.currentState.colorTransform = this.currentState.skipColorTransform ? null : nextState.colorTransform;
			}
			++batchSize;
		}
		this.renderBatch(this.currentState,batchSize,start);
		this.batchedSprites = 0;
		this.writtenVertexBytes = 0;
		if(this.clipRect != null) {
			this.gl.disable(this.gl.SCISSOR_TEST);
		}
	}
	,renderBatch: function(state,size,start) {
		if(size == 0 || state.texture == null) {
			return;
		}
		var shader = state.shader == null ? this.renderSession.shaderManager.defaultShader : state.shader;
		this.renderSession.shaderManager.setShader(shader);
		shader.bindVertexArray(this.vertexArray);
		this.renderSession.blendModeManager.setBlendMode(shader.blendMode != null ? shader.blendMode : state.blendMode);
		this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,this.renderSession.projectionMatrix.toArray(true));
		if(state.colorTransform != null) {
			this.gl.uniform1i(shader.getUniformLocation("openfl_uUseColorTransform"),1);
			var ct = state.colorTransform;
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),ct.redMultiplier,ct.greenMultiplier,ct.blueMultiplier,state.skipColorTransformAlpha ? 1 : ct.alphaMultiplier);
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),ct.redOffset / 255.,ct.greenOffset / 255.,ct.blueOffset / 255.,ct.alphaOffset / 255.);
		} else {
			this.gl.uniform1i(shader.getUniformLocation("openfl_uUseColorTransform"),0);
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),1,1,1,1);
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),0,0,0,0);
		}
		this.gl.activeTexture(this.gl.TEXTURE0);
		this.gl.bindTexture(this.gl.TEXTURE_2D,state.texture);
		this.gl.uniform1i(shader.getUniformLocation("openfl_uSampler0"),0);
		if(shader.smooth != null && shader.smooth || state.textureSmooth) {
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR);
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR);
		} else {
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST);
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST);
		}
		this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,shader.wrapS);
		this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,shader.wrapT);
		shader.applyData(state.shaderData,this.renderSession);
		this.gl.drawElements(this.gl.TRIANGLES,size * 6,this.gl.UNSIGNED_SHORT,start * 6 * 2);
		this.renderSession.drawCount++;
	}
	,setState: function(index,texture,smooth,blendMode,colorTransform,shader,skipAlpha) {
		if(skipAlpha == null) {
			skipAlpha = false;
		}
		if(smooth == null) {
			smooth = false;
		}
		var state = this.states[index];
		if(state == null) {
			state = this.states[index] = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
		}
		state.texture = texture;
		state.textureSmooth = smooth;
		state.blendMode = blendMode;
		state.skipColorTransform = colorTransform != null && colorTransform.__isDefault();
		if(!state.skipColorTransform) {
			state.colorTransform.redMultiplier = colorTransform.redMultiplier;
			state.colorTransform.greenMultiplier = colorTransform.greenMultiplier;
			state.colorTransform.blueMultiplier = colorTransform.blueMultiplier;
			state.colorTransform.alphaMultiplier = colorTransform.alphaMultiplier;
			state.colorTransform.redOffset = colorTransform.redOffset;
			state.colorTransform.greenOffset = colorTransform.greenOffset;
			state.colorTransform.blueOffset = colorTransform.blueOffset;
			state.colorTransform.alphaOffset = colorTransform.alphaOffset;
		}
		state.skipColorTransformAlpha = skipAlpha;
		if(shader == null) {
			state.shader = null;
			state.shaderData = null;
		} else {
			state.shader = shader.__shader;
			state.shaderData = shader.data;
		}
	}
	,setContext: function(gl) {
		this.gl = gl;
		this.vertexArray.setContext(gl,this.positions);
		this.indexBuffer = gl.createBuffer();
		gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,this.indices,gl.STATIC_DRAW);
	}
	,prepareShader: function(flashShader,bd) {
		if(flashShader != null) {
			flashShader.__init(this.gl);
			flashShader.__shader.wrapS = flashShader.repeatX;
			flashShader.__shader.wrapT = flashShader.repeatY;
			flashShader.__shader.smooth = flashShader.smooth;
			flashShader.__shader.blendMode = flashShader.blendMode;
			var key = openfl_display_Shader.uObjectSize;
			var _this = flashShader.data;
			var objSize = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
			var key1 = openfl_display_Shader.uTextureSize;
			var _this1 = flashShader.data;
			var texSize = __map_reserved[key1] != null ? _this1.getReserved(key1) : _this1.h[key1];
			if(bd != null) {
				objSize.value[0] = bd.width;
				objSize.value[1] = bd.height;
				if(bd.__pingPongTexture != null) {
					var _this2 = bd.__pingPongTexture;
					texSize.value[0] = (_this2.__swapped ? _this2.__texture1 : _this2.__texture0).__width;
					var _this3 = bd.__pingPongTexture;
					texSize.value[1] = (_this3.__swapped ? _this3.__texture1 : _this3.__texture0).__height;
				} else {
					texSize.value[0] = bd.width;
					texSize.value[1] = bd.height;
				}
			} else {
				objSize.value[0] = 0;
				objSize.value[1] = 0;
				texSize.value[0] = 0;
				texSize.value[1] = 0;
			}
		}
	}
	,getElementsPerVertex: function() {
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var _g2 = a.type;
				var r1;
				switch(_g2) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a.components * r1 / 4);
			}
		}
		return r;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_SpriteBatch
};
var openfl__$internal_renderer_opengl_utils__$SpriteBatch_State = function() {
	this.skipColorTransformAlpha = false;
	this.skipColorTransform = false;
	this.colorTransform = new openfl_geom_ColorTransform();
	this.textureSmooth = true;
};
$hxClasses["openfl._internal.renderer.opengl.utils._SpriteBatch.State"] = openfl__$internal_renderer_opengl_utils__$SpriteBatch_State;
openfl__$internal_renderer_opengl_utils__$SpriteBatch_State.__name__ = ["openfl","_internal","renderer","opengl","utils","_SpriteBatch","State"];
openfl__$internal_renderer_opengl_utils__$SpriteBatch_State.prototype = {
	equals: function(other) {
		if((this.shader == null && other.shader == null || this.shader != null && other.shader != null && this.shader.ID == other.shader.ID) && this.texture == other.texture && this.textureSmooth == other.textureSmooth && this.blendMode == other.blendMode) {
			if(!(this.skipColorTransform && other.skipColorTransform)) {
				if(!this.skipColorTransform && !other.skipColorTransform) {
					return this.colorTransform.__equals(other.colorTransform,this.skipColorTransformAlpha);
				} else {
					return false;
				}
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,destroy: function() {
		this.texture = null;
		this.colorTransform = null;
	}
	,__class__: openfl__$internal_renderer_opengl_utils__$SpriteBatch_State
};
var openfl__$internal_renderer_opengl_utils_StencilManager = function(gl) {
	this.stencilMask = 0;
	this.stencilStack = [];
	this.setContext(gl);
	this.reverse = true;
	this.count = 0;
};
$hxClasses["openfl._internal.renderer.opengl.utils.StencilManager"] = openfl__$internal_renderer_opengl_utils_StencilManager;
openfl__$internal_renderer_opengl_utils_StencilManager.__name__ = ["openfl","_internal","renderer","opengl","utils","StencilManager"];
openfl__$internal_renderer_opengl_utils_StencilManager.prototype = {
	prepareGraphics: function(fill,renderSession,translationMatrix) {
		var shader = renderSession.shaderManager.fillShader;
		renderSession.shaderManager.setShader(shader);
		this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
		this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
		var _this = fill.vertexArray;
		_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
		shader.bindVertexArray(fill.vertexArray);
		this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,fill.indexBuffer);
	}
	,pushBucket: function(bucket,renderSession,translationMatrix,isMask) {
		if(isMask == null) {
			isMask = false;
		}
		if(!isMask) {
			this.gl.enable(this.gl.STENCIL_TEST);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
			this.gl.stencilMask(255);
			this.gl.colorMask(false,false,false,false);
			this.gl.stencilFunc(this.gl.NEVER,1,255);
			this.gl.stencilOp(this.gl.INVERT,this.gl.KEEP,this.gl.KEEP);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
		}
		var _g = 0;
		var _g1 = bucket.fills;
		while(_g < _g1.length) {
			var fill = _g1[_g];
			++_g;
			if(fill.available) {
				continue;
			}
			var shader = renderSession.shaderManager.fillShader;
			renderSession.shaderManager.setShader(shader);
			this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
			this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
			var _this = fill.vertexArray;
			_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
			shader.bindVertexArray(fill.vertexArray);
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,fill.indexBuffer);
			this.gl.drawElements(fill.drawMode,fill.glIndices.length,this.gl.UNSIGNED_SHORT,0);
		}
		if(!isMask) {
			this.gl.colorMask(true,true,true,renderSession.renderer.transparent);
			this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
			this.gl.stencilFunc(this.gl.EQUAL,255,255);
		}
	}
	,popBucket: function(object,bucket,renderSession) {
		this.gl.disable(this.gl.STENCIL_TEST);
	}
	,pushMask: function(object,renderSession) {
		var maskGraphics = object.__maskGraphics;
		if(maskGraphics == null || maskGraphics.__commands.get_length() <= 0) {
			return;
		}
		if(this.stencilMask == 0) {
			this.gl.enable(this.gl.STENCIL_TEST);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
		}
		this.stencilMask++;
		if(maskGraphics.__dirty) {
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.updateGraphics(object,maskGraphics,renderSession.gl);
		}
		var func = this.stencilMask == 1 ? this.gl.NEVER : this.gl.EQUAL;
		var ref = this.stencilMask;
		var mask = 255 - this.stencilMask;
		this.gl.stencilMask(255);
		this.gl.colorMask(false,false,false,false);
		this.gl.stencilFunc(func,ref,mask);
		this.gl.stencilOp(this.gl.REPLACE,this.gl.KEEP,this.gl.KEEP);
		var glStack = maskGraphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId];
		var bucket;
		var translationMatrix = object.__worldTransform;
		var _g1 = 0;
		var _g = glStack.buckets.length;
		while(_g1 < _g) {
			var i = _g1++;
			bucket = glStack.buckets[i];
			if(bucket.overrideMatrix != null) {
				translationMatrix = bucket.overrideMatrix;
			} else {
				translationMatrix = object.__worldTransform;
			}
			var _g2 = bucket.mode;
			switch(_g2[1]) {
			case 1:case 2:
				this.pushBucket(bucket,renderSession,translationMatrix.toArray(true),true);
				break;
			default:
			}
		}
		this.gl.colorMask(true,true,true,renderSession.renderer.transparent);
		this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
		this.gl.stencilFunc(this.gl.EQUAL,this.stencilMask,255);
	}
	,popMask: function(object,renderSession) {
		this.stencilMask--;
		if(this.stencilMask <= 0) {
			this.gl.disable(this.gl.STENCIL_TEST);
			this.stencilMask = 0;
		}
	}
	,bindGraphics: function(object,glData,renderSession) {
	}
	,destroy: function() {
		this.stencilStack = null;
		this.gl = null;
	}
	,popStencil: function(object,glData,renderSession) {
		this.stencilStack.pop();
		this.count--;
		if(this.stencilStack.length == 0) {
			this.gl.disable(this.gl.STENCIL_TEST);
		} else {
			var level = this.count;
			this.bindGraphics(object,glData,renderSession);
			this.gl.colorMask(false,false,false,false);
			if(glData.mode == 1) {
				this.reverse = !this.reverse;
				if(this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
				}
				this.gl.drawElements(this.gl.TRIANGLE_FAN,4,this.gl.UNSIGNED_SHORT,(glData.indices.length - 4) * 2);
				this.gl.stencilFunc(this.gl.ALWAYS,0,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INVERT);
				this.gl.drawElements(this.gl.TRIANGLE_FAN,glData.indices.length - 4,this.gl.UNSIGNED_SHORT,0);
				if(!this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level,255);
				}
			} else {
				if(!this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
				}
				this.gl.drawElements(this.gl.TRIANGLE_STRIP,glData.indices.length,this.gl.UNSIGNED_SHORT,0);
				if(!this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level,255);
				}
			}
			this.gl.colorMask(true,true,true,true);
			this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
		}
	}
	,pushStencil: function(object,glData,renderSession) {
		this.bindGraphics(object,glData,renderSession);
		if(this.stencilStack.length == 0) {
			this.gl.enable(this.gl.STENCIL_TEST);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
			this.reverse = true;
			this.count = 0;
		}
		this.stencilStack.push(glData);
		var level = this.count;
		this.gl.colorMask(false,false,false,false);
		this.gl.stencilFunc(this.gl.ALWAYS,0,255);
		this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INVERT);
		if(glData.mode == 1) {
			this.gl.drawElements(this.gl.TRIANGLE_FAN,glData.indices.length - 4,this.gl.UNSIGNED_SHORT,0);
			if(this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
			}
			this.gl.drawElements(this.gl.TRIANGLE_FAN,4,this.gl.UNSIGNED_SHORT,(glData.indices.length - 4) * 2);
			if(this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
			}
			this.reverse = !this.reverse;
		} else {
			if(!this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
			}
			this.gl.drawElements(this.gl.TRIANGLE_STRIP,glData.indices.length,this.gl.UNSIGNED_SHORT,0);
			if(!this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
			}
		}
		this.gl.colorMask(true,true,true,true);
		this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
		this.count++;
	}
	,setContext: function(gl) {
		this.gl = gl;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_StencilManager
};
var openfl__$internal_renderer_opengl_utils_VertexArray = function(attributes,size,isStatic) {
	if(isStatic == null) {
		isStatic = false;
	}
	if(size == null) {
		size = 0;
	}
	this.isStatic = false;
	this.size = 0;
	this.attributes = [];
	this.size = size;
	this.attributes = attributes;
	if(size > 0) {
		this.buffer = new ArrayBuffer(size);
	}
	this.isStatic = isStatic;
};
$hxClasses["openfl._internal.renderer.opengl.utils.VertexArray"] = openfl__$internal_renderer_opengl_utils_VertexArray;
openfl__$internal_renderer_opengl_utils_VertexArray.__name__ = ["openfl","_internal","renderer","opengl","utils","VertexArray"];
openfl__$internal_renderer_opengl_utils_VertexArray.prototype = {
	bind: function() {
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.glBuffer);
	}
	,unbind: function() {
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null);
	}
	,upload: function(view) {
		this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,view);
	}
	,destroy: function() {
		this.gl.deleteBuffer(this.glBuffer);
		this.buffer = null;
	}
	,setContext: function(gl,view) {
		this.gl = gl;
		this.glBuffer = gl.createBuffer();
		gl.bindBuffer(gl.ARRAY_BUFFER,this.glBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,view,this.isStatic ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW);
	}
	,get_stride: function() {
		var s = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var _g2 = a.type;
				var s1;
				switch(_g2) {
				case 5120:case 5121:
					s1 = 1;
					break;
				case 5122:case 5123:
					s1 = 2;
					break;
				default:
					s1 = 4;
				}
				s += Math.floor(a.components * s1 / 4) * 4;
			}
		}
		return s;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_VertexArray
	,__properties__: {get_stride:"get_stride"}
};
var openfl__$internal_text_TextEngine = function(textField) {
	this.textField = textField;
	this.width = 100;
	this.height = 100;
	this.text = "";
	this.bounds = new openfl_geom_Rectangle(0,0,0,0);
	this.type = 0;
	this.autoSize = 2;
	this.displayAsPassword = false;
	this.embedFonts = false;
	this.selectable = true;
	this.borderColor = 0;
	this.border = false;
	this.backgroundColor = 16777215;
	this.background = false;
	this.gridFitType = 1;
	this.maxChars = 0;
	this.multiline = false;
	this.sharpness = 0;
	this.scrollH = 0;
	this.scrollV = 1;
	this.wordWrap = false;
	this.lineAscents = [];
	this.lineBreaks = [];
	this.lineDescents = [];
	this.lineLeadings = [];
	this.lineHeights = [];
	this.lineWidths = [];
	this.layoutGroups = [];
	this.textFormatRanges = [];
	openfl__$internal_text_TextEngine.__canvas = window.document.createElement("canvas");
	openfl__$internal_text_TextEngine.__context = openfl__$internal_text_TextEngine.__canvas.getContext("2d");
};
$hxClasses["openfl._internal.text.TextEngine"] = openfl__$internal_text_TextEngine;
openfl__$internal_text_TextEngine.__name__ = ["openfl","_internal","text","TextEngine"];
openfl__$internal_text_TextEngine.__canvas = null;
openfl__$internal_text_TextEngine.__context = null;
openfl__$internal_text_TextEngine.findFont = function(name) {
	return null;
};
openfl__$internal_text_TextEngine.getFont = function(format) {
	var font = format.italic ? "italic " : "normal ";
	font += "normal ";
	font += format.bold ? "bold " : "normal ";
	font += format.size + "px";
	font += "/" + (format.size + format.leading + 6) + "px ";
	var _g1 = format.font;
	var font1;
	switch(_g1) {
	case "_sans":
		font1 = "sans-serif";
		break;
	case "_serif":
		font1 = "serif";
		break;
	case "_typewriter":
		font1 = "monospace";
		break;
	default:
		font1 = "'" + format.font + "'";
	}
	font += "" + font1;
	return font;
};
openfl__$internal_text_TextEngine.getFontInstance = function(format) {
	return null;
};
openfl__$internal_text_TextEngine.prototype = {
	getBounds: function() {
		var padding = this.border ? 1 : 0;
		this.bounds.width = this.width + padding;
		this.bounds.height = this.height + padding;
	}
	,getLine: function(index) {
		if(index < 0 || index > this.lineBreaks.length + 1) {
			return null;
		}
		if(this.lineBreaks.length == 0) {
			return this.text;
		} else {
			return this.text.substring(index > 0 ? this.lineBreaks[index - 1] : 0,this.lineBreaks[index]);
		}
	}
	,getLineMeasurements: function() {
		this.lineAscents.splice(0,this.lineAscents.length);
		this.lineDescents.splice(0,this.lineDescents.length);
		this.lineLeadings.splice(0,this.lineLeadings.length);
		this.lineHeights.splice(0,this.lineHeights.length);
		this.lineWidths.splice(0,this.lineWidths.length);
		var currentLineAscent = 0.0;
		var currentLineDescent = 0.0;
		var currentLineLeading = null;
		var currentLineHeight = 0.0;
		var currentLineWidth = 0.0;
		this.textWidth = 0;
		this.textHeight = 0;
		this.numLines = 1;
		this.bottomScrollV = 0;
		this.maxScrollH = 0;
		var _g = 0;
		var _g1 = this.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			while(group.lineIndex > this.numLines - 1) {
				this.lineAscents.push(currentLineAscent);
				this.lineDescents.push(currentLineDescent);
				this.lineLeadings.push(currentLineLeading != null ? currentLineLeading : 0);
				this.lineHeights.push(currentLineHeight);
				this.lineWidths.push(currentLineWidth);
				currentLineAscent = 0;
				currentLineDescent = 0;
				currentLineLeading = null;
				currentLineHeight = 0;
				currentLineWidth = 0;
				this.numLines++;
				if(this.textHeight <= this.height - 2) {
					this.bottomScrollV++;
				}
			}
			currentLineAscent = Math.max(currentLineAscent,group.ascent);
			currentLineDescent = Math.max(currentLineDescent,group.descent);
			if(currentLineLeading == null) {
				currentLineLeading = group.leading;
			} else {
				currentLineLeading = Math.max(currentLineLeading,group.leading) | 0;
			}
			currentLineHeight = Math.max(currentLineHeight,group.height);
			currentLineWidth = group.offsetX - 2 + group.width;
			if(currentLineWidth > this.textWidth) {
				this.textWidth = currentLineWidth;
			}
			this.textHeight = group.offsetY - 2 + group.ascent + group.descent;
		}
		this.lineAscents.push(currentLineAscent);
		this.lineDescents.push(currentLineDescent);
		this.lineLeadings.push(currentLineLeading != null ? currentLineLeading : 0);
		this.lineHeights.push(currentLineHeight);
		this.lineWidths.push(currentLineWidth);
		if(this.numLines == 1) {
			this.bottomScrollV = 1;
			if(currentLineLeading > 0) {
				this.textHeight += currentLineLeading;
			}
		} else if(this.textHeight <= this.height - 2) {
			this.bottomScrollV++;
		}
		if(this.textWidth > this.width - 4) {
			this.maxScrollH = this.textWidth - this.width + 4 | 0;
		} else {
			this.maxScrollH = 0;
		}
		this.maxScrollV = this.numLines - this.bottomScrollV + 1;
	}
	,getLayoutGroups: function() {
		var _gthis = this;
		this.layoutGroups.splice(0,this.layoutGroups.length);
		var rangeIndex = -1;
		var formatRange = null;
		var font = null;
		var currentFormat = openfl_text_TextField.__defaultTextFormat.clone();
		var leading = 0;
		var ascent = 0.0;
		var descent = 0.0;
		var layoutGroup;
		var advances;
		var widthValue;
		var heightValue = 0.0;
		var spaceWidth = 0.0;
		var previousSpaceIndex = 0;
		var spaceIndex = this.text.indexOf(" ");
		var breakIndex = this.text.indexOf("\n");
		var marginRight = 0.0;
		var offsetX = 2.0;
		var offsetY = 2.0;
		var textIndex = 0;
		var lineIndex = 0;
		var lineFormat = null;
		if(rangeIndex < _gthis.textFormatRanges.length - 1) {
			++rangeIndex;
			formatRange = _gthis.textFormatRanges[rangeIndex];
			currentFormat.__merge(formatRange.format);
			openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
			ascent = currentFormat.size;
			descent = currentFormat.size * 0.185;
			leading = currentFormat.leading;
			heightValue = ascent + descent + leading;
			if(spaceIndex > -1) {
				spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
			}
		}
		lineFormat = formatRange.format;
		var wrap;
		while(textIndex < this.text.length) if(breakIndex > -1 && (spaceIndex == -1 || breakIndex < spaceIndex) && formatRange.end >= breakIndex) {
			layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,breakIndex);
			var text = this.text;
			var advances1 = [];
			var _g1 = textIndex;
			var _g = breakIndex;
			while(_g1 < _g) {
				var i = _g1++;
				advances1.push(openfl__$internal_text_TextEngine.__context.measureText(text.charAt(i)).width);
			}
			layoutGroup.advances = advances1;
			layoutGroup.offsetX = offsetX;
			layoutGroup.ascent = ascent;
			layoutGroup.descent = descent;
			layoutGroup.leading = leading;
			layoutGroup.lineIndex = lineIndex;
			layoutGroup.offsetY = offsetY;
			var advances2 = layoutGroup.advances;
			var width = 0.0;
			var _g2 = 0;
			while(_g2 < advances2.length) {
				var advance = advances2[_g2];
				++_g2;
				width += advance;
			}
			layoutGroup.width = width;
			layoutGroup.height = heightValue;
			this.layoutGroups.push(layoutGroup);
			offsetY += heightValue;
			offsetX = 2;
			if(this.wordWrap && layoutGroup.offsetX + layoutGroup.width > this.width - 2) {
				layoutGroup.offsetY = offsetY;
				layoutGroup.offsetX = offsetX;
				offsetY += heightValue;
				++lineIndex;
			}
			textIndex = breakIndex + 1;
			breakIndex = this.text.indexOf("\n",textIndex);
			++lineIndex;
			if(formatRange.end == breakIndex) {
				if(rangeIndex < _gthis.textFormatRanges.length - 1) {
					++rangeIndex;
					formatRange = _gthis.textFormatRanges[rangeIndex];
					currentFormat.__merge(formatRange.format);
					openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
					ascent = currentFormat.size;
					descent = currentFormat.size * 0.185;
					leading = currentFormat.leading;
					heightValue = ascent + descent + leading;
					if(spaceIndex > -1) {
						spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
					}
				}
				lineFormat = formatRange.format;
			}
		} else if(formatRange.end >= spaceIndex && spaceIndex > -1) {
			layoutGroup = null;
			wrap = false;
			while(true) {
				if(spaceIndex == -1) {
					spaceIndex = formatRange.end;
				}
				var text1 = this.text;
				var advances3 = [];
				var _g11 = textIndex;
				var _g3 = spaceIndex;
				while(_g11 < _g3) {
					var i1 = _g11++;
					advances3.push(openfl__$internal_text_TextEngine.__context.measureText(text1.charAt(i1)).width);
				}
				advances = advances3;
				var width1 = 0.0;
				var _g4 = 0;
				while(_g4 < advances.length) {
					var advance1 = advances[_g4];
					++_g4;
					width1 += advance1;
				}
				widthValue = width1;
				if(this.wordWrap) {
					if(offsetX + widthValue > this.width - 2) {
						wrap = true;
					}
				}
				if(wrap) {
					offsetY += heightValue;
					var i2 = this.layoutGroups.length - 1;
					var offsetCount = 0;
					while(true) {
						layoutGroup = this.layoutGroups[i2];
						if(i2 > 0 && layoutGroup.startIndex > previousSpaceIndex) {
							++offsetCount;
						} else {
							break;
						}
						--i2;
					}
					++lineIndex;
					offsetX = 2;
					if(offsetCount > 0) {
						var bumpX = this.layoutGroups[this.layoutGroups.length - offsetCount].offsetX;
						var _g12 = this.layoutGroups.length - offsetCount;
						var _g5 = this.layoutGroups.length;
						while(_g12 < _g5) {
							var i3 = _g12++;
							layoutGroup = this.layoutGroups[i3];
							layoutGroup.offsetX -= bumpX;
							layoutGroup.offsetY = offsetY;
							layoutGroup.lineIndex = lineIndex;
							offsetX += layoutGroup.width;
						}
					}
					layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,spaceIndex);
					layoutGroup.advances = advances;
					layoutGroup.offsetX = offsetX;
					layoutGroup.ascent = ascent;
					layoutGroup.descent = descent;
					layoutGroup.leading = leading;
					layoutGroup.lineIndex = lineIndex;
					layoutGroup.offsetY = offsetY;
					layoutGroup.width = widthValue;
					layoutGroup.height = heightValue;
					this.layoutGroups.push(layoutGroup);
					offsetX = widthValue + spaceWidth;
					marginRight = spaceWidth;
					wrap = false;
				} else {
					if(layoutGroup != null && textIndex == spaceIndex) {
						if(formatRange.format.align != 2) {
							layoutGroup.endIndex = spaceIndex;
						}
						layoutGroup.advances.push(spaceWidth);
						marginRight += spaceWidth;
					} else if(layoutGroup == null || lineFormat.align == 2) {
						layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,spaceIndex);
						layoutGroup.advances = advances;
						layoutGroup.offsetX = offsetX;
						layoutGroup.ascent = ascent;
						layoutGroup.descent = descent;
						layoutGroup.leading = leading;
						layoutGroup.lineIndex = lineIndex;
						layoutGroup.offsetY = offsetY;
						layoutGroup.width = widthValue;
						layoutGroup.height = heightValue;
						this.layoutGroups.push(layoutGroup);
						layoutGroup.advances.push(spaceWidth);
						marginRight = spaceWidth;
					} else {
						layoutGroup.endIndex = spaceIndex;
						layoutGroup.advances = layoutGroup.advances.concat(advances);
						layoutGroup.width += marginRight + widthValue;
						layoutGroup.advances.push(spaceWidth);
						marginRight = spaceWidth;
					}
					offsetX += widthValue + spaceWidth;
				}
				textIndex = spaceIndex + 1;
				previousSpaceIndex = spaceIndex;
				spaceIndex = this.text.indexOf(" ",previousSpaceIndex + 1);
				if(formatRange.end <= previousSpaceIndex) {
					layoutGroup = null;
					if(rangeIndex < _gthis.textFormatRanges.length - 1) {
						++rangeIndex;
						formatRange = _gthis.textFormatRanges[rangeIndex];
						currentFormat.__merge(formatRange.format);
						openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
						ascent = currentFormat.size;
						descent = currentFormat.size * 0.185;
						leading = currentFormat.leading;
						heightValue = ascent + descent + leading;
						if(spaceIndex > -1) {
							spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
						}
					}
				}
				if(spaceIndex > breakIndex && breakIndex > -1 || textIndex > this.text.length || spaceIndex > formatRange.end || spaceIndex == -1 && breakIndex > -1) {
					break;
				}
			}
		} else {
			if(textIndex >= formatRange.end) {
				break;
			}
			layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,formatRange.end);
			var text2 = this.text;
			var advances4 = [];
			var _g13 = textIndex;
			var _g6 = formatRange.end;
			while(_g13 < _g6) {
				var i4 = _g13++;
				advances4.push(openfl__$internal_text_TextEngine.__context.measureText(text2.charAt(i4)).width);
			}
			layoutGroup.advances = advances4;
			layoutGroup.offsetX = offsetX;
			layoutGroup.ascent = ascent;
			layoutGroup.descent = descent;
			layoutGroup.leading = leading;
			layoutGroup.lineIndex = lineIndex;
			layoutGroup.offsetY = offsetY;
			var advances5 = layoutGroup.advances;
			var width2 = 0.0;
			var _g7 = 0;
			while(_g7 < advances5.length) {
				var advance2 = advances5[_g7];
				++_g7;
				width2 += advance2;
			}
			layoutGroup.width = width2;
			layoutGroup.height = heightValue;
			this.layoutGroups.push(layoutGroup);
			offsetX += layoutGroup.width;
			textIndex = formatRange.end;
			if(rangeIndex < _gthis.textFormatRanges.length - 1) {
				++rangeIndex;
				formatRange = _gthis.textFormatRanges[rangeIndex];
				currentFormat.__merge(formatRange.format);
				openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
				ascent = currentFormat.size;
				descent = currentFormat.size * 0.185;
				leading = currentFormat.leading;
				heightValue = ascent + descent + leading;
				if(spaceIndex > -1) {
					spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
				}
			}
		}
	}
	,setTextAlignment: function() {
		var lineIndex = -1;
		var offsetX = 0.0;
		var group;
		var lineLength;
		var _g1 = 0;
		var _g = this.layoutGroups.length;
		while(_g1 < _g) {
			var i = _g1++;
			group = this.layoutGroups[i];
			if(group.lineIndex != lineIndex) {
				lineIndex = group.lineIndex;
				var _g2 = group.format.align;
				switch(_g2) {
				case 0:
					if(this.lineWidths[lineIndex] < this.width - 4) {
						offsetX = Math.round((this.width - 4 - this.lineWidths[lineIndex]) / 2);
					} else {
						offsetX = 0;
					}
					break;
				case 2:
					if(this.lineWidths[lineIndex] < this.width - 4) {
						lineLength = 1;
						var _g3 = i + 1;
						var _g21 = this.layoutGroups.length;
						while(_g3 < _g21) {
							var j = _g3++;
							if(this.layoutGroups[j].lineIndex == lineIndex) {
								++lineLength;
							} else {
								break;
							}
						}
						if(lineLength > 1) {
							group = this.layoutGroups[i + lineLength - 1];
							if(group.endIndex < this.text.length && this.text.charAt(group.endIndex) != "\n") {
								offsetX = (this.width - 4 - this.lineWidths[lineIndex]) / (lineLength - 1);
								var _g31 = 1;
								var _g22 = lineLength;
								while(_g31 < _g22) {
									var j1 = _g31++;
									this.layoutGroups[i + j1].offsetX += offsetX * j1;
								}
							}
						}
					}
					offsetX = 0;
					break;
				case 4:
					if(this.lineWidths[lineIndex] < this.width - 4) {
						offsetX = Math.round(this.width - 4 - this.lineWidths[lineIndex]);
					} else {
						offsetX = 0;
					}
					break;
				default:
					offsetX = 0;
				}
			}
			if(offsetX > 0) {
				group.offsetX += offsetX;
			}
		}
	}
	,update: function() {
		if(this.text == null || StringTools.trim(this.text) == "" || this.textFormatRanges.length == 0) {
			this.lineAscents.splice(0,this.lineAscents.length);
			this.lineBreaks.splice(0,this.lineBreaks.length);
			this.lineDescents.splice(0,this.lineDescents.length);
			this.lineLeadings.splice(0,this.lineLeadings.length);
			this.lineHeights.splice(0,this.lineHeights.length);
			this.lineWidths.splice(0,this.lineWidths.length);
			this.layoutGroups.splice(0,this.layoutGroups.length);
			this.textWidth = 0;
			this.textHeight = 0;
			this.numLines = 1;
			this.maxScrollH = 0;
			this.maxScrollV = 1;
			this.bottomScrollV = 1;
		} else {
			this.getLayoutGroups();
			this.getLineMeasurements();
			this.setTextAlignment();
		}
		this.getBounds();
	}
	,__class__: openfl__$internal_text_TextEngine
};
var openfl__$internal_text_TextFormatRange = function(format,start,end) {
	this.format = format;
	this.start = start;
	this.end = end;
};
$hxClasses["openfl._internal.text.TextFormatRange"] = openfl__$internal_text_TextFormatRange;
openfl__$internal_text_TextFormatRange.__name__ = ["openfl","_internal","text","TextFormatRange"];
openfl__$internal_text_TextFormatRange.prototype = {
	__class__: openfl__$internal_text_TextFormatRange
};
var openfl__$internal_text_TextLayoutGroup = function(format,startIndex,endIndex) {
	this.format = format;
	this.startIndex = startIndex;
	this.endIndex = endIndex;
};
$hxClasses["openfl._internal.text.TextLayoutGroup"] = openfl__$internal_text_TextLayoutGroup;
openfl__$internal_text_TextLayoutGroup.__name__ = ["openfl","_internal","text","TextLayoutGroup"];
openfl__$internal_text_TextLayoutGroup.prototype = {
	__class__: openfl__$internal_text_TextLayoutGroup
};
var openfl_display_Application = function() {
	lime_app_Application.call(this);
	if(openfl_Lib.application == null) {
		openfl_Lib.application = this;
	}
};
$hxClasses["openfl.display.Application"] = openfl_display_Application;
openfl_display_Application.__name__ = ["openfl","display","Application"];
openfl_display_Application.__super__ = lime_app_Application;
openfl_display_Application.prototype = $extend(lime_app_Application.prototype,{
	create: function(config) {
		this.config = config;
		this.backend.create(config);
		if(config != null) {
			if(Object.prototype.hasOwnProperty.call(config,"fps")) {
				this.backend.setFrameRate(config.fps);
			}
			if(Object.prototype.hasOwnProperty.call(config,"windows")) {
				var _g = 0;
				var _g1 = config.windows;
				while(_g < _g1.length) {
					var windowConfig = _g1[_g];
					++_g;
					var $window = new openfl_display_Window(windowConfig);
					this.createWindow($window);
					break;
				}
			}
			if(this.preloader == null || this.preloader.complete) {
				this.onPreloadComplete();
			}
		}
	}
	,__class__: openfl_display_Application
});
var openfl_display_Bitmap = function(bitmapData,pixelSnapping,smoothing) {
	if(smoothing == null) {
		smoothing = false;
	}
	openfl_display_DisplayObject.call(this);
	this.bitmapData = bitmapData;
	this.pixelSnapping = pixelSnapping;
	this.smoothing = smoothing;
	if(pixelSnapping == null) {
		this.pixelSnapping = 1;
	}
};
$hxClasses["openfl.display.Bitmap"] = openfl_display_Bitmap;
openfl_display_Bitmap.__name__ = ["openfl","display","Bitmap"];
openfl_display_Bitmap.__super__ = openfl_display_DisplayObject;
openfl_display_Bitmap.prototype = $extend(openfl_display_DisplayObject.prototype,{
	__getBounds: function(rect,matrix) {
		if(this.bitmapData != null) {
			var bounds = openfl_geom_Rectangle.__temp;
			bounds.setTo(0,0,this.bitmapData.width,this.bitmapData.height);
			bounds.__transform(bounds,matrix);
			rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
		}
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || this.bitmapData == null) {
			return false;
		}
		if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
			return false;
		}
		this.__getWorldTransform();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var px = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx));
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		var py = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x));
		if(px > 0 && py > 0 && px <= this.bitmapData.width && py <= this.bitmapData.height) {
			if(stack != null && !interactiveOnly) {
				stack.push(hitObject);
			}
			return true;
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		if(this.bitmapData == null) {
			return false;
		}
		this.__getWorldTransform();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var px = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx));
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		var py = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x));
		if(px > 0 && py > 0 && px <= this.bitmapData.width && py <= this.bitmapData.height) {
			return true;
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		if(!(!this.__renderable || this.__worldAlpha <= 0)) {
			var cairo = renderSession.cairo;
			if(this.bitmapData != null && this.bitmapData.__isValid) {
				if(this.__mask != null) {
					renderSession.maskManager.pushMask(this.__mask);
				}
				var transform = this.__renderTransform;
				var scrollRect = this.get_scrollRect();
				if(renderSession.roundPixels) {
					var matrix = transform.__toMatrix3();
					matrix.tx = Math.round(matrix.tx);
					matrix.ty = Math.round(matrix.ty);
					cairo.set_matrix(matrix);
				} else {
					cairo.set_matrix(transform.__toMatrix3());
				}
				var surface = this.bitmapData.getSurface();
				if(surface != null) {
					var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(surface);
					lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter(pattern,this.smoothing ? 1 : 3);
					if(scrollRect != null) {
						cairo.pushGroup();
						cairo.set_source(pattern);
						cairo.newPath();
						cairo.rectangle(scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
						cairo.fill();
						cairo.popGroupToSource();
					} else {
						cairo.set_source(pattern);
					}
					if(this.__worldAlpha == 1) {
						cairo.paint();
					} else {
						cairo.paintWithAlpha(this.__worldAlpha);
					}
				}
				if(this.__mask != null) {
					renderSession.maskManager.popMask();
				}
			}
		}
	}
	,__renderCairoMask: function(renderSession) {
		renderSession.cairo.rectangle(0,0,this.get_width(),this.get_height());
	}
	,__renderCanvas: function(renderSession) {
		if(!(!this.__renderable || this.__worldAlpha <= 0)) {
			var context = renderSession.context;
			if(this.bitmapData != null && this.bitmapData.__isValid) {
				if(this.__mask != null) {
					renderSession.maskManager.pushMask(this.__mask);
				}
				this.bitmapData.__sync();
				context.globalAlpha = this.__worldAlpha;
				var transform = this.__renderTransform;
				var scrollRect = this.get_scrollRect();
				if(renderSession.roundPixels) {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
				} else {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
				}
				if(!this.smoothing) {
					context.mozImageSmoothingEnabled = false;
					context.msImageSmoothingEnabled = false;
					context.imageSmoothingEnabled = false;
				}
				if(scrollRect == null) {
					context.drawImage(this.bitmapData.image.get_src(),0,0);
				} else {
					context.drawImage(this.bitmapData.image.get_src(),scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height,scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
				}
				if(!this.smoothing) {
					context.mozImageSmoothingEnabled = true;
					context.msImageSmoothingEnabled = true;
					context.imageSmoothingEnabled = true;
				}
				if(this.__mask != null) {
					renderSession.maskManager.popMask();
				}
			}
		}
	}
	,__renderCanvasMask: function(renderSession) {
		renderSession.context.rect(0,0,this.get_width(),this.get_height());
	}
	,__renderDOM: function(renderSession) {
		if(this.stage != null && this.__worldVisible && this.__renderable && this.bitmapData != null && this.bitmapData.__isValid) {
			if(this.bitmapData.image.buffer.__srcImage != null) {
				openfl__$internal_renderer_dom_DOMBitmap.renderImage(this,renderSession);
			} else {
				openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(this,renderSession);
			}
		} else {
			if(this.__image != null) {
				renderSession.element.removeChild(this.__image);
				this.__image = null;
				this.__style = null;
			}
			if(this.__canvas != null) {
				renderSession.element.removeChild(this.__canvas);
				this.__canvas = null;
				this.__style = null;
			}
		}
	}
	,__renderGL: function(renderSession) {
		if(this.__cacheAsBitmap) {
			var hasCacheMatrix = this.__cacheAsBitmapMatrix != null;
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(hasCacheMatrix) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(!(!this.__renderable || this.__worldAlpha <= 0 || this.bitmapData == null || !this.bitmapData.__isValid)) {
			renderSession.spriteBatch.renderBitmapData(this.bitmapData,this.smoothing,this.__renderTransform,this.__worldColorTransform,this.__worldAlpha,this.__blendMode,this.__shader,this.pixelSnapping);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__updateMask: function(maskGraphics) {
		if(this.bitmapData == null) {
			return;
		}
		maskGraphics.__commands.overrideMatrix(this.__worldTransform);
		maskGraphics.beginFill(0);
		maskGraphics.drawRect(0,0,this.bitmapData.width,this.bitmapData.height);
		if(maskGraphics.__bounds == null) {
			maskGraphics.__bounds = new openfl_geom_Rectangle();
		}
		this.__getBounds(maskGraphics.__bounds,openfl_geom_Matrix.__identity);
		openfl_display_DisplayObject.prototype.__updateMask.call(this,maskGraphics);
	}
	,get_height: function() {
		if(this.bitmapData != null) {
			return this.bitmapData.height * this.get_scaleY();
		}
		return 0;
	}
	,set_height: function(value) {
		if(this.bitmapData != null) {
			if(value != this.bitmapData.height) {
				this.set_scaleY(value / this.bitmapData.height);
			}
			return value;
		}
		return 0;
	}
	,get_width: function() {
		if(this.bitmapData != null) {
			return this.bitmapData.width * this.get_scaleX();
		}
		return 0;
	}
	,set_width: function(value) {
		if(this.bitmapData != null) {
			if(value != this.bitmapData.width) {
				this.set_scaleX(value / this.bitmapData.width);
			}
			return value;
		}
		return 0;
	}
	,__class__: openfl_display_Bitmap
});
var openfl_display_TextureUvs = function() {
	this.y3 = 0;
	this.y2 = 0;
	this.y1 = 0;
	this.y0 = 0;
	this.x3 = 0;
	this.x2 = 0;
	this.x1 = 0;
	this.x0 = 0;
};
$hxClasses["openfl.display.TextureUvs"] = openfl_display_TextureUvs;
openfl_display_TextureUvs.__name__ = ["openfl","display","TextureUvs"];
openfl_display_TextureUvs.prototype = {
	reset: function() {
		this.x0 = this.x1 = this.x2 = this.x3 = this.y0 = this.y1 = this.y2 = this.y3 = 0;
	}
	,__class__: openfl_display_TextureUvs
};
var openfl_display__$BlendMode_BlendMode_$Impl_$ = {};
$hxClasses["openfl.display._BlendMode.BlendMode_Impl_"] = openfl_display__$BlendMode_BlendMode_$Impl_$;
openfl_display__$BlendMode_BlendMode_$Impl_$.__name__ = ["openfl","display","_BlendMode","BlendMode_Impl_"];
openfl_display__$BlendMode_BlendMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "add":
		return 0;
	case "alpha":
		return 1;
	case "darken":
		return 2;
	case "difference":
		return 3;
	case "erase":
		return 4;
	case "hardlight":
		return 5;
	case "invert":
		return 6;
	case "layer":
		return 7;
	case "lighten":
		return 8;
	case "multiply":
		return 9;
	case "normal":
		return 10;
	case "overlay":
		return 11;
	case "screen":
		return 12;
	case "shader":
		return 13;
	case "subtract":
		return 14;
	default:
		return null;
	}
};
openfl_display__$BlendMode_BlendMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "add";
	case 1:
		return "alpha";
	case 2:
		return "darken";
	case 3:
		return "difference";
	case 4:
		return "erase";
	case 5:
		return "hardlight";
	case 6:
		return "invert";
	case 7:
		return "layer";
	case 8:
		return "lighten";
	case 9:
		return "multiply";
	case 10:
		return "normal";
	case 11:
		return "overlay";
	case 12:
		return "screen";
	case 13:
		return "shader";
	case 14:
		return "subtract";
	default:
		return null;
	}
};
var openfl_display__$CapsStyle_CapsStyle_$Impl_$ = {};
$hxClasses["openfl.display._CapsStyle.CapsStyle_Impl_"] = openfl_display__$CapsStyle_CapsStyle_$Impl_$;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.__name__ = ["openfl","display","_CapsStyle","CapsStyle_Impl_"];
openfl_display__$CapsStyle_CapsStyle_$Impl_$.fromString = function(value) {
	switch(value) {
	case "none":
		return 0;
	case "round":
		return 1;
	case "square":
		return 2;
	default:
		return null;
	}
};
openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "none";
	case 1:
		return "round";
	case 2:
		return "square";
	default:
		return null;
	}
};
var openfl_display_DirectRenderer = function(type) {
	if(type == null) {
		type = "DirectRenderer";
	}
	openfl_display_DisplayObject.call(this);
};
$hxClasses["openfl.display.DirectRenderer"] = openfl_display_DirectRenderer;
openfl_display_DirectRenderer.__name__ = ["openfl","display","DirectRenderer"];
openfl_display_DirectRenderer.__super__ = openfl_display_DisplayObject;
openfl_display_DirectRenderer.prototype = $extend(openfl_display_DisplayObject.prototype,{
	get_render: function() {
		return this.__render;
	}
	,set_render: function(value) {
		return this.__render = value;
	}
	,__class__: openfl_display_DirectRenderer
	,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{set_render:"set_render",get_render:"get_render"})
});
var openfl_display_FrameLabel = function(name,frame) {
	openfl_events_EventDispatcher.call(this);
	this.__name = name;
	this.__frame = frame;
};
$hxClasses["openfl.display.FrameLabel"] = openfl_display_FrameLabel;
openfl_display_FrameLabel.__name__ = ["openfl","display","FrameLabel"];
openfl_display_FrameLabel.__super__ = openfl_events_EventDispatcher;
openfl_display_FrameLabel.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	get_frame: function() {
		return this.__frame;
	}
	,get_name: function() {
		return this.__name;
	}
	,__class__: openfl_display_FrameLabel
	,__properties__: {get_name:"get_name",get_frame:"get_frame"}
});
var openfl_display__$GradientType_GradientType_$Impl_$ = {};
$hxClasses["openfl.display._GradientType.GradientType_Impl_"] = openfl_display__$GradientType_GradientType_$Impl_$;
openfl_display__$GradientType_GradientType_$Impl_$.__name__ = ["openfl","display","_GradientType","GradientType_Impl_"];
openfl_display__$GradientType_GradientType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "linear":
		return 0;
	case "radial":
		return 1;
	default:
		return null;
	}
};
openfl_display__$GradientType_GradientType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "linear";
	case 1:
		return "radial";
	default:
		return null;
	}
};
var openfl_display_Graphics = function() {
	this.__glStack = [];
	this.__dirty = true;
	this.__commands = new openfl__$internal_renderer_DrawCommandBuffer();
	this.__strokePadding = 0;
	this.__positionX = 0;
	this.__positionY = 0;
	this.__hardware = true;
	this.moveTo(0,0);
};
$hxClasses["openfl.display.Graphics"] = openfl_display_Graphics;
openfl_display_Graphics.__name__ = ["openfl","display","Graphics"];
openfl_display_Graphics.prototype = {
	beginBitmapFill: function(bitmap,matrix,repeat,smooth) {
		if(smooth == null) {
			smooth = false;
		}
		if(repeat == null) {
			repeat = true;
		}
		this.__commands.beginBitmapFill(bitmap,matrix != null ? matrix.clone() : null,repeat,smooth);
		this.__visible = true;
	}
	,beginFill: function(color,alpha) {
		if(alpha == null) {
			alpha = 1;
		}
		if(color == null) {
			color = 0;
		}
		this.__commands.beginFill(color & 16777215,alpha);
		if(alpha > 0) {
			this.__visible = true;
		}
	}
	,beginGradientFill: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		if(focalPointRatio == null) {
			focalPointRatio = 0;
		}
		if(interpolationMethod == null) {
			interpolationMethod = 1;
		}
		if(spreadMethod == null) {
			spreadMethod = 0;
		}
		this.__commands.beginGradientFill(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio);
		this.__hardware = false;
		var _g = 0;
		while(_g < alphas.length) {
			var alpha = alphas[_g];
			++_g;
			if(alpha > 0) {
				this.__visible = true;
				break;
			}
		}
	}
	,clear: function() {
		this.__commands.clear();
		this.__strokePadding = 0;
		if(this.__bounds != null) {
			this.set___dirty(true);
			this.__transformDirty = true;
			this.__bounds = null;
		}
		this.__visible = false;
		this.__hardware = true;
		this.moveTo(0,0);
	}
	,copyFrom: function(sourceGraphics) {
		this.__bounds = sourceGraphics.__bounds != null ? sourceGraphics.__bounds.clone() : null;
		this.__commands = sourceGraphics.__commands.copy();
		this.set___dirty(true);
		this.__strokePadding = sourceGraphics.__strokePadding;
		this.__positionX = sourceGraphics.__positionX;
		this.__positionY = sourceGraphics.__positionY;
		this.__transformDirty = true;
		this.__visible = sourceGraphics.__visible;
	}
	,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
		var ix1;
		var iy1;
		var ix2;
		var iy2;
		ix1 = anchorX;
		ix2 = anchorX;
		if(!((controlX1 < anchorX && controlX1 > this.__positionX || controlX1 > anchorX && controlX1 < this.__positionX) && (controlX2 < anchorX && controlX2 > this.__positionX || controlX2 > anchorX && controlX2 < this.__positionX))) {
			var u = 2 * this.__positionX - 4 * controlX1 + 2 * controlX2;
			var v = controlX1 - this.__positionX;
			var w = -this.__positionX + 3 * controlX1 + anchorX - 3 * controlX2;
			var t1 = (-u + Math.sqrt(u * u - 4 * v * w)) / (2 * w);
			var t2 = (-u - Math.sqrt(u * u - 4 * v * w)) / (2 * w);
			if(t1 > 0 && t1 < 1) {
				ix1 = this.__calculateBezierCubicPoint(t1,this.__positionX,controlX1,controlX2,anchorX);
			}
			if(t2 > 0 && t2 < 1) {
				ix2 = this.__calculateBezierCubicPoint(t2,this.__positionX,controlX1,controlX2,anchorX);
			}
		}
		iy1 = anchorY;
		iy2 = anchorY;
		if(!((controlY1 < anchorY && controlY1 > this.__positionX || controlY1 > anchorY && controlY1 < this.__positionX) && (controlY2 < anchorY && controlY2 > this.__positionX || controlY2 > anchorY && controlY2 < this.__positionX))) {
			var u1 = 2 * this.__positionX - 4 * controlY1 + 2 * controlY2;
			var v1 = controlY1 - this.__positionX;
			var w1 = -this.__positionX + 3 * controlY1 + anchorY - 3 * controlY2;
			var t11 = (-u1 + Math.sqrt(u1 * u1 - 4 * v1 * w1)) / (2 * w1);
			var t21 = (-u1 - Math.sqrt(u1 * u1 - 4 * v1 * w1)) / (2 * w1);
			if(t11 > 0 && t11 < 1) {
				iy1 = this.__calculateBezierCubicPoint(t11,this.__positionX,controlY1,controlY2,anchorY);
			}
			if(t21 > 0 && t21 < 1) {
				iy2 = this.__calculateBezierCubicPoint(t21,this.__positionX,controlY1,controlY2,anchorY);
			}
		}
		this.__inflateBounds(ix1 - this.__strokePadding,iy1 - this.__strokePadding);
		this.__inflateBounds(ix1 + this.__strokePadding,iy1 + this.__strokePadding);
		this.__inflateBounds(ix2 - this.__strokePadding,iy2 - this.__strokePadding);
		this.__inflateBounds(ix2 + this.__strokePadding,iy2 + this.__strokePadding);
		this.__positionX = anchorX;
		this.__positionY = anchorY;
		this.__commands.cubicCurveTo(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,curveTo: function(controlX,controlY,anchorX,anchorY) {
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
		var ix;
		var iy;
		if(controlX < anchorX && controlX > this.__positionX || controlX > anchorX && controlX < this.__positionX) {
			ix = anchorX;
		} else {
			var tx = (this.__positionX - controlX) / (this.__positionX - 2 * controlX + anchorX);
			ix = this.__calculateBezierQuadPoint(tx,this.__positionX,controlX,anchorX);
		}
		if(controlY < anchorY && controlY > this.__positionY || controlY > anchorY && controlY < this.__positionY) {
			iy = anchorY;
		} else {
			var ty = (this.__positionY - controlY) / (this.__positionY - 2 * controlY + anchorY);
			iy = this.__calculateBezierQuadPoint(ty,this.__positionY,controlY,anchorY);
		}
		this.__inflateBounds(ix - this.__strokePadding,iy - this.__strokePadding);
		this.__inflateBounds(ix + this.__strokePadding,iy + this.__strokePadding);
		this.__positionX = anchorX;
		this.__positionY = anchorY;
		this.__commands.curveTo(controlX,controlY,anchorX,anchorY);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawCircle: function(x,y,radius) {
		if(radius <= 0) {
			return;
		}
		this.__inflateBounds(x - radius - this.__strokePadding,y - radius - this.__strokePadding);
		this.__inflateBounds(x + radius + this.__strokePadding,y + radius + this.__strokePadding);
		this.__commands.drawCircle(x,y,radius);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawEllipse: function(x,y,width,height) {
		if(width <= 0 || height <= 0) {
			return;
		}
		this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
		this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
		this.__commands.drawEllipse(x,y,width,height);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawGraphicsData: function(graphicsData) {
		var fill;
		var bitmapFill;
		var gradientFill;
		var stroke;
		var path;
		var _g = 0;
		while(_g < graphicsData.length) {
			var graphics = graphicsData.data[_g];
			++_g;
			if(js_Boot.__instanceof(graphics,openfl_display_GraphicsSolidFill)) {
				fill = graphics;
				this.beginFill(fill.color,fill.alpha);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsBitmapFill)) {
				bitmapFill = graphics;
				this.beginBitmapFill(bitmapFill.bitmapData,bitmapFill.matrix,bitmapFill.repeat,bitmapFill.smooth);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsGradientFill)) {
				gradientFill = graphics;
				this.beginGradientFill(gradientFill.type,gradientFill.colors,gradientFill.alphas,gradientFill.ratios,gradientFill.matrix,gradientFill.spreadMethod,gradientFill.interpolationMethod,gradientFill.focalPointRatio);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsStroke)) {
				stroke = graphics;
				if(js_Boot.__instanceof(stroke.fill,openfl_display_GraphicsSolidFill)) {
					fill = stroke.fill;
					this.lineStyle(stroke.thickness,fill.color,fill.alpha,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
				} else {
					this.lineStyle(stroke.thickness,0,1,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
					if(js_Boot.__instanceof(stroke.fill,openfl_display_GraphicsBitmapFill)) {
						bitmapFill = stroke.fill;
						this.lineBitmapStyle(bitmapFill.bitmapData,bitmapFill.matrix,bitmapFill.repeat,bitmapFill.smooth);
					} else if(js_Boot.__instanceof(stroke.fill,openfl_display_GraphicsGradientFill)) {
						gradientFill = stroke.fill;
						this.lineGradientStyle(gradientFill.type,gradientFill.colors,gradientFill.alphas,gradientFill.ratios,gradientFill.matrix,gradientFill.spreadMethod,gradientFill.interpolationMethod,gradientFill.focalPointRatio);
					}
				}
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsPath)) {
				path = graphics;
				this.drawPath(path.commands,path.data,path.winding);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsEndFill)) {
				this.endFill();
			}
		}
	}
	,drawPath: function(commands,data,winding) {
		if(winding == null) {
			winding = "evenOdd";
		}
		var dataIndex = 0;
		var _g = 0;
		try {
			while(_g < commands.length) {
				var command = commands.data[_g];
				++_g;
				if(command != null) {
					switch(command) {
					case 1:
						this.moveTo(data.data[dataIndex],data.data[dataIndex + 1]);
						dataIndex += 2;
						break;
					case 2:
						this.lineTo(data.data[dataIndex],data.data[dataIndex + 1]);
						dataIndex += 2;
						break;
					case 3:
						this.curveTo(data.data[dataIndex],data.data[dataIndex + 1],data.data[dataIndex + 2],data.data[dataIndex + 3]);
						dataIndex += 4;
						break;
					case 4:
						this.moveTo(data.data[dataIndex + 2],data.data[dataIndex + 3]);
						throw "__break__";
						break;
					case 5:
						this.lineTo(data.data[dataIndex + 2],data.data[dataIndex + 3]);
						throw "__break__";
						break;
					case 6:
						this.cubicCurveTo(data.data[dataIndex],data.data[dataIndex + 1],data.data[dataIndex + 2],data.data[dataIndex + 3],data.data[dataIndex + 4],data.data[dataIndex + 5]);
						dataIndex += 6;
						break;
					default:
					}
				}
			}
		} catch( e ) { if( e != "__break__" ) throw e; }
	}
	,drawRect: function(x,y,width,height) {
		if(width <= 0 || height <= 0) {
			return;
		}
		this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
		this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
		this.__commands.drawRect(x,y,width,height);
		this.set___dirty(true);
	}
	,drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
		if(width <= 0 || height <= 0) {
			return;
		}
		this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
		this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
		this.__commands.drawRoundRect(x,y,width,height,ellipseWidth,ellipseHeight);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawRoundRectComplex: function(x,y,width,height,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius) {
		openfl_Lib.notImplemented("Graphics.drawRoundRectComplex");
	}
	,drawTiles: function(sheet,tileData,smooth,flags,shader,count) {
		if(count == null) {
			count = -1;
		}
		if(flags == null) {
			flags = 0;
		}
		if(smooth == null) {
			smooth = false;
		}
		var useScale = (flags & 1) > 0;
		var useRotation = (flags & 2) > 0;
		var useRGB = (flags & 4) > 0;
		var useAlpha = (flags & 8) > 0;
		var useTransform = (flags & 16) > 0;
		var useColorTransform = (flags & 128) > 0;
		var useRect = (flags & 32) > 0;
		var useOrigin = (flags & 64) > 0;
		var rect = openfl_geom_Rectangle.__temp;
		var matrix = openfl_geom_Matrix.__temp;
		var numValues = 3;
		var totalCount = count;
		if(count < 0) {
			totalCount = tileData.length;
		}
		if(useTransform || useScale || useRotation || useRGB || useAlpha || useColorTransform) {
			var scaleIndex = 0;
			var rotationIndex = 0;
			var transformIndex = 0;
			if(useRect) {
				if(useOrigin) {
					numValues = 8;
				} else {
					numValues = 6;
				}
			}
			if(useScale) {
				scaleIndex = numValues;
				++numValues;
			}
			if(useRotation) {
				rotationIndex = numValues;
				++numValues;
			}
			if(useTransform) {
				transformIndex = numValues;
				numValues += 4;
			}
			if(useRGB) {
				numValues += 3;
			}
			if(useAlpha) {
				++numValues;
			}
			if(useColorTransform) {
				numValues += 4;
			}
			var itemCount = totalCount / numValues | 0;
			var index = 0;
			var cacheID = -1;
			var x;
			var y;
			var id;
			var scale;
			var rotation;
			var tileWidth;
			var tileHeight;
			var originX;
			var originY;
			var tile = null;
			var tilePoint = null;
			while(index < totalCount) {
				x = tileData[index];
				y = tileData[index + 1];
				if(!useRect) {
					id = tileData[index + 2] | 0;
				} else {
					id = -1;
				}
				scale = 1.0;
				rotation = 0.0;
				if(useScale) {
					scale = tileData[index + scaleIndex];
				}
				if(useRotation) {
					rotation = tileData[index + rotationIndex];
				}
				if(id < 0) {
					tile = null;
				} else if(!useRect && cacheID != id) {
					cacheID = id;
					tile = sheet.__tileRects[id];
					tilePoint = sheet.__centerPoints[id];
				} else if(useRect) {
					tile = sheet.__rectTile;
					tile.setTo(tileData[index + 2],tileData[index + 3],tileData[index + 4],tileData[index + 5]);
					tilePoint = sheet.__point;
					if(useOrigin) {
						tilePoint.setTo(tileData[index + 6] / tile.width,tileData[index + 7] / tile.height);
					} else {
						tilePoint.setTo(0,0);
					}
				}
				if(tile != null) {
					if(useTransform) {
						rect.setTo(0,0,tile.width,tile.height);
						matrix.setTo(tileData[index + transformIndex],tileData[index + transformIndex + 1],tileData[index + transformIndex + 2],tileData[index + transformIndex + 3],0,0);
						originX = tilePoint.x * scale;
						originY = tilePoint.y * scale;
						matrix.translate(x - (originX * matrix.a + originY * matrix.c + matrix.tx),y - (originX * matrix.b + originY * matrix.d + matrix.ty));
						rect.__transform(rect,matrix);
						this.__inflateBounds(rect.x,rect.y);
						this.__inflateBounds(rect.get_right(),rect.get_bottom());
					} else {
						tileWidth = tile.width * scale;
						tileHeight = tile.height * scale;
						x -= tilePoint.x * tileWidth;
						y -= tilePoint.y * tileHeight;
						if(rotation != 0) {
							rect.setTo(0,0,tileWidth,tileHeight);
							matrix.identity();
							matrix.rotate(rotation);
							matrix.translate(x,y);
							rect.__transform(rect,matrix);
							this.__inflateBounds(rect.x,rect.y);
							this.__inflateBounds(rect.get_right(),rect.get_bottom());
						} else {
							this.__inflateBounds(x,y);
							this.__inflateBounds(x + tileWidth,y + tileHeight);
						}
					}
				}
				index += numValues;
			}
		} else {
			var x1;
			var y1;
			var id1;
			var tile1;
			var centerPoint;
			var originX1;
			var originY1;
			var rect1 = openfl_geom_Rectangle.__temp;
			var index1 = 0;
			while(index1 < totalCount) {
				x1 = tileData[index1++];
				y1 = tileData[index1++];
				if(!useRect) {
					id1 = tileData[index1++] | 0;
				} else {
					id1 = -1;
				}
				originX1 = 0.0;
				originY1 = 0.0;
				if(useRect) {
					rect1.setTo(tileData[index1++],tileData[index1++],tileData[index1++],tileData[index1++]);
					if(useOrigin) {
						originX1 = tileData[index1++];
						originY1 = tileData[index1++];
					}
					this.__inflateBounds(x1 - originX1,y1 - originY1);
					this.__inflateBounds(x1 - originX1 + rect1.width,y1 - originY1 + rect1.height);
				} else {
					tile1 = sheet.__tileRects[id1];
					if(tile1 != null) {
						centerPoint = sheet.__centerPoints[id1];
						originX1 = centerPoint.x * tile1.width;
						originY1 = centerPoint.y * tile1.height;
						this.__inflateBounds(x1 - originX1,y1 - originY1);
						this.__inflateBounds(x1 - originX1 + tile1.width,y1 - originY1 + tile1.height);
					}
				}
			}
		}
		this.__commands.drawTiles(sheet,tileData,smooth,flags,shader,count);
		this.set___dirty(true);
		this.__visible = true;
	}
	,drawTriangles: function(vertices,indices,uvtData,culling) {
		if(culling == null) {
			culling = 1;
		}
		var vlen = vertices.length / 2 | 0;
		if(culling == null) {
			culling = 1;
		}
		if(indices == null) {
			if(vlen % 3 != 0) {
				throw new js__$Boot_HaxeError(new openfl_errors_ArgumentError("Not enough vertices to close a triangle."));
			}
			var this1 = new openfl_VectorData();
			var this2 = new Array(0);
			this1.data = this2;
			this1.length = 0;
			this1.fixed = false;
			indices = this1;
			var _g1 = 0;
			var _g = vlen;
			while(_g1 < _g) {
				var i = _g1++;
				if(!indices.fixed) {
					indices.length++;
					if(indices.data.length < indices.length) {
						var length = indices.data.length + 10;
						var this3 = new Array(length);
						var data = this3;
						haxe_ds__$Vector_Vector_$Impl_$.blit(indices.data,0,data,0,indices.data.length);
						indices.data = data;
					}
					indices.data[indices.length - 1] = i;
				}
			}
		}
		this.__inflateBounds(0,0);
		var tmpx = -Infinity;
		var tmpy = -Infinity;
		var maxX = -Infinity;
		var maxY = -Infinity;
		var _g11 = 0;
		var _g2 = vlen;
		while(_g11 < _g2) {
			var i1 = _g11++;
			tmpx = vertices.data[i1 * 2];
			tmpy = vertices.data[i1 * 2 + 1];
			if(maxX < tmpx) {
				maxX = tmpx;
			}
			if(maxY < tmpy) {
				maxY = tmpy;
			}
		}
		this.__inflateBounds(maxX,maxY);
		this.__commands.drawTriangles(vertices,indices,uvtData,culling);
		this.set___dirty(true);
		this.__visible = true;
	}
	,endFill: function() {
		this.__commands.endFill();
	}
	,lineBitmapStyle: function(bitmap,matrix,repeat,smooth) {
		if(smooth == null) {
			smooth = false;
		}
		if(repeat == null) {
			repeat = true;
		}
		this.__commands.lineBitmapStyle(bitmap,matrix != null ? matrix.clone() : null,repeat,smooth);
	}
	,lineGradientStyle: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		if(focalPointRatio == null) {
			focalPointRatio = 0;
		}
		if(interpolationMethod == null) {
			interpolationMethod = 1;
		}
		if(spreadMethod == null) {
			spreadMethod = 0;
		}
		this.__commands.lineGradientStyle(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio);
	}
	,lineStyle: function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) {
		if(miterLimit == null) {
			miterLimit = 3;
		}
		if(scaleMode == null) {
			scaleMode = 2;
		}
		if(pixelHinting == null) {
			pixelHinting = false;
		}
		if(alpha == null) {
			alpha = 1;
		}
		if(color == null) {
			color = 0;
		}
		if(thickness != null) {
			if(joints == 1) {
				if(thickness > this.__strokePadding) {
					this.__strokePadding = thickness;
				}
			} else if(thickness / 2 > this.__strokePadding) {
				this.__strokePadding = thickness / 2;
			}
		}
		this.__commands.lineStyle(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit);
		if(thickness != null) {
			this.__visible = true;
		}
	}
	,lineTo: function(x,y) {
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
		this.__positionX = x;
		this.__positionY = y;
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding * 2,this.__positionY + this.__strokePadding);
		this.__commands.lineTo(x,y);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,moveTo: function(x,y) {
		this.__positionX = x;
		this.__positionY = y;
		this.__commands.moveTo(x,y);
	}
	,__calculateBezierCubicPoint: function(t,p1,p2,p3,p4) {
		var iT = 1 - t;
		return p1 * (iT * iT * iT) + 3 * p2 * t * (iT * iT) + 3 * p3 * iT * (t * t) + p4 * (t * t * t);
	}
	,__calculateBezierQuadPoint: function(t,p1,p2,p3) {
		var iT = 1 - t;
		return iT * iT * p1 + 2 * iT * t * p2 + t * t * p3;
	}
	,__getBounds: function(rect,matrix) {
		if(this.__bounds == null) {
			return;
		}
		var bounds = openfl_geom_Rectangle.__temp;
		this.__bounds.__transform(bounds,matrix);
		rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
	}
	,__hitTest: function(x,y,shapeFlag,matrix) {
		if(this.__bounds == null) {
			return false;
		}
		var norm = matrix.a * matrix.d - matrix.b * matrix.c;
		var px = norm == 0 ? -matrix.tx : 1.0 / norm * (matrix.c * (matrix.ty - y) + matrix.d * (x - matrix.tx));
		var norm1 = matrix.a * matrix.d - matrix.b * matrix.c;
		var py = norm1 == 0 ? -matrix.ty : 1.0 / norm1 * (matrix.a * (y - matrix.ty) + matrix.b * (matrix.tx - x));
		if(px > this.__bounds.x && py > this.__bounds.y && this.__bounds.contains(px,py)) {
			if(shapeFlag) {
				return openfl__$internal_renderer_canvas_CanvasGraphics.hitTest(this,px,py);
			}
			return true;
		}
		return false;
	}
	,__inflateBounds: function(x,y) {
		if(this.__bounds == null) {
			this.__bounds = new openfl_geom_Rectangle(x,y,0,0);
			this.__transformDirty = true;
			return;
		}
		if(x < this.__bounds.x) {
			this.__bounds.width += this.__bounds.x - x;
			this.__bounds.x = x;
			this.__transformDirty = true;
		}
		if(y < this.__bounds.y) {
			this.__bounds.height += this.__bounds.y - y;
			this.__bounds.y = y;
			this.__transformDirty = true;
		}
		if(x > this.__bounds.x + this.__bounds.width) {
			this.__bounds.width = x - this.__bounds.x;
		}
		if(y > this.__bounds.y + this.__bounds.height) {
			this.__bounds.height = y - this.__bounds.y;
		}
	}
	,set___dirty: function(value) {
		if(value && this.__owner != null) {
			var _this = this.__owner;
			if(!_this.__renderDirty) {
				_this.__updateCachedBitmap = true;
				_this.__updateFilters = _this.get_filters() != null && _this.get_filters().length > 0;
				_this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__dirty = value;
	}
	,__class__: openfl_display_Graphics
	,__properties__: {set___dirty:"set___dirty"}
};
var openfl_display_IGraphicsFill = function() { };
$hxClasses["openfl.display.IGraphicsFill"] = openfl_display_IGraphicsFill;
openfl_display_IGraphicsFill.__name__ = ["openfl","display","IGraphicsFill"];
openfl_display_IGraphicsFill.prototype = {
	__class__: openfl_display_IGraphicsFill
};
var openfl_display_IGraphicsData = function() { };
$hxClasses["openfl.display.IGraphicsData"] = openfl_display_IGraphicsData;
openfl_display_IGraphicsData.__name__ = ["openfl","display","IGraphicsData"];
openfl_display_IGraphicsData.prototype = {
	__class__: openfl_display_IGraphicsData
};
var openfl_display_GraphicsBitmapFill = function(bitmapData,matrix,repeat,smooth) {
	if(smooth == null) {
		smooth = false;
	}
	if(repeat == null) {
		repeat = true;
	}
	this.bitmapData = bitmapData;
	this.matrix = matrix;
	this.repeat = repeat;
	this.smooth = smooth;
	this.__graphicsDataType = openfl_display_GraphicsDataType.BITMAP;
	this.__graphicsFillType = openfl_display_GraphicsFillType.BITMAP_FILL;
};
$hxClasses["openfl.display.GraphicsBitmapFill"] = openfl_display_GraphicsBitmapFill;
openfl_display_GraphicsBitmapFill.__name__ = ["openfl","display","GraphicsBitmapFill"];
openfl_display_GraphicsBitmapFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsBitmapFill.prototype = {
	__class__: openfl_display_GraphicsBitmapFill
};
var openfl_display_GraphicsEndFill = function() {
	this.__graphicsDataType = openfl_display_GraphicsDataType.END;
	this.__graphicsFillType = openfl_display_GraphicsFillType.END_FILL;
};
$hxClasses["openfl.display.GraphicsEndFill"] = openfl_display_GraphicsEndFill;
openfl_display_GraphicsEndFill.__name__ = ["openfl","display","GraphicsEndFill"];
openfl_display_GraphicsEndFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsEndFill.prototype = {
	__class__: openfl_display_GraphicsEndFill
};
var openfl_display_GraphicsGradientFill = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
	if(focalPointRatio == null) {
		focalPointRatio = 0;
	}
	if(type == null) {
		type = 0;
	}
	if(spreadMethod == null) {
		spreadMethod = 0;
	}
	if(interpolationMethod == null) {
		interpolationMethod = 1;
	}
	this.type = type;
	this.colors = colors;
	this.alphas = alphas;
	this.ratios = ratios;
	this.matrix = matrix;
	this.spreadMethod = spreadMethod;
	this.interpolationMethod = interpolationMethod;
	this.focalPointRatio = focalPointRatio;
	this.__graphicsDataType = openfl_display_GraphicsDataType.GRADIENT;
	this.__graphicsFillType = openfl_display_GraphicsFillType.GRADIENT_FILL;
};
$hxClasses["openfl.display.GraphicsGradientFill"] = openfl_display_GraphicsGradientFill;
openfl_display_GraphicsGradientFill.__name__ = ["openfl","display","GraphicsGradientFill"];
openfl_display_GraphicsGradientFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsGradientFill.prototype = {
	__class__: openfl_display_GraphicsGradientFill
};
var openfl_display_IGraphicsPath = function() { };
$hxClasses["openfl.display.IGraphicsPath"] = openfl_display_IGraphicsPath;
openfl_display_IGraphicsPath.__name__ = ["openfl","display","IGraphicsPath"];
var openfl_display_GraphicsPath = function(commands,data,winding) {
	if(winding == null) {
		winding = "evenOdd";
	}
	this.commands = commands;
	this.data = data;
	this.winding = winding;
	this.__graphicsDataType = openfl_display_GraphicsDataType.PATH;
};
$hxClasses["openfl.display.GraphicsPath"] = openfl_display_GraphicsPath;
openfl_display_GraphicsPath.__name__ = ["openfl","display","GraphicsPath"];
openfl_display_GraphicsPath.__interfaces__ = [openfl_display_IGraphicsPath,openfl_display_IGraphicsData];
openfl_display_GraphicsPath.prototype = {
	curveTo: function(controlX,controlY,anchorX,anchorY) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 3;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
				this3.data[this3.length - 1] = anchorX;
			}
			var this5 = this.data;
			if(!this5.fixed) {
				this5.length++;
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
				this5.data[this5.length - 1] = anchorY;
			}
			var this7 = this.data;
			if(!this7.fixed) {
				this7.length++;
				if(this7.data.length < this7.length) {
					var length3 = this7.data.length + 10;
					var this8 = new Array(length3);
					var data3 = this8;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
					this7.data = data3;
				}
				this7.data[this7.length - 1] = controlX;
			}
			var this9 = this.data;
			if(!this9.fixed) {
				this9.length++;
				if(this9.data.length < this9.length) {
					var length4 = this9.data.length + 10;
					var this10 = new Array(length4);
					var data4 = this10;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
					this9.data = data4;
				}
				this9.data[this9.length - 1] = controlY;
			}
		}
	}
	,lineTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 2;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
				this3.data[this3.length - 1] = x;
			}
			var this5 = this.data;
			if(!this5.fixed) {
				this5.length++;
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
				this5.data[this5.length - 1] = y;
			}
		}
	}
	,moveTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 1;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
				this3.data[this3.length - 1] = x;
			}
			var this5 = this.data;
			if(!this5.fixed) {
				this5.length++;
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
				this5.data[this5.length - 1] = y;
			}
		}
	}
	,wideLineTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 2;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
				this3.data[this3.length - 1] = x;
			}
			var this5 = this.data;
			if(!this5.fixed) {
				this5.length++;
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
				this5.data[this5.length - 1] = y;
			}
		}
	}
	,wideMoveTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 1;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
				this3.data[this3.length - 1] = x;
			}
			var this5 = this.data;
			if(!this5.fixed) {
				this5.length++;
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
				this5.data[this5.length - 1] = y;
			}
		}
	}
	,__class__: openfl_display_GraphicsPath
};
var openfl_display_GraphicsSolidFill = function(color,alpha) {
	if(alpha == null) {
		alpha = 1;
	}
	if(color == null) {
		color = 0;
	}
	this.alpha = alpha;
	this.color = color;
	this.__graphicsDataType = openfl_display_GraphicsDataType.SOLID;
	this.__graphicsFillType = openfl_display_GraphicsFillType.SOLID_FILL;
};
$hxClasses["openfl.display.GraphicsSolidFill"] = openfl_display_GraphicsSolidFill;
openfl_display_GraphicsSolidFill.__name__ = ["openfl","display","GraphicsSolidFill"];
openfl_display_GraphicsSolidFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsSolidFill.prototype = {
	__class__: openfl_display_GraphicsSolidFill
};
var openfl_display_IGraphicsStroke = function() { };
$hxClasses["openfl.display.IGraphicsStroke"] = openfl_display_IGraphicsStroke;
openfl_display_IGraphicsStroke.__name__ = ["openfl","display","IGraphicsStroke"];
var openfl_display_GraphicsStroke = function(thickness,pixelHinting,scaleMode,caps,joints,miterLimit,fill) {
	if(miterLimit == null) {
		miterLimit = 3;
	}
	if(pixelHinting == null) {
		pixelHinting = false;
	}
	if(thickness == null) {
		thickness = 0.0;
	}
	this.caps = caps != null ? caps : 0;
	this.fill = fill;
	this.joints = joints != null ? joints : 2;
	this.miterLimit = miterLimit;
	this.pixelHinting = pixelHinting;
	this.scaleMode = scaleMode != null ? scaleMode : 2;
	this.thickness = thickness;
	this.__graphicsDataType = openfl_display_GraphicsDataType.STROKE;
};
$hxClasses["openfl.display.GraphicsStroke"] = openfl_display_GraphicsStroke;
openfl_display_GraphicsStroke.__name__ = ["openfl","display","GraphicsStroke"];
openfl_display_GraphicsStroke.__interfaces__ = [openfl_display_IGraphicsStroke,openfl_display_IGraphicsData];
openfl_display_GraphicsStroke.prototype = {
	__class__: openfl_display_GraphicsStroke
};
var openfl_display_GraphicsDataType = $hxClasses["openfl.display.GraphicsDataType"] = { __ename__ : ["openfl","display","GraphicsDataType"], __constructs__ : ["STROKE","SOLID","GRADIENT","PATH","BITMAP","END"] };
openfl_display_GraphicsDataType.STROKE = ["STROKE",0];
openfl_display_GraphicsDataType.STROKE.toString = $estr;
openfl_display_GraphicsDataType.STROKE.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.SOLID = ["SOLID",1];
openfl_display_GraphicsDataType.SOLID.toString = $estr;
openfl_display_GraphicsDataType.SOLID.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.GRADIENT = ["GRADIENT",2];
openfl_display_GraphicsDataType.GRADIENT.toString = $estr;
openfl_display_GraphicsDataType.GRADIENT.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.PATH = ["PATH",3];
openfl_display_GraphicsDataType.PATH.toString = $estr;
openfl_display_GraphicsDataType.PATH.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.BITMAP = ["BITMAP",4];
openfl_display_GraphicsDataType.BITMAP.toString = $estr;
openfl_display_GraphicsDataType.BITMAP.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.END = ["END",5];
openfl_display_GraphicsDataType.END.toString = $estr;
openfl_display_GraphicsDataType.END.__enum__ = openfl_display_GraphicsDataType;
var openfl_display_GraphicsFillType = $hxClasses["openfl.display.GraphicsFillType"] = { __ename__ : ["openfl","display","GraphicsFillType"], __constructs__ : ["SOLID_FILL","GRADIENT_FILL","BITMAP_FILL","END_FILL"] };
openfl_display_GraphicsFillType.SOLID_FILL = ["SOLID_FILL",0];
openfl_display_GraphicsFillType.SOLID_FILL.toString = $estr;
openfl_display_GraphicsFillType.SOLID_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.GRADIENT_FILL = ["GRADIENT_FILL",1];
openfl_display_GraphicsFillType.GRADIENT_FILL.toString = $estr;
openfl_display_GraphicsFillType.GRADIENT_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.BITMAP_FILL = ["BITMAP_FILL",2];
openfl_display_GraphicsFillType.BITMAP_FILL.toString = $estr;
openfl_display_GraphicsFillType.BITMAP_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.END_FILL = ["END_FILL",3];
openfl_display_GraphicsFillType.END_FILL.toString = $estr;
openfl_display_GraphicsFillType.END_FILL.__enum__ = openfl_display_GraphicsFillType;
var openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$ = {};
$hxClasses["openfl.display._InterpolationMethod.InterpolationMethod_Impl_"] = openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.__name__ = ["openfl","display","_InterpolationMethod","InterpolationMethod_Impl_"];
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.fromString = function(value) {
	switch(value) {
	case "linearRGB":
		return 0;
	case "rgb":
		return 1;
	default:
		return null;
	}
};
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "linearRGB";
	case 1:
		return "rgb";
	default:
		return null;
	}
};
var openfl_display_JPEGEncoderOptions = function(quality) {
	if(quality == null) {
		quality = 80;
	}
	this.quality = quality;
};
$hxClasses["openfl.display.JPEGEncoderOptions"] = openfl_display_JPEGEncoderOptions;
openfl_display_JPEGEncoderOptions.__name__ = ["openfl","display","JPEGEncoderOptions"];
openfl_display_JPEGEncoderOptions.prototype = {
	__class__: openfl_display_JPEGEncoderOptions
};
var openfl_display__$JointStyle_JointStyle_$Impl_$ = {};
$hxClasses["openfl.display._JointStyle.JointStyle_Impl_"] = openfl_display__$JointStyle_JointStyle_$Impl_$;
openfl_display__$JointStyle_JointStyle_$Impl_$.__name__ = ["openfl","display","_JointStyle","JointStyle_Impl_"];
openfl_display__$JointStyle_JointStyle_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bevel":
		return 0;
	case "miter":
		return 1;
	case "round":
		return 2;
	default:
		return null;
	}
};
openfl_display__$JointStyle_JointStyle_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bevel";
	case 1:
		return "miter";
	case 2:
		return "round";
	default:
		return null;
	}
};
var openfl_display__$LineScaleMode_LineScaleMode_$Impl_$ = {};
$hxClasses["openfl.display._LineScaleMode.LineScaleMode_Impl_"] = openfl_display__$LineScaleMode_LineScaleMode_$Impl_$;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.__name__ = ["openfl","display","_LineScaleMode","LineScaleMode_Impl_"];
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "horizontal":
		return 0;
	case "none":
		return 1;
	case "normal":
		return 2;
	case "vertical":
		return 3;
	default:
		return null;
	}
};
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "horizontal";
	case 1:
		return "none";
	case 2:
		return "normal";
	case 3:
		return "vertical";
	default:
		return null;
	}
};
var openfl_display_Loader = function() {
	openfl_display_DisplayObjectContainer.call(this);
	this.contentLoaderInfo = openfl_display_LoaderInfo.create(this);
};
$hxClasses["openfl.display.Loader"] = openfl_display_Loader;
openfl_display_Loader.__name__ = ["openfl","display","Loader"];
openfl_display_Loader.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Loader.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
	close: function() {
		openfl_Lib.notImplemented("Loader.close");
	}
	,load: function(request,context) {
		var extension = "";
		var parts = request.url.split(".");
		if(parts.length > 0) {
			extension = parts[parts.length - 1].toLowerCase();
		}
		if(extension.indexOf("?") != -1) {
			extension = extension.split("?")[0];
		}
		var transparent = true;
		this.contentLoaderInfo.url = request.url;
		if(request.contentType == null || request.contentType == "") {
			var tmp;
			switch(extension) {
			case "gif":
				tmp = "image/gif";
				break;
			case "jpeg":case "jpg":
				transparent = false;
				tmp = "image/jpeg";
				break;
			case "png":
				tmp = "image/png";
				break;
			case "swf":
				tmp = "application/x-shockwave-flash";
				break;
			default:
				tmp = "application/x-www-form-urlencoded";
			}
			this.contentLoaderInfo.contentType = tmp;
		} else {
			this.contentLoaderInfo.contentType = request.contentType;
		}
		var worker = new lime_system_BackgroundWorker();
		worker.doWork.add(function(_) {
			var path = request.url;
			openfl_display_BitmapData.fromFile(path,function(bitmapData) {
				worker.sendComplete(bitmapData);
			},function() {
				worker.sendError("ioError");
			});
		});
		worker.onError.add($bind(this,this.BitmapData_onError));
		worker.onComplete.add($bind(this,this.BitmapData_onLoad));
		worker.run();
	}
	,loadBytes: function(buffer,context) {
		var worker = new lime_system_BackgroundWorker();
		worker.doWork.add(function(_) {
			openfl_display_BitmapData.fromBytes(buffer,null,function(bitmapData) {
				worker.sendComplete(bitmapData);
			});
		});
		worker.onComplete.add($bind(this,this.BitmapData_onLoad));
		worker.run();
	}
	,unload: function() {
		if(this.get_numChildren() > 0) {
			while(this.get_numChildren() > 0) this.removeChildAt(0);
			this.content = null;
			this.contentLoaderInfo.url = null;
			this.contentLoaderInfo.contentType = null;
			this.contentLoaderInfo.content = null;
			this.contentLoaderInfo.bytesLoaded = 0;
			this.contentLoaderInfo.bytesTotal = 0;
			this.contentLoaderInfo.width = 0;
			this.contentLoaderInfo.height = 0;
			var event = new openfl_events_Event("unload");
			event.currentTarget = this;
			this.__dispatchEvent(event);
		}
	}
	,unloadAndStop: function(gc) {
		if(gc == null) {
			gc = true;
		}
		openfl_Lib.notImplemented("Loader.unloadAndStop");
	}
	,BitmapData_onLoad: function(bitmapData) {
		this.contentLoaderInfo.content = new openfl_display_Bitmap(bitmapData);
		this.content = this.contentLoaderInfo.content;
		this.addChild(this.contentLoaderInfo.content);
		var event = new openfl_events_Event("complete");
		event.target = this.contentLoaderInfo;
		event.currentTarget = this.contentLoaderInfo;
		this.contentLoaderInfo.dispatchEvent(event);
	}
	,BitmapData_onError: function(_) {
		var event = new openfl_events_IOErrorEvent("ioError");
		event.target = this.contentLoaderInfo;
		event.currentTarget = this.contentLoaderInfo;
		this.contentLoaderInfo.dispatchEvent(event);
	}
	,__class__: openfl_display_Loader
});
var openfl_display_OpenGLView = function() {
	openfl_display_DirectRenderer.call(this,"OpenGLView");
	if(!this.__added) {
		this.__added = true;
		haxe_Log.trace("Warning: OpenGLView is not available in HTML5 canvas rendering mode",{ fileName : "OpenGLView.hx", lineNumber : 76, className : "openfl.display.OpenGLView", methodName : "new"});
		haxe_Log.trace("Please compile your project using -Ddom or -Dwebgl (beta) to enable",{ fileName : "OpenGLView.hx", lineNumber : 77, className : "openfl.display.OpenGLView", methodName : "new"});
	}
};
$hxClasses["openfl.display.OpenGLView"] = openfl_display_OpenGLView;
openfl_display_OpenGLView.__name__ = ["openfl","display","OpenGLView"];
openfl_display_OpenGLView.__properties__ = {get_isSupported:"get_isSupported"};
openfl_display_OpenGLView.isSupported = null;
openfl_display_OpenGLView.get_isSupported = function() {
	return false;
};
openfl_display_OpenGLView.__super__ = openfl_display_DirectRenderer;
openfl_display_OpenGLView.prototype = $extend(openfl_display_DirectRenderer.prototype,{
	__renderCanvas: function(renderSession) {
	}
	,__renderDOM: function(renderSession) {
		if(this.stage != null && this.__worldVisible && this.__renderable) {
			if(!this.__added) {
				renderSession.element.appendChild(this.__canvas);
				this.__added = true;
				openfl__$internal_renderer_dom_DOMRenderer.initializeElement(this,this.__canvas,renderSession);
			}
			if(this.__context != null) {
				var rect = null;
				if(this.get_scrollRect() == null) {
					rect = new openfl_geom_Rectangle(0,0,this.stage.stageWidth,this.stage.stageHeight);
				} else {
					rect = new openfl_geom_Rectangle(this.get_x() + this.get_scrollRect().x,this.get_y() + this.get_scrollRect().y,this.get_scrollRect().width,this.get_scrollRect().height);
				}
				if(this.__render != null) {
					this.__render(rect);
				}
			}
		} else if(this.__added) {
			renderSession.element.removeChild(this.__canvas);
			this.__added = false;
		}
	}
	,__renderGL: function(renderSession) {
		if(this.stage != null && this.__renderable) {
			var rect = null;
			if(this.get_scrollRect() == null) {
				rect = new openfl_geom_Rectangle(0,0,this.stage.stageWidth,this.stage.stageHeight);
			} else {
				rect = new openfl_geom_Rectangle(this.get_x() + this.get_scrollRect().x,this.get_y() + this.get_scrollRect().y,this.get_scrollRect().width,this.get_scrollRect().height);
			}
			if(this.__render != null) {
				this.__render(rect);
			}
			renderSession.shaderManager.setShader(null);
			renderSession.blendModeManager.setBlendMode(null);
		}
	}
	,__class__: openfl_display_OpenGLView
});
var openfl_display_PNGEncoderOptions = function(fastCompression) {
	if(fastCompression == null) {
		fastCompression = false;
	}
	this.fastCompression = fastCompression;
};
$hxClasses["openfl.display.PNGEncoderOptions"] = openfl_display_PNGEncoderOptions;
openfl_display_PNGEncoderOptions.__name__ = ["openfl","display","PNGEncoderOptions"];
openfl_display_PNGEncoderOptions.prototype = {
	__class__: openfl_display_PNGEncoderOptions
};
var openfl_display__$PixelSnapping_PixelSnapping_$Impl_$ = {};
$hxClasses["openfl.display._PixelSnapping.PixelSnapping_Impl_"] = openfl_display__$PixelSnapping_PixelSnapping_$Impl_$;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.__name__ = ["openfl","display","_PixelSnapping","PixelSnapping_Impl_"];
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.fromString = function(value) {
	switch(value) {
	case "always":
		return 0;
	case "auto":
		return 1;
	case "never":
		return 2;
	default:
		return null;
	}
};
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "always";
	case 1:
		return "auto";
	case 2:
		return "never";
	default:
		return null;
	}
};
var openfl_display_Preloader = function(display) {
	lime_app_Preloader.call(this);
	if(display != null) {
		this.display = display;
		openfl_Lib.current.addChild(display);
		if(js_Boot.__instanceof(display,NMEPreloader)) {
			(js_Boot.__cast(display , NMEPreloader)).onInit();
		}
	}
};
$hxClasses["openfl.display.Preloader"] = openfl_display_Preloader;
openfl_display_Preloader.__name__ = ["openfl","display","Preloader"];
openfl_display_Preloader.__super__ = lime_app_Preloader;
openfl_display_Preloader.prototype = $extend(lime_app_Preloader.prototype,{
	load: function(urls,types) {
		var sounds = [];
		var url = null;
		var _g1 = 0;
		var _g = urls.length;
		while(_g1 < _g) {
			var i = _g1++;
			url = urls[i];
			var _g2 = types[i];
			switch(_g2) {
			case "MUSIC":case "SOUND":
				var sound = haxe_io_Path.withoutExtension(url);
				if(!HxOverrides.remove(sounds,sound)) {
					this.total++;
				}
				sounds.push(sound);
				break;
			default:
			}
		}
		var _g3 = 0;
		while(_g3 < sounds.length) {
			var soundName = sounds[_g3];
			++_g3;
			var sound1 = new openfl_media_Sound();
			sound1.addEventListener("complete",$bind(this,this.sound_onComplete));
			sound1.addEventListener("ioError",$bind(this,this.sound_onIOError));
			sound1.load(new openfl_net_URLRequest(soundName + ".ogg"));
		}
		lime_app_Preloader.prototype.load.call(this,urls,types);
	}
	,start: function() {
		if(this.display != null && js_Boot.__instanceof(this.display,NMEPreloader)) {
			this.display.addEventListener("complete",$bind(this,this.display_onComplete));
			(js_Boot.__cast(this.display , NMEPreloader)).onLoaded();
		} else {
			lime_app_Preloader.prototype.start.call(this);
		}
	}
	,update: function(loaded,total) {
		if(this.display != null && js_Boot.__instanceof(this.display,NMEPreloader)) {
			(js_Boot.__cast(this.display , NMEPreloader)).onUpdate(loaded,total);
		}
	}
	,display_onComplete: function(event) {
		this.display.removeEventListener("complete",$bind(this,this.display_onComplete));
		openfl_Lib.current.removeChild(this.display);
		openfl_Lib.current.stage.set_focus(null);
		this.display = null;
		lime_app_Preloader.prototype.start.call(this);
	}
	,sound_onComplete: function(event) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,sound_onIOError: function(event) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,__class__: openfl_display_Preloader
});
var openfl_display_Shader = function(precision) {
	if(precision == null) {
		precision = 1;
	}
	this.__dirty = true;
	this.repeatY = 33071;
	this.repeatX = 33071;
	this.precision = 1;
	this.precision = precision;
	this.data = new haxe_ds_StringMap();
	var this1 = this.data;
	var key = openfl_display_Shader.uObjectSize;
	var value = new openfl_display_GLShaderParameter("vec2");
	var _this = this1;
	if(__map_reserved[key] != null) {
		_this.setReserved(key,value);
	} else {
		_this.h[key] = value;
	}
	var this2 = this.data;
	var key1 = openfl_display_Shader.uTextureSize;
	var value1 = new openfl_display_GLShaderParameter("vec2");
	var _this1 = this2;
	if(__map_reserved[key1] != null) {
		_this1.setReserved(key1,value1);
	} else {
		_this1.h[key1] = value1;
	}
};
$hxClasses["openfl.display.Shader"] = openfl_display_Shader;
openfl_display_Shader.__name__ = ["openfl","display","Shader"];
openfl_display_Shader.prototype = {
	__init: function(gl) {
		var dirty = this.__dirty;
		if(dirty) {
			if(this.__shader != null) {
				this.__shader.destroy();
			}
			this.__shader = new openfl__$internal_renderer_opengl_shaders2_Shader(gl);
			var tmp = this.__vertexCode != null ? this.__vertexCode : openfl__$internal_renderer_opengl_shaders2_DefaultShader.VERTEX_SRC.join("\n");
			this.__shader.vertexString = tmp;
			this.__shader.fragmentString = this.__fragmentCode;
			this.__dirty = false;
		}
		this.__shader.init(dirty);
	}
	,__buildFragmentCode: function(code) {
		var output = [];
		output.push("#ifdef GL_ES");
		var _g = this.precision;
		var tmp;
		switch(_g) {
		case 1:
			tmp = "precision mediump float;";
			break;
		case 2:
			tmp = "precision highp float;";
			break;
		default:
			tmp = "precision lowp float;";
		}
		output.push(tmp);
		output.push("#endif");
		output = output.concat(openfl_display_Shader.fragmentHeader);
		output.push(code);
		this.__fragmentCode = output.join("\n");
	}
	,__buildVertexCode: function(code) {
		var output = [];
		output.push("#ifdef GL_ES");
		var _g = this.precision;
		var tmp;
		switch(_g) {
		case 1:
			tmp = "precision mediump float;";
			break;
		case 2:
			tmp = "precision highp float;";
			break;
		default:
			tmp = "precision lowp float;";
		}
		output.push(tmp);
		output.push("#endif");
		output = output.concat(openfl_display_Shader.vertexHeader);
		output.push(code);
		this.__vertexCode = output.join("\n");
	}
	,__class__: openfl_display_Shader
};
var openfl_display_GLShaderParameter = function(type,arraySize) {
	this.internalType = 0;
	this.transpose = false;
	this.repeatY = 33071;
	this.repeatX = 33071;
	this.smooth = false;
	this.arraySize = 0;
	this.size = 0;
	this.type = type;
	this.arraySize = arraySize == null ? 0 : arraySize;
	this.__init();
};
$hxClasses["openfl.display.GLShaderParameter"] = openfl_display_GLShaderParameter;
openfl_display_GLShaderParameter.__name__ = ["openfl","display","GLShaderParameter"];
openfl_display_GLShaderParameter.prototype = {
	__init: function() {
		var _g = this.type;
		switch(_g) {
		case "bool":
			this.internalType = 1;
			this.size = 1;
			if(this.internalType == 4) {
				throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
			}
			this.value = [0.0];
			break;
		case "float":
			this.internalType = 2;
			this.size = 1;
			if(this.internalType == 4) {
				throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
			}
			this.value = [0.0];
			break;
		case "int":
			this.internalType = 1;
			this.size = 1;
			if(this.internalType == 4) {
				throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
			}
			this.value = [0.0];
			break;
		case "sampler2D":case "samplerCube":
			var v = _g;
			if(v.indexOf("vec") > -1) {
				if(StringTools.startsWith(this.type,"b") || StringTools.startsWith(this.type,"i")) {
					this.internalType = 1;
				} else {
					this.internalType = 2;
				}
				var s = Std.parseInt(this.type.charAt(this.type.length - 1));
				this.size = s;
				var _g1 = [];
				var _g2 = 0;
				var _g11 = this.size;
				while(_g2 < _g11) {
					var i = _g2++;
					_g1.push(0.0);
				}
				if(this.internalType == 4) {
					throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
				}
				this.value = _g1;
			} else {
				var m = _g;
				if(m.indexOf("mat") > -1) {
					this.internalType = 3;
					var s1 = Std.parseInt(this.type.charAt(this.type.length - 1));
					this.size = s1;
					var v1;
					var _g3 = this.size;
					switch(_g3) {
					case 2:
						v1 = [1,0,1,0];
						break;
					case 3:
						v1 = [1,0,0,0,1,0,0,0,1];
						break;
					case 4:
						v1 = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];
						break;
					default:
						v1 = [0];
					}
					if(this.internalType == 4) {
						throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
					}
					this.value = v1;
				} else {
					this.internalType = 4;
					this.size = 0;
				}
			}
			break;
		default:
			var v2 = _g;
			if(v2.indexOf("vec") > -1) {
				if(StringTools.startsWith(this.type,"b") || StringTools.startsWith(this.type,"i")) {
					this.internalType = 1;
				} else {
					this.internalType = 2;
				}
				var s2 = Std.parseInt(this.type.charAt(this.type.length - 1));
				this.size = s2;
				var _g4 = [];
				var _g21 = 0;
				var _g12 = this.size;
				while(_g21 < _g12) {
					var i1 = _g21++;
					_g4.push(0.0);
				}
				if(this.internalType == 4) {
					throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
				}
				this.value = _g4;
			} else {
				var m1 = _g;
				if(m1.indexOf("mat") > -1) {
					this.internalType = 3;
					var s3 = Std.parseInt(this.type.charAt(this.type.length - 1));
					this.size = s3;
					var v3;
					var _g5 = this.size;
					switch(_g5) {
					case 2:
						v3 = [1,0,1,0];
						break;
					case 3:
						v3 = [1,0,0,0,1,0,0,0,1];
						break;
					case 4:
						v3 = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];
						break;
					default:
						v3 = [0];
					}
					if(this.internalType == 4) {
						throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
					}
					this.value = v3;
				} else {
					this.internalType = 0;
					haxe_Log.trace("Can't initialize value for type " + this.type,{ fileName : "Shader.hx", lineNumber : 307, className : "openfl.display.GLShaderParameter", methodName : "__init"});
				}
			}
		}
	}
	,set_value: function(v) {
		if(this.internalType == 4) {
			throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
		}
		return this.value = v;
	}
	,set_bitmap: function(v) {
		if(this.internalType != 4) {
			throw new js__$Boot_HaxeError("This parameter doesn't accept a bitmap, use value instead");
		}
		return this.bitmap = v;
	}
	,__class__: openfl_display_GLShaderParameter
	,__properties__: {set_bitmap:"set_bitmap",set_value:"set_value"}
};
var openfl_display_Shape = function() {
	openfl_display_DisplayObject.call(this);
};
$hxClasses["openfl.display.Shape"] = openfl_display_Shape;
openfl_display_Shape.__name__ = ["openfl","display","Shape"];
openfl_display_Shape.__super__ = openfl_display_DisplayObject;
openfl_display_Shape.prototype = $extend(openfl_display_DisplayObject.prototype,{
	get_graphics: function() {
		if(this.__graphics == null) {
			this.__graphics = new openfl_display_Graphics();
			this.__graphics.__owner = this;
		}
		return this.__graphics;
	}
	,__class__: openfl_display_Shape
	,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{get_graphics:"get_graphics"})
});
var openfl_display__$SpreadMethod_SpreadMethod_$Impl_$ = {};
$hxClasses["openfl.display._SpreadMethod.SpreadMethod_Impl_"] = openfl_display__$SpreadMethod_SpreadMethod_$Impl_$;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.__name__ = ["openfl","display","_SpreadMethod","SpreadMethod_Impl_"];
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.fromString = function(value) {
	switch(value) {
	case "pad":
		return 0;
	case "reflect":
		return 1;
	case "repeat":
		return 2;
	default:
		return null;
	}
};
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "pad";
	case 1:
		return "reflect";
	case 2:
		return "repeat";
	default:
		return null;
	}
};
var openfl_display_Stage = function(window,color) {
	openfl_display_DisplayObjectContainer.call(this);
	this.application = window.application;
	this.window = window;
	if(color == null) {
		this.__transparent = true;
		this.set_color(0);
	} else {
		this.set_color(color);
	}
	this.set_name(null);
	this.__deltaTime = 0;
	this.__displayState = 2;
	this.__mouseX = 0;
	this.__mouseY = 0;
	this.__lastClickTime = 0;
	this.stageWidth = window.__width * window.__scale | 0;
	this.stageHeight = window.__height * window.__scale | 0;
	this.stage = this;
	this.align = 6;
	this.allowsFullScreen = false;
	this.allowsFullScreenInteractive = false;
	this.quality = 1;
	this.scaleMode = 2;
	this.stageFocusRect = true;
	this.__macKeyboard = /AppleWebKit/.test (navigator.userAgent) && /Mobile\/\w+/.test (navigator.userAgent) || /Mac/.test (navigator.platform);
	this.__clearBeforeRender = true;
	this.__stack = [];
	this.__mouseOutStack = [];
	var this1 = new openfl_VectorData();
	var this2 = new Array(0);
	this1.data = this2;
	this1.length = 0;
	this1.fixed = false;
	this.stage3Ds = this1;
	var this3 = this.stage3Ds;
	var x = new openfl_display_Stage3D();
	if(!this3.fixed) {
		this3.length++;
		if(this3.data.length < this3.length) {
			var length = this3.data.length + 10;
			var this4 = new Array(length);
			var data = this4;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data,0,this3.data.length);
			this3.data = data;
		}
		this3.data[this3.length - 1] = x;
	}
	if(openfl_Lib.current.stage == null) {
		this.stage.addChild(openfl_Lib.current);
	}
};
$hxClasses["openfl.display.Stage"] = openfl_display_Stage;
openfl_display_Stage.__name__ = ["openfl","display","Stage"];
openfl_display_Stage.__interfaces__ = [lime_app_IModule];
openfl_display_Stage.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Stage.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
	globalToLocal: function(pos) {
		return pos.clone();
	}
	,invalidate: function() {
		this.__invalidated = true;
	}
	,localToGlobal: function(pos) {
		return pos.clone();
	}
	,onGamepadAxisMove: function(gamepad,axis,value) {
		openfl_ui_GameInput.__onGamepadAxisMove(gamepad,axis,value);
	}
	,onGamepadButtonDown: function(gamepad,button) {
		openfl_ui_GameInput.__onGamepadButtonDown(gamepad,button);
	}
	,onGamepadButtonUp: function(gamepad,button) {
		openfl_ui_GameInput.__onGamepadButtonUp(gamepad,button);
	}
	,onGamepadConnect: function(gamepad) {
		openfl_ui_GameInput.__onGamepadConnect(gamepad);
	}
	,onGamepadDisconnect: function(gamepad) {
		openfl_ui_GameInput.__onGamepadDisconnect(gamepad);
	}
	,onJoystickAxisMove: function(joystick,axis,value) {
	}
	,onJoystickButtonDown: function(joystick,button) {
	}
	,onJoystickButtonUp: function(joystick,button) {
	}
	,onJoystickConnect: function(joystick) {
	}
	,onJoystickDisconnect: function(joystick) {
	}
	,onJoystickHatMove: function(joystick,hat,position) {
	}
	,onJoystickTrackballMove: function(joystick,trackball,value) {
	}
	,onKeyDown: function(window,keyCode,modifier) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onKey("keyDown",keyCode,modifier);
	}
	,onKeyUp: function(window,keyCode,modifier) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onKey("keyUp",keyCode,modifier);
	}
	,onModuleExit: function(code) {
		if(this.window != null) {
			var event = new openfl_events_Event("deactivate");
			this.__broadcast(event,true);
		}
	}
	,onMouseDown: function(window,x,y,button) {
		if(this.window == null || this.window != window) {
			return;
		}
		var type;
		switch(button) {
		case 1:
			type = "middleMouseDown";
			break;
		case 2:
			type = "rightMouseDown";
			break;
		default:
			type = "mouseDown";
		}
		this.__onMouse(type,x * window.__scale | 0,y * window.__scale | 0,button);
	}
	,onMouseMove: function(window,x,y) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onMouse("mouseMove",x * window.__scale | 0,y * window.__scale | 0,0);
	}
	,onMouseMoveRelative: function(window,x,y) {
	}
	,onMouseUp: function(window,x,y,button) {
		if(this.window == null || this.window != window) {
			return;
		}
		var type;
		switch(button) {
		case 1:
			type = "middleMouseUp";
			break;
		case 2:
			type = "rightMouseUp";
			break;
		default:
			type = "mouseUp";
		}
		this.__onMouse(type,x * window.__scale | 0,y * window.__scale | 0,button);
	}
	,onMouseWheel: function(window,deltaX,deltaY) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onMouseWheel(deltaX * window.__scale | 0,deltaY * window.__scale | 0);
	}
	,onPreloadComplete: function() {
	}
	,onPreloadProgress: function(loaded,total) {
	}
	,onRenderContextLost: function(renderer) {
	}
	,onRenderContextRestored: function(renderer,context) {
	}
	,onTextEdit: function(window,text,start,length) {
	}
	,onTextInput: function(window,text) {
		if(this.window == null || this.window != window) {
			return;
		}
		var stack = [];
		if(this.__focus == null) {
			this.__getInteractive(stack);
		} else {
			this.__focus.__getInteractive(stack);
		}
		var event = new openfl_events_TextEvent("textInput",true,false,text);
		if(stack.length > 0) {
			stack.reverse();
			this.__fireEvent(event,stack);
		} else {
			this.__broadcast(event,true);
		}
	}
	,onTouchMove: function(touch) {
		this.__onTouch("touchMove",touch);
	}
	,onTouchEnd: function(touch) {
		this.__onTouch("touchEnd",touch);
	}
	,onTouchStart: function(touch) {
		this.__onTouch("touchBegin",touch);
	}
	,onWindowActivate: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		var event = new openfl_events_Event("activate");
		this.__broadcast(event,true);
	}
	,onWindowClose: function(window) {
		if(this.window == window) {
			this.window = null;
		}
	}
	,onWindowCreate: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		if(window.renderer != null) {
			var _g = window.renderer.context;
			switch(_g[1]) {
			case 0:
				var gl = _g[2];
				break;
			case 1:
				var context = _g[2];
				this.__renderer = new openfl__$internal_renderer_canvas_CanvasRenderer(this.stageWidth,this.stageHeight,context);
				break;
			case 2:
				var element = _g[2];
				break;
			case 4:
				var cairo = _g[2];
				break;
			case 5:
				var ctx = _g[2];
				break;
			default:
			}
		}
	}
	,onWindowDeactivate: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		var event = new openfl_events_Event("deactivate");
		this.__broadcast(event,true);
	}
	,onWindowDropFile: function(window,file) {
	}
	,onWindowEnter: function(window) {
	}
	,onWindowFocusIn: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		var event = new openfl_events_FocusEvent("focusIn",true,false,null,false,0);
		this.__broadcast(event,true);
	}
	,onWindowFocusOut: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		var event = new openfl_events_FocusEvent("focusOut",true,false,null,false,0);
		this.__broadcast(event,true);
	}
	,onWindowFullscreen: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		if(this.__displayState == 2) {
			this.__displayState = 1;
		}
	}
	,onWindowLeave: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__dispatchEvent(new openfl_events_Event("mouseLeave"));
	}
	,onWindowMinimize: function(window) {
	}
	,onWindowMove: function(window,x,y) {
	}
	,onWindowResize: function(window,width,height) {
		if(this.window == null || this.window != window) {
			return;
		}
		if(this.__displayState != 2 && !window.__fullscreen) {
			this.__displayState = 2;
		}
		this.stageWidth = width * window.__scale | 0;
		this.stageHeight = height * window.__scale | 0;
		if(this.__renderer != null) {
			this.__renderer.resize(this.stageWidth,this.stageHeight);
		}
		var event = new openfl_events_Event("resize");
		this.__broadcast(event,false);
	}
	,onWindowRestore: function(window) {
	}
	,render: function(renderer) {
		if(renderer.window == null || renderer.window != this.window) {
			return;
		}
		if(this.application != null && this.application.windows.length > 0) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		if(this.__rendering) {
			return;
		}
		this.__rendering = true;
		this.__broadcast(new openfl_events_Event("enterFrame"),true);
		if(this.__invalidated) {
			this.__invalidated = false;
			this.__broadcast(new openfl_events_Event("render"),true);
		}
		this.__renderable = true;
		this.__enterFrame(this.__deltaTime);
		this.__deltaTime = 0;
		this.__update(false,true);
		if(this.__renderer != null) {
			var _g = renderer.context;
			if(_g[1] == 4) {
				var cairo = _g[2];
				(js_Boot.__cast(this.__renderer , openfl__$internal_renderer_cairo_CairoRenderer)).cairo = cairo;
				this.__renderer.renderSession.cairo = cairo;
			}
			this.__renderer.render(this);
		}
		this.__rendering = false;
	}
	,update: function(deltaTime) {
		this.__deltaTime = deltaTime;
	}
	,__drag: function(mouse) {
		var parent = this.__dragObject.parent;
		if(parent != null) {
			mouse = parent.globalToLocal(mouse);
		}
		var x = mouse.x + this.__dragOffsetX;
		var y = mouse.y + this.__dragOffsetY;
		if(this.__dragBounds != null) {
			if(x < this.__dragBounds.x) {
				x = this.__dragBounds.x;
			} else if(x > this.__dragBounds.get_right()) {
				x = this.__dragBounds.get_right();
			}
			if(y < this.__dragBounds.y) {
				y = this.__dragBounds.y;
			} else if(y > this.__dragBounds.get_bottom()) {
				y = this.__dragBounds.get_bottom();
			}
		}
		this.__dragObject.set_x(x);
		this.__dragObject.set_y(y);
	}
	,__fireEvent: function(event,stack) {
		var length = stack.length;
		if(length == 0) {
			event.eventPhase = 2;
			event.target.__broadcast(event,false);
		} else {
			event.eventPhase = 1;
			event.target = stack[stack.length - 1];
			var _g1 = 0;
			var _g = length - 1;
			while(_g1 < _g) {
				var i = _g1++;
				stack[i].__broadcast(event,false);
				if(event.__isCanceled) {
					return;
				}
			}
			event.eventPhase = 2;
			event.target.__broadcast(event,false);
			if(event.__isCanceled) {
				return;
			}
			if(event.bubbles) {
				event.eventPhase = 3;
				var i1 = length - 2;
				while(i1 >= 0) {
					stack[i1].__broadcast(event,false);
					if(event.__isCanceled) {
						return;
					}
					--i1;
				}
			}
		}
	}
	,__getInteractive: function(stack) {
		if(stack != null) {
			stack.push(this);
		}
		return true;
	}
	,__onKey: function(type,keyCode,modifier) {
		openfl_events_MouseEvent.__altKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(modifier);
		openfl_events_MouseEvent.__commandKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier);
		openfl_events_MouseEvent.__ctrlKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier);
		openfl_events_MouseEvent.__shiftKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier);
		var stack = [];
		if(this.__focus == null) {
			this.__getInteractive(stack);
		} else {
			this.__focus.__getInteractive(stack);
		}
		if(stack.length > 0) {
			var keyLocation;
			switch(keyCode) {
			case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:
				keyLocation = 3;
				break;
			case 1073742048:case 1073742049:case 1073742050:case 1073742051:
				keyLocation = 1;
				break;
			case 1073742052:case 1073742053:case 1073742054:case 1073742055:
				keyLocation = 2;
				break;
			default:
				keyLocation = 0;
			}
			var keyCode1;
			switch(keyCode) {
			case 8:
				keyCode1 = 8;
				break;
			case 9:
				keyCode1 = 9;
				break;
			case 13:
				keyCode1 = 13;
				break;
			case 27:
				keyCode1 = 27;
				break;
			case 32:
				keyCode1 = 32;
				break;
			case 33:
				keyCode1 = 49;
				break;
			case 34:
				keyCode1 = 222;
				break;
			case 35:
				keyCode1 = 51;
				break;
			case 36:
				keyCode1 = 52;
				break;
			case 37:
				keyCode1 = 53;
				break;
			case 38:
				keyCode1 = 55;
				break;
			case 39:
				keyCode1 = 222;
				break;
			case 40:
				keyCode1 = 57;
				break;
			case 41:
				keyCode1 = 48;
				break;
			case 42:
				keyCode1 = 56;
				break;
			case 44:
				keyCode1 = 188;
				break;
			case 45:
				keyCode1 = 189;
				break;
			case 46:
				keyCode1 = 190;
				break;
			case 47:
				keyCode1 = 191;
				break;
			case 48:
				keyCode1 = 48;
				break;
			case 49:
				keyCode1 = 49;
				break;
			case 50:
				keyCode1 = 50;
				break;
			case 51:
				keyCode1 = 51;
				break;
			case 52:
				keyCode1 = 52;
				break;
			case 53:
				keyCode1 = 53;
				break;
			case 54:
				keyCode1 = 54;
				break;
			case 55:
				keyCode1 = 55;
				break;
			case 56:
				keyCode1 = 56;
				break;
			case 57:
				keyCode1 = 57;
				break;
			case 58:
				keyCode1 = 186;
				break;
			case 59:
				keyCode1 = 186;
				break;
			case 60:
				keyCode1 = 60;
				break;
			case 61:
				keyCode1 = 187;
				break;
			case 62:
				keyCode1 = 190;
				break;
			case 63:
				keyCode1 = 191;
				break;
			case 64:
				keyCode1 = 50;
				break;
			case 91:
				keyCode1 = 219;
				break;
			case 92:
				keyCode1 = 220;
				break;
			case 93:
				keyCode1 = 221;
				break;
			case 94:
				keyCode1 = 54;
				break;
			case 95:
				keyCode1 = 189;
				break;
			case 96:
				keyCode1 = 192;
				break;
			case 97:
				keyCode1 = 65;
				break;
			case 98:
				keyCode1 = 66;
				break;
			case 99:
				keyCode1 = 67;
				break;
			case 100:
				keyCode1 = 68;
				break;
			case 101:
				keyCode1 = 69;
				break;
			case 102:
				keyCode1 = 70;
				break;
			case 103:
				keyCode1 = 71;
				break;
			case 104:
				keyCode1 = 72;
				break;
			case 105:
				keyCode1 = 73;
				break;
			case 106:
				keyCode1 = 74;
				break;
			case 107:
				keyCode1 = 75;
				break;
			case 108:
				keyCode1 = 76;
				break;
			case 109:
				keyCode1 = 77;
				break;
			case 110:
				keyCode1 = 78;
				break;
			case 111:
				keyCode1 = 79;
				break;
			case 112:
				keyCode1 = 80;
				break;
			case 113:
				keyCode1 = 81;
				break;
			case 114:
				keyCode1 = 82;
				break;
			case 115:
				keyCode1 = 83;
				break;
			case 116:
				keyCode1 = 84;
				break;
			case 117:
				keyCode1 = 85;
				break;
			case 118:
				keyCode1 = 86;
				break;
			case 119:
				keyCode1 = 87;
				break;
			case 120:
				keyCode1 = 88;
				break;
			case 121:
				keyCode1 = 89;
				break;
			case 122:
				keyCode1 = 90;
				break;
			case 127:
				keyCode1 = 46;
				break;
			case 1073741881:
				keyCode1 = 20;
				break;
			case 1073741882:
				keyCode1 = 112;
				break;
			case 1073741883:
				keyCode1 = 113;
				break;
			case 1073741884:
				keyCode1 = 114;
				break;
			case 1073741885:
				keyCode1 = 115;
				break;
			case 1073741886:
				keyCode1 = 116;
				break;
			case 1073741887:
				keyCode1 = 117;
				break;
			case 1073741888:
				keyCode1 = 118;
				break;
			case 1073741889:
				keyCode1 = 119;
				break;
			case 1073741890:
				keyCode1 = 120;
				break;
			case 1073741891:
				keyCode1 = 121;
				break;
			case 1073741892:
				keyCode1 = 122;
				break;
			case 1073741893:
				keyCode1 = 123;
				break;
			case 1073741894:
				keyCode1 = 301;
				break;
			case 1073741895:
				keyCode1 = 145;
				break;
			case 1073741896:
				keyCode1 = 19;
				break;
			case 1073741897:
				keyCode1 = 45;
				break;
			case 1073741898:
				keyCode1 = 36;
				break;
			case 1073741899:
				keyCode1 = 33;
				break;
			case 1073741901:
				keyCode1 = 35;
				break;
			case 1073741902:
				keyCode1 = 34;
				break;
			case 1073741903:
				keyCode1 = 39;
				break;
			case 1073741904:
				keyCode1 = 37;
				break;
			case 1073741905:
				keyCode1 = 40;
				break;
			case 1073741906:
				keyCode1 = 38;
				break;
			case 1073741907:
				keyCode1 = 144;
				break;
			case 1073741908:
				keyCode1 = 111;
				break;
			case 1073741909:
				keyCode1 = 106;
				break;
			case 1073741910:
				keyCode1 = 109;
				break;
			case 1073741911:
				keyCode1 = 107;
				break;
			case 1073741912:
				keyCode1 = 108;
				break;
			case 1073741913:
				keyCode1 = 97;
				break;
			case 1073741914:
				keyCode1 = 98;
				break;
			case 1073741915:
				keyCode1 = 99;
				break;
			case 1073741916:
				keyCode1 = 100;
				break;
			case 1073741917:
				keyCode1 = 101;
				break;
			case 1073741918:
				keyCode1 = 102;
				break;
			case 1073741919:
				keyCode1 = 103;
				break;
			case 1073741920:
				keyCode1 = 104;
				break;
			case 1073741921:
				keyCode1 = 105;
				break;
			case 1073741922:
				keyCode1 = 96;
				break;
			case 1073741923:
				keyCode1 = 110;
				break;
			case 1073741925:
				keyCode1 = 302;
				break;
			case 1073741928:
				keyCode1 = 124;
				break;
			case 1073741929:
				keyCode1 = 125;
				break;
			case 1073741930:
				keyCode1 = 126;
				break;
			case 1073741982:
				keyCode1 = 13;
				break;
			case 1073742044:
				keyCode1 = 110;
				break;
			case 1073742048:
				keyCode1 = 17;
				break;
			case 1073742049:
				keyCode1 = 16;
				break;
			case 1073742050:
				keyCode1 = 18;
				break;
			case 1073742051:
				keyCode1 = 15;
				break;
			case 1073742052:
				keyCode1 = 17;
				break;
			case 1073742053:
				keyCode1 = 16;
				break;
			case 1073742054:
				keyCode1 = 18;
				break;
			case 1073742055:
				keyCode1 = 15;
				break;
			default:
				keyCode1 = keyCode;
			}
			var charCode = openfl_ui_Keyboard.__getCharCode(keyCode1,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier));
			var event = new openfl_events_KeyboardEvent(type,true,false,charCode,keyCode1,keyLocation,this.__macKeyboard ? lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier) || lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier) : lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier));
			stack.reverse();
			this.__fireEvent(event,stack);
			if(event.__isCanceled) {
				if(type == "keyDown") {
					this.window.onKeyDown.cancel();
				} else {
					this.window.onKeyUp.cancel();
				}
			}
		}
	}
	,__onMouse: function(type,x,y,button) {
		if(button > 2) {
			return;
		}
		this.__mouseX = x;
		this.__mouseY = y;
		var stack = [];
		var target = null;
		var targetPoint = new openfl_geom_Point(x,y);
		if(this.__hitTest(x,y,true,stack,true,this)) {
			target = stack[stack.length - 1];
		} else {
			target = this;
			stack = [this];
		}
		if(target == null) {
			target = this;
		}
		var clickType = null;
		switch(type) {
		case "middleMouseDown":
			this.__mouseDownMiddle = target;
			break;
		case "middleMouseUp":
			if(this.__mouseDownMiddle == target) {
				clickType = "middleClick";
			}
			this.__mouseDownMiddle = null;
			break;
		case "mouseDown":
			if(target.get_tabEnabled()) {
				this.set_focus(target);
			} else {
				this.set_focus(null);
			}
			this.__mouseDownLeft = target;
			break;
		case "mouseUp":
			if(this.__mouseDownLeft == target) {
				clickType = "click";
			}
			this.__mouseDownLeft = null;
			break;
		case "rightMouseDown":
			this.__mouseDownRight = target;
			break;
		case "rightMouseUp":
			if(this.__mouseDownRight == target) {
				clickType = "rightClick";
			}
			this.__mouseDownRight = null;
			break;
		default:
		}
		this.__fireEvent(openfl_events_MouseEvent.__create(type,button,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target),stack);
		if(clickType != null) {
			this.__fireEvent(openfl_events_MouseEvent.__create(clickType,button,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target),stack);
			if(type == "mouseUp" && (js_Boot.__cast(target , openfl_display_InteractiveObject)).doubleClickEnabled) {
				var currentTime = openfl_Lib.getTimer();
				if(currentTime - this.__lastClickTime < 500) {
					this.__fireEvent(openfl_events_MouseEvent.__create("doubleClick",button,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target),stack);
					this.__lastClickTime = 0;
				} else {
					this.__lastClickTime = currentTime;
				}
			}
		}
		var cursor = null;
		var _g = 0;
		while(_g < stack.length) {
			var target1 = stack[_g];
			++_g;
			cursor = target1.__getCursor();
			if(cursor != null) {
				lime_ui_Mouse.set_cursor(cursor);
				break;
			}
		}
		if(cursor == null) {
			lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.ARROW);
		}
		var event;
		var localPoint;
		var _g1 = 0;
		var _g11 = this.__mouseOutStack;
		while(_g1 < _g11.length) {
			var target2 = _g11[_g1];
			++_g1;
			if(stack.indexOf(target2) == -1) {
				HxOverrides.remove(this.__mouseOutStack,target2);
				localPoint = target2.globalToLocal(targetPoint);
				event = openfl_events_MouseEvent.__create("mouseOut",button,this.__mouseX,this.__mouseY,localPoint,target2);
				event.bubbles = false;
				target2.__dispatchEvent(event);
			}
		}
		var _g2 = 0;
		while(_g2 < stack.length) {
			var target3 = stack[_g2];
			++_g2;
			if(this.__mouseOutStack.indexOf(target3) == -1) {
				if(target3.hasEventListener("mouseOver")) {
					localPoint = target3.globalToLocal(targetPoint);
					event = openfl_events_MouseEvent.__create("mouseOver",button,this.__mouseX,this.__mouseY,localPoint,target3);
					event.bubbles = false;
					target3.__dispatchEvent(event);
				}
				if(target3.hasEventListener("mouseOut")) {
					this.__mouseOutStack.push(target3);
				}
			}
		}
		if(this.__dragObject != null) {
			this.__drag(targetPoint);
		}
	}
	,__onMouseWheel: function(deltaX,deltaY) {
		var x = this.__mouseX;
		var y = this.__mouseY;
		var stack = [];
		if(!this.__hitTest(x,y,false,stack,true,this)) {
			stack = [this];
		}
		var target = stack[stack.length - 1];
		var targetPoint = new openfl_geom_Point(x,y);
		var delta = deltaY | 0;
		this.__fireEvent(openfl_events_MouseEvent.__create("mouseWheel",0,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target,delta),stack);
	}
	,__onTouch: function(type,touch) {
		var point = new openfl_geom_Point(touch.x * this.stageWidth,touch.y * this.stageHeight);
		this.__mouseX = point.x;
		this.__mouseY = point.y;
		var __stack = [];
		if(this.__hitTest(this.__mouseX,this.__mouseY,false,__stack,true,this)) {
			var target = __stack[__stack.length - 1];
			if(target == null) {
				target = this;
			}
			var localPoint = target.globalToLocal(point);
			var touchEvent = openfl_events_TouchEvent.__create(type,null,this.__mouseX,this.__mouseY,localPoint,target);
			touchEvent.touchPointID = touch.id;
			touchEvent.isPrimaryTouchPoint = true;
			this.__fireEvent(touchEvent,__stack);
		} else {
			var touchEvent1 = openfl_events_TouchEvent.__create(type,null,this.__mouseX,this.__mouseY,point,this);
			touchEvent1.touchPointID = touch.id;
			touchEvent1.isPrimaryTouchPoint = true;
			this.__fireEvent(touchEvent1,[this.stage]);
		}
	}
	,__resize: function() {
	}
	,__startDrag: function(sprite,lockCenter,bounds) {
		this.__dragBounds = bounds == null ? null : bounds.clone();
		this.__dragObject = sprite;
		if(this.__dragObject != null) {
			if(lockCenter) {
				this.__dragOffsetX = -this.__dragObject.get_width() / 2;
				this.__dragOffsetY = -this.__dragObject.get_height() / 2;
			} else {
				var mouse = new openfl_geom_Point(this.get_mouseX(),this.get_mouseY());
				var parent = this.__dragObject.parent;
				if(parent != null) {
					mouse = parent.globalToLocal(mouse);
				}
				this.__dragOffsetX = this.__dragObject.get_x() - mouse.x;
				this.__dragOffsetY = this.__dragObject.get_y() - mouse.y;
			}
		}
	}
	,__stopDrag: function(sprite) {
		this.__dragBounds = null;
		this.__dragObject = null;
	}
	,__update: function(transformOnly,updateChildren,maskGrahpics) {
		if(transformOnly) {
			if(openfl_display_DisplayObject.__worldTransformDirty > 0) {
				openfl_display_DisplayObjectContainer.prototype.__update.call(this,true,updateChildren,maskGrahpics);
				if(updateChildren) {
					openfl_display_DisplayObject.__worldTransformDirty = 0;
					this.__dirty = true;
				}
			}
		} else if(openfl_display_DisplayObject.__worldTransformDirty > 0 || this.__dirty || openfl_display_DisplayObject.__worldRenderDirty > 0) {
			openfl_display_DisplayObjectContainer.prototype.__update.call(this,false,updateChildren,maskGrahpics);
			if(updateChildren) {
				openfl_display_DisplayObject.__worldTransformDirty = 0;
				openfl_display_DisplayObject.__worldRenderDirty = 0;
				this.__dirty = false;
			}
		}
	}
	,get_mouseX: function() {
		return this.__mouseX;
	}
	,get_mouseY: function() {
		return this.__mouseY;
	}
	,canvas_onContextLost: function(event) {
	}
	,canvas_onContextRestored: function(event) {
	}
	,get_color: function() {
		return this.__color;
	}
	,set_color: function(value) {
		var r = (value & 16711680) >>> 16;
		var g = (value & 65280) >>> 8;
		var b = value & 255;
		this.__colorSplit = [r / 255,g / 255,b / 255];
		this.__colorString = "#" + StringTools.hex(value,6);
		return this.__color = value;
	}
	,get_displayState: function() {
		return this.__displayState;
	}
	,set_displayState: function(value) {
		if(this.window != null) {
			if(value == 2) {
				if(this.window.__fullscreen) {
					this.window.set_fullscreen(false);
					this.stageWidth = this.window.__width * this.window.__scale | 0;
					this.stageHeight = this.window.__height * this.window.__scale | 0;
					this.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true));
				}
			} else if(!this.window.__fullscreen) {
				this.window.set_fullscreen(true);
				this.stageWidth = this.window.__width * this.window.__scale | 0;
				this.stageHeight = this.window.__height * this.window.__scale | 0;
				this.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true));
			}
		}
		return this.__displayState = value;
	}
	,get_focus: function() {
		return this.__focus;
	}
	,set_focus: function(value) {
		if(value != this.__focus) {
			var oldFocus = this.__focus;
			this.__focus = value;
			if(oldFocus != null) {
				var event = new openfl_events_FocusEvent("focusOut",true,false,this.__focus,false,0);
				this.__stack = [];
				oldFocus.__getInteractive(this.__stack);
				this.__stack.reverse();
				this.__fireEvent(event,this.__stack);
			}
			if(this.__focus != null) {
				var event1 = new openfl_events_FocusEvent("focusIn",true,false,oldFocus,false,0);
				this.__stack = [];
				value.__getInteractive(this.__stack);
				this.__stack.reverse();
				this.__fireEvent(event1,this.__stack);
			}
		}
		return this.__focus;
	}
	,get_frameRate: function() {
		if(this.application != null) {
			return this.application.backend.getFrameRate();
		}
		return 0;
	}
	,set_frameRate: function(value) {
		if(this.application != null) {
			return this.application.backend.setFrameRate(value);
		}
		return value;
	}
	,__class__: openfl_display_Stage
	,__properties__: $extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",set_color:"set_color",get_color:"get_color"})
});
var openfl_display_Stage3D = function() {
	openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.display.Stage3D"] = openfl_display_Stage3D;
openfl_display_Stage3D.__name__ = ["openfl","display","Stage3D"];
openfl_display_Stage3D.__super__ = openfl_events_EventDispatcher;
openfl_display_Stage3D.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	requestContext3D: function(context3DRenderMode) {
		if(context3DRenderMode == null) {
			context3DRenderMode = "";
		}
		var _gthis = this;
		if(openfl_display_OpenGLView.get_isSupported()) {
			haxe_Timer.delay(function() {
				_gthis.context3D = new openfl_display3D_Context3D();
				_gthis.dispatchEvent(new openfl_events_Event("context3DCreate"));
			},1);
		} else {
			haxe_Timer.delay(function() {
				_gthis.dispatchEvent(new openfl_events_ErrorEvent("error"));
			},1);
		}
	}
	,__class__: openfl_display_Stage3D
});
var openfl_display__$StageAlign_StageAlign_$Impl_$ = {};
$hxClasses["openfl.display._StageAlign.StageAlign_Impl_"] = openfl_display__$StageAlign_StageAlign_$Impl_$;
openfl_display__$StageAlign_StageAlign_$Impl_$.__name__ = ["openfl","display","_StageAlign","StageAlign_Impl_"];
openfl_display__$StageAlign_StageAlign_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bottom":
		return 0;
	case "bottomLeft":
		return 1;
	case "bottomRight":
		return 2;
	case "left":
		return 3;
	case "right":
		return 4;
	case "top":
		return 5;
	case "topLeft":
		return 6;
	case "topRight":
		return 7;
	default:
		return null;
	}
};
openfl_display__$StageAlign_StageAlign_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bottom";
	case 1:
		return "bottomLeft";
	case 2:
		return "bottomRight";
	case 3:
		return "left";
	case 4:
		return "right";
	case 5:
		return "top";
	case 6:
		return "topLeft";
	case 7:
		return "topRight";
	default:
		return null;
	}
};
var openfl_display__$StageDisplayState_StageDisplayState_$Impl_$ = {};
$hxClasses["openfl.display._StageDisplayState.StageDisplayState_Impl_"] = openfl_display__$StageDisplayState_StageDisplayState_$Impl_$;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.__name__ = ["openfl","display","_StageDisplayState","StageDisplayState_Impl_"];
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.fromString = function(value) {
	switch(value) {
	case "fullScreen":
		return 0;
	case "fullScreenInteractive":
		return 1;
	case "normal":
		return 2;
	default:
		return null;
	}
};
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "fullScreen";
	case 1:
		return "fullScreenInteractive";
	case 2:
		return "normal";
	default:
		return null;
	}
};
var openfl_display__$StageQuality_StageQuality_$Impl_$ = {};
$hxClasses["openfl.display._StageQuality.StageQuality_Impl_"] = openfl_display__$StageQuality_StageQuality_$Impl_$;
openfl_display__$StageQuality_StageQuality_$Impl_$.__name__ = ["openfl","display","_StageQuality","StageQuality_Impl_"];
openfl_display__$StageQuality_StageQuality_$Impl_$.fromString = function(value) {
	switch(value) {
	case "best":
		return 0;
	case "high":
		return 1;
	case "low":
		return 2;
	case "medium":
		return 3;
	default:
		return null;
	}
};
openfl_display__$StageQuality_StageQuality_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "best";
	case 1:
		return "high";
	case 2:
		return "low";
	case 3:
		return "medium";
	default:
		return null;
	}
};
var openfl_display__$StageScaleMode_StageScaleMode_$Impl_$ = {};
$hxClasses["openfl.display._StageScaleMode.StageScaleMode_Impl_"] = openfl_display__$StageScaleMode_StageScaleMode_$Impl_$;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.__name__ = ["openfl","display","_StageScaleMode","StageScaleMode_Impl_"];
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "exactFit":
		return 0;
	case "noBorder":
		return 1;
	case "noScale":
		return 2;
	case "showAll":
		return 3;
	default:
		return null;
	}
};
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "exactFit";
	case 1:
		return "noBorder";
	case 2:
		return "noScale";
	case 3:
		return "showAll";
	default:
		return null;
	}
};
var openfl_display__$TriangleCulling_TriangleCulling_$Impl_$ = {};
$hxClasses["openfl.display._TriangleCulling.TriangleCulling_Impl_"] = openfl_display__$TriangleCulling_TriangleCulling_$Impl_$;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.__name__ = ["openfl","display","_TriangleCulling","TriangleCulling_Impl_"];
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.fromString = function(value) {
	switch(value) {
	case "negative":
		return 0;
	case "none":
		return 1;
	case "positive":
		return 2;
	default:
		return null;
	}
};
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "negative";
	case 1:
		return "none";
	case 2:
		return "positive";
	default:
		return null;
	}
};
var openfl_display_Window = function(config) {
	lime_ui_Window.call(this,config);
};
$hxClasses["openfl.display.Window"] = openfl_display_Window;
openfl_display_Window.__name__ = ["openfl","display","Window"];
openfl_display_Window.__super__ = lime_ui_Window;
openfl_display_Window.prototype = $extend(lime_ui_Window.prototype,{
	create: function(application) {
		lime_ui_Window.prototype.create.call(this,application);
		this.stage = new openfl_display_Stage(this,Object.prototype.hasOwnProperty.call(this.config,"background") ? this.config.background : 16777215);
		application.addModule(this.stage);
	}
	,__class__: openfl_display_Window
});
var openfl_display3D_Context3D = function() {
	this.disposed = false;
	var this1 = 519;
	this.stencilCompareMode = this1;
	this.stencilRef = 0;
	this.stencilReadMask = 255;
	this._yFlip = 1;
	this.vertexBuffersCreated = [];
	this.indexBuffersCreated = [];
	this.programsCreated = [];
	this.texturesCreated = [];
	this.samplerParameters = [];
	var _g1 = 0;
	var _g = openfl_display3D_Context3D.MAX_SAMPLERS;
	while(_g1 < _g) {
		var i = _g1++;
		this.samplerParameters[i] = new openfl_display3D__$Context3D_SamplerState();
		this.samplerParameters[i].wrap = openfl_display3D_Context3DWrapMode.CLAMP;
		this.samplerParameters[i].filter = openfl_display3D_Context3DTextureFilter.LINEAR;
		this.samplerParameters[i].mipfilter = openfl_display3D_Context3DMipFilter.MIPNONE;
	}
	var stage = openfl_Lib.current.stage;
	this.ogl = new openfl_display_OpenGLView();
	this.ogl.set_scrollRect(new openfl_geom_Rectangle(0,0,stage.stageWidth,stage.stageHeight));
	this.scrollRect = this.ogl.get_scrollRect().clone();
	this.ogl.set_width(stage.stageWidth);
	this.ogl.set_height(stage.stageHeight);
	stage.addChildAt(this.ogl,0);
	lime_graphics_opengl_GL.context.pixelStorei(37440,1);
	lime_graphics_opengl_GL.context.pixelStorei(37441,1);
};
$hxClasses["openfl.display3D.Context3D"] = openfl_display3D_Context3D;
openfl_display3D_Context3D.__name__ = ["openfl","display3D","Context3D"];
openfl_display3D_Context3D.prototype = {
	clear: function(red,green,blue,alpha,depth,stencil,mask) {
		if(mask == null) {
			mask = 17664;
		}
		if(stencil == null) {
			stencil = 0;
		}
		if(depth == null) {
			depth = 1;
		}
		if(alpha == null) {
			alpha = 1;
		}
		if(blue == null) {
			blue = 0;
		}
		if(green == null) {
			green = 0;
		}
		if(red == null) {
			red = 0;
		}
		if(!this.drawing) {
			this.__updateBlendStatus();
			this.drawing = true;
		}
		if(this.scissorRectangle != null) {
			lime_graphics_opengl_GL.context.disable(3089);
		}
		lime_graphics_opengl_GL.context.clearColor(red,green,blue,alpha);
		lime_graphics_opengl_GL.context.clearDepth(depth);
		lime_graphics_opengl_GL.context.clearStencil(stencil);
		lime_graphics_opengl_GL.context.clear(mask);
		if(this.scissorRectangle != null) {
			lime_graphics_opengl_GL.context.enable(3089);
		}
	}
	,configureBackBuffer: function(width,height,antiAlias,enableDepthAndStencil) {
		if(enableDepthAndStencil == null) {
			enableDepthAndStencil = true;
		}
		this.backBufferDepthAndStencil = enableDepthAndStencil;
		this.updateDepthAndStencilState();
		this.setBackBufferViewPort(null,null,width,height);
		this.updateScissorRectangle();
	}
	,setBackBufferViewPort: function(x,y,width,height) {
		if(x == null) {
			x = this.scrollRect.x | 0;
		}
		if(y == null) {
			y = this.scrollRect.y | 0;
		}
		if(width == null) {
			width = this.scrollRect.width | 0;
		}
		if(height == null) {
			height = this.scrollRect.height | 0;
		}
		this.scrollRect.x = x;
		this.scrollRect.y = y;
		this.scrollRect.width = width;
		this.scrollRect.height = height;
		this.ogl.set_width(x + width);
		this.ogl.set_height(y + height);
		this.updateBackBufferViewPort();
	}
	,updateBackBufferViewPort: function() {
		if(!this.renderToTexture) {
			lime_graphics_opengl_GL.context.viewport(this.scrollRect.x | 0,this.scrollRect.y | 0,this.scrollRect.width | 0,this.scrollRect.height | 0);
		}
	}
	,updateDepthAndStencilState: function() {
		var depthAndStencil = this.renderToTexture ? this.rttDepthAndStencil : this.backBufferDepthAndStencil;
		if(depthAndStencil) {
			if(lime_app_Application.current.windows[0].config.depthBuffer) {
				lime_graphics_opengl_GL.context.enable(2929);
			}
			if(lime_app_Application.current.windows[0].config.stencilBuffer) {
				lime_graphics_opengl_GL.context.enable(2960);
			}
		} else {
			lime_graphics_opengl_GL.context.disable(2929);
			lime_graphics_opengl_GL.context.disable(2960);
		}
	}
	,createCubeTexture: function(size,format,optimizeForRenderToTexture,streamingLevels) {
		if(streamingLevels == null) {
			streamingLevels = 0;
		}
		var texture = new openfl_display3D_textures_CubeTexture(this,lime_graphics_opengl_GL.context.createTexture(),size);
		this.texturesCreated.push(texture);
		return texture;
	}
	,createIndexBuffer: function(numIndices,bufferUsage) {
		if(bufferUsage == null) {
			bufferUsage = openfl_display3D_Context3DBufferUsage.STATIC_DRAW;
		}
		var indexBuffer = new openfl_display3D_IndexBuffer3D(this,lime_graphics_opengl_GL.context.createBuffer(),numIndices,bufferUsage == openfl_display3D_Context3DBufferUsage.STATIC_DRAW ? 35044 : 35048);
		this.indexBuffersCreated.push(indexBuffer);
		return indexBuffer;
	}
	,createProgram: function() {
		var program = new openfl_display3D_Program3D(this,lime_graphics_opengl_GL.context.createProgram());
		this.programsCreated.push(program);
		return program;
	}
	,createRectangleTexture: function(width,height,format,optimizeForRenderToTexture) {
		var texture = new openfl_display3D_textures_RectangleTexture(this,lime_graphics_opengl_GL.context.createTexture(),optimizeForRenderToTexture,width,height);
		this.texturesCreated.push(texture);
		return texture;
	}
	,createTexture: function(width,height,format,optimizeForRenderToTexture,streamingLevels) {
		if(streamingLevels == null) {
			streamingLevels = 0;
		}
		var texture = new openfl_display3D_textures_Texture(this,lime_graphics_opengl_GL.context.createTexture(),optimizeForRenderToTexture,width,height);
		this.texturesCreated.push(texture);
		return texture;
	}
	,createVertexBuffer: function(numVertices,data32PerVertex,bufferUsage) {
		if(bufferUsage == null) {
			bufferUsage = openfl_display3D_Context3DBufferUsage.STATIC_DRAW;
		}
		var vertexBuffer = new openfl_display3D_VertexBuffer3D(this,lime_graphics_opengl_GL.context.createBuffer(),numVertices,data32PerVertex,bufferUsage == openfl_display3D_Context3DBufferUsage.STATIC_DRAW ? 35044 : 35048);
		this.vertexBuffersCreated.push(vertexBuffer);
		return vertexBuffer;
	}
	,__deleteTexture: function(texture) {
		if(texture.glTexture == null) {
			return;
		}
		HxOverrides.remove(this.texturesCreated,texture);
		lime_graphics_opengl_GL.context.deleteTexture(texture.glTexture);
		texture.glTexture = null;
	}
	,__deleteVertexBuffer: function(buffer) {
		if(buffer.glBuffer == null) {
			return;
		}
		HxOverrides.remove(this.vertexBuffersCreated,buffer);
		lime_graphics_opengl_GL.context.deleteBuffer(buffer.glBuffer);
		buffer.glBuffer = null;
	}
	,__deleteIndexBuffer: function(buffer) {
		if(buffer.glBuffer == null) {
			return;
		}
		HxOverrides.remove(this.indexBuffersCreated,buffer);
		lime_graphics_opengl_GL.context.deleteBuffer(buffer.glBuffer);
		buffer.glBuffer = null;
	}
	,__deleteProgram: function(program) {
		if(program.glProgram == null) {
			return;
		}
		HxOverrides.remove(this.programsCreated,program);
		lime_graphics_opengl_GL.context.deleteProgram(program.glProgram);
		program.glProgram = null;
	}
	,dispose: function() {
		var _g = 0;
		var _g1 = this.vertexBuffersCreated;
		while(_g < _g1.length) {
			var vertexBuffer = _g1[_g];
			++_g;
			vertexBuffer.dispose();
		}
		this.vertexBuffersCreated = null;
		var _g2 = 0;
		var _g11 = this.indexBuffersCreated;
		while(_g2 < _g11.length) {
			var indexBuffer = _g11[_g2];
			++_g2;
			indexBuffer.dispose();
		}
		this.indexBuffersCreated = null;
		var _g3 = 0;
		var _g12 = this.programsCreated;
		while(_g3 < _g12.length) {
			var program = _g12[_g3];
			++_g3;
			program.dispose();
		}
		this.programsCreated = null;
		this.samplerParameters = null;
		var _g4 = 0;
		var _g13 = this.texturesCreated;
		while(_g4 < _g13.length) {
			var texture = _g13[_g4];
			++_g4;
			texture.dispose();
		}
		this.texturesCreated = null;
		if(this.framebuffer != null) {
			lime_graphics_opengl_GL.context.deleteFramebuffer(this.framebuffer);
			this.framebuffer = null;
		}
		if(this.renderbuffer != null) {
			lime_graphics_opengl_GL.context.deleteRenderbuffer(this.renderbuffer);
			this.renderbuffer = null;
		}
		this.disposed = true;
	}
	,drawToBitmapData: function(destination) {
	}
	,drawTriangles: function(indexBuffer,firstIndex,numTriangles) {
		if(numTriangles == null) {
			numTriangles = -1;
		}
		if(firstIndex == null) {
			firstIndex = 0;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,"yflip");
		lime_graphics_opengl_GL.context.uniform1f(location,this._yFlip);
		if(!this.drawing) {
			throw new js__$Boot_HaxeError(new openfl_errors_Error("Need to clear before drawing if the buffer has not been cleared since the last present() call."));
		}
		var numIndices;
		if(numTriangles == -1) {
			numIndices = indexBuffer.numIndices;
		} else {
			numIndices = numTriangles * 3;
		}
		var byteOffset = firstIndex * 2;
		lime_graphics_opengl_GL.context.bindBuffer(34963,indexBuffer.glBuffer);
		lime_graphics_opengl_GL.context.drawElements(4,numIndices,5123,byteOffset);
	}
	,present: function() {
		this.drawing = false;
		lime_graphics_opengl_GL.context.useProgram(null);
		lime_graphics_opengl_GL.context.bindBuffer(34962,null);
		lime_graphics_opengl_GL.context.disable(2884);
		if(this.framebuffer != null) {
			lime_graphics_opengl_GL.context.bindFramebuffer(36160,null);
		}
		if(this.renderbuffer != null) {
			lime_graphics_opengl_GL.context.bindRenderbuffer(36161,null);
		}
	}
	,removeRenderMethod: function(func) {
		this.ogl.set_render(null);
	}
	,setBlendFactors: function(sourceFactor,destinationFactor) {
		this.blendEnabled = true;
		this.blendSourceFactor = sourceFactor;
		this.blendDestinationFactor = destinationFactor;
		this.__updateBlendStatus();
	}
	,setColorMask: function(red,green,blue,alpha) {
		lime_graphics_opengl_GL.context.colorMask(red,green,blue,alpha);
	}
	,setCulling: function(triangleFaceToCull) {
		if(triangleFaceToCull == 0) {
			lime_graphics_opengl_GL.context.disable(2884);
		} else {
			lime_graphics_opengl_GL.context.enable(2884);
			switch(triangleFaceToCull) {
			case 1028:
				lime_graphics_opengl_GL.context.cullFace(1028);
				break;
			case 1029:
				lime_graphics_opengl_GL.context.cullFace(1029);
				break;
			case 1032:
				lime_graphics_opengl_GL.context.cullFace(1032);
				break;
			default:
				throw new js__$Boot_HaxeError("Unknown Context3DTriangleFace type.");
			}
		}
		switch(triangleFaceToCull) {
		case 0:
			this._yFlip = 1;
			break;
		case 1028:
			this._yFlip = 1;
			break;
		case 1029:
			this._yFlip = -1;
			break;
		case 1032:
			this._yFlip = 1;
			break;
		default:
			throw new js__$Boot_HaxeError("Unknown culling mode " + triangleFaceToCull + ".");
		}
	}
	,setDepthTest: function(depthMask,passCompareMode) {
		lime_graphics_opengl_GL.context.depthFunc(passCompareMode);
		lime_graphics_opengl_GL.context.depthMask(depthMask);
	}
	,setGLSLProgramConstantsFromByteArray: function(locationName,data,byteArrayOffset) {
		if(byteArrayOffset == null) {
			byteArrayOffset = 0;
		}
		data.position = byteArrayOffset;
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		var x = data.readFloat();
		var y = data.readFloat();
		var z = data.readFloat();
		var w = data.readFloat();
		lime_graphics_opengl_GL.context.uniform4f(location,x,y,z,w);
	}
	,setGLSLProgramConstantsFromMatrix: function(locationName,matrix,transposedMatrix) {
		if(transposedMatrix == null) {
			transposedMatrix = false;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		var this1 = matrix.rawData;
		var value = [];
		var _g1 = 0;
		var _g = this1.data.length;
		while(_g1 < _g) {
			var i = _g1++;
			value.push(this1.data[i]);
		}
		var array = value;
		var this2;
		if(array != null) {
			this2 = new Float32Array(array);
		} else {
			this2 = null;
		}
		lime_graphics_opengl_GL.context.uniformMatrix4fv(location,!transposedMatrix,this2);
	}
	,setGLSLProgramConstantsFromVector4: function(locationName,data,startIndex) {
		if(startIndex == null) {
			startIndex = 0;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		lime_graphics_opengl_GL.context.uniform4f(location,data[startIndex],data[startIndex + 1],data[startIndex + 2],data[startIndex + 3]);
	}
	,setGLSLTextureAt: function(locationName,texture,textureIndex) {
		switch(textureIndex) {
		case 0:
			lime_graphics_opengl_GL.context.activeTexture(33984);
			break;
		case 1:
			lime_graphics_opengl_GL.context.activeTexture(33985);
			break;
		case 2:
			lime_graphics_opengl_GL.context.activeTexture(33986);
			break;
		case 3:
			lime_graphics_opengl_GL.context.activeTexture(33987);
			break;
		case 4:
			lime_graphics_opengl_GL.context.activeTexture(33988);
			break;
		case 5:
			lime_graphics_opengl_GL.context.activeTexture(33989);
			break;
		case 6:
			lime_graphics_opengl_GL.context.activeTexture(33990);
			break;
		case 7:
			lime_graphics_opengl_GL.context.activeTexture(33991);
			break;
		default:
			throw new js__$Boot_HaxeError("Does not support texture8 or more");
		}
		if(texture == null) {
			lime_graphics_opengl_GL.context.bindTexture(3553,null);
			lime_graphics_opengl_GL.context.bindTexture(34067,null);
			return;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		if(js_Boot.__instanceof(texture,openfl_display3D_textures_Texture)) {
			lime_graphics_opengl_GL.context.bindTexture(3553,(js_Boot.__cast(texture , openfl_display3D_textures_Texture)).glTexture);
			lime_graphics_opengl_GL.context.uniform1i(location,textureIndex);
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_RectangleTexture)) {
			lime_graphics_opengl_GL.context.bindTexture(3553,(js_Boot.__cast(texture , openfl_display3D_textures_RectangleTexture)).glTexture);
			lime_graphics_opengl_GL.context.uniform1i(location,textureIndex);
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_CubeTexture)) {
			lime_graphics_opengl_GL.context.bindTexture(34067,(js_Boot.__cast(texture , openfl_display3D_textures_CubeTexture)).glTexture);
			lime_graphics_opengl_GL.context.uniform1i(location,textureIndex);
		} else {
			throw new js__$Boot_HaxeError("Texture of type " + Type.getClassName(texture == null ? null : js_Boot.getClass(texture)) + " not supported yet");
		}
		var parameters = this.samplerParameters[textureIndex];
		if(parameters != null) {
			this.setTextureParameters(texture,parameters.wrap,parameters.filter,parameters.mipfilter);
		} else {
			this.setTextureParameters(texture,openfl_display3D_Context3DWrapMode.CLAMP,openfl_display3D_Context3DTextureFilter.NEAREST,openfl_display3D_Context3DMipFilter.MIPNONE);
		}
	}
	,setGLSLVertexBufferAt: function(locationName,buffer,bufferOffset,format) {
		if(bufferOffset == null) {
			bufferOffset = 0;
		}
		var location = this.currentProgram != null && this.currentProgram.glProgram != null ? lime_graphics_opengl_GL.context.getAttribLocation(this.currentProgram.glProgram,locationName) : -1;
		if(location == -1) {
			return;
		}
		if(buffer == null) {
			if(location > -1) {
				lime_graphics_opengl_GL.context.disableVertexAttribArray(location);
			}
			return;
		}
		lime_graphics_opengl_GL.context.bindBuffer(34962,buffer.glBuffer);
		var dimension = 4;
		var type = 5126;
		var numBytes = 4;
		if(format == openfl_display3D_Context3DVertexBufferFormat.BYTES_4) {
			dimension = 4;
			type = 5126;
			numBytes = 4;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_1) {
			dimension = 1;
			type = 5126;
			numBytes = 4;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_2) {
			dimension = 2;
			type = 5126;
			numBytes = 4;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_3) {
			dimension = 3;
			type = 5126;
			numBytes = 4;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_4) {
			dimension = 4;
			type = 5126;
			numBytes = 4;
		} else {
			throw new js__$Boot_HaxeError("Buffer format " + Std.string(format) + " is not supported");
		}
		lime_graphics_opengl_GL.context.enableVertexAttribArray(location);
		lime_graphics_opengl_GL.context.vertexAttribPointer(location,dimension,type,false,buffer.data32PerVertex * numBytes,bufferOffset * numBytes);
	}
	,setProgram: function(program3D) {
		var glProgram = null;
		if(program3D != null) {
			glProgram = program3D.glProgram;
		}
		lime_graphics_opengl_GL.context.useProgram(glProgram);
		this.currentProgram = program3D;
	}
	,setProgramConstantsFromByteArray: function(programType,firstRegister,numRegisters,data,byteArrayOffset) {
		data.position = byteArrayOffset;
		var _g1 = 0;
		var _g = numRegisters;
		while(_g1 < _g) {
			var i = _g1++;
			var locationName = this.__getUniformLocationNameFromAgalRegisterIndex(programType,firstRegister + i);
			this.setGLSLProgramConstantsFromByteArray(locationName,data);
		}
	}
	,setProgramConstantsFromMatrix: function(programType,firstRegister,matrix,transposedMatrix) {
		if(transposedMatrix == null) {
			transposedMatrix = false;
		}
		var d = matrix.rawData;
		if(transposedMatrix) {
			this.setProgramConstantsFromVector(programType,firstRegister,[d.data[0],d.data[4],d.data[8],d.data[12]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 1,[d.data[1],d.data[5],d.data[9],d.data[13]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 2,[d.data[2],d.data[6],d.data[10],d.data[14]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 3,[d.data[3],d.data[7],d.data[11],d.data[15]],1);
		} else {
			this.setProgramConstantsFromVector(programType,firstRegister,[d.data[0],d.data[1],d.data[2],d.data[3]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 1,[d.data[4],d.data[5],d.data[6],d.data[7]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 2,[d.data[8],d.data[9],d.data[10],d.data[11]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 3,[d.data[12],d.data[13],d.data[14],d.data[15]],1);
		}
	}
	,setProgramConstantsFromVector: function(programType,firstRegister,data,numRegisters) {
		if(numRegisters == null) {
			numRegisters = 1;
		}
		var _g1 = 0;
		var _g = numRegisters;
		while(_g1 < _g) {
			var i = _g1++;
			var currentIndex = i * 4;
			var locationName = this.__getUniformLocationNameFromAgalRegisterIndex(programType,firstRegister + i);
			this.setGLSLProgramConstantsFromVector4(locationName,data,currentIndex);
		}
	}
	,setRenderMethod: function(func) {
		this.ogl.set_render(function(rect) {
			func(null);
		});
	}
	,setRenderToBackBuffer: function() {
		lime_graphics_opengl_GL.context.disable(2929);
		lime_graphics_opengl_GL.context.disable(2960);
		lime_graphics_opengl_GL.context.disable(3089);
		lime_graphics_opengl_GL.context.bindFramebuffer(36160,null);
		if(this.framebuffer != null) {
			lime_graphics_opengl_GL.context.bindFramebuffer(36160,null);
		}
		if(this.renderbuffer != null) {
			lime_graphics_opengl_GL.context.bindRenderbuffer(36161,null);
		}
		this.renderToTexture = false;
		this.updateBackBufferViewPort();
		this.updateScissorRectangle();
		this.updateDepthAndStencilState();
	}
	,setRenderToTexture: function(texture,enableDepthAndStencil,antiAlias,surfaceSelector) {
		if(surfaceSelector == null) {
			surfaceSelector = 0;
		}
		if(antiAlias == null) {
			antiAlias = 0;
		}
		if(enableDepthAndStencil == null) {
			enableDepthAndStencil = false;
		}
		if(this.framebuffer == null) {
			this.framebuffer = lime_graphics_opengl_GL.context.createFramebuffer();
		}
		lime_graphics_opengl_GL.context.bindFramebuffer(36160,this.framebuffer);
		if(this.renderbuffer == null) {
			this.renderbuffer = lime_graphics_opengl_GL.context.createRenderbuffer();
		}
		lime_graphics_opengl_GL.context.bindRenderbuffer(36161,this.renderbuffer);
		if(enableDepthAndStencil) {
			lime_graphics_opengl_GL.context.renderbufferStorage(36161,34041,texture.width,texture.height);
		}
		lime_graphics_opengl_GL.context.framebufferTexture2D(36160,36064,3553,texture.glTexture,0);
		lime_graphics_opengl_GL.context.renderbufferStorage(36161,34041,texture.width,texture.height);
		lime_graphics_opengl_GL.context.framebufferRenderbuffer(36160,33306,36161,this.renderbuffer);
		if(enableDepthAndStencil) {
			lime_graphics_opengl_GL.context.enable(2929);
			lime_graphics_opengl_GL.context.enable(2960);
		}
		lime_graphics_opengl_GL.context.bindTexture(3553,texture.glTexture);
		lime_graphics_opengl_GL.context.texImage2D(3553,0,6408,texture.width,texture.height,0,6408,5121,null);
		lime_graphics_opengl_GL.context.texParameteri(3553,10240,9729);
		lime_graphics_opengl_GL.context.texParameteri(3553,10241,9985);
		lime_graphics_opengl_GL.context.viewport(0,0,texture.width,texture.height);
		this.renderToTexture = true;
		this.rttDepthAndStencil = enableDepthAndStencil;
		this.rttWidth = texture.width;
		this.rttHeight = texture.height;
		this.updateScissorRectangle();
		this.updateDepthAndStencilState();
	}
	,setSamplerStateAt: function(sampler,wrap,filter,mipfilter) {
		if(0 <= sampler && sampler < openfl_display3D_Context3D.MAX_SAMPLERS) {
			this.samplerParameters[sampler].wrap = wrap;
			this.samplerParameters[sampler].filter = filter;
			this.samplerParameters[sampler].mipfilter = mipfilter;
		} else {
			throw new js__$Boot_HaxeError("Sampler is out of bounds.");
		}
	}
	,setScissorRectangle: function(rectangle) {
		this.scissorRectangle = rectangle;
		if(rectangle == null) {
			lime_graphics_opengl_GL.context.disable(3089);
			return;
		}
		lime_graphics_opengl_GL.context.enable(3089);
		this.updateScissorRectangle();
	}
	,updateScissorRectangle: function() {
		if(this.scissorRectangle == null) {
			return;
		}
		var height = this.renderToTexture ? this.rttHeight : this.scrollRect.height | 0;
		lime_graphics_opengl_GL.context.scissor(this.scissorRectangle.x | 0,height - (this.scissorRectangle.y | 0) - (this.scissorRectangle.height | 0) | 0,this.scissorRectangle.width | 0,this.scissorRectangle.height | 0);
	}
	,setStencilActions: function(triangleFace,compareMode,actionOnBothPass,actionOnDepthFail,actionOnDepthPassStencilFail) {
		var this1 = compareMode;
		this.stencilCompareMode = this1;
		lime_graphics_opengl_GL.context.stencilOp(actionOnBothPass,actionOnDepthFail,actionOnDepthPassStencilFail);
		lime_graphics_opengl_GL.context.stencilFunc(this.stencilCompareMode,this.stencilRef,this.stencilReadMask);
	}
	,setStencilReferenceValue: function(referenceValue,readMask,writeMask) {
		if(writeMask == null) {
			writeMask = 255;
		}
		if(readMask == null) {
			readMask = 255;
		}
		this.stencilReadMask = readMask;
		this.stencilRef = referenceValue;
		lime_graphics_opengl_GL.context.stencilFunc(this.stencilCompareMode,this.stencilRef,this.stencilReadMask);
		lime_graphics_opengl_GL.context.stencilMask(writeMask);
	}
	,setTextureAt: function(sampler,texture) {
		var locationName = "fs" + sampler;
		this.setGLSLTextureAt(locationName,texture,sampler);
	}
	,setTextureParameters: function(texture,wrap,filter,mipfilter) {
		if(!openfl_display3D_Context3D.anisotropySupportTested) {
			var ext = lime_graphics_opengl_GL.context.getExtension("EXT_texture_filter_anisotropic");
			if(ext == null || Reflect.field(ext,"MAX_TEXTURE_MAX_ANISOTROPY_EXT") == null) {
				ext = lime_graphics_opengl_GL.context.getExtension("MOZ_EXT_texture_filter_anisotropic");
			}
			if(ext == null || Reflect.field(ext,"MAX_TEXTURE_MAX_ANISOTROPY_EXT") == null) {
				ext = lime_graphics_opengl_GL.context.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
			}
			openfl_display3D_Context3D.supportsAnisotropy = ext != null;
			if(openfl_display3D_Context3D.supportsAnisotropy) {
				openfl_display3D_Context3D.maxSupportedAnisotropy = lime_graphics_opengl_GL.context.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
				lime_graphics_opengl_GL.context.texParameteri(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,openfl_display3D_Context3D.maxSupportedAnisotropy);
			}
			openfl_display3D_Context3D.anisotropySupportTested = true;
		}
		if(js_Boot.__instanceof(texture,openfl_display3D_textures_Texture)) {
			switch(wrap[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
				lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(3553,10242,10497);
				lime_graphics_opengl_GL.context.texParameteri(3553,10243,10497);
				break;
			}
			switch(filter[1]) {
			case 0:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param = _$UInt_UInt_$Impl_$.gt(2,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 2;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname,param);
				}
				break;
			case 1:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname1 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param1 = _$UInt_UInt_$Impl_$.gt(4,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 4;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname1,param1);
				}
				break;
			case 2:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname2 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param2 = _$UInt_UInt_$Impl_$.gt(8,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 8;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname2,param2);
				}
				break;
			case 3:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname3 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param3 = _$UInt_UInt_$Impl_$.gt(16,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 16;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname3,param3);
				}
				break;
			case 4:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9729);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			case 5:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			}
			switch(mipfilter[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(3553,10241,9987);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(3553,10241,9984);
				break;
			case 2:
				lime_graphics_opengl_GL.context.texParameteri(3553,10241,filter == openfl_display3D_Context3DTextureFilter.NEAREST ? 9728 : 9729);
				break;
			}
			var tex = texture;
			if(mipfilter != openfl_display3D_Context3DMipFilter.MIPNONE && !tex.mipmapsGenerated) {
				lime_graphics_opengl_GL.context.generateMipmap(3553);
				tex.mipmapsGenerated = true;
			}
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_RectangleTexture)) {
			lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
			lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
			switch(filter[1]) {
			case 0:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname4 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param4 = _$UInt_UInt_$Impl_$.gt(2,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 2;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname4,param4);
				}
				break;
			case 1:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname5 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param5 = _$UInt_UInt_$Impl_$.gt(4,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 4;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname5,param5);
				}
				break;
			case 2:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname6 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param6 = _$UInt_UInt_$Impl_$.gt(8,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 8;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname6,param6);
				}
				break;
			case 3:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname7 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param7 = _$UInt_UInt_$Impl_$.gt(16,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 16;
					lime_graphics_opengl_GL.context.texParameterf(3553,pname7,param7);
				}
				break;
			case 4:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9729);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			case 5:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			}
			lime_graphics_opengl_GL.context.texParameteri(3553,10241,filter == openfl_display3D_Context3DTextureFilter.NEAREST ? 9728 : 9729);
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_CubeTexture)) {
			switch(wrap[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(34067,10242,33071);
				lime_graphics_opengl_GL.context.texParameteri(34067,10243,33071);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(34067,10242,10497);
				lime_graphics_opengl_GL.context.texParameteri(34067,10243,10497);
				break;
			}
			switch(filter[1]) {
			case 0:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname8 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param8 = _$UInt_UInt_$Impl_$.gt(2,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 2;
					lime_graphics_opengl_GL.context.texParameterf(34067,pname8,param8);
				}
				break;
			case 1:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname9 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param9 = _$UInt_UInt_$Impl_$.gt(4,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 4;
					lime_graphics_opengl_GL.context.texParameterf(34067,pname9,param9);
				}
				break;
			case 2:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname10 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param10 = _$UInt_UInt_$Impl_$.gt(8,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 8;
					lime_graphics_opengl_GL.context.texParameterf(34067,pname10,param10);
				}
				break;
			case 3:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					var pname11 = openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT;
					var param11 = _$UInt_UInt_$Impl_$.gt(16,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 16;
					lime_graphics_opengl_GL.context.texParameterf(34067,pname11,param11);
				}
				break;
			case 4:
				lime_graphics_opengl_GL.context.texParameteri(34067,10240,9729);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			case 5:
				lime_graphics_opengl_GL.context.texParameteri(34067,10240,9728);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			}
			switch(mipfilter[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(34067,10241,9987);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(34067,10241,9984);
				break;
			case 2:
				lime_graphics_opengl_GL.context.texParameteri(34067,10241,filter == openfl_display3D_Context3DTextureFilter.NEAREST ? 9728 : 9729);
				break;
			}
			var cubetex = texture;
			if(mipfilter != openfl_display3D_Context3DMipFilter.MIPNONE && !cubetex.mipmapsGenerated) {
				lime_graphics_opengl_GL.context.generateMipmap(34067);
				cubetex.mipmapsGenerated = true;
			}
		} else {
			throw new js__$Boot_HaxeError("Texture of type " + Type.getClassName(texture == null ? null : js_Boot.getClass(texture)) + " not supported yet");
		}
	}
	,setVertexBufferAt: function(index,buffer,bufferOffset,format) {
		if(bufferOffset == null) {
			bufferOffset = 0;
		}
		var locationName = "va" + index;
		this.setGLSLVertexBufferAt(locationName,buffer,bufferOffset,format);
	}
	,__getUniformLocationNameFromAgalRegisterIndex: function(programType,firstRegister) {
		if(programType == openfl_display3D_Context3DProgramType.VERTEX) {
			return "vc" + firstRegister;
		} else if(programType == openfl_display3D_Context3DProgramType.FRAGMENT) {
			return "fc" + firstRegister;
		}
		throw new js__$Boot_HaxeError("Program Type " + Std.string(programType) + " not supported");
	}
	,__updateBlendStatus: function() {
		if(this.blendEnabled) {
			lime_graphics_opengl_GL.context.enable(3042);
			lime_graphics_opengl_GL.context.blendEquation(32774);
			lime_graphics_opengl_GL.context.blendFunc(this.blendSourceFactor,this.blendDestinationFactor);
		} else {
			lime_graphics_opengl_GL.context.disable(3042);
		}
	}
	,__class__: openfl_display3D_Context3D
};
var openfl_display3D__$Context3D_SamplerState = function() {
};
$hxClasses["openfl.display3D._Context3D.SamplerState"] = openfl_display3D__$Context3D_SamplerState;
openfl_display3D__$Context3D_SamplerState.__name__ = ["openfl","display3D","_Context3D","SamplerState"];
openfl_display3D__$Context3D_SamplerState.prototype = {
	__class__: openfl_display3D__$Context3D_SamplerState
};
var openfl_display3D_Context3DBufferUsage = $hxClasses["openfl.display3D.Context3DBufferUsage"] = { __ename__ : ["openfl","display3D","Context3DBufferUsage"], __constructs__ : ["STATIC_DRAW","DYNAMIC_DRAW"] };
openfl_display3D_Context3DBufferUsage.STATIC_DRAW = ["STATIC_DRAW",0];
openfl_display3D_Context3DBufferUsage.STATIC_DRAW.toString = $estr;
openfl_display3D_Context3DBufferUsage.STATIC_DRAW.__enum__ = openfl_display3D_Context3DBufferUsage;
openfl_display3D_Context3DBufferUsage.DYNAMIC_DRAW = ["DYNAMIC_DRAW",1];
openfl_display3D_Context3DBufferUsage.DYNAMIC_DRAW.toString = $estr;
openfl_display3D_Context3DBufferUsage.DYNAMIC_DRAW.__enum__ = openfl_display3D_Context3DBufferUsage;
var openfl_display3D_Context3DClearMask = function() { };
$hxClasses["openfl.display3D.Context3DClearMask"] = openfl_display3D_Context3DClearMask;
openfl_display3D_Context3DClearMask.__name__ = ["openfl","display3D","Context3DClearMask"];
var openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DCompareMode.Context3DCompareMode_Impl_"] = openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.__name__ = ["openfl","display3D","_Context3DCompareMode","Context3DCompareMode_Impl_"];
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$._new = function(a) {
	var this1 = a;
	return this1;
};
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.fromInt = function(s) {
	var this1 = s;
	return this1;
};
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.toInt = function(this1) {
	return this1;
};
var openfl_display3D_Context3DMipFilter = $hxClasses["openfl.display3D.Context3DMipFilter"] = { __ename__ : ["openfl","display3D","Context3DMipFilter"], __constructs__ : ["MIPLINEAR","MIPNEAREST","MIPNONE"] };
openfl_display3D_Context3DMipFilter.MIPLINEAR = ["MIPLINEAR",0];
openfl_display3D_Context3DMipFilter.MIPLINEAR.toString = $estr;
openfl_display3D_Context3DMipFilter.MIPLINEAR.__enum__ = openfl_display3D_Context3DMipFilter;
openfl_display3D_Context3DMipFilter.MIPNEAREST = ["MIPNEAREST",1];
openfl_display3D_Context3DMipFilter.MIPNEAREST.toString = $estr;
openfl_display3D_Context3DMipFilter.MIPNEAREST.__enum__ = openfl_display3D_Context3DMipFilter;
openfl_display3D_Context3DMipFilter.MIPNONE = ["MIPNONE",2];
openfl_display3D_Context3DMipFilter.MIPNONE.toString = $estr;
openfl_display3D_Context3DMipFilter.MIPNONE.__enum__ = openfl_display3D_Context3DMipFilter;
var openfl_display3D_Context3DProgramType = $hxClasses["openfl.display3D.Context3DProgramType"] = { __ename__ : ["openfl","display3D","Context3DProgramType"], __constructs__ : ["VERTEX","FRAGMENT"] };
openfl_display3D_Context3DProgramType.VERTEX = ["VERTEX",0];
openfl_display3D_Context3DProgramType.VERTEX.toString = $estr;
openfl_display3D_Context3DProgramType.VERTEX.__enum__ = openfl_display3D_Context3DProgramType;
openfl_display3D_Context3DProgramType.FRAGMENT = ["FRAGMENT",1];
openfl_display3D_Context3DProgramType.FRAGMENT.toString = $estr;
openfl_display3D_Context3DProgramType.FRAGMENT.__enum__ = openfl_display3D_Context3DProgramType;
var openfl_display3D_Context3DTextureFilter = $hxClasses["openfl.display3D.Context3DTextureFilter"] = { __ename__ : ["openfl","display3D","Context3DTextureFilter"], __constructs__ : ["ANISOTROPIC2X","ANISOTROPIC4X","ANISOTROPIC8X","ANISOTROPIC16X","LINEAR","NEAREST"] };
openfl_display3D_Context3DTextureFilter.ANISOTROPIC2X = ["ANISOTROPIC2X",0];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC2X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC2X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC4X = ["ANISOTROPIC4X",1];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC4X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC4X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC8X = ["ANISOTROPIC8X",2];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC8X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC8X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC16X = ["ANISOTROPIC16X",3];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC16X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC16X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.LINEAR = ["LINEAR",4];
openfl_display3D_Context3DTextureFilter.LINEAR.toString = $estr;
openfl_display3D_Context3DTextureFilter.LINEAR.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.NEAREST = ["NEAREST",5];
openfl_display3D_Context3DTextureFilter.NEAREST.toString = $estr;
openfl_display3D_Context3DTextureFilter.NEAREST.__enum__ = openfl_display3D_Context3DTextureFilter;
var openfl_display3D_Context3DTextureFormat = $hxClasses["openfl.display3D.Context3DTextureFormat"] = { __ename__ : ["openfl","display3D","Context3DTextureFormat"], __constructs__ : ["BGRA","COMPRESSED","COMPRESSED_ALPHA"] };
openfl_display3D_Context3DTextureFormat.BGRA = ["BGRA",0];
openfl_display3D_Context3DTextureFormat.BGRA.toString = $estr;
openfl_display3D_Context3DTextureFormat.BGRA.__enum__ = openfl_display3D_Context3DTextureFormat;
openfl_display3D_Context3DTextureFormat.COMPRESSED = ["COMPRESSED",1];
openfl_display3D_Context3DTextureFormat.COMPRESSED.toString = $estr;
openfl_display3D_Context3DTextureFormat.COMPRESSED.__enum__ = openfl_display3D_Context3DTextureFormat;
openfl_display3D_Context3DTextureFormat.COMPRESSED_ALPHA = ["COMPRESSED_ALPHA",2];
openfl_display3D_Context3DTextureFormat.COMPRESSED_ALPHA.toString = $estr;
openfl_display3D_Context3DTextureFormat.COMPRESSED_ALPHA.__enum__ = openfl_display3D_Context3DTextureFormat;
var openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DTriangleFace.Context3DTriangleFace_Impl_"] = openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.__name__ = ["openfl","display3D","_Context3DTriangleFace","Context3DTriangleFace_Impl_"];
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$._new = function(a) {
	var this1 = a;
	return this1;
};
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.fromInt = function(s) {
	var this1 = s;
	return this1;
};
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.toInt = function(this1) {
	return this1;
};
var openfl_display3D_Context3DVertexBufferFormat = $hxClasses["openfl.display3D.Context3DVertexBufferFormat"] = { __ename__ : ["openfl","display3D","Context3DVertexBufferFormat"], __constructs__ : ["BYTES_4","FLOAT_1","FLOAT_2","FLOAT_3","FLOAT_4"] };
openfl_display3D_Context3DVertexBufferFormat.BYTES_4 = ["BYTES_4",0];
openfl_display3D_Context3DVertexBufferFormat.BYTES_4.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.BYTES_4.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_1 = ["FLOAT_1",1];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_1.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_1.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_2 = ["FLOAT_2",2];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_2.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_2.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_3 = ["FLOAT_3",3];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_3.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_3.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_4 = ["FLOAT_4",4];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_4.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_4.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
var openfl_display3D_Context3DWrapMode = $hxClasses["openfl.display3D.Context3DWrapMode"] = { __ename__ : ["openfl","display3D","Context3DWrapMode"], __constructs__ : ["CLAMP","REPEAT"] };
openfl_display3D_Context3DWrapMode.CLAMP = ["CLAMP",0];
openfl_display3D_Context3DWrapMode.CLAMP.toString = $estr;
openfl_display3D_Context3DWrapMode.CLAMP.__enum__ = openfl_display3D_Context3DWrapMode;
openfl_display3D_Context3DWrapMode.REPEAT = ["REPEAT",1];
openfl_display3D_Context3DWrapMode.REPEAT.toString = $estr;
openfl_display3D_Context3DWrapMode.REPEAT.__enum__ = openfl_display3D_Context3DWrapMode;
var openfl_display3D_IndexBuffer3D = function(context,glBuffer,numIndices,bufferUsage) {
	this.context = context;
	this.glBuffer = glBuffer;
	this.numIndices = numIndices;
	this.bufferUsage = bufferUsage;
};
$hxClasses["openfl.display3D.IndexBuffer3D"] = openfl_display3D_IndexBuffer3D;
openfl_display3D_IndexBuffer3D.__name__ = ["openfl","display3D","IndexBuffer3D"];
openfl_display3D_IndexBuffer3D.prototype = {
	dispose: function() {
		this.context.__deleteIndexBuffer(this);
	}
	,uploadFromByteArray: function(byteArray,byteArrayOffset,startOffset,count) {
		var bytesPerIndex = 2;
		lime_graphics_opengl_GL.context.bindBuffer(34963,this.glBuffer);
		var length = count * bytesPerIndex;
		var offset = byteArrayOffset + startOffset * bytesPerIndex;
		var indices;
		var this1;
		if(length != null) {
			this1 = new Int16Array(length);
		} else {
			this1 = null;
		}
		indices = this1;
		byteArray.position = offset;
		var i = 0;
		while(byteArray.position < length + offset) {
			indices[i] = byteArray.readUnsignedByte();
			++i;
		}
		lime_graphics_opengl_GL.context.bufferData(34963,indices,this.bufferUsage);
	}
	,uploadFromVector: function(data,startOffset,count) {
		lime_graphics_opengl_GL.context.bindBuffer(34963,this.glBuffer);
		var indices;
		var this1;
		if(count != null) {
			this1 = new Int16Array(count);
		} else {
			this1 = null;
		}
		indices = this1;
		var _g1 = startOffset;
		var _g = startOffset + count;
		while(_g1 < _g) {
			var i = _g1++;
			indices[i] = data.data[i];
		}
		lime_graphics_opengl_GL.context.bufferData(34963,indices,this.bufferUsage);
	}
	,uploadFromInt16Array: function(data) {
		lime_graphics_opengl_GL.context.bindBuffer(34963,this.glBuffer);
		lime_graphics_opengl_GL.context.bufferData(34963,data,this.bufferUsage);
	}
	,__class__: openfl_display3D_IndexBuffer3D
};
var openfl_display3D_Program3D = function(context,program) {
	this.context = context;
	this.glProgram = program;
};
$hxClasses["openfl.display3D.Program3D"] = openfl_display3D_Program3D;
openfl_display3D_Program3D.__name__ = ["openfl","display3D","Program3D"];
openfl_display3D_Program3D.prototype = {
	dispose: function() {
		this.context.__deleteProgram(this);
	}
	,upload: function(vertexShader,fragmentShader) {
		lime_graphics_opengl_GL.context.attachShader(this.glProgram,vertexShader);
		lime_graphics_opengl_GL.context.attachShader(this.glProgram,fragmentShader);
		lime_graphics_opengl_GL.context.linkProgram(this.glProgram);
		if(lime_graphics_opengl_GL.context.getProgramParameter(this.glProgram,35714) == 0) {
			var result = lime_graphics_opengl_GL.context.getProgramInfoLog(this.glProgram);
			if(result != "") {
				throw new js__$Boot_HaxeError(result);
			}
		}
	}
	,__class__: openfl_display3D_Program3D
};
var openfl_display3D_VertexBuffer3D = function(context,glBuffer,numVertices,data32PerVertex,bufferUsage) {
	this.context = context;
	this.glBuffer = glBuffer;
	this.numVertices = numVertices;
	this.data32PerVertex = data32PerVertex;
	this.bufferUsage = bufferUsage;
};
$hxClasses["openfl.display3D.VertexBuffer3D"] = openfl_display3D_VertexBuffer3D;
openfl_display3D_VertexBuffer3D.__name__ = ["openfl","display3D","VertexBuffer3D"];
openfl_display3D_VertexBuffer3D.prototype = {
	dispose: function() {
		this.context.__deleteVertexBuffer(this);
	}
	,uploadFromByteArray: function(byteArray,byteArrayOffset,startOffset,count) {
		var bytesPerVertex = this.data32PerVertex * 4;
		lime_graphics_opengl_GL.context.bindBuffer(34962,this.glBuffer);
		var length = count * bytesPerVertex;
		var offset = byteArrayOffset + startOffset * bytesPerVertex;
		var float32Array;
		var this1;
		if(length != null) {
			this1 = new Float32Array(length);
		} else {
			this1 = null;
		}
		float32Array = this1;
		byteArray.position = offset;
		var i = 0;
		while(byteArray.position < length + offset) {
			float32Array[i] = byteArray.readUnsignedByte();
			++i;
		}
		lime_graphics_opengl_GL.context.bufferData(34962,float32Array,this.bufferUsage);
	}
	,uploadFromFloat32Array: function(data) {
		lime_graphics_opengl_GL.context.bindBuffer(34962,this.glBuffer);
		lime_graphics_opengl_GL.context.bufferData(34962,data,this.bufferUsage);
	}
	,uploadFromVector: function(data,startVertex,numVertices) {
		var bytesPerVertex = this.data32PerVertex * 4;
		lime_graphics_opengl_GL.context.bindBuffer(34962,this.glBuffer);
		var length = numVertices * this.data32PerVertex;
		var offset = startVertex;
		var float32Array;
		var this1;
		if(length != null) {
			this1 = new Float32Array(length);
		} else {
			this1 = null;
		}
		float32Array = this1;
		var _g1 = startVertex;
		var _g = startVertex + length;
		while(_g1 < _g) {
			var i = _g1++;
			float32Array[i] = data.data[i];
		}
		lime_graphics_opengl_GL.context.bufferData(34962,float32Array,this.bufferUsage);
		float32Array = null;
	}
	,__class__: openfl_display3D_VertexBuffer3D
};
var openfl_display3D_textures_TextureBase = function(context,glTexture,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	openfl_events_EventDispatcher.call(this);
	this.context = context;
	this.width = width;
	this.height = height;
	this.glTexture = glTexture;
};
$hxClasses["openfl.display3D.textures.TextureBase"] = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_TextureBase.__name__ = ["openfl","display3D","textures","TextureBase"];
openfl_display3D_textures_TextureBase.__super__ = openfl_events_EventDispatcher;
openfl_display3D_textures_TextureBase.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	dispose: function() {
		this.context.__deleteTexture(this);
	}
	,__class__: openfl_display3D_textures_TextureBase
});
var openfl_display3D_textures_CubeTexture = function(context,glTexture,size) {
	openfl_display3D_textures_TextureBase.call(this,context,glTexture,size,size);
	this.size = size;
	this.mipmapsGenerated = false;
	this._textures = [];
	var _g = 0;
	while(_g < 6) {
		var i = _g++;
		this._textures[i] = lime_graphics_opengl_GL.context.createTexture();
	}
};
$hxClasses["openfl.display3D.textures.CubeTexture"] = openfl_display3D_textures_CubeTexture;
openfl_display3D_textures_CubeTexture.__name__ = ["openfl","display3D","textures","CubeTexture"];
openfl_display3D_textures_CubeTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_CubeTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
	glTextureAt: function(index) {
		return this._textures[index];
	}
	,uploadCompressedTextureFromByteArray: function(data,byteArrayOffset,async) {
		if(async == null) {
			async = false;
		}
	}
	,uploadFromBitmapData: function(bitmapData,side,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var source = bitmapData.image.get_data();
		lime_graphics_opengl_GL.context.bindTexture(34067,this.glTexture);
		switch(side) {
		case 0:
			lime_graphics_opengl_GL.context.texImage2D(34069,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 1:
			lime_graphics_opengl_GL.context.texImage2D(34070,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 2:
			lime_graphics_opengl_GL.context.texImage2D(34071,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 3:
			lime_graphics_opengl_GL.context.texImage2D(34072,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 4:
			lime_graphics_opengl_GL.context.texImage2D(34073,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 5:
			lime_graphics_opengl_GL.context.texImage2D(34074,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		default:
			throw new js__$Boot_HaxeError("unknown side type");
		}
		lime_graphics_opengl_GL.context.bindTexture(34067,null);
	}
	,uploadFromByteArray: function(data,byteArrayOffset,side,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
	}
	,__class__: openfl_display3D_textures_CubeTexture
});
var openfl_display3D_textures_RectangleTexture = function(context,glTexture,optimize,width,height) {
	this.optimizeForRenderToTexture = optimize;
	if(this.optimizeForRenderToTexture == null) {
		this.optimizeForRenderToTexture = false;
	}
	openfl_display3D_textures_TextureBase.call(this,context,glTexture,width,height);
};
$hxClasses["openfl.display3D.textures.RectangleTexture"] = openfl_display3D_textures_RectangleTexture;
openfl_display3D_textures_RectangleTexture.__name__ = ["openfl","display3D","textures","RectangleTexture"];
openfl_display3D_textures_RectangleTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_RectangleTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
	uploadFromBitmapData: function(bitmapData,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var p = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer(bitmapData.image.get_data().buffer);
		this.width = bitmapData.width;
		this.height = bitmapData.height;
		this.uploadFromByteArray(p,0);
	}
	,uploadFromByteArray: function(data,byteArrayOffset) {
		lime_graphics_opengl_GL.context.bindTexture(3553,this.glTexture);
		if(this.optimizeForRenderToTexture) {
			lime_graphics_opengl_GL.context.pixelStorei(37440,1);
		}
		lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
		lime_graphics_opengl_GL.context.texParameteri(3553,10241,9728);
		lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
		lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
		var elements = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data);
		var this1;
		if(elements != null) {
			this1 = new Uint8Array(elements);
		} else {
			this1 = null;
		}
		var source = this1;
		data.position = byteArrayOffset;
		var i = 0;
		while(data.position < openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data)) {
			source[i] = data.readUnsignedByte();
			++i;
		}
		lime_graphics_opengl_GL.context.texImage2D(3553,0,6408,this.width,this.height,0,6408,5121,source);
		lime_graphics_opengl_GL.context.bindTexture(3553,null);
	}
	,__class__: openfl_display3D_textures_RectangleTexture
});
var openfl_display3D_textures_Texture = function(context,glTexture,optimize,width,height) {
	this.optimizeForRenderToTexture = optimize;
	this.mipmapsGenerated = false;
	if(openfl_display3D_textures_Texture.internalFormat == -1) {
		openfl_display3D_textures_Texture.internalFormat = 6408;
	}
	if(this.optimizeForRenderToTexture == null) {
		this.optimizeForRenderToTexture = false;
	}
	openfl_display3D_textures_TextureBase.call(this,context,glTexture,width,height);
};
$hxClasses["openfl.display3D.textures.Texture"] = openfl_display3D_textures_Texture;
openfl_display3D_textures_Texture.__name__ = ["openfl","display3D","textures","Texture"];
openfl_display3D_textures_Texture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_Texture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
	uploadCompressedTextureFromByteArray: function(data,byteArrayOffset,async) {
		if(async == null) {
			async = false;
		}
	}
	,uploadFromBitmapData: function(bitmapData,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var image = bitmapData.image;
		if(!image.get_premultiplied() && image.get_transparent()) {
			image = image.clone();
			image.set_premultiplied(true);
		}
		this.width = image.width;
		this.height = image.height;
		this.uploadFromUInt8Array(image.get_data(),miplevel);
	}
	,uploadFromByteArray: function(data,byteArrayOffset,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var elements = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data);
		var this1;
		if(elements != null) {
			this1 = new Uint8Array(elements);
		} else {
			this1 = null;
		}
		var source = this1;
		data.position = byteArrayOffset;
		var i = 0;
		while(data.position < openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data)) {
			source[i] = data.readUnsignedByte();
			++i;
		}
		this.uploadFromUInt8Array(source,miplevel);
	}
	,uploadFromUInt8Array: function(data,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		lime_graphics_opengl_GL.context.bindTexture(3553,this.glTexture);
		if(this.optimizeForRenderToTexture) {
			lime_graphics_opengl_GL.context.pixelStorei(37440,1);
			lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
			lime_graphics_opengl_GL.context.texParameteri(3553,10241,9728);
			lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
			lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
		}
		lime_graphics_opengl_GL.context.texImage2D(3553,miplevel,openfl_display3D_textures_Texture.internalFormat,this.width,this.height,0,openfl_display3D_textures_Texture.internalFormat,5121,data);
		lime_graphics_opengl_GL.context.bindTexture(3553,null);
	}
	,__class__: openfl_display3D_textures_Texture
});
var openfl_errors_Error = function(message,id) {
	if(id == null) {
		id = 0;
	}
	if(message == null) {
		message = "";
	}
	this.message = message;
	this.errorID = id;
	this.name = "Error";
};
$hxClasses["openfl.errors.Error"] = openfl_errors_Error;
openfl_errors_Error.__name__ = ["openfl","errors","Error"];
openfl_errors_Error.prototype = {
	getStackTrace: function() {
		return haxe_CallStack.toString(haxe_CallStack.exceptionStack());
	}
	,toString: function() {
		if(this.message != null) {
			return this.message;
		} else {
			return "Error";
		}
	}
	,__class__: openfl_errors_Error
};
var openfl_errors_ArgumentError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message);
	this.name = "ArgumentError";
};
$hxClasses["openfl.errors.ArgumentError"] = openfl_errors_ArgumentError;
openfl_errors_ArgumentError.__name__ = ["openfl","errors","ArgumentError"];
openfl_errors_ArgumentError.__super__ = openfl_errors_Error;
openfl_errors_ArgumentError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_ArgumentError
});
var openfl_errors_IOError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message);
	this.name = "IOError";
};
$hxClasses["openfl.errors.IOError"] = openfl_errors_IOError;
openfl_errors_IOError.__name__ = ["openfl","errors","IOError"];
openfl_errors_IOError.__super__ = openfl_errors_Error;
openfl_errors_IOError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_IOError
});
var openfl_errors_EOFError = function() {
	openfl_errors_IOError.call(this,"End of file was encountered");
	this.name = "EOFError";
	this.errorID = 2030;
};
$hxClasses["openfl.errors.EOFError"] = openfl_errors_EOFError;
openfl_errors_EOFError.__name__ = ["openfl","errors","EOFError"];
openfl_errors_EOFError.__super__ = openfl_errors_IOError;
openfl_errors_EOFError.prototype = $extend(openfl_errors_IOError.prototype,{
	__class__: openfl_errors_EOFError
});
var openfl_errors_RangeError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message,0);
	this.name = "RangeError";
};
$hxClasses["openfl.errors.RangeError"] = openfl_errors_RangeError;
openfl_errors_RangeError.__name__ = ["openfl","errors","RangeError"];
openfl_errors_RangeError.__super__ = openfl_errors_Error;
openfl_errors_RangeError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_RangeError
});
var openfl_errors_TypeError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message,0);
	this.name = "TypeError";
};
$hxClasses["openfl.errors.TypeError"] = openfl_errors_TypeError;
openfl_errors_TypeError.__name__ = ["openfl","errors","TypeError"];
openfl_errors_TypeError.__super__ = openfl_errors_Error;
openfl_errors_TypeError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_TypeError
});
var openfl_events_Event = function(type,bubbles,cancelable) {
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	this.type = type;
	this.bubbles = bubbles;
	this.cancelable = cancelable;
	this.eventPhase = 2;
};
$hxClasses["openfl.events.Event"] = openfl_events_Event;
openfl_events_Event.__name__ = ["openfl","events","Event"];
openfl_events_Event.prototype = {
	clone: function() {
		var event = new openfl_events_Event(this.type,this.bubbles,this.cancelable);
		event.eventPhase = this.eventPhase;
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		return event;
	}
	,formatToString: function(className,p1,p2,p3,p4,p5) {
		var parameters = [];
		if(p1 != null) {
			parameters.push(p1);
		}
		if(p2 != null) {
			parameters.push(p2);
		}
		if(p3 != null) {
			parameters.push(p3);
		}
		if(p4 != null) {
			parameters.push(p4);
		}
		if(p5 != null) {
			parameters.push(p5);
		}
		return $bind(this,this.__formatToString).apply(this,[className,parameters]);
	}
	,isDefaultPrevented: function() {
		return this.__preventDefault;
	}
	,preventDefault: function() {
		if(this.cancelable) {
			this.__preventDefault = true;
		}
	}
	,stopImmediatePropagation: function() {
		this.__isCanceled = true;
		this.__isCanceledNow = true;
	}
	,stopPropagation: function() {
		this.__isCanceled = true;
	}
	,toString: function() {
		return this.__formatToString("Event",["type","bubbles","cancelable"]);
	}
	,__formatToString: function(className,parameters) {
		var output = "[" + className;
		var arg = null;
		var _g = 0;
		while(_g < parameters.length) {
			var param = parameters[_g];
			++_g;
			arg = Reflect.field(this,param);
			if(typeof(arg) == "string") {
				output += " " + param + "=\"" + Std.string(arg) + "\"";
			} else {
				output += " " + param + "=" + Std.string(arg);
			}
		}
		output += "]";
		return output;
	}
	,__class__: openfl_events_Event
};
var openfl_events_ActivityEvent = function(type,bubbles,cancelable,activating) {
	if(activating == null) {
		activating = false;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.activating = activating;
};
$hxClasses["openfl.events.ActivityEvent"] = openfl_events_ActivityEvent;
openfl_events_ActivityEvent.__name__ = ["openfl","events","ActivityEvent"];
openfl_events_ActivityEvent.__super__ = openfl_events_Event;
openfl_events_ActivityEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_ActivityEvent(this.type,this.bubbles,this.cancelable,this.activating);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"]);
	}
	,__class__: openfl_events_ActivityEvent
});
var openfl_events_TextEvent = function(type,bubbles,cancelable,text) {
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.text = text;
};
$hxClasses["openfl.events.TextEvent"] = openfl_events_TextEvent;
openfl_events_TextEvent.__name__ = ["openfl","events","TextEvent"];
openfl_events_TextEvent.__super__ = openfl_events_Event;
openfl_events_TextEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_TextEvent(this.type,this.bubbles,this.cancelable,this.text);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("TextEvent",["type","bubbles","cancelable","text"]);
	}
	,__class__: openfl_events_TextEvent
});
var openfl_events_ErrorEvent = function(type,bubbles,cancelable,text,id) {
	if(id == null) {
		id = 0;
	}
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_TextEvent.call(this,type,bubbles,cancelable,text);
	this.errorID = id;
};
$hxClasses["openfl.events.ErrorEvent"] = openfl_events_ErrorEvent;
openfl_events_ErrorEvent.__name__ = ["openfl","events","ErrorEvent"];
openfl_events_ErrorEvent.__super__ = openfl_events_TextEvent;
openfl_events_ErrorEvent.prototype = $extend(openfl_events_TextEvent.prototype,{
	clone: function() {
		var event = new openfl_events_ErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("ErrorEvent",["type","bubbles","cancelable","text","errorID"]);
	}
	,__class__: openfl_events_ErrorEvent
});
var openfl_events__$EventDispatcher_Listener = function(callback,useCapture,priority) {
	this.callback = callback;
	this.useCapture = useCapture;
	this.priority = priority;
};
$hxClasses["openfl.events._EventDispatcher.Listener"] = openfl_events__$EventDispatcher_Listener;
openfl_events__$EventDispatcher_Listener.__name__ = ["openfl","events","_EventDispatcher","Listener"];
openfl_events__$EventDispatcher_Listener.prototype = {
	match: function(callback,useCapture) {
		if(Reflect.compareMethods(this.callback,callback)) {
			return this.useCapture == useCapture;
		} else {
			return false;
		}
	}
	,__class__: openfl_events__$EventDispatcher_Listener
};
var openfl_events_FocusEvent = function(type,bubbles,cancelable,relatedObject,shiftKey,keyCode) {
	if(keyCode == null) {
		keyCode = 0;
	}
	if(shiftKey == null) {
		shiftKey = false;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.keyCode = keyCode;
	this.shiftKey = shiftKey;
	this.relatedObject = relatedObject;
};
$hxClasses["openfl.events.FocusEvent"] = openfl_events_FocusEvent;
openfl_events_FocusEvent.__name__ = ["openfl","events","FocusEvent"];
openfl_events_FocusEvent.__super__ = openfl_events_Event;
openfl_events_FocusEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_FocusEvent(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("FocusEvent",["type","bubbles","cancelable","relatedObject","shiftKey","keyCode"]);
	}
	,__class__: openfl_events_FocusEvent
});
var openfl_events_FullScreenEvent = function(type,bubbles,cancelable,fullScreen,interactive) {
	if(interactive == null) {
		interactive = false;
	}
	if(fullScreen == null) {
		fullScreen = false;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_ActivityEvent.call(this,type,bubbles,cancelable);
	this.fullScreen = fullScreen;
	this.interactive = interactive;
};
$hxClasses["openfl.events.FullScreenEvent"] = openfl_events_FullScreenEvent;
openfl_events_FullScreenEvent.__name__ = ["openfl","events","FullScreenEvent"];
openfl_events_FullScreenEvent.__super__ = openfl_events_ActivityEvent;
openfl_events_FullScreenEvent.prototype = $extend(openfl_events_ActivityEvent.prototype,{
	clone: function() {
		var event = new openfl_events_FullScreenEvent(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"]);
	}
	,__class__: openfl_events_FullScreenEvent
});
var openfl_events_GameInputEvent = function(type,bubbles,cancelable,device) {
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.device = device;
};
$hxClasses["openfl.events.GameInputEvent"] = openfl_events_GameInputEvent;
openfl_events_GameInputEvent.__name__ = ["openfl","events","GameInputEvent"];
openfl_events_GameInputEvent.__super__ = openfl_events_Event;
openfl_events_GameInputEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_GameInputEvent(this.type,this.bubbles,this.cancelable,this.device);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("GameInputEvent",["type","bubbles","cancelable","device"]);
	}
	,__class__: openfl_events_GameInputEvent
});
var openfl_events_HTTPStatusEvent = function(type,bubbles,cancelable,status,redirected) {
	if(redirected == null) {
		redirected = false;
	}
	if(status == null) {
		status = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	this.status = status;
	this.redirected = redirected;
	openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.HTTPStatusEvent"] = openfl_events_HTTPStatusEvent;
openfl_events_HTTPStatusEvent.__name__ = ["openfl","events","HTTPStatusEvent"];
openfl_events_HTTPStatusEvent.__super__ = openfl_events_Event;
openfl_events_HTTPStatusEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_HTTPStatusEvent(this.type,this.bubbles,null,this.status,this.redirected);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable","status","redirected"]);
	}
	,__class__: openfl_events_HTTPStatusEvent
});
var openfl_events_IOErrorEvent = function(type,bubbles,cancelable,text,id) {
	if(id == null) {
		id = 0;
	}
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_ErrorEvent.call(this,type,bubbles,cancelable,text,id);
};
$hxClasses["openfl.events.IOErrorEvent"] = openfl_events_IOErrorEvent;
openfl_events_IOErrorEvent.__name__ = ["openfl","events","IOErrorEvent"];
openfl_events_IOErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_IOErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
	clone: function() {
		var event = new openfl_events_IOErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"]);
	}
	,__class__: openfl_events_IOErrorEvent
});
var openfl_events_KeyboardEvent = function(type,bubbles,cancelable,charCodeValue,keyCodeValue,keyLocationValue,ctrlKeyValue,altKeyValue,shiftKeyValue,controlKeyValue,commandKeyValue) {
	if(commandKeyValue == null) {
		commandKeyValue = false;
	}
	if(controlKeyValue == null) {
		controlKeyValue = false;
	}
	if(shiftKeyValue == null) {
		shiftKeyValue = false;
	}
	if(altKeyValue == null) {
		altKeyValue = false;
	}
	if(ctrlKeyValue == null) {
		ctrlKeyValue = false;
	}
	if(keyCodeValue == null) {
		keyCodeValue = 0;
	}
	if(charCodeValue == null) {
		charCodeValue = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.charCode = charCodeValue;
	this.keyCode = keyCodeValue;
	this.keyLocation = keyLocationValue != null ? keyLocationValue : 0;
	this.ctrlKey = ctrlKeyValue;
	this.altKey = altKeyValue;
	this.shiftKey = shiftKeyValue;
	this.controlKey = controlKeyValue;
	this.commandKey = commandKeyValue;
};
$hxClasses["openfl.events.KeyboardEvent"] = openfl_events_KeyboardEvent;
openfl_events_KeyboardEvent.__name__ = ["openfl","events","KeyboardEvent"];
openfl_events_KeyboardEvent.__super__ = openfl_events_Event;
openfl_events_KeyboardEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_KeyboardEvent(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("KeyboardEvent",["type","bubbles","cancelable","charCode","keyCode","keyLocation","ctrlKey","altKey","shiftKey"]);
	}
	,__class__: openfl_events_KeyboardEvent
});
var openfl_events_MouseEvent = function(type,bubbles,cancelable,localX,localY,relatedObject,ctrlKey,altKey,shiftKey,buttonDown,delta,commandKey,clickCount) {
	if(clickCount == null) {
		clickCount = 0;
	}
	if(commandKey == null) {
		commandKey = false;
	}
	if(delta == null) {
		delta = 0;
	}
	if(buttonDown == null) {
		buttonDown = false;
	}
	if(shiftKey == null) {
		shiftKey = false;
	}
	if(altKey == null) {
		altKey = false;
	}
	if(ctrlKey == null) {
		ctrlKey = false;
	}
	if(localY == null) {
		localY = 0;
	}
	if(localX == null) {
		localX = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.shiftKey = shiftKey;
	this.altKey = altKey;
	this.ctrlKey = ctrlKey;
	this.bubbles = bubbles;
	this.relatedObject = relatedObject;
	this.delta = delta;
	this.localX = localX;
	this.localY = localY;
	this.buttonDown = buttonDown;
	this.commandKey = commandKey;
	this.clickCount = clickCount;
};
$hxClasses["openfl.events.MouseEvent"] = openfl_events_MouseEvent;
openfl_events_MouseEvent.__name__ = ["openfl","events","MouseEvent"];
openfl_events_MouseEvent.__altKey = null;
openfl_events_MouseEvent.__buttonDown = null;
openfl_events_MouseEvent.__commandKey = null;
openfl_events_MouseEvent.__ctrlKey = null;
openfl_events_MouseEvent.__shiftKey = null;
openfl_events_MouseEvent.__create = function(type,button,stageX,stageY,local,target,delta) {
	if(delta == null) {
		delta = 0;
	}
	switch(type) {
	case "mouseDown":
		openfl_events_MouseEvent.__buttonDown = true;
		break;
	case "mouseUp":
		openfl_events_MouseEvent.__buttonDown = false;
		break;
	default:
	}
	var event = new openfl_events_MouseEvent(type,true,false,local.x,local.y,null,openfl_events_MouseEvent.__ctrlKey,openfl_events_MouseEvent.__altKey,openfl_events_MouseEvent.__shiftKey,openfl_events_MouseEvent.__buttonDown,delta,openfl_events_MouseEvent.__commandKey);
	event.stageX = stageX;
	event.stageY = stageY;
	event.target = target;
	return event;
};
openfl_events_MouseEvent.__super__ = openfl_events_Event;
openfl_events_MouseEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_MouseEvent(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta,this.commandKey,this.clickCount);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("MouseEvent",["type","bubbles","cancelable","localX","localY","relatedObject","ctrlKey","altKey","shiftKey","buttonDown","delta"]);
	}
	,updateAfterEvent: function() {
	}
	,__class__: openfl_events_MouseEvent
});
var openfl_events_NetStatusEvent = function(type,bubbles,cancelable,info) {
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	this.info = info;
	openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.NetStatusEvent"] = openfl_events_NetStatusEvent;
openfl_events_NetStatusEvent.__name__ = ["openfl","events","NetStatusEvent"];
openfl_events_NetStatusEvent.__super__ = openfl_events_Event;
openfl_events_NetStatusEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_NetStatusEvent(this.type,this.bubbles,this.cancelable,this.info);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"]);
	}
	,__class__: openfl_events_NetStatusEvent
});
var openfl_events_ProgressEvent = function(type,bubbles,cancelable,bytesLoaded,bytesTotal) {
	if(bytesTotal == null) {
		bytesTotal = 0;
	}
	if(bytesLoaded == null) {
		bytesLoaded = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.bytesLoaded = bytesLoaded;
	this.bytesTotal = bytesTotal;
};
$hxClasses["openfl.events.ProgressEvent"] = openfl_events_ProgressEvent;
openfl_events_ProgressEvent.__name__ = ["openfl","events","ProgressEvent"];
openfl_events_ProgressEvent.__super__ = openfl_events_Event;
openfl_events_ProgressEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_ProgressEvent(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"]);
	}
	,__class__: openfl_events_ProgressEvent
});
var openfl_events_SecurityErrorEvent = function(type,bubbles,cancelable,text,id) {
	if(id == null) {
		id = 0;
	}
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_ErrorEvent.call(this,type,bubbles,cancelable,text,id);
};
$hxClasses["openfl.events.SecurityErrorEvent"] = openfl_events_SecurityErrorEvent;
openfl_events_SecurityErrorEvent.__name__ = ["openfl","events","SecurityErrorEvent"];
openfl_events_SecurityErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_SecurityErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
	clone: function() {
		var event = new openfl_events_SecurityErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"]);
	}
	,__class__: openfl_events_SecurityErrorEvent
});
var openfl_events_TouchEvent = function(type,bubbles,cancelable,touchPointID,isPrimaryTouchPoint,localX,localY,sizeX,sizeY,pressure,relatedObject,ctrlKey,altKey,shiftKey,commandKey,controlKey,timestamp,touchIntent,samples,isTouchPointCanceled) {
	if(isTouchPointCanceled == null) {
		isTouchPointCanceled = false;
	}
	if(timestamp == null) {
		timestamp = 0;
	}
	if(controlKey == null) {
		controlKey = false;
	}
	if(commandKey == null) {
		commandKey = false;
	}
	if(shiftKey == null) {
		shiftKey = false;
	}
	if(altKey == null) {
		altKey = false;
	}
	if(ctrlKey == null) {
		ctrlKey = false;
	}
	if(pressure == null) {
		pressure = 0;
	}
	if(sizeY == null) {
		sizeY = 0;
	}
	if(sizeX == null) {
		sizeX = 0;
	}
	if(localY == null) {
		localY = 0;
	}
	if(localX == null) {
		localX = 0;
	}
	if(isPrimaryTouchPoint == null) {
		isPrimaryTouchPoint = false;
	}
	if(touchPointID == null) {
		touchPointID = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.touchPointID = touchPointID;
	this.isPrimaryTouchPoint = isPrimaryTouchPoint;
	this.localX = localX;
	this.localY = localY;
	this.sizeX = sizeX;
	this.sizeY = sizeY;
	this.pressure = pressure;
	this.relatedObject = relatedObject;
	this.ctrlKey = ctrlKey;
	this.altKey = altKey;
	this.shiftKey = shiftKey;
	this.commandKey = commandKey;
	this.controlKey = controlKey;
};
$hxClasses["openfl.events.TouchEvent"] = openfl_events_TouchEvent;
openfl_events_TouchEvent.__name__ = ["openfl","events","TouchEvent"];
openfl_events_TouchEvent.__create = function(type,touch,stageX,stageY,local,target) {
	var evt = new openfl_events_TouchEvent(type,true,false,0,true,local.x,local.y,1,1,1);
	evt.stageX = stageX;
	evt.stageY = stageY;
	evt.target = target;
	return evt;
};
openfl_events_TouchEvent.__super__ = openfl_events_Event;
openfl_events_TouchEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_TouchEvent(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey,this.controlKey);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("TouchEvent",["type","bubbles","cancelable","touchPointID","isPrimaryTouchPoint","localX","localY","sizeX","sizeY","pressure","relatedObject","ctrlKey","altKey","shiftKey","commandKey","controlKey"]);
	}
	,updateAfterEvent: function() {
	}
	,__class__: openfl_events_TouchEvent
});
var openfl_filters_BitmapFilter = function() {
	this.__saveLastFilter = false;
	this.__passes = 0;
	this.__dirty = true;
};
$hxClasses["openfl.filters.BitmapFilter"] = openfl_filters_BitmapFilter;
openfl_filters_BitmapFilter.__name__ = ["openfl","filters","BitmapFilter"];
openfl_filters_BitmapFilter.__tmpRenderTexture = null;
openfl_filters_BitmapFilter.__applyFilters = function(filters,renderSession,source,target,sourceRect,destPoint) {
	var same = target == source && target.__usingPingPongTexture;
	if(same) {
		target.__pingPongTexture.useOldTexture = true;
	}
	if(sourceRect == null) {
		sourceRect = source.rect;
	}
	var lastFilterOutput = null;
	var useLastFilter = false;
	var srcShader = source.__shader;
	var _g = 0;
	while(_g < filters.length) {
		var filter = filters[_g];
		++_g;
		useLastFilter = false;
		if(filter.__saveLastFilter) {
			target.__pingPongTexture.swap();
			target.__drawGL(renderSession,source,null,null,null,sourceRect,true,!target.__usingPingPongTexture,true);
			var _this = target.__pingPongTexture;
			if(_this.__swapped) {
				lastFilterOutput = _this.__texture0;
			} else {
				lastFilterOutput = _this.__texture1;
			}
			var _this1 = target.__pingPongTexture;
			var v = openfl_filters_BitmapFilter.__tmpRenderTexture;
			if(_this1.__swapped) {
				_this1.__texture0 = v;
			} else {
				_this1.__texture1 = v;
			}
		}
		var _g2 = 0;
		var _g1 = filter.__passes;
		while(_g2 < _g1) {
			var pass = _g2++;
			if(filter.__saveLastFilter) {
				useLastFilter = filter.__useLastFilter(pass);
			} else {
				useLastFilter = false;
			}
			if(same && !useLastFilter) {
				target.__pingPongTexture.swap();
			}
			if(useLastFilter) {
				var _this2 = target.__pingPongTexture;
				openfl_filters_BitmapFilter.__tmpRenderTexture = _this2.__swapped ? _this2.__texture0 : _this2.__texture1;
				var _this3 = target.__pingPongTexture;
				if(_this3.__swapped) {
					_this3.__texture0 = lastFilterOutput;
				} else {
					_this3.__texture1 = lastFilterOutput;
				}
			}
			source.__shader = filter.__preparePass(pass);
			target.__drawGL(renderSession,source,null,null,null,sourceRect,true,!target.__usingPingPongTexture,!useLastFilter);
		}
	}
	source.__shader = srcShader;
	if(same) {
		target.__pingPongTexture.useOldTexture = false;
	}
};
openfl_filters_BitmapFilter.__expandBounds = function(filters,rect,matrix) {
	var r = openfl_geom_Rectangle.__temp;
	r.setEmpty();
	var _g = 0;
	while(_g < filters.length) {
		var filter = filters[_g];
		++_g;
		filter.__growBounds(r);
	}
	r.__transform(r,matrix);
	rect.__expand(r.x,r.y,r.width,r.height);
};
openfl_filters_BitmapFilter.prototype = {
	clone: function() {
		return new openfl_filters_BitmapFilter();
	}
	,__applyFilter: function(sourceData,targetData,sourceRect,destPoint) {
	}
	,__growBounds: function(rect) {
	}
	,__preparePass: function(pass) {
		return null;
	}
	,__useLastFilter: function(pass) {
		return false;
	}
	,__class__: openfl_filters_BitmapFilter
};
var openfl_geom_Matrix3D = function(v) {
	if(v != null && v.length == 16) {
		this.rawData = v;
	} else {
		var value = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.rawData = vectorData;
	}
};
$hxClasses["openfl.geom.Matrix3D"] = openfl_geom_Matrix3D;
openfl_geom_Matrix3D.__name__ = ["openfl","geom","Matrix3D"];
openfl_geom_Matrix3D.create2D = function(x,y,scale,rotation) {
	if(rotation == null) {
		rotation = 0;
	}
	if(scale == null) {
		scale = 1;
	}
	var theta = rotation * Math.PI / 180.0;
	var c = Math.cos(theta);
	var s = Math.sin(theta);
	var value = [c * scale,-s * scale,0,0,s * scale,c * scale,0,0,0,0,1,0,x,y,0,1];
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return new openfl_geom_Matrix3D(vectorData);
};
openfl_geom_Matrix3D.createABCD = function(a,b,c,d,tx,ty) {
	var value = [a,b,0,0,c,d,0,0,0,0,1,0,tx,ty,0,1];
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return new openfl_geom_Matrix3D(vectorData);
};
openfl_geom_Matrix3D.createOrtho = function(x0,x1,y0,y1,zNear,zFar) {
	var sx = 1.0 / (x1 - x0);
	var sy = 1.0 / (y1 - y0);
	var sz = 1.0 / (zFar - zNear);
	var value = [2.0 * sx,0,0,0,0,2.0 * sy,0,0,0,0,-2.0 * sz,0,-(x0 + x1) * sx,-(y0 + y1) * sy,-(zNear + zFar) * sz,1];
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return new openfl_geom_Matrix3D(vectorData);
};
openfl_geom_Matrix3D.interpolate = function(thisMat,toMat,percent) {
	var m = new openfl_geom_Matrix3D();
	var _g = 0;
	while(_g < 16) {
		var i = _g++;
		var this1 = m.rawData;
		var value = thisMat.rawData.data[i] + (toMat.rawData.data[i] - thisMat.rawData.data[i]) * percent;
		if(!this1.fixed) {
			if(i >= this1.length) {
				this1.length = i + 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var this2 = new Array(length);
				var data = this2;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[i] = value;
	}
	return m;
};
openfl_geom_Matrix3D.__getAxisRotation = function(x,y,z,degrees) {
	var m = new openfl_geom_Matrix3D();
	var a1 = new openfl_geom_Vector3D(x,y,z);
	var rad = -degrees * (Math.PI / 180);
	var c = Math.cos(rad);
	var s = Math.sin(rad);
	var t = 1.0 - c;
	var this1 = m.rawData;
	var value = c + a1.x * a1.x * t;
	if(!this1.fixed) {
		if(0 >= this1.length) {
			this1.length = 1;
		}
		if(this1.data.length < this1.length) {
			var length = this1.data.length + 10;
			var this2 = new Array(length);
			var data = this2;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
			this1.data = data;
		}
	}
	this1.data[0] = value;
	var this3 = m.rawData;
	var value1 = c + a1.y * a1.y * t;
	if(!this3.fixed) {
		if(5 >= this3.length) {
			this3.length = 6;
		}
		if(this3.data.length < this3.length) {
			var length1 = this3.data.length + 10;
			var this4 = new Array(length1);
			var data1 = this4;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
			this3.data = data1;
		}
	}
	this3.data[5] = value1;
	var this5 = m.rawData;
	var value2 = c + a1.z * a1.z * t;
	if(!this5.fixed) {
		if(10 >= this5.length) {
			this5.length = 11;
		}
		if(this5.data.length < this5.length) {
			var length2 = this5.data.length + 10;
			var this6 = new Array(length2);
			var data2 = this6;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
			this5.data = data2;
		}
	}
	this5.data[10] = value2;
	var tmp1 = a1.x * a1.y * t;
	var tmp2 = a1.z * s;
	var this7 = m.rawData;
	if(!this7.fixed) {
		if(4 >= this7.length) {
			this7.length = 5;
		}
		if(this7.data.length < this7.length) {
			var length3 = this7.data.length + 10;
			var this8 = new Array(length3);
			var data3 = this8;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
			this7.data = data3;
		}
	}
	this7.data[4] = tmp1 + tmp2;
	var this9 = m.rawData;
	if(!this9.fixed) {
		if(1 >= this9.length) {
			this9.length = 2;
		}
		if(this9.data.length < this9.length) {
			var length4 = this9.data.length + 10;
			var this10 = new Array(length4);
			var data4 = this10;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
			this9.data = data4;
		}
	}
	this9.data[1] = tmp1 - tmp2;
	tmp1 = a1.x * a1.z * t;
	tmp2 = a1.y * s;
	var this11 = m.rawData;
	if(!this11.fixed) {
		if(8 >= this11.length) {
			this11.length = 9;
		}
		if(this11.data.length < this11.length) {
			var length5 = this11.data.length + 10;
			var this12 = new Array(length5);
			var data5 = this12;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
			this11.data = data5;
		}
	}
	this11.data[8] = tmp1 - tmp2;
	var this13 = m.rawData;
	if(!this13.fixed) {
		if(2 >= this13.length) {
			this13.length = 3;
		}
		if(this13.data.length < this13.length) {
			var length6 = this13.data.length + 10;
			var this14 = new Array(length6);
			var data6 = this14;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
			this13.data = data6;
		}
	}
	this13.data[2] = tmp1 + tmp2;
	tmp1 = a1.y * a1.z * t;
	tmp2 = a1.x * s;
	var this15 = m.rawData;
	if(!this15.fixed) {
		if(9 >= this15.length) {
			this15.length = 10;
		}
		if(this15.data.length < this15.length) {
			var length7 = this15.data.length + 10;
			var this16 = new Array(length7);
			var data7 = this16;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
			this15.data = data7;
		}
	}
	this15.data[9] = tmp1 + tmp2;
	var this17 = m.rawData;
	if(!this17.fixed) {
		if(6 >= this17.length) {
			this17.length = 7;
		}
		if(this17.data.length < this17.length) {
			var length8 = this17.data.length + 10;
			var this18 = new Array(length8);
			var data8 = this18;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
			this17.data = data8;
		}
	}
	this17.data[6] = tmp1 - tmp2;
	return m;
};
openfl_geom_Matrix3D.prototype = {
	append: function(lhs) {
		var m111 = this.rawData.data[0];
		var m121 = this.rawData.data[4];
		var m131 = this.rawData.data[8];
		var m141 = this.rawData.data[12];
		var m112 = this.rawData.data[1];
		var m122 = this.rawData.data[5];
		var m132 = this.rawData.data[9];
		var m142 = this.rawData.data[13];
		var m113 = this.rawData.data[2];
		var m123 = this.rawData.data[6];
		var m133 = this.rawData.data[10];
		var m143 = this.rawData.data[14];
		var m114 = this.rawData.data[3];
		var m124 = this.rawData.data[7];
		var m134 = this.rawData.data[11];
		var m144 = this.rawData.data[15];
		var m211 = lhs.rawData.data[0];
		var m221 = lhs.rawData.data[4];
		var m231 = lhs.rawData.data[8];
		var m241 = lhs.rawData.data[12];
		var m212 = lhs.rawData.data[1];
		var m222 = lhs.rawData.data[5];
		var m232 = lhs.rawData.data[9];
		var m242 = lhs.rawData.data[13];
		var m213 = lhs.rawData.data[2];
		var m223 = lhs.rawData.data[6];
		var m233 = lhs.rawData.data[10];
		var m243 = lhs.rawData.data[14];
		var m214 = lhs.rawData.data[3];
		var m224 = lhs.rawData.data[7];
		var m234 = lhs.rawData.data[11];
		var m244 = lhs.rawData.data[15];
		var this1 = this.rawData;
		if(!this1.fixed) {
			if(0 >= this1.length) {
				this1.length = 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var this2 = new Array(length);
				var data = this2;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
		var this3 = this.rawData;
		if(!this3.fixed) {
			if(1 >= this3.length) {
				this3.length = 2;
			}
			if(this3.data.length < this3.length) {
				var length1 = this3.data.length + 10;
				var this4 = new Array(length1);
				var data1 = this4;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
				this3.data = data1;
			}
		}
		this3.data[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
		var this5 = this.rawData;
		if(!this5.fixed) {
			if(2 >= this5.length) {
				this5.length = 3;
			}
			if(this5.data.length < this5.length) {
				var length2 = this5.data.length + 10;
				var this6 = new Array(length2);
				var data2 = this6;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
				this5.data = data2;
			}
		}
		this5.data[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
		var this7 = this.rawData;
		if(!this7.fixed) {
			if(3 >= this7.length) {
				this7.length = 4;
			}
			if(this7.data.length < this7.length) {
				var length3 = this7.data.length + 10;
				var this8 = new Array(length3);
				var data3 = this8;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
				this7.data = data3;
			}
		}
		this7.data[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
		var this9 = this.rawData;
		if(!this9.fixed) {
			if(4 >= this9.length) {
				this9.length = 5;
			}
			if(this9.data.length < this9.length) {
				var length4 = this9.data.length + 10;
				var this10 = new Array(length4);
				var data4 = this10;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
				this9.data = data4;
			}
		}
		this9.data[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
		var this11 = this.rawData;
		if(!this11.fixed) {
			if(5 >= this11.length) {
				this11.length = 6;
			}
			if(this11.data.length < this11.length) {
				var length5 = this11.data.length + 10;
				var this12 = new Array(length5);
				var data5 = this12;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
				this11.data = data5;
			}
		}
		this11.data[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
		var this13 = this.rawData;
		if(!this13.fixed) {
			if(6 >= this13.length) {
				this13.length = 7;
			}
			if(this13.data.length < this13.length) {
				var length6 = this13.data.length + 10;
				var this14 = new Array(length6);
				var data6 = this14;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
				this13.data = data6;
			}
		}
		this13.data[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
		var this15 = this.rawData;
		if(!this15.fixed) {
			if(7 >= this15.length) {
				this15.length = 8;
			}
			if(this15.data.length < this15.length) {
				var length7 = this15.data.length + 10;
				var this16 = new Array(length7);
				var data7 = this16;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
				this15.data = data7;
			}
		}
		this15.data[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
		var this17 = this.rawData;
		if(!this17.fixed) {
			if(8 >= this17.length) {
				this17.length = 9;
			}
			if(this17.data.length < this17.length) {
				var length8 = this17.data.length + 10;
				var this18 = new Array(length8);
				var data8 = this18;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
				this17.data = data8;
			}
		}
		this17.data[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
		var this19 = this.rawData;
		if(!this19.fixed) {
			if(9 >= this19.length) {
				this19.length = 10;
			}
			if(this19.data.length < this19.length) {
				var length9 = this19.data.length + 10;
				var this20 = new Array(length9);
				var data9 = this20;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
				this19.data = data9;
			}
		}
		this19.data[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
		var this21 = this.rawData;
		if(!this21.fixed) {
			if(10 >= this21.length) {
				this21.length = 11;
			}
			if(this21.data.length < this21.length) {
				var length10 = this21.data.length + 10;
				var this22 = new Array(length10);
				var data10 = this22;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
				this21.data = data10;
			}
		}
		this21.data[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
		var this23 = this.rawData;
		if(!this23.fixed) {
			if(11 >= this23.length) {
				this23.length = 12;
			}
			if(this23.data.length < this23.length) {
				var length11 = this23.data.length + 10;
				var this24 = new Array(length11);
				var data11 = this24;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
				this23.data = data11;
			}
		}
		this23.data[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
		var this25 = this.rawData;
		if(!this25.fixed) {
			if(12 >= this25.length) {
				this25.length = 13;
			}
			if(this25.data.length < this25.length) {
				var length12 = this25.data.length + 10;
				var this26 = new Array(length12);
				var data12 = this26;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
				this25.data = data12;
			}
		}
		this25.data[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
		var this27 = this.rawData;
		if(!this27.fixed) {
			if(13 >= this27.length) {
				this27.length = 14;
			}
			if(this27.data.length < this27.length) {
				var length13 = this27.data.length + 10;
				var this28 = new Array(length13);
				var data13 = this28;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
				this27.data = data13;
			}
		}
		this27.data[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
		var this29 = this.rawData;
		if(!this29.fixed) {
			if(14 >= this29.length) {
				this29.length = 15;
			}
			if(this29.data.length < this29.length) {
				var length14 = this29.data.length + 10;
				var this30 = new Array(length14);
				var data14 = this30;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
				this29.data = data14;
			}
		}
		this29.data[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
		var this31 = this.rawData;
		if(!this31.fixed) {
			if(15 >= this31.length) {
				this31.length = 16;
			}
			if(this31.data.length < this31.length) {
				var length15 = this31.data.length + 10;
				var this32 = new Array(length15);
				var data15 = this32;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
				this31.data = data15;
			}
		}
		this31.data[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
	}
	,appendRotation: function(degrees,axis,pivotPoint) {
		var m = openfl_geom_Matrix3D.__getAxisRotation(axis.x,axis.y,axis.z,degrees);
		if(pivotPoint != null) {
			var p = pivotPoint;
			m.appendTranslation(p.x,p.y,p.z);
		}
		this.append(m);
	}
	,appendScale: function(xScale,yScale,zScale) {
		var value = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.append(new openfl_geom_Matrix3D(vectorData));
	}
	,appendTranslation: function(x,y,z) {
		var _g = this.rawData;
		var value = _g.data[12] + x;
		if(!_g.fixed) {
			if(12 >= _g.length) {
				_g.length = 13;
			}
			if(_g.data.length < _g.length) {
				var length = _g.data.length + 10;
				var this1 = new Array(length);
				var data = this1;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g.data,0,data,0,_g.data.length);
				_g.data = data;
			}
		}
		_g.data[12] = value;
		var _g1 = this.rawData;
		var value1 = _g1.data[13] + y;
		if(!_g1.fixed) {
			if(13 >= _g1.length) {
				_g1.length = 14;
			}
			if(_g1.data.length < _g1.length) {
				var length1 = _g1.data.length + 10;
				var this2 = new Array(length1);
				var data1 = this2;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g1.data,0,data1,0,_g1.data.length);
				_g1.data = data1;
			}
		}
		_g1.data[13] = value1;
		var _g2 = this.rawData;
		var value2 = _g2.data[14] + z;
		if(!_g2.fixed) {
			if(14 >= _g2.length) {
				_g2.length = 15;
			}
			if(_g2.data.length < _g2.length) {
				var length2 = _g2.data.length + 10;
				var this3 = new Array(length2);
				var data2 = this3;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g2.data,0,data2,0,_g2.data.length);
				_g2.data = data2;
			}
		}
		_g2.data[14] = value2;
	}
	,clone: function() {
		var this1 = this.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		var this2 = new Array(length);
		vectorData.data = this2;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		return new openfl_geom_Matrix3D(vectorData);
	}
	,copyColumnFrom: function(column,vector3D) {
		switch(column) {
		case 0:
			var this1 = this.rawData;
			var value = vector3D.x;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = value;
			var this3 = this.rawData;
			var value1 = vector3D.y;
			if(!this3.fixed) {
				if(1 >= this3.length) {
					this3.length = 2;
				}
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
			}
			this3.data[1] = value1;
			var this5 = this.rawData;
			var value2 = vector3D.z;
			if(!this5.fixed) {
				if(2 >= this5.length) {
					this5.length = 3;
				}
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
			}
			this5.data[2] = value2;
			var this7 = this.rawData;
			var value3 = vector3D.w;
			if(!this7.fixed) {
				if(3 >= this7.length) {
					this7.length = 4;
				}
				if(this7.data.length < this7.length) {
					var length3 = this7.data.length + 10;
					var this8 = new Array(length3);
					var data3 = this8;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
					this7.data = data3;
				}
			}
			this7.data[3] = value3;
			break;
		case 1:
			var this9 = this.rawData;
			var value4 = vector3D.x;
			if(!this9.fixed) {
				if(4 >= this9.length) {
					this9.length = 5;
				}
				if(this9.data.length < this9.length) {
					var length4 = this9.data.length + 10;
					var this10 = new Array(length4);
					var data4 = this10;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
					this9.data = data4;
				}
			}
			this9.data[4] = value4;
			var this11 = this.rawData;
			var value5 = vector3D.y;
			if(!this11.fixed) {
				if(5 >= this11.length) {
					this11.length = 6;
				}
				if(this11.data.length < this11.length) {
					var length5 = this11.data.length + 10;
					var this12 = new Array(length5);
					var data5 = this12;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
					this11.data = data5;
				}
			}
			this11.data[5] = value5;
			var this13 = this.rawData;
			var value6 = vector3D.z;
			if(!this13.fixed) {
				if(6 >= this13.length) {
					this13.length = 7;
				}
				if(this13.data.length < this13.length) {
					var length6 = this13.data.length + 10;
					var this14 = new Array(length6);
					var data6 = this14;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
					this13.data = data6;
				}
			}
			this13.data[6] = value6;
			var this15 = this.rawData;
			var value7 = vector3D.w;
			if(!this15.fixed) {
				if(7 >= this15.length) {
					this15.length = 8;
				}
				if(this15.data.length < this15.length) {
					var length7 = this15.data.length + 10;
					var this16 = new Array(length7);
					var data7 = this16;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
					this15.data = data7;
				}
			}
			this15.data[7] = value7;
			break;
		case 2:
			var this17 = this.rawData;
			var value8 = vector3D.x;
			if(!this17.fixed) {
				if(8 >= this17.length) {
					this17.length = 9;
				}
				if(this17.data.length < this17.length) {
					var length8 = this17.data.length + 10;
					var this18 = new Array(length8);
					var data8 = this18;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
					this17.data = data8;
				}
			}
			this17.data[8] = value8;
			var this19 = this.rawData;
			var value9 = vector3D.y;
			if(!this19.fixed) {
				if(9 >= this19.length) {
					this19.length = 10;
				}
				if(this19.data.length < this19.length) {
					var length9 = this19.data.length + 10;
					var this20 = new Array(length9);
					var data9 = this20;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
					this19.data = data9;
				}
			}
			this19.data[9] = value9;
			var this21 = this.rawData;
			var value10 = vector3D.z;
			if(!this21.fixed) {
				if(10 >= this21.length) {
					this21.length = 11;
				}
				if(this21.data.length < this21.length) {
					var length10 = this21.data.length + 10;
					var this22 = new Array(length10);
					var data10 = this22;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
					this21.data = data10;
				}
			}
			this21.data[10] = value10;
			var this23 = this.rawData;
			var value11 = vector3D.w;
			if(!this23.fixed) {
				if(11 >= this23.length) {
					this23.length = 12;
				}
				if(this23.data.length < this23.length) {
					var length11 = this23.data.length + 10;
					var this24 = new Array(length11);
					var data11 = this24;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
					this23.data = data11;
				}
			}
			this23.data[11] = value11;
			break;
		case 3:
			var this25 = this.rawData;
			var value12 = vector3D.x;
			if(!this25.fixed) {
				if(12 >= this25.length) {
					this25.length = 13;
				}
				if(this25.data.length < this25.length) {
					var length12 = this25.data.length + 10;
					var this26 = new Array(length12);
					var data12 = this26;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
					this25.data = data12;
				}
			}
			this25.data[12] = value12;
			var this27 = this.rawData;
			var value13 = vector3D.y;
			if(!this27.fixed) {
				if(13 >= this27.length) {
					this27.length = 14;
				}
				if(this27.data.length < this27.length) {
					var length13 = this27.data.length + 10;
					var this28 = new Array(length13);
					var data13 = this28;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
					this27.data = data13;
				}
			}
			this27.data[13] = value13;
			var this29 = this.rawData;
			var value14 = vector3D.z;
			if(!this29.fixed) {
				if(14 >= this29.length) {
					this29.length = 15;
				}
				if(this29.data.length < this29.length) {
					var length14 = this29.data.length + 10;
					var this30 = new Array(length14);
					var data14 = this30;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
					this29.data = data14;
				}
			}
			this29.data[14] = value14;
			var this31 = this.rawData;
			var value15 = vector3D.w;
			if(!this31.fixed) {
				if(15 >= this31.length) {
					this31.length = 16;
				}
				if(this31.data.length < this31.length) {
					var length15 = this31.data.length + 10;
					var this32 = new Array(length15);
					var data15 = this32;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
					this31.data = data15;
				}
			}
			this31.data[15] = value15;
			break;
		default:
		}
	}
	,copyColumnTo: function(column,vector3D) {
		switch(column) {
		case 0:
			vector3D.x = this.rawData.data[0];
			vector3D.y = this.rawData.data[1];
			vector3D.z = this.rawData.data[2];
			vector3D.w = this.rawData.data[3];
			break;
		case 1:
			vector3D.x = this.rawData.data[4];
			vector3D.y = this.rawData.data[5];
			vector3D.z = this.rawData.data[6];
			vector3D.w = this.rawData.data[7];
			break;
		case 2:
			vector3D.x = this.rawData.data[8];
			vector3D.y = this.rawData.data[9];
			vector3D.z = this.rawData.data[10];
			vector3D.w = this.rawData.data[11];
			break;
		case 3:
			vector3D.x = this.rawData.data[12];
			vector3D.y = this.rawData.data[13];
			vector3D.z = this.rawData.data[14];
			vector3D.w = this.rawData.data[15];
			break;
		default:
		}
	}
	,copyFrom: function(other) {
		var this1 = other.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		var this2 = new Array(length);
		vectorData.data = this2;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		this.rawData = vectorData;
	}
	,copyRawDataFrom: function(vector,index,transpose) {
		if(transpose == null) {
			transpose = false;
		}
		if(index == null) {
			index = 0;
		}
		if(transpose) {
			this.transpose();
		}
		var length = vector.length - index;
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i = _g1++;
			var this1 = this.rawData;
			var value = vector.data[i + index];
			if(!this1.fixed) {
				if(i >= this1.length) {
					this1.length = i + 1;
				}
				if(this1.data.length < this1.length) {
					var length1 = this1.data.length + 10;
					var this2 = new Array(length1);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[i] = value;
		}
		if(transpose) {
			this.transpose();
		}
	}
	,copyRawDataTo: function(vector,index,transpose) {
		if(transpose == null) {
			transpose = false;
		}
		if(index == null) {
			index = 0;
		}
		if(transpose) {
			this.transpose();
		}
		var _g1 = 0;
		var _g = this.rawData.length;
		while(_g1 < _g) {
			var i = _g1++;
			var key = i + index;
			var value = this.rawData.data[i];
			if(!vector.fixed) {
				if(key >= vector.length) {
					vector.length = key + 1;
				}
				if(vector.data.length < vector.length) {
					var length = vector.data.length + 10;
					var this1 = new Array(length);
					var data = this1;
					haxe_ds__$Vector_Vector_$Impl_$.blit(vector.data,0,data,0,vector.data.length);
					vector.data = data;
				}
			}
			vector.data[key] = value;
		}
		if(transpose) {
			this.transpose();
		}
	}
	,copyRowFrom: function(row,vector3D) {
		switch(row) {
		case 0:
			var this1 = this.rawData;
			var value = vector3D.x;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = value;
			var this3 = this.rawData;
			var value1 = vector3D.y;
			if(!this3.fixed) {
				if(4 >= this3.length) {
					this3.length = 5;
				}
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
			}
			this3.data[4] = value1;
			var this5 = this.rawData;
			var value2 = vector3D.z;
			if(!this5.fixed) {
				if(8 >= this5.length) {
					this5.length = 9;
				}
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
			}
			this5.data[8] = value2;
			var this7 = this.rawData;
			var value3 = vector3D.w;
			if(!this7.fixed) {
				if(12 >= this7.length) {
					this7.length = 13;
				}
				if(this7.data.length < this7.length) {
					var length3 = this7.data.length + 10;
					var this8 = new Array(length3);
					var data3 = this8;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
					this7.data = data3;
				}
			}
			this7.data[12] = value3;
			break;
		case 1:
			var this9 = this.rawData;
			var value4 = vector3D.x;
			if(!this9.fixed) {
				if(1 >= this9.length) {
					this9.length = 2;
				}
				if(this9.data.length < this9.length) {
					var length4 = this9.data.length + 10;
					var this10 = new Array(length4);
					var data4 = this10;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
					this9.data = data4;
				}
			}
			this9.data[1] = value4;
			var this11 = this.rawData;
			var value5 = vector3D.y;
			if(!this11.fixed) {
				if(5 >= this11.length) {
					this11.length = 6;
				}
				if(this11.data.length < this11.length) {
					var length5 = this11.data.length + 10;
					var this12 = new Array(length5);
					var data5 = this12;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
					this11.data = data5;
				}
			}
			this11.data[5] = value5;
			var this13 = this.rawData;
			var value6 = vector3D.z;
			if(!this13.fixed) {
				if(9 >= this13.length) {
					this13.length = 10;
				}
				if(this13.data.length < this13.length) {
					var length6 = this13.data.length + 10;
					var this14 = new Array(length6);
					var data6 = this14;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
					this13.data = data6;
				}
			}
			this13.data[9] = value6;
			var this15 = this.rawData;
			var value7 = vector3D.w;
			if(!this15.fixed) {
				if(13 >= this15.length) {
					this15.length = 14;
				}
				if(this15.data.length < this15.length) {
					var length7 = this15.data.length + 10;
					var this16 = new Array(length7);
					var data7 = this16;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
					this15.data = data7;
				}
			}
			this15.data[13] = value7;
			break;
		case 2:
			var this17 = this.rawData;
			var value8 = vector3D.x;
			if(!this17.fixed) {
				if(2 >= this17.length) {
					this17.length = 3;
				}
				if(this17.data.length < this17.length) {
					var length8 = this17.data.length + 10;
					var this18 = new Array(length8);
					var data8 = this18;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
					this17.data = data8;
				}
			}
			this17.data[2] = value8;
			var this19 = this.rawData;
			var value9 = vector3D.y;
			if(!this19.fixed) {
				if(6 >= this19.length) {
					this19.length = 7;
				}
				if(this19.data.length < this19.length) {
					var length9 = this19.data.length + 10;
					var this20 = new Array(length9);
					var data9 = this20;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
					this19.data = data9;
				}
			}
			this19.data[6] = value9;
			var this21 = this.rawData;
			var value10 = vector3D.z;
			if(!this21.fixed) {
				if(10 >= this21.length) {
					this21.length = 11;
				}
				if(this21.data.length < this21.length) {
					var length10 = this21.data.length + 10;
					var this22 = new Array(length10);
					var data10 = this22;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
					this21.data = data10;
				}
			}
			this21.data[10] = value10;
			var this23 = this.rawData;
			var value11 = vector3D.w;
			if(!this23.fixed) {
				if(14 >= this23.length) {
					this23.length = 15;
				}
				if(this23.data.length < this23.length) {
					var length11 = this23.data.length + 10;
					var this24 = new Array(length11);
					var data11 = this24;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
					this23.data = data11;
				}
			}
			this23.data[14] = value11;
			break;
		case 3:
			var this25 = this.rawData;
			var value12 = vector3D.x;
			if(!this25.fixed) {
				if(3 >= this25.length) {
					this25.length = 4;
				}
				if(this25.data.length < this25.length) {
					var length12 = this25.data.length + 10;
					var this26 = new Array(length12);
					var data12 = this26;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
					this25.data = data12;
				}
			}
			this25.data[3] = value12;
			var this27 = this.rawData;
			var value13 = vector3D.y;
			if(!this27.fixed) {
				if(7 >= this27.length) {
					this27.length = 8;
				}
				if(this27.data.length < this27.length) {
					var length13 = this27.data.length + 10;
					var this28 = new Array(length13);
					var data13 = this28;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
					this27.data = data13;
				}
			}
			this27.data[7] = value13;
			var this29 = this.rawData;
			var value14 = vector3D.z;
			if(!this29.fixed) {
				if(11 >= this29.length) {
					this29.length = 12;
				}
				if(this29.data.length < this29.length) {
					var length14 = this29.data.length + 10;
					var this30 = new Array(length14);
					var data14 = this30;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
					this29.data = data14;
				}
			}
			this29.data[11] = value14;
			var this31 = this.rawData;
			var value15 = vector3D.w;
			if(!this31.fixed) {
				if(15 >= this31.length) {
					this31.length = 16;
				}
				if(this31.data.length < this31.length) {
					var length15 = this31.data.length + 10;
					var this32 = new Array(length15);
					var data15 = this32;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
					this31.data = data15;
				}
			}
			this31.data[15] = value15;
			break;
		default:
		}
	}
	,copyRowTo: function(row,vector3D) {
		switch(row) {
		case 0:
			vector3D.x = this.rawData.data[0];
			vector3D.y = this.rawData.data[4];
			vector3D.z = this.rawData.data[8];
			vector3D.w = this.rawData.data[12];
			break;
		case 1:
			vector3D.x = this.rawData.data[1];
			vector3D.y = this.rawData.data[5];
			vector3D.z = this.rawData.data[9];
			vector3D.w = this.rawData.data[13];
			break;
		case 2:
			vector3D.x = this.rawData.data[2];
			vector3D.y = this.rawData.data[6];
			vector3D.z = this.rawData.data[10];
			vector3D.w = this.rawData.data[14];
			break;
		case 3:
			vector3D.x = this.rawData.data[3];
			vector3D.y = this.rawData.data[7];
			vector3D.z = this.rawData.data[11];
			vector3D.w = this.rawData.data[15];
			break;
		default:
		}
	}
	,copyToMatrix3D: function(other) {
		var this1 = this.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		var this2 = new Array(length);
		vectorData.data = this2;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		other.rawData = vectorData;
	}
	,decompose: function(orientationStyle) {
		if(orientationStyle == null) {
			orientationStyle = 1;
		}
		var this1 = new openfl_VectorData();
		var this2 = new Array(0);
		this1.data = this2;
		this1.length = 0;
		this1.fixed = false;
		var vec = this1;
		var m = this.clone();
		var this3 = m.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this3.length;
		vectorData.fixed = this3.fixed;
		var length = this3.length;
		var this4 = new Array(length);
		vectorData.data = this4;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,vectorData.data,0,this3.length);
		var mr = vectorData;
		var pos = new openfl_geom_Vector3D(mr.data[12],mr.data[13],mr.data[14]);
		if(!mr.fixed) {
			if(12 >= mr.length) {
				mr.length = 13;
			}
			if(mr.data.length < mr.length) {
				var length1 = mr.data.length + 10;
				var this5 = new Array(length1);
				var data = this5;
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data,0,mr.data.length);
				mr.data = data;
			}
		}
		mr.data[12] = 0;
		if(!mr.fixed) {
			if(13 >= mr.length) {
				mr.length = 14;
			}
			if(mr.data.length < mr.length) {
				var length2 = mr.data.length + 10;
				var this6 = new Array(length2);
				var data1 = this6;
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data1,0,mr.data.length);
				mr.data = data1;
			}
		}
		mr.data[13] = 0;
		if(!mr.fixed) {
			if(14 >= mr.length) {
				mr.length = 15;
			}
			if(mr.data.length < mr.length) {
				var length3 = mr.data.length + 10;
				var this7 = new Array(length3);
				var data2 = this7;
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data2,0,mr.data.length);
				mr.data = data2;
			}
		}
		mr.data[14] = 0;
		var scale = new openfl_geom_Vector3D();
		scale.x = Math.sqrt(mr.data[0] * mr.data[0] + mr.data[1] * mr.data[1] + mr.data[2] * mr.data[2]);
		scale.y = Math.sqrt(mr.data[4] * mr.data[4] + mr.data[5] * mr.data[5] + mr.data[6] * mr.data[6]);
		scale.z = Math.sqrt(mr.data[8] * mr.data[8] + mr.data[9] * mr.data[9] + mr.data[10] * mr.data[10]);
		if(mr.data[0] * (mr.data[5] * mr.data[10] - mr.data[6] * mr.data[9]) - mr.data[1] * (mr.data[4] * mr.data[10] - mr.data[6] * mr.data[8]) + mr.data[2] * (mr.data[4] * mr.data[9] - mr.data[5] * mr.data[8]) < 0) {
			scale.z = -scale.z;
		}
		var _g = mr;
		var value = _g.data[0] / scale.x;
		if(!_g.fixed) {
			if(0 >= _g.length) {
				_g.length = 1;
			}
			if(_g.data.length < _g.length) {
				var length4 = _g.data.length + 10;
				var this8 = new Array(length4);
				var data3 = this8;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g.data,0,data3,0,_g.data.length);
				_g.data = data3;
			}
		}
		_g.data[0] = value;
		var _g1 = mr;
		var value1 = _g1.data[1] / scale.x;
		if(!_g1.fixed) {
			if(1 >= _g1.length) {
				_g1.length = 2;
			}
			if(_g1.data.length < _g1.length) {
				var length5 = _g1.data.length + 10;
				var this9 = new Array(length5);
				var data4 = this9;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g1.data,0,data4,0,_g1.data.length);
				_g1.data = data4;
			}
		}
		_g1.data[1] = value1;
		var _g2 = mr;
		var value2 = _g2.data[2] / scale.x;
		if(!_g2.fixed) {
			if(2 >= _g2.length) {
				_g2.length = 3;
			}
			if(_g2.data.length < _g2.length) {
				var length6 = _g2.data.length + 10;
				var this10 = new Array(length6);
				var data5 = this10;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g2.data,0,data5,0,_g2.data.length);
				_g2.data = data5;
			}
		}
		_g2.data[2] = value2;
		var _g3 = mr;
		var value3 = _g3.data[4] / scale.y;
		if(!_g3.fixed) {
			if(4 >= _g3.length) {
				_g3.length = 5;
			}
			if(_g3.data.length < _g3.length) {
				var length7 = _g3.data.length + 10;
				var this11 = new Array(length7);
				var data6 = this11;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g3.data,0,data6,0,_g3.data.length);
				_g3.data = data6;
			}
		}
		_g3.data[4] = value3;
		var _g4 = mr;
		var value4 = _g4.data[5] / scale.y;
		if(!_g4.fixed) {
			if(5 >= _g4.length) {
				_g4.length = 6;
			}
			if(_g4.data.length < _g4.length) {
				var length8 = _g4.data.length + 10;
				var this12 = new Array(length8);
				var data7 = this12;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g4.data,0,data7,0,_g4.data.length);
				_g4.data = data7;
			}
		}
		_g4.data[5] = value4;
		var _g5 = mr;
		var value5 = _g5.data[6] / scale.y;
		if(!_g5.fixed) {
			if(6 >= _g5.length) {
				_g5.length = 7;
			}
			if(_g5.data.length < _g5.length) {
				var length9 = _g5.data.length + 10;
				var this13 = new Array(length9);
				var data8 = this13;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g5.data,0,data8,0,_g5.data.length);
				_g5.data = data8;
			}
		}
		_g5.data[6] = value5;
		var _g6 = mr;
		var value6 = _g6.data[8] / scale.z;
		if(!_g6.fixed) {
			if(8 >= _g6.length) {
				_g6.length = 9;
			}
			if(_g6.data.length < _g6.length) {
				var length10 = _g6.data.length + 10;
				var this14 = new Array(length10);
				var data9 = this14;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g6.data,0,data9,0,_g6.data.length);
				_g6.data = data9;
			}
		}
		_g6.data[8] = value6;
		var _g7 = mr;
		var value7 = _g7.data[9] / scale.z;
		if(!_g7.fixed) {
			if(9 >= _g7.length) {
				_g7.length = 10;
			}
			if(_g7.data.length < _g7.length) {
				var length11 = _g7.data.length + 10;
				var this15 = new Array(length11);
				var data10 = this15;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g7.data,0,data10,0,_g7.data.length);
				_g7.data = data10;
			}
		}
		_g7.data[9] = value7;
		var _g8 = mr;
		var value8 = _g8.data[10] / scale.z;
		if(!_g8.fixed) {
			if(10 >= _g8.length) {
				_g8.length = 11;
			}
			if(_g8.data.length < _g8.length) {
				var length12 = _g8.data.length + 10;
				var this16 = new Array(length12);
				var data11 = this16;
				haxe_ds__$Vector_Vector_$Impl_$.blit(_g8.data,0,data11,0,_g8.data.length);
				_g8.data = data11;
			}
		}
		_g8.data[10] = value8;
		var rot = new openfl_geom_Vector3D();
		switch(orientationStyle) {
		case 0:
			rot.w = Math.acos((mr.data[0] + mr.data[5] + mr.data[10] - 1) / 2);
			var len = Math.sqrt((mr.data[6] - mr.data[9]) * (mr.data[6] - mr.data[9]) + (mr.data[8] - mr.data[2]) * (mr.data[8] - mr.data[2]) + (mr.data[1] - mr.data[4]) * (mr.data[1] - mr.data[4]));
			if(len != 0) {
				rot.x = (mr.data[6] - mr.data[9]) / len;
				rot.y = (mr.data[8] - mr.data[2]) / len;
				rot.z = (mr.data[1] - mr.data[4]) / len;
			} else {
				rot.x = rot.y = rot.z = 0;
			}
			break;
		case 1:
			rot.y = Math.asin(-mr.data[2]);
			if(mr.data[2] != 1 && mr.data[2] != -1) {
				rot.x = Math.atan2(mr.data[6],mr.data[10]);
				rot.z = Math.atan2(mr.data[1],mr.data[0]);
			} else {
				rot.z = 0;
				rot.x = Math.atan2(mr.data[4],mr.data[5]);
			}
			break;
		case 2:
			var tr = mr.data[0] + mr.data[5] + mr.data[10];
			if(tr > 0) {
				rot.w = Math.sqrt(1 + tr) / 2;
				rot.x = (mr.data[6] - mr.data[9]) / (4 * rot.w);
				rot.y = (mr.data[8] - mr.data[2]) / (4 * rot.w);
				rot.z = (mr.data[1] - mr.data[4]) / (4 * rot.w);
			} else if(mr.data[0] > mr.data[5] && mr.data[0] > mr.data[10]) {
				rot.x = Math.sqrt(1 + mr.data[0] - mr.data[5] - mr.data[10]) / 2;
				rot.w = (mr.data[6] - mr.data[9]) / (4 * rot.x);
				rot.y = (mr.data[1] + mr.data[4]) / (4 * rot.x);
				rot.z = (mr.data[8] + mr.data[2]) / (4 * rot.x);
			} else if(mr.data[5] > mr.data[10]) {
				rot.y = Math.sqrt(1 + mr.data[5] - mr.data[0] - mr.data[10]) / 2;
				rot.x = (mr.data[1] + mr.data[4]) / (4 * rot.y);
				rot.w = (mr.data[8] - mr.data[2]) / (4 * rot.y);
				rot.z = (mr.data[6] + mr.data[9]) / (4 * rot.y);
			} else {
				rot.z = Math.sqrt(1 + mr.data[10] - mr.data[0] - mr.data[5]) / 2;
				rot.x = (mr.data[8] + mr.data[2]) / (4 * rot.z);
				rot.y = (mr.data[6] + mr.data[9]) / (4 * rot.z);
				rot.w = (mr.data[1] - mr.data[4]) / (4 * rot.z);
			}
			break;
		}
		if(!vec.fixed) {
			vec.length++;
			if(vec.data.length < vec.length) {
				var length13 = vec.data.length + 10;
				var this17 = new Array(length13);
				var data12 = this17;
				haxe_ds__$Vector_Vector_$Impl_$.blit(vec.data,0,data12,0,vec.data.length);
				vec.data = data12;
			}
			vec.data[vec.length - 1] = pos;
		}
		if(!vec.fixed) {
			vec.length++;
			if(vec.data.length < vec.length) {
				var length14 = vec.data.length + 10;
				var this18 = new Array(length14);
				var data13 = this18;
				haxe_ds__$Vector_Vector_$Impl_$.blit(vec.data,0,data13,0,vec.data.length);
				vec.data = data13;
			}
			vec.data[vec.length - 1] = rot;
		}
		if(!vec.fixed) {
			vec.length++;
			if(vec.data.length < vec.length) {
				var length15 = vec.data.length + 10;
				var this19 = new Array(length15);
				var data14 = this19;
				haxe_ds__$Vector_Vector_$Impl_$.blit(vec.data,0,data14,0,vec.data.length);
				vec.data = data14;
			}
			vec.data[vec.length - 1] = scale;
		}
		return vec;
	}
	,deltaTransformVector: function(v) {
		var x = v.x;
		var y = v.y;
		var z = v.z;
		return new openfl_geom_Vector3D(x * this.rawData.data[0] + y * this.rawData.data[4] + z * this.rawData.data[8] + this.rawData.data[3],x * this.rawData.data[1] + y * this.rawData.data[5] + z * this.rawData.data[9] + this.rawData.data[7],x * this.rawData.data[2] + y * this.rawData.data[6] + z * this.rawData.data[10] + this.rawData.data[11],0);
	}
	,identity: function() {
		var value = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.rawData = vectorData;
	}
	,interpolateTo: function(toMat,percent) {
		var _g = 0;
		while(_g < 16) {
			var i = _g++;
			var this1 = this.rawData;
			var value = this.rawData.data[i] + (toMat.rawData.data[i] - this.rawData.data[i]) * percent;
			if(!this1.fixed) {
				if(i >= this1.length) {
					this1.length = i + 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[i] = value;
		}
	}
	,invert: function() {
		var d = this.get_determinant();
		var invertable = Math.abs(d) > 0.00000000001;
		if(invertable) {
			d = 1 / d;
			var m11 = this.rawData.data[0];
			var m21 = this.rawData.data[4];
			var m31 = this.rawData.data[8];
			var m41 = this.rawData.data[12];
			var m12 = this.rawData.data[1];
			var m22 = this.rawData.data[5];
			var m32 = this.rawData.data[9];
			var m42 = this.rawData.data[13];
			var m13 = this.rawData.data[2];
			var m23 = this.rawData.data[6];
			var m33 = this.rawData.data[10];
			var m43 = this.rawData.data[14];
			var m14 = this.rawData.data[3];
			var m24 = this.rawData.data[7];
			var m34 = this.rawData.data[11];
			var m44 = this.rawData.data[15];
			var this1 = this.rawData;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
			var this3 = this.rawData;
			if(!this3.fixed) {
				if(1 >= this3.length) {
					this3.length = 2;
				}
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
			}
			this3.data[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
			var this5 = this.rawData;
			if(!this5.fixed) {
				if(2 >= this5.length) {
					this5.length = 3;
				}
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
			}
			this5.data[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
			var this7 = this.rawData;
			if(!this7.fixed) {
				if(3 >= this7.length) {
					this7.length = 4;
				}
				if(this7.data.length < this7.length) {
					var length3 = this7.data.length + 10;
					var this8 = new Array(length3);
					var data3 = this8;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
					this7.data = data3;
				}
			}
			this7.data[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
			var this9 = this.rawData;
			if(!this9.fixed) {
				if(4 >= this9.length) {
					this9.length = 5;
				}
				if(this9.data.length < this9.length) {
					var length4 = this9.data.length + 10;
					var this10 = new Array(length4);
					var data4 = this10;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
					this9.data = data4;
				}
			}
			this9.data[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
			var this11 = this.rawData;
			if(!this11.fixed) {
				if(5 >= this11.length) {
					this11.length = 6;
				}
				if(this11.data.length < this11.length) {
					var length5 = this11.data.length + 10;
					var this12 = new Array(length5);
					var data5 = this12;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
					this11.data = data5;
				}
			}
			this11.data[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
			var this13 = this.rawData;
			if(!this13.fixed) {
				if(6 >= this13.length) {
					this13.length = 7;
				}
				if(this13.data.length < this13.length) {
					var length6 = this13.data.length + 10;
					var this14 = new Array(length6);
					var data6 = this14;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
					this13.data = data6;
				}
			}
			this13.data[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
			var this15 = this.rawData;
			if(!this15.fixed) {
				if(7 >= this15.length) {
					this15.length = 8;
				}
				if(this15.data.length < this15.length) {
					var length7 = this15.data.length + 10;
					var this16 = new Array(length7);
					var data7 = this16;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
					this15.data = data7;
				}
			}
			this15.data[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
			var this17 = this.rawData;
			if(!this17.fixed) {
				if(8 >= this17.length) {
					this17.length = 9;
				}
				if(this17.data.length < this17.length) {
					var length8 = this17.data.length + 10;
					var this18 = new Array(length8);
					var data8 = this18;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
					this17.data = data8;
				}
			}
			this17.data[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
			var this19 = this.rawData;
			if(!this19.fixed) {
				if(9 >= this19.length) {
					this19.length = 10;
				}
				if(this19.data.length < this19.length) {
					var length9 = this19.data.length + 10;
					var this20 = new Array(length9);
					var data9 = this20;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
					this19.data = data9;
				}
			}
			this19.data[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
			var this21 = this.rawData;
			if(!this21.fixed) {
				if(10 >= this21.length) {
					this21.length = 11;
				}
				if(this21.data.length < this21.length) {
					var length10 = this21.data.length + 10;
					var this22 = new Array(length10);
					var data10 = this22;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
					this21.data = data10;
				}
			}
			this21.data[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
			var this23 = this.rawData;
			if(!this23.fixed) {
				if(11 >= this23.length) {
					this23.length = 12;
				}
				if(this23.data.length < this23.length) {
					var length11 = this23.data.length + 10;
					var this24 = new Array(length11);
					var data11 = this24;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
					this23.data = data11;
				}
			}
			this23.data[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
			var this25 = this.rawData;
			if(!this25.fixed) {
				if(12 >= this25.length) {
					this25.length = 13;
				}
				if(this25.data.length < this25.length) {
					var length12 = this25.data.length + 10;
					var this26 = new Array(length12);
					var data12 = this26;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
					this25.data = data12;
				}
			}
			this25.data[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
			var this27 = this.rawData;
			if(!this27.fixed) {
				if(13 >= this27.length) {
					this27.length = 14;
				}
				if(this27.data.length < this27.length) {
					var length13 = this27.data.length + 10;
					var this28 = new Array(length13);
					var data13 = this28;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
					this27.data = data13;
				}
			}
			this27.data[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
			var this29 = this.rawData;
			if(!this29.fixed) {
				if(14 >= this29.length) {
					this29.length = 15;
				}
				if(this29.data.length < this29.length) {
					var length14 = this29.data.length + 10;
					var this30 = new Array(length14);
					var data14 = this30;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
					this29.data = data14;
				}
			}
			this29.data[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
			var this31 = this.rawData;
			if(!this31.fixed) {
				if(15 >= this31.length) {
					this31.length = 16;
				}
				if(this31.data.length < this31.length) {
					var length15 = this31.data.length + 10;
					var this32 = new Array(length15);
					var data15 = this32;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
					this31.data = data15;
				}
			}
			this31.data[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
		}
		return invertable;
	}
	,pointAt: function(pos,at,up) {
		if(at == null) {
			at = new openfl_geom_Vector3D(0,0,-1);
		}
		if(up == null) {
			up = new openfl_geom_Vector3D(0,-1,0);
		}
		var dir = at.subtract(pos);
		var vup = up.clone();
		var right;
		dir.normalize();
		vup.normalize();
		var dir2 = dir.clone();
		dir2.scaleBy(vup.dotProduct(dir));
		vup = vup.subtract(dir2);
		if(vup.get_length() > 0) {
			vup.normalize();
		} else if(dir.x != 0) {
			vup = new openfl_geom_Vector3D(-dir.y,dir.x,0);
		} else {
			vup = new openfl_geom_Vector3D(1,0,0);
		}
		right = vup.crossProduct(dir);
		right.normalize();
		var this1 = this.rawData;
		var value = right.x;
		if(!this1.fixed) {
			if(0 >= this1.length) {
				this1.length = 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var this2 = new Array(length);
				var data = this2;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[0] = value;
		var this3 = this.rawData;
		var value1 = right.y;
		if(!this3.fixed) {
			if(4 >= this3.length) {
				this3.length = 5;
			}
			if(this3.data.length < this3.length) {
				var length1 = this3.data.length + 10;
				var this4 = new Array(length1);
				var data1 = this4;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
				this3.data = data1;
			}
		}
		this3.data[4] = value1;
		var this5 = this.rawData;
		var value2 = right.z;
		if(!this5.fixed) {
			if(8 >= this5.length) {
				this5.length = 9;
			}
			if(this5.data.length < this5.length) {
				var length2 = this5.data.length + 10;
				var this6 = new Array(length2);
				var data2 = this6;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
				this5.data = data2;
			}
		}
		this5.data[8] = value2;
		var this7 = this.rawData;
		if(!this7.fixed) {
			if(12 >= this7.length) {
				this7.length = 13;
			}
			if(this7.data.length < this7.length) {
				var length3 = this7.data.length + 10;
				var this8 = new Array(length3);
				var data3 = this8;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
				this7.data = data3;
			}
		}
		this7.data[12] = 0.0;
		var this9 = this.rawData;
		var value3 = vup.x;
		if(!this9.fixed) {
			if(1 >= this9.length) {
				this9.length = 2;
			}
			if(this9.data.length < this9.length) {
				var length4 = this9.data.length + 10;
				var this10 = new Array(length4);
				var data4 = this10;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
				this9.data = data4;
			}
		}
		this9.data[1] = value3;
		var this11 = this.rawData;
		var value4 = vup.y;
		if(!this11.fixed) {
			if(5 >= this11.length) {
				this11.length = 6;
			}
			if(this11.data.length < this11.length) {
				var length5 = this11.data.length + 10;
				var this12 = new Array(length5);
				var data5 = this12;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
				this11.data = data5;
			}
		}
		this11.data[5] = value4;
		var this13 = this.rawData;
		var value5 = vup.z;
		if(!this13.fixed) {
			if(9 >= this13.length) {
				this13.length = 10;
			}
			if(this13.data.length < this13.length) {
				var length6 = this13.data.length + 10;
				var this14 = new Array(length6);
				var data6 = this14;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
				this13.data = data6;
			}
		}
		this13.data[9] = value5;
		var this15 = this.rawData;
		if(!this15.fixed) {
			if(13 >= this15.length) {
				this15.length = 14;
			}
			if(this15.data.length < this15.length) {
				var length7 = this15.data.length + 10;
				var this16 = new Array(length7);
				var data7 = this16;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
				this15.data = data7;
			}
		}
		this15.data[13] = 0.0;
		var this17 = this.rawData;
		var value6 = dir.x;
		if(!this17.fixed) {
			if(2 >= this17.length) {
				this17.length = 3;
			}
			if(this17.data.length < this17.length) {
				var length8 = this17.data.length + 10;
				var this18 = new Array(length8);
				var data8 = this18;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
				this17.data = data8;
			}
		}
		this17.data[2] = value6;
		var this19 = this.rawData;
		var value7 = dir.y;
		if(!this19.fixed) {
			if(6 >= this19.length) {
				this19.length = 7;
			}
			if(this19.data.length < this19.length) {
				var length9 = this19.data.length + 10;
				var this20 = new Array(length9);
				var data9 = this20;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
				this19.data = data9;
			}
		}
		this19.data[6] = value7;
		var this21 = this.rawData;
		var value8 = dir.z;
		if(!this21.fixed) {
			if(10 >= this21.length) {
				this21.length = 11;
			}
			if(this21.data.length < this21.length) {
				var length10 = this21.data.length + 10;
				var this22 = new Array(length10);
				var data10 = this22;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
				this21.data = data10;
			}
		}
		this21.data[10] = value8;
		var this23 = this.rawData;
		if(!this23.fixed) {
			if(14 >= this23.length) {
				this23.length = 15;
			}
			if(this23.data.length < this23.length) {
				var length11 = this23.data.length + 10;
				var this24 = new Array(length11);
				var data11 = this24;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
				this23.data = data11;
			}
		}
		this23.data[14] = 0.0;
		var this25 = this.rawData;
		var value9 = pos.x;
		if(!this25.fixed) {
			if(3 >= this25.length) {
				this25.length = 4;
			}
			if(this25.data.length < this25.length) {
				var length12 = this25.data.length + 10;
				var this26 = new Array(length12);
				var data12 = this26;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
				this25.data = data12;
			}
		}
		this25.data[3] = value9;
		var this27 = this.rawData;
		var value10 = pos.y;
		if(!this27.fixed) {
			if(7 >= this27.length) {
				this27.length = 8;
			}
			if(this27.data.length < this27.length) {
				var length13 = this27.data.length + 10;
				var this28 = new Array(length13);
				var data13 = this28;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
				this27.data = data13;
			}
		}
		this27.data[7] = value10;
		var this29 = this.rawData;
		var value11 = pos.z;
		if(!this29.fixed) {
			if(11 >= this29.length) {
				this29.length = 12;
			}
			if(this29.data.length < this29.length) {
				var length14 = this29.data.length + 10;
				var this30 = new Array(length14);
				var data14 = this30;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
				this29.data = data14;
			}
		}
		this29.data[11] = value11;
		var this31 = this.rawData;
		if(!this31.fixed) {
			if(15 >= this31.length) {
				this31.length = 16;
			}
			if(this31.data.length < this31.length) {
				var length15 = this31.data.length + 10;
				var this32 = new Array(length15);
				var data15 = this32;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
				this31.data = data15;
			}
		}
		this31.data[15] = 1.0;
	}
	,prepend: function(rhs) {
		var m111 = rhs.rawData.data[0];
		var m121 = rhs.rawData.data[4];
		var m131 = rhs.rawData.data[8];
		var m141 = rhs.rawData.data[12];
		var m112 = rhs.rawData.data[1];
		var m122 = rhs.rawData.data[5];
		var m132 = rhs.rawData.data[9];
		var m142 = rhs.rawData.data[13];
		var m113 = rhs.rawData.data[2];
		var m123 = rhs.rawData.data[6];
		var m133 = rhs.rawData.data[10];
		var m143 = rhs.rawData.data[14];
		var m114 = rhs.rawData.data[3];
		var m124 = rhs.rawData.data[7];
		var m134 = rhs.rawData.data[11];
		var m144 = rhs.rawData.data[15];
		var m211 = this.rawData.data[0];
		var m221 = this.rawData.data[4];
		var m231 = this.rawData.data[8];
		var m241 = this.rawData.data[12];
		var m212 = this.rawData.data[1];
		var m222 = this.rawData.data[5];
		var m232 = this.rawData.data[9];
		var m242 = this.rawData.data[13];
		var m213 = this.rawData.data[2];
		var m223 = this.rawData.data[6];
		var m233 = this.rawData.data[10];
		var m243 = this.rawData.data[14];
		var m214 = this.rawData.data[3];
		var m224 = this.rawData.data[7];
		var m234 = this.rawData.data[11];
		var m244 = this.rawData.data[15];
		var this1 = this.rawData;
		if(!this1.fixed) {
			if(0 >= this1.length) {
				this1.length = 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var this2 = new Array(length);
				var data = this2;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
		var this3 = this.rawData;
		if(!this3.fixed) {
			if(1 >= this3.length) {
				this3.length = 2;
			}
			if(this3.data.length < this3.length) {
				var length1 = this3.data.length + 10;
				var this4 = new Array(length1);
				var data1 = this4;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
				this3.data = data1;
			}
		}
		this3.data[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
		var this5 = this.rawData;
		if(!this5.fixed) {
			if(2 >= this5.length) {
				this5.length = 3;
			}
			if(this5.data.length < this5.length) {
				var length2 = this5.data.length + 10;
				var this6 = new Array(length2);
				var data2 = this6;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
				this5.data = data2;
			}
		}
		this5.data[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
		var this7 = this.rawData;
		if(!this7.fixed) {
			if(3 >= this7.length) {
				this7.length = 4;
			}
			if(this7.data.length < this7.length) {
				var length3 = this7.data.length + 10;
				var this8 = new Array(length3);
				var data3 = this8;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
				this7.data = data3;
			}
		}
		this7.data[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
		var this9 = this.rawData;
		if(!this9.fixed) {
			if(4 >= this9.length) {
				this9.length = 5;
			}
			if(this9.data.length < this9.length) {
				var length4 = this9.data.length + 10;
				var this10 = new Array(length4);
				var data4 = this10;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
				this9.data = data4;
			}
		}
		this9.data[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
		var this11 = this.rawData;
		if(!this11.fixed) {
			if(5 >= this11.length) {
				this11.length = 6;
			}
			if(this11.data.length < this11.length) {
				var length5 = this11.data.length + 10;
				var this12 = new Array(length5);
				var data5 = this12;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
				this11.data = data5;
			}
		}
		this11.data[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
		var this13 = this.rawData;
		if(!this13.fixed) {
			if(6 >= this13.length) {
				this13.length = 7;
			}
			if(this13.data.length < this13.length) {
				var length6 = this13.data.length + 10;
				var this14 = new Array(length6);
				var data6 = this14;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
				this13.data = data6;
			}
		}
		this13.data[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
		var this15 = this.rawData;
		if(!this15.fixed) {
			if(7 >= this15.length) {
				this15.length = 8;
			}
			if(this15.data.length < this15.length) {
				var length7 = this15.data.length + 10;
				var this16 = new Array(length7);
				var data7 = this16;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
				this15.data = data7;
			}
		}
		this15.data[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
		var this17 = this.rawData;
		if(!this17.fixed) {
			if(8 >= this17.length) {
				this17.length = 9;
			}
			if(this17.data.length < this17.length) {
				var length8 = this17.data.length + 10;
				var this18 = new Array(length8);
				var data8 = this18;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
				this17.data = data8;
			}
		}
		this17.data[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
		var this19 = this.rawData;
		if(!this19.fixed) {
			if(9 >= this19.length) {
				this19.length = 10;
			}
			if(this19.data.length < this19.length) {
				var length9 = this19.data.length + 10;
				var this20 = new Array(length9);
				var data9 = this20;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
				this19.data = data9;
			}
		}
		this19.data[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
		var this21 = this.rawData;
		if(!this21.fixed) {
			if(10 >= this21.length) {
				this21.length = 11;
			}
			if(this21.data.length < this21.length) {
				var length10 = this21.data.length + 10;
				var this22 = new Array(length10);
				var data10 = this22;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
				this21.data = data10;
			}
		}
		this21.data[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
		var this23 = this.rawData;
		if(!this23.fixed) {
			if(11 >= this23.length) {
				this23.length = 12;
			}
			if(this23.data.length < this23.length) {
				var length11 = this23.data.length + 10;
				var this24 = new Array(length11);
				var data11 = this24;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
				this23.data = data11;
			}
		}
		this23.data[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
		var this25 = this.rawData;
		if(!this25.fixed) {
			if(12 >= this25.length) {
				this25.length = 13;
			}
			if(this25.data.length < this25.length) {
				var length12 = this25.data.length + 10;
				var this26 = new Array(length12);
				var data12 = this26;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
				this25.data = data12;
			}
		}
		this25.data[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
		var this27 = this.rawData;
		if(!this27.fixed) {
			if(13 >= this27.length) {
				this27.length = 14;
			}
			if(this27.data.length < this27.length) {
				var length13 = this27.data.length + 10;
				var this28 = new Array(length13);
				var data13 = this28;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
				this27.data = data13;
			}
		}
		this27.data[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
		var this29 = this.rawData;
		if(!this29.fixed) {
			if(14 >= this29.length) {
				this29.length = 15;
			}
			if(this29.data.length < this29.length) {
				var length14 = this29.data.length + 10;
				var this30 = new Array(length14);
				var data14 = this30;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
				this29.data = data14;
			}
		}
		this29.data[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
		var this31 = this.rawData;
		if(!this31.fixed) {
			if(15 >= this31.length) {
				this31.length = 16;
			}
			if(this31.data.length < this31.length) {
				var length15 = this31.data.length + 10;
				var this32 = new Array(length15);
				var data15 = this32;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
				this31.data = data15;
			}
		}
		this31.data[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
	}
	,prependRotation: function(degrees,axis,pivotPoint) {
		var m = openfl_geom_Matrix3D.__getAxisRotation(axis.x,axis.y,axis.z,degrees);
		if(pivotPoint != null) {
			var p = pivotPoint;
			m.appendTranslation(p.x,p.y,p.z);
		}
		this.prepend(m);
	}
	,prependScale: function(xScale,yScale,zScale) {
		var value = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.prepend(new openfl_geom_Matrix3D(vectorData));
	}
	,prependTranslation: function(x,y,z) {
		var m = new openfl_geom_Matrix3D();
		m.set_position(new openfl_geom_Vector3D(x,y,z));
		this.prepend(m);
	}
	,recompose: function(components,orientationStyle) {
		if(components.length < 3 || components.data[2].x == 0 || components.data[2].y == 0 || components.data[2].z == 0) {
			return false;
		}
		if(orientationStyle == null) {
			orientationStyle = 1;
		}
		this.identity();
		var scale = [];
		scale[0] = scale[1] = scale[2] = components.data[2].x;
		scale[4] = scale[5] = scale[6] = components.data[2].y;
		scale[8] = scale[9] = scale[10] = components.data[2].z;
		if(orientationStyle == null) {
			var x = components.data[1].x;
			var y = components.data[1].y;
			var z = components.data[1].z;
			var w = components.data[1].w;
			if(Type.enumEq(orientationStyle,0)) {
				x *= Math.sin(w / 2);
				y *= Math.sin(w / 2);
				z *= Math.sin(w / 2);
				w = Math.cos(w / 2);
			}
			var this1 = this.rawData;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var this2 = new Array(length);
					var data = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = (1 - 2 * y * y - 2 * z * z) * scale[0];
			var this3 = this.rawData;
			if(!this3.fixed) {
				if(1 >= this3.length) {
					this3.length = 2;
				}
				if(this3.data.length < this3.length) {
					var length1 = this3.data.length + 10;
					var this4 = new Array(length1);
					var data1 = this4;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
					this3.data = data1;
				}
			}
			this3.data[1] = (2 * x * y + 2 * w * z) * scale[1];
			var this5 = this.rawData;
			if(!this5.fixed) {
				if(2 >= this5.length) {
					this5.length = 3;
				}
				if(this5.data.length < this5.length) {
					var length2 = this5.data.length + 10;
					var this6 = new Array(length2);
					var data2 = this6;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
					this5.data = data2;
				}
			}
			this5.data[2] = (2 * x * z - 2 * w * y) * scale[2];
			var this7 = this.rawData;
			if(!this7.fixed) {
				if(3 >= this7.length) {
					this7.length = 4;
				}
				if(this7.data.length < this7.length) {
					var length3 = this7.data.length + 10;
					var this8 = new Array(length3);
					var data3 = this8;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data3,0,this7.data.length);
					this7.data = data3;
				}
			}
			this7.data[3] = 0;
			var this9 = this.rawData;
			if(!this9.fixed) {
				if(4 >= this9.length) {
					this9.length = 5;
				}
				if(this9.data.length < this9.length) {
					var length4 = this9.data.length + 10;
					var this10 = new Array(length4);
					var data4 = this10;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data4,0,this9.data.length);
					this9.data = data4;
				}
			}
			this9.data[4] = (2 * x * y - 2 * w * z) * scale[4];
			var this11 = this.rawData;
			if(!this11.fixed) {
				if(5 >= this11.length) {
					this11.length = 6;
				}
				if(this11.data.length < this11.length) {
					var length5 = this11.data.length + 10;
					var this12 = new Array(length5);
					var data5 = this12;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data5,0,this11.data.length);
					this11.data = data5;
				}
			}
			this11.data[5] = (1 - 2 * x * x - 2 * z * z) * scale[5];
			var this13 = this.rawData;
			if(!this13.fixed) {
				if(6 >= this13.length) {
					this13.length = 7;
				}
				if(this13.data.length < this13.length) {
					var length6 = this13.data.length + 10;
					var this14 = new Array(length6);
					var data6 = this14;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data6,0,this13.data.length);
					this13.data = data6;
				}
			}
			this13.data[6] = (2 * y * z + 2 * w * x) * scale[6];
			var this15 = this.rawData;
			if(!this15.fixed) {
				if(7 >= this15.length) {
					this15.length = 8;
				}
				if(this15.data.length < this15.length) {
					var length7 = this15.data.length + 10;
					var this16 = new Array(length7);
					var data7 = this16;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data7,0,this15.data.length);
					this15.data = data7;
				}
			}
			this15.data[7] = 0;
			var this17 = this.rawData;
			if(!this17.fixed) {
				if(8 >= this17.length) {
					this17.length = 9;
				}
				if(this17.data.length < this17.length) {
					var length8 = this17.data.length + 10;
					var this18 = new Array(length8);
					var data8 = this18;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data8,0,this17.data.length);
					this17.data = data8;
				}
			}
			this17.data[8] = (2 * x * z + 2 * w * y) * scale[8];
			var this19 = this.rawData;
			if(!this19.fixed) {
				if(9 >= this19.length) {
					this19.length = 10;
				}
				if(this19.data.length < this19.length) {
					var length9 = this19.data.length + 10;
					var this20 = new Array(length9);
					var data9 = this20;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data9,0,this19.data.length);
					this19.data = data9;
				}
			}
			this19.data[9] = (2 * y * z - 2 * w * x) * scale[9];
			var this21 = this.rawData;
			if(!this21.fixed) {
				if(10 >= this21.length) {
					this21.length = 11;
				}
				if(this21.data.length < this21.length) {
					var length10 = this21.data.length + 10;
					var this22 = new Array(length10);
					var data10 = this22;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data10,0,this21.data.length);
					this21.data = data10;
				}
			}
			this21.data[10] = (1 - 2 * x * x - 2 * y * y) * scale[10];
			var this23 = this.rawData;
			if(!this23.fixed) {
				if(11 >= this23.length) {
					this23.length = 12;
				}
				if(this23.data.length < this23.length) {
					var length11 = this23.data.length + 10;
					var this24 = new Array(length11);
					var data11 = this24;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data11,0,this23.data.length);
					this23.data = data11;
				}
			}
			this23.data[11] = 0;
			var this25 = this.rawData;
			var value = components.data[0].x;
			if(!this25.fixed) {
				if(12 >= this25.length) {
					this25.length = 13;
				}
				if(this25.data.length < this25.length) {
					var length12 = this25.data.length + 10;
					var this26 = new Array(length12);
					var data12 = this26;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data12,0,this25.data.length);
					this25.data = data12;
				}
			}
			this25.data[12] = value;
			var this27 = this.rawData;
			var value1 = components.data[0].y;
			if(!this27.fixed) {
				if(13 >= this27.length) {
					this27.length = 14;
				}
				if(this27.data.length < this27.length) {
					var length13 = this27.data.length + 10;
					var this28 = new Array(length13);
					var data13 = this28;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data13,0,this27.data.length);
					this27.data = data13;
				}
			}
			this27.data[13] = value1;
			var this29 = this.rawData;
			var value2 = components.data[0].z;
			if(!this29.fixed) {
				if(14 >= this29.length) {
					this29.length = 15;
				}
				if(this29.data.length < this29.length) {
					var length14 = this29.data.length + 10;
					var this30 = new Array(length14);
					var data14 = this30;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data14,0,this29.data.length);
					this29.data = data14;
				}
			}
			this29.data[14] = value2;
			var this31 = this.rawData;
			if(!this31.fixed) {
				if(15 >= this31.length) {
					this31.length = 16;
				}
				if(this31.data.length < this31.length) {
					var length15 = this31.data.length + 10;
					var this32 = new Array(length15);
					var data15 = this32;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data15,0,this31.data.length);
					this31.data = data15;
				}
			}
			this31.data[15] = 1;
		} else if(orientationStyle == 1) {
			var cx = Math.cos(components.data[1].x);
			var cy = Math.cos(components.data[1].y);
			var cz = Math.cos(components.data[1].z);
			var sx = Math.sin(components.data[1].x);
			var sy = Math.sin(components.data[1].y);
			var sz = Math.sin(components.data[1].z);
			var this33 = this.rawData;
			if(!this33.fixed) {
				if(0 >= this33.length) {
					this33.length = 1;
				}
				if(this33.data.length < this33.length) {
					var length16 = this33.data.length + 10;
					var this34 = new Array(length16);
					var data16 = this34;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this33.data,0,data16,0,this33.data.length);
					this33.data = data16;
				}
			}
			this33.data[0] = cy * cz * scale[0];
			var this35 = this.rawData;
			if(!this35.fixed) {
				if(1 >= this35.length) {
					this35.length = 2;
				}
				if(this35.data.length < this35.length) {
					var length17 = this35.data.length + 10;
					var this36 = new Array(length17);
					var data17 = this36;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this35.data,0,data17,0,this35.data.length);
					this35.data = data17;
				}
			}
			this35.data[1] = cy * sz * scale[1];
			var this37 = this.rawData;
			if(!this37.fixed) {
				if(2 >= this37.length) {
					this37.length = 3;
				}
				if(this37.data.length < this37.length) {
					var length18 = this37.data.length + 10;
					var this38 = new Array(length18);
					var data18 = this38;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this37.data,0,data18,0,this37.data.length);
					this37.data = data18;
				}
			}
			this37.data[2] = -sy * scale[2];
			var this39 = this.rawData;
			if(!this39.fixed) {
				if(3 >= this39.length) {
					this39.length = 4;
				}
				if(this39.data.length < this39.length) {
					var length19 = this39.data.length + 10;
					var this40 = new Array(length19);
					var data19 = this40;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this39.data,0,data19,0,this39.data.length);
					this39.data = data19;
				}
			}
			this39.data[3] = 0;
			var this41 = this.rawData;
			if(!this41.fixed) {
				if(4 >= this41.length) {
					this41.length = 5;
				}
				if(this41.data.length < this41.length) {
					var length20 = this41.data.length + 10;
					var this42 = new Array(length20);
					var data20 = this42;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this41.data,0,data20,0,this41.data.length);
					this41.data = data20;
				}
			}
			this41.data[4] = (sx * sy * cz - cx * sz) * scale[4];
			var this43 = this.rawData;
			if(!this43.fixed) {
				if(5 >= this43.length) {
					this43.length = 6;
				}
				if(this43.data.length < this43.length) {
					var length21 = this43.data.length + 10;
					var this44 = new Array(length21);
					var data21 = this44;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this43.data,0,data21,0,this43.data.length);
					this43.data = data21;
				}
			}
			this43.data[5] = (sx * sy * sz + cx * cz) * scale[5];
			var this45 = this.rawData;
			if(!this45.fixed) {
				if(6 >= this45.length) {
					this45.length = 7;
				}
				if(this45.data.length < this45.length) {
					var length22 = this45.data.length + 10;
					var this46 = new Array(length22);
					var data22 = this46;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this45.data,0,data22,0,this45.data.length);
					this45.data = data22;
				}
			}
			this45.data[6] = sx * cy * scale[6];
			var this47 = this.rawData;
			if(!this47.fixed) {
				if(7 >= this47.length) {
					this47.length = 8;
				}
				if(this47.data.length < this47.length) {
					var length23 = this47.data.length + 10;
					var this48 = new Array(length23);
					var data23 = this48;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this47.data,0,data23,0,this47.data.length);
					this47.data = data23;
				}
			}
			this47.data[7] = 0;
			var this49 = this.rawData;
			if(!this49.fixed) {
				if(8 >= this49.length) {
					this49.length = 9;
				}
				if(this49.data.length < this49.length) {
					var length24 = this49.data.length + 10;
					var this50 = new Array(length24);
					var data24 = this50;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this49.data,0,data24,0,this49.data.length);
					this49.data = data24;
				}
			}
			this49.data[8] = (cx * sy * cz + sx * sz) * scale[8];
			var this51 = this.rawData;
			if(!this51.fixed) {
				if(9 >= this51.length) {
					this51.length = 10;
				}
				if(this51.data.length < this51.length) {
					var length25 = this51.data.length + 10;
					var this52 = new Array(length25);
					var data25 = this52;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this51.data,0,data25,0,this51.data.length);
					this51.data = data25;
				}
			}
			this51.data[9] = (cx * sy * sz - sx * cz) * scale[9];
			var this53 = this.rawData;
			if(!this53.fixed) {
				if(10 >= this53.length) {
					this53.length = 11;
				}
				if(this53.data.length < this53.length) {
					var length26 = this53.data.length + 10;
					var this54 = new Array(length26);
					var data26 = this54;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this53.data,0,data26,0,this53.data.length);
					this53.data = data26;
				}
			}
			this53.data[10] = cx * cy * scale[10];
			var this55 = this.rawData;
			if(!this55.fixed) {
				if(11 >= this55.length) {
					this55.length = 12;
				}
				if(this55.data.length < this55.length) {
					var length27 = this55.data.length + 10;
					var this56 = new Array(length27);
					var data27 = this56;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this55.data,0,data27,0,this55.data.length);
					this55.data = data27;
				}
			}
			this55.data[11] = 0;
			var this57 = this.rawData;
			var value3 = components.data[0].x;
			if(!this57.fixed) {
				if(12 >= this57.length) {
					this57.length = 13;
				}
				if(this57.data.length < this57.length) {
					var length28 = this57.data.length + 10;
					var this58 = new Array(length28);
					var data28 = this58;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this57.data,0,data28,0,this57.data.length);
					this57.data = data28;
				}
			}
			this57.data[12] = value3;
			var this59 = this.rawData;
			var value4 = components.data[0].y;
			if(!this59.fixed) {
				if(13 >= this59.length) {
					this59.length = 14;
				}
				if(this59.data.length < this59.length) {
					var length29 = this59.data.length + 10;
					var this60 = new Array(length29);
					var data29 = this60;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this59.data,0,data29,0,this59.data.length);
					this59.data = data29;
				}
			}
			this59.data[13] = value4;
			var this61 = this.rawData;
			var value5 = components.data[0].z;
			if(!this61.fixed) {
				if(14 >= this61.length) {
					this61.length = 15;
				}
				if(this61.data.length < this61.length) {
					var length30 = this61.data.length + 10;
					var this62 = new Array(length30);
					var data30 = this62;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this61.data,0,data30,0,this61.data.length);
					this61.data = data30;
				}
			}
			this61.data[14] = value5;
			var this63 = this.rawData;
			if(!this63.fixed) {
				if(15 >= this63.length) {
					this63.length = 16;
				}
				if(this63.data.length < this63.length) {
					var length31 = this63.data.length + 10;
					var this64 = new Array(length31);
					var data31 = this64;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this63.data,0,data31,0,this63.data.length);
					this63.data = data31;
				}
			}
			this63.data[15] = 1;
		} else {
			var x1 = components.data[1].x;
			var y1 = components.data[1].y;
			var z1 = components.data[1].z;
			var w1 = components.data[1].w;
			if(Type.enumEq(orientationStyle,0)) {
				x1 *= Math.sin(w1 / 2);
				y1 *= Math.sin(w1 / 2);
				z1 *= Math.sin(w1 / 2);
				w1 = Math.cos(w1 / 2);
			}
			var this65 = this.rawData;
			if(!this65.fixed) {
				if(0 >= this65.length) {
					this65.length = 1;
				}
				if(this65.data.length < this65.length) {
					var length32 = this65.data.length + 10;
					var this66 = new Array(length32);
					var data32 = this66;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this65.data,0,data32,0,this65.data.length);
					this65.data = data32;
				}
			}
			this65.data[0] = (1 - 2 * y1 * y1 - 2 * z1 * z1) * scale[0];
			var this67 = this.rawData;
			if(!this67.fixed) {
				if(1 >= this67.length) {
					this67.length = 2;
				}
				if(this67.data.length < this67.length) {
					var length33 = this67.data.length + 10;
					var this68 = new Array(length33);
					var data33 = this68;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this67.data,0,data33,0,this67.data.length);
					this67.data = data33;
				}
			}
			this67.data[1] = (2 * x1 * y1 + 2 * w1 * z1) * scale[1];
			var this69 = this.rawData;
			if(!this69.fixed) {
				if(2 >= this69.length) {
					this69.length = 3;
				}
				if(this69.data.length < this69.length) {
					var length34 = this69.data.length + 10;
					var this70 = new Array(length34);
					var data34 = this70;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this69.data,0,data34,0,this69.data.length);
					this69.data = data34;
				}
			}
			this69.data[2] = (2 * x1 * z1 - 2 * w1 * y1) * scale[2];
			var this71 = this.rawData;
			if(!this71.fixed) {
				if(3 >= this71.length) {
					this71.length = 4;
				}
				if(this71.data.length < this71.length) {
					var length35 = this71.data.length + 10;
					var this72 = new Array(length35);
					var data35 = this72;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this71.data,0,data35,0,this71.data.length);
					this71.data = data35;
				}
			}
			this71.data[3] = 0;
			var this73 = this.rawData;
			if(!this73.fixed) {
				if(4 >= this73.length) {
					this73.length = 5;
				}
				if(this73.data.length < this73.length) {
					var length36 = this73.data.length + 10;
					var this74 = new Array(length36);
					var data36 = this74;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this73.data,0,data36,0,this73.data.length);
					this73.data = data36;
				}
			}
			this73.data[4] = (2 * x1 * y1 - 2 * w1 * z1) * scale[4];
			var this75 = this.rawData;
			if(!this75.fixed) {
				if(5 >= this75.length) {
					this75.length = 6;
				}
				if(this75.data.length < this75.length) {
					var length37 = this75.data.length + 10;
					var this76 = new Array(length37);
					var data37 = this76;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this75.data,0,data37,0,this75.data.length);
					this75.data = data37;
				}
			}
			this75.data[5] = (1 - 2 * x1 * x1 - 2 * z1 * z1) * scale[5];
			var this77 = this.rawData;
			if(!this77.fixed) {
				if(6 >= this77.length) {
					this77.length = 7;
				}
				if(this77.data.length < this77.length) {
					var length38 = this77.data.length + 10;
					var this78 = new Array(length38);
					var data38 = this78;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this77.data,0,data38,0,this77.data.length);
					this77.data = data38;
				}
			}
			this77.data[6] = (2 * y1 * z1 + 2 * w1 * x1) * scale[6];
			var this79 = this.rawData;
			if(!this79.fixed) {
				if(7 >= this79.length) {
					this79.length = 8;
				}
				if(this79.data.length < this79.length) {
					var length39 = this79.data.length + 10;
					var this80 = new Array(length39);
					var data39 = this80;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this79.data,0,data39,0,this79.data.length);
					this79.data = data39;
				}
			}
			this79.data[7] = 0;
			var this81 = this.rawData;
			if(!this81.fixed) {
				if(8 >= this81.length) {
					this81.length = 9;
				}
				if(this81.data.length < this81.length) {
					var length40 = this81.data.length + 10;
					var this82 = new Array(length40);
					var data40 = this82;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this81.data,0,data40,0,this81.data.length);
					this81.data = data40;
				}
			}
			this81.data[8] = (2 * x1 * z1 + 2 * w1 * y1) * scale[8];
			var this83 = this.rawData;
			if(!this83.fixed) {
				if(9 >= this83.length) {
					this83.length = 10;
				}
				if(this83.data.length < this83.length) {
					var length41 = this83.data.length + 10;
					var this84 = new Array(length41);
					var data41 = this84;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this83.data,0,data41,0,this83.data.length);
					this83.data = data41;
				}
			}
			this83.data[9] = (2 * y1 * z1 - 2 * w1 * x1) * scale[9];
			var this85 = this.rawData;
			if(!this85.fixed) {
				if(10 >= this85.length) {
					this85.length = 11;
				}
				if(this85.data.length < this85.length) {
					var length42 = this85.data.length + 10;
					var this86 = new Array(length42);
					var data42 = this86;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this85.data,0,data42,0,this85.data.length);
					this85.data = data42;
				}
			}
			this85.data[10] = (1 - 2 * x1 * x1 - 2 * y1 * y1) * scale[10];
			var this87 = this.rawData;
			if(!this87.fixed) {
				if(11 >= this87.length) {
					this87.length = 12;
				}
				if(this87.data.length < this87.length) {
					var length43 = this87.data.length + 10;
					var this88 = new Array(length43);
					var data43 = this88;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this87.data,0,data43,0,this87.data.length);
					this87.data = data43;
				}
			}
			this87.data[11] = 0;
			var this89 = this.rawData;
			var value6 = components.data[0].x;
			if(!this89.fixed) {
				if(12 >= this89.length) {
					this89.length = 13;
				}
				if(this89.data.length < this89.length) {
					var length44 = this89.data.length + 10;
					var this90 = new Array(length44);
					var data44 = this90;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this89.data,0,data44,0,this89.data.length);
					this89.data = data44;
				}
			}
			this89.data[12] = value6;
			var this91 = this.rawData;
			var value7 = components.data[0].y;
			if(!this91.fixed) {
				if(13 >= this91.length) {
					this91.length = 14;
				}
				if(this91.data.length < this91.length) {
					var length45 = this91.data.length + 10;
					var this92 = new Array(length45);
					var data45 = this92;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this91.data,0,data45,0,this91.data.length);
					this91.data = data45;
				}
			}
			this91.data[13] = value7;
			var this93 = this.rawData;
			var value8 = components.data[0].z;
			if(!this93.fixed) {
				if(14 >= this93.length) {
					this93.length = 15;
				}
				if(this93.data.length < this93.length) {
					var length46 = this93.data.length + 10;
					var this94 = new Array(length46);
					var data46 = this94;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this93.data,0,data46,0,this93.data.length);
					this93.data = data46;
				}
			}
			this93.data[14] = value8;
			var this95 = this.rawData;
			if(!this95.fixed) {
				if(15 >= this95.length) {
					this95.length = 16;
				}
				if(this95.data.length < this95.length) {
					var length47 = this95.data.length + 10;
					var this96 = new Array(length47);
					var data47 = this96;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this95.data,0,data47,0,this95.data.length);
					this95.data = data47;
				}
			}
			this95.data[15] = 1;
		}
		if(components.data[2].x == 0) {
			var this97 = this.rawData;
			if(!this97.fixed) {
				if(0 >= this97.length) {
					this97.length = 1;
				}
				if(this97.data.length < this97.length) {
					var length48 = this97.data.length + 10;
					var this98 = new Array(length48);
					var data48 = this98;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this97.data,0,data48,0,this97.data.length);
					this97.data = data48;
				}
			}
			this97.data[0] = 1e-15;
		}
		if(components.data[2].y == 0) {
			var this99 = this.rawData;
			if(!this99.fixed) {
				if(5 >= this99.length) {
					this99.length = 6;
				}
				if(this99.data.length < this99.length) {
					var length49 = this99.data.length + 10;
					var this100 = new Array(length49);
					var data49 = this100;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this99.data,0,data49,0,this99.data.length);
					this99.data = data49;
				}
			}
			this99.data[5] = 1e-15;
		}
		if(components.data[2].z == 0) {
			var this101 = this.rawData;
			if(!this101.fixed) {
				if(10 >= this101.length) {
					this101.length = 11;
				}
				if(this101.data.length < this101.length) {
					var length50 = this101.data.length + 10;
					var this102 = new Array(length50);
					var data50 = this102;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this101.data,0,data50,0,this101.data.length);
					this101.data = data50;
				}
			}
			this101.data[10] = 1e-15;
		}
		return !(components.data[2].x == 0 || components.data[2].y == 0 || components.data[2].y == 0);
	}
	,transformVector: function(v) {
		var x = v.x;
		var y = v.y;
		var z = v.z;
		return new openfl_geom_Vector3D(x * this.rawData.data[0] + y * this.rawData.data[4] + z * this.rawData.data[8] + this.rawData.data[12],x * this.rawData.data[1] + y * this.rawData.data[5] + z * this.rawData.data[9] + this.rawData.data[13],x * this.rawData.data[2] + y * this.rawData.data[6] + z * this.rawData.data[10] + this.rawData.data[14],x * this.rawData.data[3] + y * this.rawData.data[7] + z * this.rawData.data[11] + this.rawData.data[15]);
	}
	,transformVectors: function(vin,vout) {
		var i = 0;
		var x;
		var y;
		var z;
		while(i + 3 <= vin.length) {
			x = vin.data[i];
			y = vin.data[i + 1];
			z = vin.data[i + 2];
			var value = x * this.rawData.data[0] + y * this.rawData.data[4] + z * this.rawData.data[8] + this.rawData.data[12];
			if(!vout.fixed) {
				if(i >= vout.length) {
					vout.length = i + 1;
				}
				if(vout.data.length < vout.length) {
					var length = vout.data.length + 10;
					var this1 = new Array(length);
					var data = this1;
					haxe_ds__$Vector_Vector_$Impl_$.blit(vout.data,0,data,0,vout.data.length);
					vout.data = data;
				}
			}
			vout.data[i] = value;
			var key = i + 1;
			var value1 = x * this.rawData.data[1] + y * this.rawData.data[5] + z * this.rawData.data[9] + this.rawData.data[13];
			if(!vout.fixed) {
				if(key >= vout.length) {
					vout.length = key + 1;
				}
				if(vout.data.length < vout.length) {
					var length1 = vout.data.length + 10;
					var this2 = new Array(length1);
					var data1 = this2;
					haxe_ds__$Vector_Vector_$Impl_$.blit(vout.data,0,data1,0,vout.data.length);
					vout.data = data1;
				}
			}
			vout.data[key] = value1;
			var key1 = i + 2;
			var value2 = x * this.rawData.data[2] + y * this.rawData.data[6] + z * this.rawData.data[10] + this.rawData.data[14];
			if(!vout.fixed) {
				if(key1 >= vout.length) {
					vout.length = key1 + 1;
				}
				if(vout.data.length < vout.length) {
					var length2 = vout.data.length + 10;
					var this3 = new Array(length2);
					var data2 = this3;
					haxe_ds__$Vector_Vector_$Impl_$.blit(vout.data,0,data2,0,vout.data.length);
					vout.data = data2;
				}
			}
			vout.data[key1] = value2;
			i += 3;
		}
	}
	,transpose: function() {
		var this1 = this.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		var this2 = new Array(length);
		vectorData.data = this2;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		var oRawData = vectorData;
		var this3 = this.rawData;
		var value = oRawData.data[4];
		if(!this3.fixed) {
			if(1 >= this3.length) {
				this3.length = 2;
			}
			if(this3.data.length < this3.length) {
				var length1 = this3.data.length + 10;
				var this4 = new Array(length1);
				var data = this4;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data,0,this3.data.length);
				this3.data = data;
			}
		}
		this3.data[1] = value;
		var this5 = this.rawData;
		var value1 = oRawData.data[8];
		if(!this5.fixed) {
			if(2 >= this5.length) {
				this5.length = 3;
			}
			if(this5.data.length < this5.length) {
				var length2 = this5.data.length + 10;
				var this6 = new Array(length2);
				var data1 = this6;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data1,0,this5.data.length);
				this5.data = data1;
			}
		}
		this5.data[2] = value1;
		var this7 = this.rawData;
		var value2 = oRawData.data[12];
		if(!this7.fixed) {
			if(3 >= this7.length) {
				this7.length = 4;
			}
			if(this7.data.length < this7.length) {
				var length3 = this7.data.length + 10;
				var this8 = new Array(length3);
				var data2 = this8;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data2,0,this7.data.length);
				this7.data = data2;
			}
		}
		this7.data[3] = value2;
		var this9 = this.rawData;
		var value3 = oRawData.data[1];
		if(!this9.fixed) {
			if(4 >= this9.length) {
				this9.length = 5;
			}
			if(this9.data.length < this9.length) {
				var length4 = this9.data.length + 10;
				var this10 = new Array(length4);
				var data3 = this10;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data3,0,this9.data.length);
				this9.data = data3;
			}
		}
		this9.data[4] = value3;
		var this11 = this.rawData;
		var value4 = oRawData.data[9];
		if(!this11.fixed) {
			if(6 >= this11.length) {
				this11.length = 7;
			}
			if(this11.data.length < this11.length) {
				var length5 = this11.data.length + 10;
				var this12 = new Array(length5);
				var data4 = this12;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data4,0,this11.data.length);
				this11.data = data4;
			}
		}
		this11.data[6] = value4;
		var this13 = this.rawData;
		var value5 = oRawData.data[13];
		if(!this13.fixed) {
			if(7 >= this13.length) {
				this13.length = 8;
			}
			if(this13.data.length < this13.length) {
				var length6 = this13.data.length + 10;
				var this14 = new Array(length6);
				var data5 = this14;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data5,0,this13.data.length);
				this13.data = data5;
			}
		}
		this13.data[7] = value5;
		var this15 = this.rawData;
		var value6 = oRawData.data[2];
		if(!this15.fixed) {
			if(8 >= this15.length) {
				this15.length = 9;
			}
			if(this15.data.length < this15.length) {
				var length7 = this15.data.length + 10;
				var this16 = new Array(length7);
				var data6 = this16;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data6,0,this15.data.length);
				this15.data = data6;
			}
		}
		this15.data[8] = value6;
		var this17 = this.rawData;
		var value7 = oRawData.data[6];
		if(!this17.fixed) {
			if(9 >= this17.length) {
				this17.length = 10;
			}
			if(this17.data.length < this17.length) {
				var length8 = this17.data.length + 10;
				var this18 = new Array(length8);
				var data7 = this18;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data7,0,this17.data.length);
				this17.data = data7;
			}
		}
		this17.data[9] = value7;
		var this19 = this.rawData;
		var value8 = oRawData.data[14];
		if(!this19.fixed) {
			if(11 >= this19.length) {
				this19.length = 12;
			}
			if(this19.data.length < this19.length) {
				var length9 = this19.data.length + 10;
				var this20 = new Array(length9);
				var data8 = this20;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data8,0,this19.data.length);
				this19.data = data8;
			}
		}
		this19.data[11] = value8;
		var this21 = this.rawData;
		var value9 = oRawData.data[3];
		if(!this21.fixed) {
			if(12 >= this21.length) {
				this21.length = 13;
			}
			if(this21.data.length < this21.length) {
				var length10 = this21.data.length + 10;
				var this22 = new Array(length10);
				var data9 = this22;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data9,0,this21.data.length);
				this21.data = data9;
			}
		}
		this21.data[12] = value9;
		var this23 = this.rawData;
		var value10 = oRawData.data[7];
		if(!this23.fixed) {
			if(13 >= this23.length) {
				this23.length = 14;
			}
			if(this23.data.length < this23.length) {
				var length11 = this23.data.length + 10;
				var this24 = new Array(length11);
				var data10 = this24;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data10,0,this23.data.length);
				this23.data = data10;
			}
		}
		this23.data[13] = value10;
		var this25 = this.rawData;
		var value11 = oRawData.data[11];
		if(!this25.fixed) {
			if(14 >= this25.length) {
				this25.length = 15;
			}
			if(this25.data.length < this25.length) {
				var length12 = this25.data.length + 10;
				var this26 = new Array(length12);
				var data11 = this26;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data11,0,this25.data.length);
				this25.data = data11;
			}
		}
		this25.data[14] = value11;
	}
	,get_determinant: function() {
		return (this.rawData.data[0] * this.rawData.data[5] - this.rawData.data[4] * this.rawData.data[1]) * (this.rawData.data[10] * this.rawData.data[15] - this.rawData.data[14] * this.rawData.data[11]) - (this.rawData.data[0] * this.rawData.data[9] - this.rawData.data[8] * this.rawData.data[1]) * (this.rawData.data[6] * this.rawData.data[15] - this.rawData.data[14] * this.rawData.data[7]) + (this.rawData.data[0] * this.rawData.data[13] - this.rawData.data[12] * this.rawData.data[1]) * (this.rawData.data[6] * this.rawData.data[11] - this.rawData.data[10] * this.rawData.data[7]) + (this.rawData.data[4] * this.rawData.data[9] - this.rawData.data[8] * this.rawData.data[5]) * (this.rawData.data[2] * this.rawData.data[15] - this.rawData.data[14] * this.rawData.data[3]) - (this.rawData.data[4] * this.rawData.data[13] - this.rawData.data[12] * this.rawData.data[5]) * (this.rawData.data[2] * this.rawData.data[11] - this.rawData.data[10] * this.rawData.data[3]) + (this.rawData.data[8] * this.rawData.data[13] - this.rawData.data[12] * this.rawData.data[9]) * (this.rawData.data[2] * this.rawData.data[7] - this.rawData.data[6] * this.rawData.data[3]);
	}
	,get_position: function() {
		return new openfl_geom_Vector3D(this.rawData.data[12],this.rawData.data[13],this.rawData.data[14]);
	}
	,set_position: function(val) {
		var this1 = this.rawData;
		var value = val.x;
		if(!this1.fixed) {
			if(12 >= this1.length) {
				this1.length = 13;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var this2 = new Array(length);
				var data = this2;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[12] = value;
		var this3 = this.rawData;
		var value1 = val.y;
		if(!this3.fixed) {
			if(13 >= this3.length) {
				this3.length = 14;
			}
			if(this3.data.length < this3.length) {
				var length1 = this3.data.length + 10;
				var this4 = new Array(length1);
				var data1 = this4;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
				this3.data = data1;
			}
		}
		this3.data[13] = value1;
		var this5 = this.rawData;
		var value2 = val.z;
		if(!this5.fixed) {
			if(14 >= this5.length) {
				this5.length = 15;
			}
			if(this5.data.length < this5.length) {
				var length2 = this5.data.length + 10;
				var this6 = new Array(length2);
				var data2 = this6;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data2,0,this5.data.length);
				this5.data = data2;
			}
		}
		this5.data[14] = value2;
		return val;
	}
	,__class__: openfl_geom_Matrix3D
	,__properties__: {set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}
};
var openfl_geom__$Orientation3D_Orientation3D_$Impl_$ = {};
$hxClasses["openfl.geom._Orientation3D.Orientation3D_Impl_"] = openfl_geom__$Orientation3D_Orientation3D_$Impl_$;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.__name__ = ["openfl","geom","_Orientation3D","Orientation3D_Impl_"];
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.fromString = function(value) {
	switch(value) {
	case "axisAngle":
		return 0;
	case "eulerAngles":
		return 1;
	case "quaternion":
		return 2;
	default:
		return null;
	}
};
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "axisAngle";
	case 1:
		return "eulerAngles";
	case 2:
		return "quaternion";
	default:
		return null;
	}
};
var openfl_geom_Transform = function(displayObject) {
	this.__colorTransform = new openfl_geom_ColorTransform();
	this.concatenatedColorTransform = new openfl_geom_ColorTransform();
	this.pixelBounds = new openfl_geom_Rectangle();
	this.__displayObject = displayObject;
	this.__hasMatrix = true;
};
$hxClasses["openfl.geom.Transform"] = openfl_geom_Transform;
openfl_geom_Transform.__name__ = ["openfl","geom","Transform"];
openfl_geom_Transform.prototype = {
	get_colorTransform: function() {
		return this.__colorTransform;
	}
	,set_colorTransform: function(value) {
		if(!this.__colorTransform.__equals(value)) {
			this.__colorTransform = value;
			if(value != null) {
				this.__displayObject.set_alpha(value.alphaMultiplier);
			}
			var _this = this.__displayObject;
			if(!_this.__renderDirty) {
				_this.__updateCachedBitmap = true;
				_this.__updateFilters = _this.get_filters() != null && _this.get_filters().length > 0;
				_this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__colorTransform;
	}
	,get_matrix: function() {
		if(this.__hasMatrix) {
			return this.__displayObject.__transform.clone();
		}
		return null;
	}
	,get_concatenatedMatrix: function() {
		if(this.__hasMatrix) {
			return this.__displayObject.__getWorldTransform().clone();
		}
		return null;
	}
	,set_matrix: function(value) {
		if(value == null) {
			this.__hasMatrix = false;
			return null;
		}
		this.__hasMatrix = true;
		this.__hasMatrix3D = false;
		if(this.__displayObject != null) {
			var rotation = 180 / Math.PI * Math.atan2(value.d,value.c) - 90;
			if(rotation != this.__displayObject.__rotation) {
				this.__displayObject.__rotation = rotation;
				var radians = rotation * (Math.PI / 180);
				this.__displayObject.__rotationSine = Math.sin(radians);
				this.__displayObject.__rotationCosine = Math.cos(radians);
			}
			this.__displayObject.__transform.copyFrom(value);
			var _this = this.__displayObject;
			if(!_this.__transformDirty) {
				_this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return value;
	}
	,get_matrix3D: function() {
		if(this.__hasMatrix3D) {
			var matrix = this.__displayObject.__transform;
			var value = [matrix.a,matrix.b,0.0,0.0,matrix.c,matrix.d,0.0,0.0,0.0,0.0,1.0,0.0,matrix.tx,matrix.ty,0.0,1.0];
			var vectorData = new openfl_VectorData();
			vectorData.length = value.length;
			vectorData.fixed = true;
			vectorData.data = value.slice(0);
			return new openfl_geom_Matrix3D(vectorData);
		}
		return null;
	}
	,set_matrix3D: function(value) {
		if(value == null) {
			this.__hasMatrix3D = false;
			return null;
		}
		this.__hasMatrix = false;
		this.__hasMatrix3D = true;
		if(this.__displayObject != null) {
			var rotation = 180 / Math.PI * Math.atan2(value.rawData.data[5],value.rawData.data[4]) - 90;
			if(rotation != this.__displayObject.__rotation) {
				this.__displayObject.__rotation = rotation;
				var radians = rotation * (Math.PI / 180);
				this.__displayObject.__rotationSine = Math.sin(radians);
				this.__displayObject.__rotationCosine = Math.cos(radians);
			}
			this.__displayObject.__transform.a = value.rawData.data[0];
			this.__displayObject.__transform.b = value.rawData.data[1];
			this.__displayObject.__transform.c = value.rawData.data[5];
			this.__displayObject.__transform.d = value.rawData.data[6];
			this.__displayObject.__transform.tx = value.rawData.data[12];
			this.__displayObject.__transform.ty = value.rawData.data[13];
			var _this = this.__displayObject;
			if(!_this.__transformDirty) {
				_this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return value;
	}
	,__class__: openfl_geom_Transform
	,__properties__: {set_matrix3D:"set_matrix3D",get_matrix3D:"get_matrix3D",set_matrix:"set_matrix",get_matrix:"get_matrix",get_concatenatedMatrix:"get_concatenatedMatrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}
};
var openfl_geom_Vector3D = function(x,y,z,w) {
	if(w == null) {
		w = 0;
	}
	if(z == null) {
		z = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.w = w;
	this.x = x;
	this.y = y;
	this.z = z;
};
$hxClasses["openfl.geom.Vector3D"] = openfl_geom_Vector3D;
openfl_geom_Vector3D.__name__ = ["openfl","geom","Vector3D"];
openfl_geom_Vector3D.__properties__ = {get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};
openfl_geom_Vector3D.X_AXIS = null;
openfl_geom_Vector3D.Y_AXIS = null;
openfl_geom_Vector3D.Z_AXIS = null;
openfl_geom_Vector3D.angleBetween = function(a,b) {
	var la = a.get_length();
	var lb = b.get_length();
	var dot = a.dotProduct(b);
	if(la != 0) {
		dot /= la;
	}
	if(lb != 0) {
		dot /= lb;
	}
	return Math.acos(dot);
};
openfl_geom_Vector3D.distance = function(pt1,pt2) {
	var x = pt2.x - pt1.x;
	var y = pt2.y - pt1.y;
	var z = pt2.z - pt1.z;
	return Math.sqrt(x * x + y * y + z * z);
};
openfl_geom_Vector3D.get_X_AXIS = function() {
	return new openfl_geom_Vector3D(1,0,0);
};
openfl_geom_Vector3D.get_Y_AXIS = function() {
	return new openfl_geom_Vector3D(0,1,0);
};
openfl_geom_Vector3D.get_Z_AXIS = function() {
	return new openfl_geom_Vector3D(0,0,1);
};
openfl_geom_Vector3D.prototype = {
	add: function(a) {
		return new openfl_geom_Vector3D(this.x + a.x,this.y + a.y,this.z + a.z);
	}
	,clone: function() {
		return new openfl_geom_Vector3D(this.x,this.y,this.z,this.w);
	}
	,copyFrom: function(sourceVector3D) {
		this.x = sourceVector3D.x;
		this.y = sourceVector3D.y;
		this.z = sourceVector3D.z;
	}
	,crossProduct: function(a) {
		return new openfl_geom_Vector3D(this.y * a.z - this.z * a.y,this.z * a.x - this.x * a.z,this.x * a.y - this.y * a.x,1);
	}
	,decrementBy: function(a) {
		this.x -= a.x;
		this.y -= a.y;
		this.z -= a.z;
	}
	,dotProduct: function(a) {
		return this.x * a.x + this.y * a.y + this.z * a.z;
	}
	,equals: function(toCompare,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z) {
			if(!(!allFour)) {
				return this.w == toCompare.w;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,incrementBy: function(a) {
		this.x += a.x;
		this.y += a.y;
		this.z += a.z;
	}
	,nearEquals: function(toCompare,tolerance,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(Math.abs(this.x - toCompare.x) < tolerance && Math.abs(this.y - toCompare.y) < tolerance && Math.abs(this.z - toCompare.z) < tolerance) {
			if(!(!allFour)) {
				return Math.abs(this.w - toCompare.w) < tolerance;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,negate: function() {
		this.x *= -1;
		this.y *= -1;
		this.z *= -1;
	}
	,normalize: function() {
		var l = this.get_length();
		if(l != 0) {
			this.x /= l;
			this.y /= l;
			this.z /= l;
		}
		return l;
	}
	,project: function() {
		this.x /= this.w;
		this.y /= this.w;
		this.z /= this.w;
	}
	,scaleBy: function(s) {
		this.x *= s;
		this.y *= s;
		this.z *= s;
	}
	,setTo: function(xa,ya,za) {
		this.x = xa;
		this.y = ya;
		this.z = za;
	}
	,subtract: function(a) {
		return new openfl_geom_Vector3D(this.x - a.x,this.y - a.y,this.z - a.z);
	}
	,toString: function() {
		return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")";
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
	}
	,get_lengthSquared: function() {
		return this.x * this.x + this.y * this.y + this.z * this.z;
	}
	,__class__: openfl_geom_Vector3D
	,__properties__: {get_lengthSquared:"get_lengthSquared",get_length:"get_length"}
};
var openfl_media_ID3Info = function() {
};
$hxClasses["openfl.media.ID3Info"] = openfl_media_ID3Info;
openfl_media_ID3Info.__name__ = ["openfl","media","ID3Info"];
openfl_media_ID3Info.prototype = {
	__class__: openfl_media_ID3Info
};
var openfl_media_Sound = function(stream,context) {
	openfl_events_EventDispatcher.call(this,this);
	this.bytesLoaded = 0;
	this.bytesTotal = 0;
	this.id3 = null;
	this.isBuffering = false;
	this.url = null;
	if(stream != null) {
		this.load(stream,context);
	}
};
$hxClasses["openfl.media.Sound"] = openfl_media_Sound;
openfl_media_Sound.__name__ = ["openfl","media","Sound"];
openfl_media_Sound.fromAudioBuffer = function(buffer) {
	var sound = new openfl_media_Sound();
	sound.__buffer = buffer;
	return sound;
};
openfl_media_Sound.fromFile = function(path) {
	return openfl_media_Sound.fromAudioBuffer(lime_audio_AudioBuffer.fromFile(path));
};
openfl_media_Sound.__super__ = openfl_events_EventDispatcher;
openfl_media_Sound.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	close: function() {
		var key = this.__soundID;
		var _this = openfl_media_Sound.__registeredSounds;
		if(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key)) {
			createjs.Sound.removeSound(this.__soundID);
		}
	}
	,load: function(stream,context) {
		this.url = stream.url;
		this.__soundID = haxe_io_Path.withoutExtension(stream.url);
		var key = this.__soundID;
		var _this = openfl_media_Sound.__registeredSounds;
		if(!(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key))) {
			var key1 = this.__soundID;
			var _this1 = openfl_media_Sound.__registeredSounds;
			if(__map_reserved[key1] != null) {
				_this1.setReserved(key1,true);
			} else {
				_this1.h[key1] = true;
			}
			createjs.Sound.addEventListener("fileload",$bind(this,this.SoundJS_onFileLoad));
			createjs.Sound.addEventListener("fileerror",$bind(this,this.SoundJS_onFileError));
			createjs.Sound.registerSound(this.url,this.__soundID);
		} else {
			this.dispatchEvent(new openfl_events_Event("complete"));
		}
	}
	,loadCompressedDataFromByteArray: function(bytes,bytesLength,forcePlayAsMusic) {
		if(forcePlayAsMusic == null) {
			forcePlayAsMusic = false;
		}
		openfl_Lib.notImplemented("Sound.loadCompressedDataFromByteArray");
	}
	,loadPCMFromByteArray: function(bytes,samples,format,stereo,sampleRate) {
		if(sampleRate == null) {
			sampleRate = 44100;
		}
		if(stereo == null) {
			stereo = true;
		}
		openfl_Lib.notImplemented("Sound.loadPCMFromByteArray");
	}
	,play: function(startTime,loops,sndTransform) {
		if(loops == null) {
			loops = 0;
		}
		if(startTime == null) {
			startTime = 0.0;
		}
		if(sndTransform == null) {
			sndTransform = new openfl_media_SoundTransform(1,0);
		}
		var pan = sndTransform.pan;
		if(pan == 0) {
			pan = -0.0000001;
		}
		var instance = loops > 1 ? createjs.Sound.play(this.__soundID,"any",0,startTime | 0,loops - 1,sndTransform.volume,pan) : createjs.Sound.play(this.__soundID,"any",0,startTime | 0,0,sndTransform.volume,pan);
		return new openfl_media_SoundChannel(instance);
	}
	,get_id3: function() {
		return new openfl_media_ID3Info();
	}
	,get_length: function() {
		var tmp = this.__buffer != null;
		return 0;
	}
	,AudioBuffer_onURLLoad: function(buffer) {
		if(buffer == null) {
			this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"));
		} else {
			this.__buffer = buffer;
			this.dispatchEvent(new openfl_events_Event("complete"));
		}
	}
	,SoundJS_onFileLoad: function(event) {
		if(event.id == this.__soundID) {
			createjs.Sound.removeEventListener("fileload",$bind(this,this.SoundJS_onFileLoad));
			createjs.Sound.removeEventListener("fileerror",$bind(this,this.SoundJS_onFileError));
			this.dispatchEvent(new openfl_events_Event("complete"));
		}
	}
	,SoundJS_onFileError: function(event) {
		if(event.id == this.__soundID) {
			createjs.Sound.removeEventListener("fileload",$bind(this,this.SoundJS_onFileLoad));
			createjs.Sound.removeEventListener("fileerror",$bind(this,this.SoundJS_onFileError));
			this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"));
		}
	}
	,__class__: openfl_media_Sound
	,__properties__: {get_length:"get_length",get_id3:"get_id3"}
});
var openfl_media_SoundChannel = function(soundInstance) {
	openfl_events_EventDispatcher.call(this,this);
	this.leftPeak = 1;
	this.rightPeak = 1;
	if(soundInstance != null) {
		this.__soundInstance = soundInstance;
		this.__soundInstance.addEventListener("complete",$bind(this,this.source_onComplete));
		this.__isValid = true;
	}
};
$hxClasses["openfl.media.SoundChannel"] = openfl_media_SoundChannel;
openfl_media_SoundChannel.__name__ = ["openfl","media","SoundChannel"];
openfl_media_SoundChannel.__super__ = openfl_events_EventDispatcher;
openfl_media_SoundChannel.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	stop: function() {
		if(!this.__isValid) {
			return;
		}
		this.__soundInstance.stop();
	}
	,__dispose: function() {
		if(!this.__isValid) {
			return;
		}
		this.__soundInstance.stop();
		this.__soundInstance = null;
		this.__isValid = false;
	}
	,get_position: function() {
		if(!this.__isValid) {
			return 0;
		}
		return this.__soundInstance.getPosition();
	}
	,set_position: function(value) {
		if(!this.__isValid) {
			return 0;
		}
		this.__soundInstance.setPosition(value | 0);
		return this.__soundInstance.getPosition();
	}
	,get_soundTransform: function() {
		if(!this.__isValid) {
			return new openfl_media_SoundTransform();
		}
		return new openfl_media_SoundTransform(this.__soundInstance.getVolume(),this.__soundInstance.getPan());
	}
	,set_soundTransform: function(value) {
		if(!this.__isValid) {
			return value;
		}
		this.__soundInstance.setVolume(value.volume);
		this.__soundInstance.setPan(value.pan);
		return value;
	}
	,soundInstance_onComplete: function(_) {
		this.dispatchEvent(new openfl_events_Event("soundComplete"));
	}
	,source_onComplete: function() {
		this.__dispose();
		this.dispatchEvent(new openfl_events_Event("soundComplete"));
	}
	,__class__: openfl_media_SoundChannel
	,__properties__: {set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}
});
var openfl_media_SoundLoaderContext = function(bufferTime,checkPolicyFile) {
	if(checkPolicyFile == null) {
		checkPolicyFile = false;
	}
	if(bufferTime == null) {
		bufferTime = 1000;
	}
	this.bufferTime = bufferTime;
	this.checkPolicyFile = checkPolicyFile;
};
$hxClasses["openfl.media.SoundLoaderContext"] = openfl_media_SoundLoaderContext;
openfl_media_SoundLoaderContext.__name__ = ["openfl","media","SoundLoaderContext"];
openfl_media_SoundLoaderContext.prototype = {
	__class__: openfl_media_SoundLoaderContext
};
var openfl_media_SoundTransform = function(vol,panning) {
	if(panning == null) {
		panning = 0;
	}
	if(vol == null) {
		vol = 1;
	}
	this.volume = vol;
	this.pan = panning;
	this.leftToLeft = 0;
	this.leftToRight = 0;
	this.rightToLeft = 0;
	this.rightToRight = 0;
};
$hxClasses["openfl.media.SoundTransform"] = openfl_media_SoundTransform;
openfl_media_SoundTransform.__name__ = ["openfl","media","SoundTransform"];
openfl_media_SoundTransform.prototype = {
	clone: function() {
		return new openfl_media_SoundTransform(this.volume,this.pan);
	}
	,__class__: openfl_media_SoundTransform
};
var openfl_net_NetConnection = function() {
	openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.net.NetConnection"] = openfl_net_NetConnection;
openfl_net_NetConnection.__name__ = ["openfl","net","NetConnection"];
openfl_net_NetConnection.__super__ = openfl_events_EventDispatcher;
openfl_net_NetConnection.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	connect: function(command,_,_1,_2,_3,_4) {
		if(command != null) {
			throw new js__$Boot_HaxeError("Error: Can only connect in \"HTTP streaming\" mode");
		}
		this.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,true,{ code : "connectSuccess"}));
	}
	,__class__: openfl_net_NetConnection
});
var openfl_net_SharedObject = function() {
	openfl_events_EventDispatcher.call(this);
	this.client = this;
	this.objectEncoding = 3;
};
$hxClasses["openfl.net.SharedObject"] = openfl_net_SharedObject;
openfl_net_SharedObject.__name__ = ["openfl","net","SharedObject"];
openfl_net_SharedObject.__sharedObjects = null;
openfl_net_SharedObject.getLocal = function(name,localPath,secure) {
	if(secure == null) {
		secure = false;
	}
	if(localPath == null) {
		localPath = window.location.href;
	}
	if(openfl_net_SharedObject.__sharedObjects == null) {
		openfl_net_SharedObject.__sharedObjects = new haxe_ds_StringMap();
		openfl_Lib.application.onExit.add(openfl_net_SharedObject.application_onExit);
	}
	var id = localPath + "/" + name;
	var _this = openfl_net_SharedObject.__sharedObjects;
	if(!(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id))) {
		var sharedObject = new openfl_net_SharedObject();
		sharedObject.data = { };
		sharedObject.__localPath = localPath;
		sharedObject.__name = name;
		var encodedData = null;
		try {
			var storage = js_Browser.getLocalStorage();
			if(storage != null) {
				encodedData = storage.getItem(localPath + ":" + name);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
		}
		if(encodedData != null && encodedData != "") {
			try {
				var unserializer = new haxe_Unserializer(encodedData);
				unserializer.setResolver({ resolveEnum : Type.resolveEnum, resolveClass : openfl_net_SharedObject.__resolveClass});
				sharedObject.data = unserializer.unserialize();
			} catch( e1 ) {
				haxe_CallStack.lastException = e1;
			}
		}
		var _this1 = openfl_net_SharedObject.__sharedObjects;
		if(__map_reserved[id] != null) {
			_this1.setReserved(id,sharedObject);
		} else {
			_this1.h[id] = sharedObject;
		}
	}
	var _this2 = openfl_net_SharedObject.__sharedObjects;
	if(__map_reserved[id] != null) {
		return _this2.getReserved(id);
	} else {
		return _this2.h[id];
	}
};
openfl_net_SharedObject.getRemote = function(name,remotePath,persistence,secure) {
	if(secure == null) {
		secure = false;
	}
	if(persistence == null) {
		persistence = false;
	}
	openfl_Lib.notImplemented("SharedObject.getRemote");
	return null;
};
openfl_net_SharedObject.__mkdir = function(directory) {
};
openfl_net_SharedObject.__resolveClass = function(name) {
	if(name != null) {
		if(StringTools.startsWith(name,"neash.")) {
			name = StringTools.replace(name,"neash.","openfl.");
		}
		if(StringTools.startsWith(name,"native.")) {
			name = StringTools.replace(name,"native.","openfl.");
		}
		if(StringTools.startsWith(name,"flash.")) {
			name = StringTools.replace(name,"flash.","openfl.");
		}
		if(StringTools.startsWith(name,"openfl._v2.")) {
			name = StringTools.replace(name,"openfl._v2.","openfl.");
		}
		if(StringTools.startsWith(name,"openfl._legacy.")) {
			name = StringTools.replace(name,"openfl._legacy.","openfl.");
		}
		return Type.resolveClass(name);
	}
	return null;
};
openfl_net_SharedObject.application_onExit = function(_) {
	var _this = openfl_net_SharedObject.__sharedObjects;
	var sharedObject = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(sharedObject.hasNext()) {
		var sharedObject1 = sharedObject.next();
		sharedObject1.flush();
	}
};
openfl_net_SharedObject.__super__ = openfl_events_EventDispatcher;
openfl_net_SharedObject.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	clear: function() {
		this.data = { };
		try {
			var storage = js_Browser.getLocalStorage();
			if(storage != null) {
				storage.removeItem(this.__localPath + ":" + this.__name);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
		}
	}
	,close: function() {
	}
	,connect: function(myConnection,params) {
		openfl_Lib.notImplemented("SharedObject.connect");
	}
	,flush: function(minDiskSpace) {
		if(minDiskSpace == null) {
			minDiskSpace = 0;
		}
		if(Reflect.fields(this.data).length == 0) {
			return 0;
		}
		var encodedData = haxe_Serializer.run(this.data);
		try {
			var storage = js_Browser.getLocalStorage();
			if(storage != null) {
				storage.removeItem(this.__localPath + ":" + this.__name);
				storage.setItem(this.__localPath + ":" + this.__name,encodedData);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
			return 1;
		}
		return 0;
	}
	,send: function($arguments) {
		openfl_Lib.notImplemented("SharedObject.send");
	}
	,setDirty: function(propertyName) {
	}
	,setProperty: function(propertyName,value) {
		if(this.data != null) {
			this.data[propertyName] = value;
		}
	}
	,get_size: function() {
		try {
			var d = haxe_Serializer.run(this.data);
			return haxe_io_Bytes.ofString(d).length;
		} catch( e ) {
			haxe_CallStack.lastException = e;
			return 0;
		}
	}
	,__class__: openfl_net_SharedObject
	,__properties__: {get_size:"get_size"}
});
var openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$ = {};
$hxClasses["openfl.net._SharedObjectFlushStatus.SharedObjectFlushStatus_Impl_"] = openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.__name__ = ["openfl","net","_SharedObjectFlushStatus","SharedObjectFlushStatus_Impl_"];
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.fromString = function(value) {
	switch(value) {
	case "flushed":
		return 0;
	case "pending":
		return 1;
	default:
		return null;
	}
};
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "flushed";
	case 1:
		return "pending";
	default:
		return null;
	}
};
var openfl_net_URLLoader = function(request) {
	openfl_events_EventDispatcher.call(this);
	this.bytesLoaded = 0;
	this.bytesTotal = 0;
	this.set_dataFormat(1);
	if(request != null) {
		this.load(request);
	}
};
$hxClasses["openfl.net.URLLoader"] = openfl_net_URLLoader;
openfl_net_URLLoader.__name__ = ["openfl","net","URLLoader"];
openfl_net_URLLoader.__super__ = openfl_events_EventDispatcher;
openfl_net_URLLoader.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	close: function() {
	}
	,getData: function() {
		return null;
	}
	,load: function(request) {
		this.requestUrl(request.url,request.method,request.data,request.formatRequestHeaders());
	}
	,registerEvents: function(subject) {
		var self = this;
		if(typeof XMLHttpRequestProgressEvent != "undefined") {
			subject.addEventListener("progress",$bind(this,this.onProgress),false);
		}
		subject.onreadystatechange = function() {
			if(subject.readyState != 4) {
				return;
			}
			var s;
			try {
				s = subject.status;
			} catch( e ) {
				haxe_CallStack.lastException = e;
				s = null;
			}
			if(s == undefined) {
				s = null;
			}
			if(s != null) {
				self.onStatus(s);
			}
			if(s != null && s >= 200 && s < 400) {
				self.onData(subject.response);
			} else if(s == null) {
				self.onError("Failed to connect or resolve host");
			} else if(s == 12029) {
				self.onError("Failed to connect to host");
			} else if(s == 12007) {
				self.onError("Unknown host");
			} else if(s == 0) {
				self.onError("Unable to make request (may be blocked due to cross-domain permissions)");
				self.onSecurityError("Unable to make request (may be blocked due to cross-domain permissions)");
			} else {
				self.onError("Http Error #" + subject.status);
			}
		};
	}
	,requestUrl: function(url,method,data,requestHeaders) {
		var xmlHttpRequest = new XMLHttpRequest();
		this.registerEvents(xmlHttpRequest);
		var uri = "";
		if(js_Boot.__instanceof(data,openfl_utils_ByteArrayData)) {
			var data1 = data;
			var _g = this.dataFormat;
			if(_g == 0) {
				uri = js_Boot.__cast(data1 , ArrayBuffer);
			} else {
				uri = data1.readUTFBytes(data1.length);
			}
		} else if(js_Boot.__instanceof(data,openfl_net_URLVariables)) {
			var data2 = data;
			var _g1 = 0;
			var _g11 = Reflect.fields(data2);
			while(_g1 < _g11.length) {
				var p = _g11[_g1];
				++_g1;
				if(uri.length != 0) {
					uri += "&";
				}
				var uri1 = encodeURIComponent(p) + "=";
				var s = Reflect.field(data2,p);
				uri += uri1 + encodeURIComponent(s);
			}
		} else if(data != null) {
			uri = data.toString();
		}
		try {
			if(method == "GET" && uri != null && uri != "") {
				var question = url.split("?").length <= 1;
				xmlHttpRequest.open(method,url + (question ? "?" : "&") + Std.string(uri),true);
				uri = "";
			} else {
				xmlHttpRequest.open(method,url,true);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
			if (e instanceof js__$Boot_HaxeError) e = e.val;
			this.onError(e.toString());
			return;
		}
		var _g2 = this.dataFormat;
		if(_g2 == 0) {
			xmlHttpRequest.responseType = "arraybuffer";
		}
		var _g12 = 0;
		while(_g12 < requestHeaders.length) {
			var header = requestHeaders[_g12];
			++_g12;
			xmlHttpRequest.setRequestHeader(header.name,header.value);
		}
		xmlHttpRequest.send(uri);
		this.onOpen();
		this.getData = function() {
			if(xmlHttpRequest.response != null) {
				return xmlHttpRequest.response;
			} else {
				return xmlHttpRequest.responseText;
			}
		};
	}
	,onData: function(_) {
		var content = this.getData();
		var _g = this.dataFormat;
		if(_g == 0) {
			this.data = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer(content);
		} else {
			this.data = Std.string(content);
		}
		var evt = new openfl_events_Event("complete");
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onError: function(msg) {
		var evt = new openfl_events_IOErrorEvent("ioError");
		evt.text = msg;
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onOpen: function() {
		var evt = new openfl_events_Event("open");
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onProgress: function(event) {
		var evt = new openfl_events_ProgressEvent("progress");
		evt.currentTarget = this;
		evt.bytesLoaded = event.loaded;
		evt.bytesTotal = event.total;
		this.dispatchEvent(evt);
	}
	,onSecurityError: function(msg) {
		var evt = new openfl_events_SecurityErrorEvent("securityError");
		evt.text = msg;
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onStatus: function(status) {
		var evt = new openfl_events_HTTPStatusEvent("httpStatus",false,false,status);
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,set_dataFormat: function(inputVal) {
		if(inputVal == 0 && !Object.prototype.hasOwnProperty.call(window,"ArrayBuffer")) {
			this.dataFormat = 1;
		} else {
			this.dataFormat = inputVal;
		}
		return this.dataFormat;
	}
	,__class__: openfl_net_URLLoader
	,__properties__: {set_dataFormat:"set_dataFormat"}
});
var openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$ = {};
$hxClasses["openfl.net._URLLoaderDataFormat.URLLoaderDataFormat_Impl_"] = openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.__name__ = ["openfl","net","_URLLoaderDataFormat","URLLoaderDataFormat_Impl_"];
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.fromString = function(value) {
	switch(value) {
	case "binary":
		return 0;
	case "text":
		return 1;
	case "variables":
		return 2;
	default:
		return null;
	}
};
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "binary";
	case 1:
		return "text";
	case 2:
		return "variables";
	default:
		return null;
	}
};
var openfl_net_URLRequest = function(inURL) {
	if(inURL != null) {
		this.url = inURL;
	}
	this.requestHeaders = [];
	this.method = openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.toString(1);
	this.contentType = null;
};
$hxClasses["openfl.net.URLRequest"] = openfl_net_URLRequest;
openfl_net_URLRequest.__name__ = ["openfl","net","URLRequest"];
openfl_net_URLRequest.prototype = {
	formatRequestHeaders: function() {
		var res = this.requestHeaders;
		if(res == null) {
			res = [];
		}
		if(openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.fromString(this.method) == 1 || this.data == null) {
			return res;
		}
		if(typeof(this.data) == "string" || js_Boot.__instanceof(this.data,openfl_utils_ByteArrayData)) {
			res = res.slice();
			res.push(new openfl_net_URLRequestHeader("Content-Type",this.contentType != null ? this.contentType : "application/x-www-form-urlencoded"));
		}
		return res;
	}
	,__class__: openfl_net_URLRequest
};
var openfl_net_URLRequestHeader = function(name,value) {
	if(value == null) {
		value = "";
	}
	if(name == null) {
		name = "";
	}
	this.name = name;
	this.value = value;
};
$hxClasses["openfl.net.URLRequestHeader"] = openfl_net_URLRequestHeader;
openfl_net_URLRequestHeader.__name__ = ["openfl","net","URLRequestHeader"];
openfl_net_URLRequestHeader.prototype = {
	__class__: openfl_net_URLRequestHeader
};
var openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$ = {};
$hxClasses["openfl.net._URLRequestMethod.URLRequestMethod_Impl_"] = openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.__name__ = ["openfl","net","_URLRequestMethod","URLRequestMethod_Impl_"];
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.fromString = function(value) {
	switch(value) {
	case "DELETE":
		return 0;
	case "GET":
		return 1;
	case "HEAD":
		return 2;
	case "OPTIONS":
		return 3;
	case "POST":
		return 4;
	case "PUT":
		return 5;
	default:
		return null;
	}
};
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "DELETE";
	case 1:
		return "GET";
	case 2:
		return "HEAD";
	case 3:
		return "OPTIONS";
	case 4:
		return "POST";
	case 5:
		return "PUT";
	default:
		return null;
	}
};
var openfl_net_URLVariables = function(source) {
	if(source != null) {
		this.decode(source);
	}
};
$hxClasses["openfl.net.URLVariables"] = openfl_net_URLVariables;
openfl_net_URLVariables.__name__ = ["openfl","net","URLVariables"];
openfl_net_URLVariables.prototype = {
	decode: function(source) {
		var fields = Reflect.fields(this);
		var _g = 0;
		while(_g < fields.length) {
			var f = fields[_g];
			++_g;
			Reflect.deleteField(this,f);
		}
		var fields1 = source.split(";").join("&").split("&");
		var _g1 = 0;
		while(_g1 < fields1.length) {
			var f1 = fields1[_g1];
			++_g1;
			var eq = f1.indexOf("=");
			if(eq > 0) {
				var s = HxOverrides.substr(f1,0,eq);
				var field = decodeURIComponent(s.split("+").join(" "));
				var s1 = HxOverrides.substr(f1,eq + 1,null);
				this[field] = decodeURIComponent(s1.split("+").join(" "));
			} else if(eq != 0) {
				this[decodeURIComponent(f1.split("+").join(" "))] = "";
			}
		}
	}
	,toString: function() {
		var result = [];
		var fields = Reflect.fields(this);
		var _g = 0;
		while(_g < fields.length) {
			var f = fields[_g];
			++_g;
			var tmp = encodeURIComponent(f) + "=";
			var s = Reflect.field(this,f);
			result.push(tmp + encodeURIComponent(s));
		}
		return result.join("&");
	}
	,__class__: openfl_net_URLVariables
};
var openfl_system_LoaderContext = function(checkPolicyFile,applicationDomain,securityDomain) {
	if(checkPolicyFile == null) {
		checkPolicyFile = false;
	}
	this.checkPolicyFile = checkPolicyFile;
	this.securityDomain = securityDomain;
	this.applicationDomain = applicationDomain;
	this.allowCodeImport = true;
	this.allowLoadBytesCodeExecution = true;
};
$hxClasses["openfl.system.LoaderContext"] = openfl_system_LoaderContext;
openfl_system_LoaderContext.__name__ = ["openfl","system","LoaderContext"];
openfl_system_LoaderContext.prototype = {
	__class__: openfl_system_LoaderContext
};
var openfl_system_SecurityDomain = function() {
};
$hxClasses["openfl.system.SecurityDomain"] = openfl_system_SecurityDomain;
openfl_system_SecurityDomain.__name__ = ["openfl","system","SecurityDomain"];
openfl_system_SecurityDomain.prototype = {
	__class__: openfl_system_SecurityDomain
};
var openfl_system_System = function() { };
$hxClasses["openfl.system.System"] = openfl_system_System;
openfl_system_System.__name__ = ["openfl","system","System"];
openfl_system_System.__properties__ = {get_vmVersion:"get_vmVersion",get_totalMemory:"get_totalMemory"};
openfl_system_System.totalMemory = null;
openfl_system_System.vmVersion = null;
openfl_system_System.exit = function(code) {
	lime_system_System.exit(code);
};
openfl_system_System.gc = function() {
};
openfl_system_System.pause = function() {
	openfl_Lib.notImplemented("System.pause");
};
openfl_system_System.resume = function() {
	openfl_Lib.notImplemented("System.resume");
};
openfl_system_System.setClipboard = function(string) {
	lime_system_Clipboard.set_text(string);
};
openfl_system_System.get_totalMemory = function() {
	return (window.performance && window.performance.memory) ? window.performance.memory.usedJSHeapSize : 0;
};
openfl_system_System.get_vmVersion = function() {
	return "1.0.0";
};
var openfl_text__$AntiAliasType_AntiAliasType_$Impl_$ = {};
$hxClasses["openfl.text._AntiAliasType.AntiAliasType_Impl_"] = openfl_text__$AntiAliasType_AntiAliasType_$Impl_$;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.__name__ = ["openfl","text","_AntiAliasType","AntiAliasType_Impl_"];
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "advanced":
		return 0;
	case "normal":
		return 1;
	default:
		return null;
	}
};
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "advanced";
	case 1:
		return "normal";
	default:
		return null;
	}
};
var openfl_text_Font = function(name) {
	lime_text_Font.call(this,name);
};
$hxClasses["openfl.text.Font"] = openfl_text_Font;
openfl_text_Font.__name__ = ["openfl","text","Font"];
openfl_text_Font.enumerateFonts = function(enumerateDeviceFonts) {
	if(enumerateDeviceFonts == null) {
		enumerateDeviceFonts = false;
	}
	return openfl_text_Font.__registeredFonts;
};
openfl_text_Font.fromBytes = function(bytes) {
	var font = new openfl_text_Font();
	font.__fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes));
	return font;
};
openfl_text_Font.fromFile = function(path) {
	var font = new openfl_text_Font();
	font.__fromFile(path);
	return font;
};
openfl_text_Font.registerFont = function(font) {
	var instance = js_Boot.__cast(Type.createInstance(font,[]) , openfl_text_Font);
	if(instance != null) {
		openfl_text_Font.__registeredFonts.push(instance);
	}
};
openfl_text_Font.__fromLimeFont = function(value) {
	var font = new openfl_text_Font();
	font.name = value.name;
	font.src = value.src;
	return font;
};
openfl_text_Font.__super__ = lime_text_Font;
openfl_text_Font.prototype = $extend(lime_text_Font.prototype,{
	get_fontName: function() {
		return this.name;
	}
	,set_fontName: function(value) {
		return this.name = value;
	}
	,__class__: openfl_text_Font
	,__properties__: $extend(lime_text_Font.prototype.__properties__,{set_fontName:"set_fontName",get_fontName:"get_fontName"})
});
var openfl_text__$FontStyle_FontStyle_$Impl_$ = {};
$hxClasses["openfl.text._FontStyle.FontStyle_Impl_"] = openfl_text__$FontStyle_FontStyle_$Impl_$;
openfl_text__$FontStyle_FontStyle_$Impl_$.__name__ = ["openfl","text","_FontStyle","FontStyle_Impl_"];
openfl_text__$FontStyle_FontStyle_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bold":
		return 0;
	case "boldItalic":
		return 1;
	case "italic":
		return 2;
	case "regular":
		return 3;
	default:
		return null;
	}
};
openfl_text__$FontStyle_FontStyle_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bold";
	case 1:
		return "boldItalic";
	case 2:
		return "italic";
	case 3:
		return "regular";
	default:
		return null;
	}
};
var openfl_text__$FontType_FontType_$Impl_$ = {};
$hxClasses["openfl.text._FontType.FontType_Impl_"] = openfl_text__$FontType_FontType_$Impl_$;
openfl_text__$FontType_FontType_$Impl_$.__name__ = ["openfl","text","_FontType","FontType_Impl_"];
openfl_text__$FontType_FontType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "device":
		return 0;
	case "embedded":
		return 1;
	case "embeddedCFF":
		return 2;
	default:
		return null;
	}
};
openfl_text__$FontType_FontType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "device";
	case 1:
		return "embedded";
	case 2:
		return "embeddedCFF";
	default:
		return null;
	}
};
var openfl_text__$GridFitType_GridFitType_$Impl_$ = {};
$hxClasses["openfl.text._GridFitType.GridFitType_Impl_"] = openfl_text__$GridFitType_GridFitType_$Impl_$;
openfl_text__$GridFitType_GridFitType_$Impl_$.__name__ = ["openfl","text","_GridFitType","GridFitType_Impl_"];
openfl_text__$GridFitType_GridFitType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "none":
		return 0;
	case "pixel":
		return 1;
	case "subpixel":
		return 2;
	default:
		return null;
	}
};
openfl_text__$GridFitType_GridFitType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "none";
	case 1:
		return "pixel";
	case 2:
		return "subpixel";
	default:
		return null;
	}
};
var openfl_text_TextField = function() {
	openfl_display_InteractiveObject.call(this);
	this.__caretIndex = -1;
	this.__graphics = new openfl_display_Graphics();
	this.__textEngine = new openfl__$internal_text_TextEngine(this);
	this.__layoutDirty = true;
	this.__tabEnabled = true;
	if(openfl_text_TextField.__defaultTextFormat == null) {
		openfl_text_TextField.__defaultTextFormat = new openfl_text_TextFormat("Times New Roman",12,0,false,false,false,"","",3,0,0,0,0);
		openfl_text_TextField.__defaultTextFormat.blockIndent = 0;
		openfl_text_TextField.__defaultTextFormat.bullet = false;
		openfl_text_TextField.__defaultTextFormat.letterSpacing = 0;
		openfl_text_TextField.__defaultTextFormat.kerning = false;
	}
	this.__textFormat = openfl_text_TextField.__defaultTextFormat.clone();
	this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,0,0));
	this.addEventListener("mouseDown",$bind(this,this.this_onMouseDown));
};
$hxClasses["openfl.text.TextField"] = openfl_text_TextField;
openfl_text_TextField.__name__ = ["openfl","text","TextField"];
openfl_text_TextField.__defaultTextFormat = null;
openfl_text_TextField.__super__ = openfl_display_InteractiveObject;
openfl_text_TextField.prototype = $extend(openfl_display_InteractiveObject.prototype,{
	appendText: function(text) {
		this.__textEngine.text += text;
		this.__textEngine.textFormatRanges[this.__textEngine.textFormatRanges.length - 1].end = this.__textEngine.text.length;
		this.__dirty = true;
		this.__layoutDirty = true;
	}
	,getCharBoundaries: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return null;
		}
		this.__updateLayout();
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(charIndex >= group.startIndex && charIndex <= group.endIndex) {
				var x = group.offsetX;
				var _g3 = 0;
				var _g2 = charIndex - group.startIndex;
				while(_g3 < _g2) {
					var i = _g3++;
					x += group.advances[i];
				}
				return new openfl_geom_Rectangle(x,group.offsetY,group.advances[charIndex - group.startIndex],group.ascent + group.descent);
			}
		}
		return null;
	}
	,getCharIndexAtPoint: function(x,y) {
		if(x <= 2 || x > this.get_width() + 4 || y <= 0 || y > this.get_height() + 4) {
			return -1;
		}
		this.__updateLayout();
		x += this.get_scrollH();
		var _g1 = 0;
		var _g = this.get_scrollV() - 1;
		while(_g1 < _g) {
			var i = _g1++;
			y += this.__textEngine.lineHeights[i];
		}
		var _g2 = 0;
		var _g11 = this.__textEngine.layoutGroups;
		while(_g2 < _g11.length) {
			var group = _g11[_g2];
			++_g2;
			if(y >= group.offsetY && y <= group.offsetY + group.height) {
				if(x >= group.offsetX && x <= group.offsetX + group.width) {
					var advance = 0.0;
					var _g3 = 0;
					var _g21 = group.advances.length;
					while(_g3 < _g21) {
						var i1 = _g3++;
						advance += group.advances[i1];
						if(x <= group.offsetX + advance) {
							return group.startIndex + i1;
						}
					}
					return group.endIndex;
				}
			}
		}
		return -1;
	}
	,getFirstCharInParagraph: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return 0;
		}
		var index = this.__textEngine.text.indexOf("\n");
		var startIndex = 0;
		while(index > -1) {
			if(index <= charIndex) {
				startIndex = index + 1;
			} else if(index > charIndex) {
				break;
			}
			index = this.__textEngine.text.indexOf("\n",index + 1);
		}
		return startIndex;
	}
	,getLineIndexAtPoint: function(x,y) {
		this.__updateLayout();
		if(x <= 2 || x > this.get_width() + 4 || y <= 0 || y > this.get_height() + 4) {
			return -1;
		}
		var _g1 = 0;
		var _g = this.get_scrollV() - 1;
		while(_g1 < _g) {
			var i = _g1++;
			y += this.__textEngine.lineHeights[i];
		}
		var _g2 = 0;
		var _g11 = this.__textEngine.layoutGroups;
		while(_g2 < _g11.length) {
			var group = _g11[_g2];
			++_g2;
			if(y >= group.offsetY && y <= group.offsetY + group.height) {
				return group.lineIndex;
			}
		}
		return -1;
	}
	,getLineIndexOfChar: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return -1;
		}
		this.__updateLayout();
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.startIndex <= charIndex && group.endIndex >= charIndex) {
				return group.lineIndex;
			}
		}
		return -1;
	}
	,getLineLength: function(lineIndex) {
		this.__updateLayout();
		if(lineIndex < 0 || lineIndex > this.__textEngine.numLines - 1) {
			return 0;
		}
		var startIndex = -1;
		var endIndex = -1;
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.lineIndex == lineIndex) {
				if(startIndex == -1) {
					startIndex = group.startIndex;
				}
			} else if(group.lineIndex == lineIndex + 1) {
				endIndex = group.startIndex;
				break;
			}
		}
		if(endIndex == -1) {
			endIndex = this.__textEngine.text.length;
		}
		return endIndex - startIndex;
	}
	,getLineMetrics: function(lineIndex) {
		this.__updateLayout();
		var ascender = this.__textEngine.lineAscents[lineIndex];
		var descender = this.__textEngine.lineDescents[lineIndex];
		var leading = this.__textEngine.lineLeadings[lineIndex];
		var lineHeight = this.__textEngine.lineHeights[lineIndex];
		var lineWidth = this.__textEngine.lineWidths[lineIndex];
		var margin;
		var _g = this.__textFormat.align;
		switch(_g) {
		case 0:
			margin = (this.__textEngine.width - lineWidth) / 2;
			break;
		case 1:case 4:
			margin = this.__textEngine.width - lineWidth - 2;
			break;
		case 2:case 3:case 5:
			margin = 2;
			break;
		}
		return new openfl_text_TextLineMetrics(margin,lineWidth,lineHeight,ascender,descender,leading);
	}
	,getLineOffset: function(lineIndex) {
		this.__updateLayout();
		if(lineIndex < 0 || lineIndex > this.__textEngine.numLines - 1) {
			return -1;
		}
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.lineIndex == lineIndex) {
				return group.startIndex;
			}
		}
		return 0;
	}
	,getLineText: function(lineIndex) {
		this.__updateLayout();
		if(lineIndex < 0 || lineIndex > this.__textEngine.numLines - 1) {
			return null;
		}
		var startIndex = -1;
		var endIndex = -1;
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.lineIndex == lineIndex) {
				if(startIndex == -1) {
					startIndex = group.startIndex;
				}
			} else if(group.lineIndex == lineIndex + 1) {
				endIndex = group.startIndex;
				break;
			}
		}
		if(endIndex == -1) {
			endIndex = this.__textEngine.text.length;
		}
		return this.__textEngine.text.substring(startIndex,endIndex);
	}
	,getParagraphLength: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return 0;
		}
		var startIndex = this.getFirstCharInParagraph(charIndex);
		var endIndex = this.__textEngine.text.indexOf("\n",charIndex) + 1;
		if(endIndex == 0) {
			endIndex = this.__textEngine.text.length;
		}
		return endIndex - startIndex;
	}
	,getTextFormat: function(beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 0;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
		var format = null;
		var _g = 0;
		var _g1 = this.__textEngine.textFormatRanges;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.start <= beginIndex && group.end >= beginIndex || group.start <= endIndex && group.end >= endIndex) {
				if(format == null) {
					format = group.format.clone();
				} else {
					if(group.format.font != format.font) {
						format.font = null;
					}
					if(group.format.size != format.size) {
						format.size = null;
					}
					if(group.format.color != format.color) {
						format.color = null;
					}
					if(group.format.bold != format.bold) {
						format.bold = null;
					}
					if(group.format.italic != format.italic) {
						format.italic = null;
					}
					if(group.format.underline != format.underline) {
						format.underline = null;
					}
					if(group.format.url != format.url) {
						format.url = null;
					}
					if(group.format.target != format.target) {
						format.target = null;
					}
					if(group.format.align != format.align) {
						format.align = null;
					}
					if(group.format.leftMargin != format.leftMargin) {
						format.leftMargin = null;
					}
					if(group.format.rightMargin != format.rightMargin) {
						format.rightMargin = null;
					}
					if(group.format.indent != format.indent) {
						format.indent = null;
					}
					if(group.format.leading != format.leading) {
						format.leading = null;
					}
					if(group.format.blockIndent != format.blockIndent) {
						format.blockIndent = null;
					}
					if(group.format.bullet != format.bullet) {
						format.bullet = null;
					}
					if(group.format.kerning != format.kerning) {
						format.kerning = null;
					}
					if(group.format.letterSpacing != format.letterSpacing) {
						format.letterSpacing = null;
					}
					if(group.format.tabStops != format.tabStops) {
						format.tabStops = null;
					}
				}
			}
		}
		return format;
	}
	,replaceSelectedText: function(value) {
		if(value == "" && this.__selectionIndex == this.__caretIndex) {
			return;
		}
		var startIndex = this.__caretIndex < this.__selectionIndex ? this.__caretIndex : this.__selectionIndex;
		var endIndex = this.__caretIndex > this.__selectionIndex ? this.__caretIndex : this.__selectionIndex;
		this.replaceText(startIndex,endIndex,value);
		this.__caretIndex = startIndex + value.length;
		this.__selectionIndex = this.__caretIndex;
	}
	,replaceText: function(beginIndex,endIndex,newText) {
		if(endIndex < beginIndex || beginIndex < 0 || endIndex > this.__textEngine.text.length || newText == null) {
			return;
		}
		var tmp = this.__textEngine.text.substring(0,beginIndex) + newText;
		var tmp1 = this.__textEngine.text.substring(endIndex);
		this.__textEngine.text = tmp + tmp1;
		var offset = newText.length - (endIndex - beginIndex);
		var i = 0;
		var range;
		while(i < this.__textEngine.textFormatRanges.length) {
			range = this.__textEngine.textFormatRanges[i];
			if(range.start <= beginIndex && range.end >= endIndex) {
				range.end += offset;
				++i;
			} else if(range.start >= beginIndex && range.end <= endIndex) {
				this.__textEngine.textFormatRanges.splice(i,1);
				offset -= range.end - range.start;
			} else if(range.start > beginIndex && range.start <= endIndex) {
				range.start += offset;
				++i;
			} else {
				++i;
			}
		}
		this.__dirty = true;
		this.__layoutDirty = true;
	}
	,setSelection: function(beginIndex,endIndex) {
		this.__selectionIndex = beginIndex;
		this.__caretIndex = endIndex;
	}
	,setTextFormat: function(format,beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 0;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
		if(format.font != null) {
			this.__textFormat.font = format.font;
		}
		if(format.size != null) {
			this.__textFormat.size = format.size;
		}
		if(format.color != null) {
			this.__textFormat.color = format.color;
		}
		if(format.bold != null) {
			this.__textFormat.bold = format.bold;
		}
		if(format.italic != null) {
			this.__textFormat.italic = format.italic;
		}
		if(format.underline != null) {
			this.__textFormat.underline = format.underline;
		}
		if(format.url != null) {
			this.__textFormat.url = format.url;
		}
		if(format.target != null) {
			this.__textFormat.target = format.target;
		}
		if(format.align != null) {
			this.__textFormat.align = format.align;
		}
		if(format.leftMargin != null) {
			this.__textFormat.leftMargin = format.leftMargin;
		}
		if(format.rightMargin != null) {
			this.__textFormat.rightMargin = format.rightMargin;
		}
		if(format.indent != null) {
			this.__textFormat.indent = format.indent;
		}
		if(format.leading != null) {
			this.__textFormat.leading = format.leading;
		}
		if(format.blockIndent != null) {
			this.__textFormat.blockIndent = format.blockIndent;
		}
		if(format.bullet != null) {
			this.__textFormat.bullet = format.bullet;
		}
		if(format.kerning != null) {
			this.__textFormat.kerning = format.kerning;
		}
		if(format.letterSpacing != null) {
			this.__textFormat.letterSpacing = format.letterSpacing;
		}
		if(format.tabStops != null) {
			this.__textFormat.tabStops = format.tabStops;
		}
		this.__dirty = true;
		this.__layoutDirty = true;
	}
	,__getBounds: function(rect,matrix) {
		this.__updateLayout();
		var bounds = openfl_geom_Rectangle.__temp;
		this.__textEngine.bounds.__transform(bounds,matrix);
		rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
	}
	,__getCursor: function() {
		if(this.__textEngine.selectable) {
			return lime_ui_MouseCursor.TEXT;
		} else {
			return null;
		}
	}
	,__getPosition: function(x,y) {
		this.__updateLayout();
		x += this.get_scrollH();
		var _g1 = 0;
		var _g = this.get_scrollV() - 1;
		while(_g1 < _g) {
			var i = _g1++;
			y += this.__textEngine.lineHeights[i];
		}
		if(y > this.__textEngine.textHeight) {
			y = this.__textEngine.textHeight;
		}
		var firstGroup = true;
		var group;
		var nextGroup;
		var _g11 = 0;
		var _g2 = this.__textEngine.layoutGroups.length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			group = this.__textEngine.layoutGroups[i1];
			if(i1 < this.__textEngine.layoutGroups.length - 1) {
				nextGroup = this.__textEngine.layoutGroups[i1 + 1];
			} else {
				nextGroup = null;
			}
			if(firstGroup) {
				if(y < group.offsetY) {
					y = group.offsetY;
				}
				if(x < group.offsetX) {
					x = group.offsetX;
				}
				firstGroup = false;
			}
			if(y >= group.offsetY && y <= group.offsetY + group.height || nextGroup == null) {
				if(x >= group.offsetX && x <= group.offsetX + group.width || (nextGroup == null || nextGroup.lineIndex != group.lineIndex)) {
					var advance = 0.0;
					var _g3 = 0;
					var _g21 = group.advances.length;
					while(_g3 < _g21) {
						var i2 = _g3++;
						advance += group.advances[i2];
						if(x <= group.offsetX + advance) {
							if(x <= group.offsetX + (advance - group.advances[i2]) + group.advances[i2] / 2) {
								return group.startIndex + i2;
							} else if(group.startIndex + i2 < group.endIndex) {
								return group.startIndex + i2 + 1;
							} else {
								return group.endIndex;
							}
						}
					}
					return group.endIndex;
				}
			}
		}
		return this.__textEngine.text.length;
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled) {
			return false;
		}
		if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
			return false;
		}
		this.__getWorldTransform();
		this.__updateLayout();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var px = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx));
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		var py = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x));
		if(this.__textEngine.bounds.contains(px,py)) {
			if(stack != null) {
				stack.push(hitObject);
			}
			return true;
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		this.__getWorldTransform();
		this.__updateLayout();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var px = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx));
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		var py = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x));
		if(this.__textEngine.bounds.contains(px,py)) {
			return true;
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		openfl__$internal_renderer_cairo_CairoTextField.render(this,renderSession);
		openfl_display_InteractiveObject.prototype.__renderCairo.call(this,renderSession);
	}
	,__renderCanvas: function(renderSession) {
		if(this.__dirty) {
			var textEngine = this.__textEngine;
			this.__updateLayout();
			if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
				this.__graphics.__canvas = null;
				this.__graphics.__context = null;
				this.__graphics.set___dirty(false);
				this.__dirty = false;
			} else {
				var bounds = textEngine.bounds;
				if(this.__graphics == null || this.__graphics.__canvas == null) {
					if(this.__graphics == null) {
						this.__graphics = new openfl_display_Graphics();
					}
					this.__graphics.__canvas = window.document.createElement("canvas");
					this.__graphics.__context = this.__graphics.__canvas.getContext("2d");
					this.__graphics.__bounds = new openfl_geom_Rectangle(0,0,bounds.width,bounds.height);
				}
				var graphics = this.__graphics;
				openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
				if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
					var text = textEngine.text;
					if(textEngine.displayAsPassword) {
						var length = text.length;
						var mask = "";
						var _g1 = 0;
						var _g = length;
						while(_g1 < _g) {
							var i = _g1++;
							mask += "*";
						}
						text = mask;
					}
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.antiAliasType != 0 || textEngine.gridFitType != 1) {
						graphics.__context.mozImageSmoothingEnabled = true;
						graphics.__context.msImageSmoothingEnabled = true;
						graphics.__context.imageSmoothingEnabled = true;
					} else {
						graphics.__context.mozImageSmoothingEnabled = false;
						graphics.__context.msImageSmoothingEnabled = false;
						graphics.__context.imageSmoothingEnabled = false;
					}
					if(textEngine.border || textEngine.background) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						if(textEngine.background) {
							var tmp = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							var tmp1 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
					openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
					var scrollX = -this.get_scrollH();
					var scrollY = 0.0;
					var _g11 = 0;
					var _g2 = this.get_scrollV() - 1;
					while(_g11 < _g2) {
						var i1 = _g11++;
						scrollY -= textEngine.lineHeights[i1];
					}
					var advance;
					var offsetY = 0.0;
					var applyHack = new EReg("(iPad|iPhone|iPod|Firefox)","g").match(window.navigator.userAgent);
					var _g3 = 0;
					var _g12 = textEngine.layoutGroups;
					while(_g3 < _g12.length) {
						var group = _g12[_g3];
						++_g3;
						if(group.lineIndex < this.get_scrollV() - 1) {
							continue;
						}
						if(group.lineIndex > this.get_scrollV() + textEngine.bottomScrollV - 2) {
							break;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
						var tmp2 = StringTools.hex(group.format.color,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp2;
						if(applyHack) {
							offsetY = group.format.size * 0.185;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
						if(this.__caretIndex > -1 && textEngine.selectable) {
							if(this.__selectionIndex == this.__caretIndex) {
								if(this.__showCursor && group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex) {
									advance = 0.0;
									var _g31 = 0;
									var _g21 = this.__caretIndex - group.startIndex;
									while(_g31 < _g21) {
										var i2 = _g31++;
										if(group.advances.length <= i2) {
											break;
										}
										advance += group.advances[i2];
									}
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
								}
							} else if(group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex || group.startIndex <= this.__selectionIndex && group.endIndex >= this.__selectionIndex) {
								var selectionStart = Math.min(this.__selectionIndex,this.__caretIndex) | 0;
								var selectionEnd = Math.max(this.__selectionIndex,this.__caretIndex) | 0;
								if(group.startIndex > selectionStart) {
									selectionStart = group.startIndex;
								}
								if(group.endIndex < selectionEnd) {
									selectionEnd = group.endIndex;
								}
								var start;
								var end;
								start = this.getCharBoundaries(selectionStart);
								if(selectionEnd >= textEngine.text.length) {
									end = this.getCharBoundaries(textEngine.text.length - 1);
									end.x += end.width + 2;
								} else {
									end = this.getCharBoundaries(selectionEnd);
								}
								if(start != null && end != null) {
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
								}
							}
						}
					}
				} else {
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.border || textEngine.background) {
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						} else {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
						}
						if(textEngine.background) {
							var tmp3 = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp3;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
							var tmp4 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp4;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
				}
				graphics.__bitmap = openfl_display_BitmapData.fromCanvas(this.__graphics.__canvas);
				this.__dirty = false;
				graphics.set___dirty(false);
			}
		}
		if(this.__textEngine.antiAliasType == 0 && this.__textEngine.gridFitType == 1) {
			var smoothingEnabled = renderSession.context.imageSmoothingEnabled;
			if(smoothingEnabled) {
				renderSession.context.mozImageSmoothingEnabled = false;
				renderSession.context.msImageSmoothingEnabled = false;
				renderSession.context.imageSmoothingEnabled = false;
			}
			openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,renderSession);
			if(smoothingEnabled) {
				renderSession.context.mozImageSmoothingEnabled = true;
				renderSession.context.msImageSmoothingEnabled = true;
				renderSession.context.imageSmoothingEnabled = true;
			}
		} else {
			openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,renderSession);
		}
	}
	,__renderDOM: function(renderSession) {
		var textField = this;
		var textEngine = textField.__textEngine;
		if(textField.stage != null && textField.__worldVisible && textField.__renderable) {
			if(textField.__dirty || textField.__div == null) {
				if(textEngine.text != "" || textEngine.background || textEngine.border || textEngine.type == 1) {
					if(textField.__div == null) {
						textField.__div = window.document.createElement("div");
						openfl__$internal_renderer_dom_DOMRenderer.initializeElement(textField,textField.__div,renderSession);
						textField.__style.setProperty("outline","none",null);
						textField.__div.addEventListener("input",function(event) {
							event.preventDefault();
							if(textField.get_htmlText() != textField.__div.innerHTML) {
								textField.set_htmlText(textField.__div.innerHTML);
								textField.__dirty = false;
							}
						},true);
					}
					if(textEngine.selectable) {
						textField.__style.setProperty("cursor","text",null);
					} else {
						textField.__style.setProperty("cursor","inherit",null);
					}
					textField.__div.contentEditable = textEngine.type == 1;
					var style = textField.__style;
					textField.__div.innerHTML = textEngine.text;
					if(textEngine.background) {
						style.setProperty("background-color","#" + StringTools.hex(textEngine.backgroundColor,6),null);
					} else {
						style.removeProperty("background-color");
					}
					if(textEngine.border) {
						style.setProperty("border","solid 1px #" + StringTools.hex(textEngine.borderColor,6),null);
					} else {
						style.removeProperty("border");
					}
					style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
					style.setProperty("color","#" + StringTools.hex(textField.__textFormat.color,6),null);
					if(textEngine.autoSize != 2) {
						style.setProperty("width","auto",null);
					} else {
						style.setProperty("width",textEngine.width + "px",null);
					}
					style.setProperty("height",textEngine.height + "px",null);
					var _g = textField.__textFormat.align;
					switch(_g) {
					case 0:
						style.setProperty("text-align","center",null);
						break;
					case 4:
						style.setProperty("text-align","right",null);
						break;
					default:
						style.setProperty("text-align","left",null);
					}
					textField.__dirty = false;
				} else if(textField.__div != null) {
					renderSession.element.removeChild(textField.__div);
					textField.__div = null;
				}
			}
			if(textField.__div != null) {
				openfl__$internal_renderer_dom_DOMRenderer.applyStyle(textField,renderSession,true,true,false);
			}
		} else if(textField.__div != null) {
			renderSession.element.removeChild(textField.__div);
			textField.__div = null;
			textField.__style = null;
		}
	}
	,__renderGL: function(renderSession) {
		if(this.__cacheAsBitmap) {
			var hasCacheMatrix = this.__cacheAsBitmapMatrix != null;
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(hasCacheMatrix) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(this.__dirty) {
			var textEngine = this.__textEngine;
			this.__updateLayout();
			if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
				this.__graphics.__canvas = null;
				this.__graphics.__context = null;
				this.__graphics.set___dirty(false);
				this.__dirty = false;
			} else {
				var bounds = textEngine.bounds;
				if(this.__graphics == null || this.__graphics.__canvas == null) {
					if(this.__graphics == null) {
						this.__graphics = new openfl_display_Graphics();
					}
					this.__graphics.__canvas = window.document.createElement("canvas");
					this.__graphics.__context = this.__graphics.__canvas.getContext("2d");
					this.__graphics.__bounds = new openfl_geom_Rectangle(0,0,bounds.width,bounds.height);
				}
				var graphics = this.__graphics;
				openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
				if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
					var text = textEngine.text;
					if(textEngine.displayAsPassword) {
						var length = text.length;
						var mask = "";
						var _g1 = 0;
						var _g = length;
						while(_g1 < _g) {
							var i = _g1++;
							mask += "*";
						}
						text = mask;
					}
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.antiAliasType != 0 || textEngine.gridFitType != 1) {
						graphics.__context.mozImageSmoothingEnabled = true;
						graphics.__context.msImageSmoothingEnabled = true;
						graphics.__context.imageSmoothingEnabled = true;
					} else {
						graphics.__context.mozImageSmoothingEnabled = false;
						graphics.__context.msImageSmoothingEnabled = false;
						graphics.__context.imageSmoothingEnabled = false;
					}
					if(textEngine.border || textEngine.background) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						if(textEngine.background) {
							var tmp = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							var tmp1 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
					openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
					var scrollX = -this.get_scrollH();
					var scrollY = 0.0;
					var _g11 = 0;
					var _g2 = this.get_scrollV() - 1;
					while(_g11 < _g2) {
						var i1 = _g11++;
						scrollY -= textEngine.lineHeights[i1];
					}
					var advance;
					var offsetY = 0.0;
					var applyHack = new EReg("(iPad|iPhone|iPod|Firefox)","g").match(window.navigator.userAgent);
					var _g3 = 0;
					var _g12 = textEngine.layoutGroups;
					while(_g3 < _g12.length) {
						var group = _g12[_g3];
						++_g3;
						if(group.lineIndex < this.get_scrollV() - 1) {
							continue;
						}
						if(group.lineIndex > this.get_scrollV() + textEngine.bottomScrollV - 2) {
							break;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
						var tmp2 = StringTools.hex(group.format.color,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp2;
						if(applyHack) {
							offsetY = group.format.size * 0.185;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
						if(this.__caretIndex > -1 && textEngine.selectable) {
							if(this.__selectionIndex == this.__caretIndex) {
								if(this.__showCursor && group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex) {
									advance = 0.0;
									var _g31 = 0;
									var _g21 = this.__caretIndex - group.startIndex;
									while(_g31 < _g21) {
										var i2 = _g31++;
										if(group.advances.length <= i2) {
											break;
										}
										advance += group.advances[i2];
									}
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
								}
							} else if(group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex || group.startIndex <= this.__selectionIndex && group.endIndex >= this.__selectionIndex) {
								var selectionStart = Math.min(this.__selectionIndex,this.__caretIndex) | 0;
								var selectionEnd = Math.max(this.__selectionIndex,this.__caretIndex) | 0;
								if(group.startIndex > selectionStart) {
									selectionStart = group.startIndex;
								}
								if(group.endIndex < selectionEnd) {
									selectionEnd = group.endIndex;
								}
								var start;
								var end;
								start = this.getCharBoundaries(selectionStart);
								if(selectionEnd >= textEngine.text.length) {
									end = this.getCharBoundaries(textEngine.text.length - 1);
									end.x += end.width + 2;
								} else {
									end = this.getCharBoundaries(selectionEnd);
								}
								if(start != null && end != null) {
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
								}
							}
						}
					}
				} else {
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.border || textEngine.background) {
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						} else {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
						}
						if(textEngine.background) {
							var tmp3 = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp3;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
							var tmp4 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp4;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
				}
				graphics.__bitmap = openfl_display_BitmapData.fromCanvas(this.__graphics.__canvas);
				this.__dirty = false;
				graphics.set___dirty(false);
			}
		}
		openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession,this.__textEngine.antiAliasType != 0 || this.__textEngine.gridFitType != 1);
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__startCursorTimer: function() {
		this.__cursorTimer = haxe_Timer.delay($bind(this,this.__startCursorTimer),600);
		this.__showCursor = !this.__showCursor;
		this.__dirty = true;
	}
	,__startTextInput: function() {
		if(this.__caretIndex < 0) {
			this.__caretIndex = this.__textEngine.text.length;
			this.__selectionIndex = this.__caretIndex;
		}
		if(this.stage != null) {
			this.stage.window.backend.setEnableTextEvents(true);
			if(!this.__inputEnabled) {
				this.stage.window.backend.setEnableTextEvents(true);
				if(!this.stage.window.onTextInput.has($bind(this,this.window_onTextInput))) {
					this.stage.window.onTextInput.add($bind(this,this.window_onTextInput));
					this.stage.window.onKeyDown.add($bind(this,this.window_onKeyDown));
				}
				this.__inputEnabled = true;
				this.__startCursorTimer();
			}
		}
	}
	,__stopCursorTimer: function() {
		if(this.__cursorTimer != null) {
			this.__cursorTimer.stop();
			this.__cursorTimer = null;
		}
		if(this.__showCursor) {
			this.__showCursor = false;
			this.__dirty = true;
		}
	}
	,__stopTextInput: function() {
		if(this.__inputEnabled && this.stage != null) {
			this.stage.window.backend.setEnableTextEvents(false);
			this.stage.window.onTextInput.remove($bind(this,this.window_onTextInput));
			this.stage.window.onKeyDown.remove($bind(this,this.window_onKeyDown));
			this.__inputEnabled = false;
			this.__stopCursorTimer();
		}
	}
	,__updateLayout: function() {
		if(this.__layoutDirty) {
			this.__textEngine.update();
			if(this.__textEngine.autoSize != 2) {
				var cacheWidth = this.__textEngine.width;
				var cacheHeight = this.__textEngine.height;
				var _g = this.__textEngine.autoSize;
				switch(_g) {
				case 0:case 1:case 3:
					if(!this.__textEngine.wordWrap) {
						this.__textEngine.width = this.__textEngine.textWidth + 4;
					}
					this.__textEngine.height = this.__textEngine.textHeight + 4;
					break;
				default:
				}
				if(this.__textEngine.width != cacheWidth) {
					var _g1 = this.__textEngine.autoSize;
					switch(_g1) {
					case 0:
						var _g11 = this;
						_g11.set_x(_g11.get_x() + (cacheWidth - this.__textEngine.width) / 2);
						break;
					case 3:
						var _g12 = this;
						_g12.set_x(_g12.get_x() + (cacheWidth - this.__textEngine.width));
						break;
					default:
					}
				}
				this.__textEngine.getBounds();
			}
			this.__layoutDirty = false;
		}
	}
	,get_antiAliasType: function() {
		return this.__textEngine.antiAliasType;
	}
	,set_antiAliasType: function(value) {
		var tmp = value != this.__textEngine.antiAliasType;
		return this.__textEngine.antiAliasType = value;
	}
	,get_autoSize: function() {
		return this.__textEngine.autoSize;
	}
	,set_autoSize: function(value) {
		if(value != this.__textEngine.autoSize) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.autoSize = value;
	}
	,get_background: function() {
		return this.__textEngine.background;
	}
	,set_background: function(value) {
		if(value != this.__textEngine.background) {
			this.__dirty = true;
		}
		return this.__textEngine.background = value;
	}
	,get_backgroundColor: function() {
		return this.__textEngine.backgroundColor;
	}
	,set_backgroundColor: function(value) {
		if(value != this.__textEngine.backgroundColor) {
			this.__dirty = true;
		}
		return this.__textEngine.backgroundColor = value;
	}
	,get_border: function() {
		return this.__textEngine.border;
	}
	,set_border: function(value) {
		if(value != this.__textEngine.border) {
			this.__dirty = true;
		}
		return this.__textEngine.border = value;
	}
	,get_borderColor: function() {
		return this.__textEngine.borderColor;
	}
	,set_borderColor: function(value) {
		if(value != this.__textEngine.borderColor) {
			this.__dirty = true;
		}
		return this.__textEngine.borderColor = value;
	}
	,get_bottomScrollV: function() {
		this.__updateLayout();
		return this.__textEngine.bottomScrollV;
	}
	,get_caretIndex: function() {
		return this.__caretIndex;
	}
	,get_defaultTextFormat: function() {
		return this.__textFormat.clone();
	}
	,set_defaultTextFormat: function(value) {
		this.__textFormat.__merge(value);
		this.__layoutDirty = true;
		this.__dirty = true;
		return value;
	}
	,get_displayAsPassword: function() {
		return this.__textEngine.displayAsPassword;
	}
	,set_displayAsPassword: function(value) {
		if(value != this.__textEngine.displayAsPassword) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.displayAsPassword = value;
	}
	,get_embedFonts: function() {
		return this.__textEngine.embedFonts;
	}
	,set_embedFonts: function(value) {
		return this.__textEngine.embedFonts = value;
	}
	,get_gridFitType: function() {
		return this.__textEngine.gridFitType;
	}
	,set_gridFitType: function(value) {
		return this.__textEngine.gridFitType = value;
	}
	,get_height: function() {
		this.__updateLayout();
		return this.__textEngine.height;
	}
	,set_height: function(value) {
		if(this.get_scaleY() != 1 || value != this.__textEngine.height) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		this.set_scaleY(1);
		return this.__textEngine.height = value;
	}
	,get_htmlText: function() {
		return this.__textEngine.text;
	}
	,set_htmlText: function(value) {
		if(!this.__isHTML || this.__textEngine.text != value) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		this.__isHTML = true;
		if(this.__div == null) {
			var _this_r = new RegExp("<br>","g".split("u").join(""));
			value = value.replace(_this_r,"\n");
			var _this_r1 = new RegExp("<br/>","g".split("u").join(""));
			value = value.replace(_this_r1,"\n");
			var segments = value.split("<font");
			if(segments.length == 1) {
				var _this_r2 = new RegExp("<.*?>","g".split("u").join(""));
				value = value.replace(_this_r2,"");
				if(this.__textEngine.textFormatRanges.length > 1) {
					this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.length - 1);
				}
				var range = this.__textEngine.textFormatRanges[0];
				range.format = this.__textFormat;
				range.start = 0;
				range.end = value.length;
				return this.__textEngine.text = value;
			} else {
				this.__textEngine.textFormatRanges.splice(0,this.__textEngine.textFormatRanges.length);
				value = "";
				var _g = 0;
				while(_g < segments.length) {
					var segment = segments[_g];
					++_g;
					if(segment == "") {
						continue;
					}
					var closeFontIndex = segment.indexOf("</font>");
					if(closeFontIndex > -1) {
						var start = segment.indexOf(">") + 1;
						var end = closeFontIndex;
						var format = this.__textFormat.clone();
						var faceIndex = segment.indexOf("face=");
						var colorIndex = segment.indexOf("color=");
						var sizeIndex = segment.indexOf("size=");
						if(faceIndex > -1 && faceIndex < start) {
							format.font = HxOverrides.substr(segment,faceIndex + 6,segment.indexOf("\"",faceIndex));
						}
						if(colorIndex > -1 && colorIndex < start) {
							format.color = Std.parseInt("0x" + HxOverrides.substr(segment,colorIndex + 8,6));
						}
						if(sizeIndex > -1 && sizeIndex < start) {
							format.size = Std.parseInt(HxOverrides.substr(segment,sizeIndex + 6,segment.indexOf("\"",sizeIndex)));
						}
						var sub = segment.substring(start,end);
						var _this_r3 = new RegExp("<.*?>","g".split("u").join(""));
						sub = sub.replace(_this_r3,"");
						this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(format,value.length,value.length + sub.length));
						value += sub;
						if(closeFontIndex + 7 < segment.length) {
							sub = HxOverrides.substr(segment,closeFontIndex + 7,null);
							this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,value.length,value.length + sub.length));
							value += sub;
						}
					} else {
						this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,value.length,value.length + segment.length));
						value += segment;
					}
				}
			}
		}
		return this.__textEngine.text = value;
	}
	,get_length: function() {
		if(this.__textEngine.text != null) {
			return this.__textEngine.text.length;
		}
		return 0;
	}
	,get_maxChars: function() {
		return this.__textEngine.maxChars;
	}
	,set_maxChars: function(value) {
		if(value != this.__textEngine.maxChars) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.maxChars = value;
	}
	,get_maxScrollH: function() {
		this.__updateLayout();
		return this.__textEngine.maxScrollH;
	}
	,get_maxScrollV: function() {
		this.__updateLayout();
		return this.__textEngine.maxScrollV;
	}
	,get_multiline: function() {
		return this.__textEngine.multiline;
	}
	,set_multiline: function(value) {
		if(value != this.__textEngine.multiline) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.multiline = value;
	}
	,get_numLines: function() {
		this.__updateLayout();
		return this.__textEngine.numLines;
	}
	,get_restrict: function() {
		return this.__textEngine.restrict;
	}
	,set_restrict: function(value) {
		return this.__textEngine.restrict = value;
	}
	,get_scrollH: function() {
		return this.__textEngine.scrollH;
	}
	,set_scrollH: function(value) {
		if(value > this.__textEngine.maxScrollH) {
			value = this.__textEngine.maxScrollH;
		}
		if(value < 0) {
			value = 0;
		}
		if(value != this.__textEngine.scrollH) {
			this.__dirty = true;
		}
		return this.__textEngine.scrollH = value;
	}
	,get_scrollV: function() {
		return this.__textEngine.scrollV;
	}
	,set_scrollV: function(value) {
		if(value > this.__textEngine.maxScrollV) {
			value = this.__textEngine.maxScrollV;
		}
		if(value < 1) {
			value = 1;
		}
		if(value != this.__textEngine.scrollV) {
			this.__dirty = true;
		}
		return this.__textEngine.scrollV = value;
	}
	,get_selectable: function() {
		return this.__textEngine.selectable;
	}
	,set_selectable: function(value) {
		if(value != this.__textEngine.selectable && this.get_type() == 1) {
			if(this.stage != null && this.stage.get_focus() == this) {
				this.__startTextInput();
			} else if(!value) {
				this.__stopTextInput();
			}
		}
		return this.__textEngine.selectable = value;
	}
	,get_selectionBeginIndex: function() {
		return Math.min(this.__caretIndex,this.__selectionIndex) | 0;
	}
	,get_selectionEndIndex: function() {
		return Math.max(this.__caretIndex,this.__selectionIndex) | 0;
	}
	,get_sharpness: function() {
		return this.__textEngine.sharpness;
	}
	,set_sharpness: function(value) {
		if(value != this.__textEngine.sharpness) {
			this.__dirty = true;
		}
		return this.__textEngine.sharpness = value;
	}
	,get_text: function() {
		return this.__textEngine.text;
	}
	,set_text: function(value) {
		if(this.__isHTML || this.__textEngine.text != value) {
			this.__dirty = true;
			this.__layoutDirty = true;
		} else {
			return value;
		}
		if(this.__textEngine.textFormatRanges.length > 1) {
			this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.length - 1);
		}
		var range = this.__textEngine.textFormatRanges[0];
		range.format = this.__textFormat;
		range.start = 0;
		range.end = value.length;
		this.__isHTML = false;
		return this.__textEngine.text = value;
	}
	,get_textColor: function() {
		return this.__textFormat.color;
	}
	,set_textColor: function(value) {
		if(value != this.__textFormat.color) {
			this.__dirty = true;
		}
		var _g = 0;
		var _g1 = this.__textEngine.textFormatRanges;
		while(_g < _g1.length) {
			var range = _g1[_g];
			++_g;
			range.format.color = value;
		}
		return this.__textFormat.color = value;
	}
	,get_textWidth: function() {
		this.__updateLayout();
		return this.__textEngine.textWidth;
	}
	,get_textHeight: function() {
		this.__updateLayout();
		return this.__textEngine.textHeight;
	}
	,get_type: function() {
		return this.__textEngine.type;
	}
	,set_type: function(value) {
		if(value != this.__textEngine.type) {
			if(value == 1) {
				this.addEventListener("focusIn",$bind(this,this.this_onFocusIn));
				this.addEventListener("focusOut",$bind(this,this.this_onFocusOut));
				this.addEventListener("addedToStage",$bind(this,this.this_onAddedToStage));
				this.this_onFocusIn(null);
			} else {
				this.removeEventListener("focusIn",$bind(this,this.this_onFocusIn));
				this.removeEventListener("focusOut",$bind(this,this.this_onFocusOut));
				this.removeEventListener("addedToStage",$bind(this,this.this_onAddedToStage));
				this.__stopTextInput();
			}
			this.__dirty = true;
		}
		return this.__textEngine.type = value;
	}
	,get_width: function() {
		this.__updateLayout();
		return this.__textEngine.width;
	}
	,set_width: function(value) {
		if(this.get_scaleX() != 1 || this.__textEngine.width != value) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		this.set_scaleX(1);
		return this.__textEngine.width = value;
	}
	,get_wordWrap: function() {
		return this.__textEngine.wordWrap;
	}
	,set_wordWrap: function(value) {
		if(value != this.__textEngine.wordWrap) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.wordWrap = value;
	}
	,stage_onMouseMove: function(event) {
		if(this.stage == null) {
			return;
		}
		if(this.__textEngine.selectable && this.__selectionIndex >= 0) {
			this.__updateLayout();
			var position = this.__getPosition(this.get_mouseX(),this.get_mouseY());
			if(position != this.__caretIndex) {
				this.__caretIndex = position;
				this.__dirty = true;
			}
		}
	}
	,stage_onMouseUp: function(event) {
		if(this.stage == null) {
			return;
		}
		this.stage.removeEventListener("mouseMove",$bind(this,this.stage_onMouseMove));
		this.stage.removeEventListener("mouseUp",$bind(this,this.stage_onMouseUp));
		if(this.stage.get_focus() == this) {
			this.__getWorldTransform();
			this.__updateLayout();
			var _this = this.__worldTransform;
			var px = this.get_x();
			var py = this.get_y();
			var norm = _this.a * _this.d - _this.b * _this.c;
			var px1 = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - py) + _this.d * (px - _this.tx));
			var _this1 = this.__worldTransform;
			var px2 = this.get_x();
			var py1 = this.get_y();
			var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
			var py2 = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (py1 - _this1.ty) + _this1.b * (_this1.tx - px2));
			var upPos = this.__getPosition(this.get_mouseX(),this.get_mouseY());
			var leftPos;
			var rightPos;
			leftPos = Math.min(this.__selectionIndex,upPos) | 0;
			rightPos = Math.max(this.__selectionIndex,upPos) | 0;
			this.__selectionIndex = leftPos;
			this.__caretIndex = rightPos;
			if(this.__inputEnabled) {
				this.this_onFocusIn(null);
				this.__stopCursorTimer();
				this.__startCursorTimer();
			}
		}
	}
	,this_onAddedToStage: function(event) {
		this.this_onFocusIn(null);
	}
	,this_onFocusIn: function(event) {
		if(this.get_selectable() && this.get_type() == 1 && this.stage != null && this.stage.get_focus() == this) {
			this.__startTextInput();
		}
	}
	,this_onFocusOut: function(event) {
		this.__stopTextInput();
	}
	,this_onMouseDown: function(event) {
		if(!this.get_selectable()) {
			return;
		}
		this.__updateLayout();
		this.__caretIndex = this.__getPosition(this.get_mouseX(),this.get_mouseY());
		this.__selectionIndex = this.__caretIndex;
		this.__dirty = true;
		this.stage.addEventListener("mouseMove",$bind(this,this.stage_onMouseMove));
		this.stage.addEventListener("mouseUp",$bind(this,this.stage_onMouseUp));
	}
	,window_onKeyDown: function(key,modifier) {
		switch(key) {
		case 8:
			if(this.__selectionIndex == this.__caretIndex && this.__caretIndex > 0) {
				this.__selectionIndex = this.__caretIndex - 1;
			}
			if(this.__selectionIndex != this.__caretIndex) {
				this.replaceSelectedText("");
				this.__selectionIndex = this.__caretIndex;
				this.dispatchEvent(new openfl_events_Event("change",true));
			}
			break;
		case 99:
			if(modifier == 64 || modifier == 128) {
				lime_system_Clipboard.set_text(this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex));
			}
			break;
		case 118:
			if(modifier == 64 || modifier == 128) {
				var text = lime_system_Clipboard.get_text();
				if(text != null) {
					this.replaceSelectedText(text);
				} else {
					this.replaceSelectedText("");
				}
				this.dispatchEvent(new openfl_events_Event("change",true));
			} else {
				this.__textEngine.textFormatRanges[this.__textEngine.textFormatRanges.length - 1].end = this.__textEngine.text.length;
			}
			break;
		case 120:
			if(modifier == 64 || modifier == 128) {
				lime_system_Clipboard.set_text(this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex));
				if(this.__caretIndex != this.__selectionIndex) {
					this.replaceSelectedText("");
					this.dispatchEvent(new openfl_events_Event("change",true));
				}
			}
			break;
		case 127:
			if(this.__selectionIndex == this.__caretIndex && this.__caretIndex < this.__textEngine.text.length) {
				this.__selectionIndex = this.__caretIndex + 1;
			}
			if(this.__selectionIndex != this.__caretIndex) {
				this.replaceSelectedText("");
				this.__selectionIndex = this.__caretIndex;
				this.dispatchEvent(new openfl_events_Event("change",true));
			}
			break;
		case 1073741903:
			if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier)) {
				if(this.__caretIndex < this.__textEngine.text.length) {
					this.__caretIndex++;
				}
			} else {
				if(this.__selectionIndex == this.__caretIndex) {
					if(this.__caretIndex < this.__textEngine.text.length) {
						this.__caretIndex++;
					}
				} else {
					this.__caretIndex = Math.max(this.__caretIndex,this.__selectionIndex) | 0;
				}
				this.__selectionIndex = this.__caretIndex;
			}
			this.__stopCursorTimer();
			this.__startCursorTimer();
			break;
		case 1073741904:
			if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier)) {
				if(this.__caretIndex > 0) {
					this.__caretIndex--;
				}
			} else {
				if(this.__selectionIndex == this.__caretIndex) {
					if(this.__caretIndex > 0) {
						this.__caretIndex--;
					}
				} else {
					this.__caretIndex = Math.min(this.__caretIndex,this.__selectionIndex) | 0;
				}
				this.__selectionIndex = this.__caretIndex;
			}
			this.__stopCursorTimer();
			this.__startCursorTimer();
			break;
		default:
		}
	}
	,window_onTextInput: function(value) {
		this.replaceSelectedText(value);
		this.dispatchEvent(new openfl_events_Event("change",true));
	}
	,__class__: openfl_text_TextField
	,__properties__: $extend(openfl_display_InteractiveObject.prototype.__properties__,{set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_type:"set_type",get_type:"get_type",get_textWidth:"get_textWidth",get_textHeight:"get_textHeight",set_textColor:"set_textColor",get_textColor:"get_textColor",set_text:"set_text",get_text:"get_text",set_sharpness:"set_sharpness",get_sharpness:"get_sharpness",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",set_selectable:"set_selectable",get_selectable:"get_selectable",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_scrollH:"set_scrollH",get_scrollH:"get_scrollH",set_restrict:"set_restrict",get_restrict:"get_restrict",get_numLines:"get_numLines",set_multiline:"set_multiline",get_multiline:"get_multiline",get_maxScrollV:"get_maxScrollV",get_maxScrollH:"get_maxScrollH",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_length:"get_length",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_gridFitType:"set_gridFitType",get_gridFitType:"get_gridFitType",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",get_caretIndex:"get_caretIndex",get_bottomScrollV:"get_bottomScrollV",set_borderColor:"set_borderColor",get_borderColor:"get_borderColor",set_border:"set_border",get_border:"get_border",set_backgroundColor:"set_backgroundColor",get_backgroundColor:"get_backgroundColor",set_background:"set_background",get_background:"get_background",set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_antiAliasType:"set_antiAliasType",get_antiAliasType:"get_antiAliasType"})
});
var openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$ = {};
$hxClasses["openfl.text._TextFieldAutoSize.TextFieldAutoSize_Impl_"] = openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.__name__ = ["openfl","text","_TextFieldAutoSize","TextFieldAutoSize_Impl_"];
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.fromString = function(value) {
	switch(value) {
	case "center":
		return 0;
	case "left":
		return 1;
	case "none":
		return 2;
	case "right":
		return 3;
	default:
		return null;
	}
};
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "center";
	case 1:
		return "left";
	case 2:
		return "none";
	case 3:
		return "right";
	default:
		return null;
	}
};
var openfl_text__$TextFieldType_TextFieldType_$Impl_$ = {};
$hxClasses["openfl.text._TextFieldType.TextFieldType_Impl_"] = openfl_text__$TextFieldType_TextFieldType_$Impl_$;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.__name__ = ["openfl","text","_TextFieldType","TextFieldType_Impl_"];
openfl_text__$TextFieldType_TextFieldType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "dynamic":
		return 0;
	case "input":
		return 1;
	default:
		return null;
	}
};
openfl_text__$TextFieldType_TextFieldType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "dynamic";
	case 1:
		return "input";
	default:
		return null;
	}
};
var openfl_text_TextFormat = function(font,size,color,bold,italic,underline,url,target,align,leftMargin,rightMargin,indent,leading) {
	this.font = font;
	this.size = size;
	this.color = color;
	this.bold = bold;
	this.italic = italic;
	this.underline = underline;
	this.url = url;
	this.target = target;
	this.align = align;
	this.leftMargin = leftMargin;
	this.rightMargin = rightMargin;
	this.indent = indent;
	this.leading = leading;
};
$hxClasses["openfl.text.TextFormat"] = openfl_text_TextFormat;
openfl_text_TextFormat.__name__ = ["openfl","text","TextFormat"];
openfl_text_TextFormat.prototype = {
	clone: function() {
		var newFormat = new openfl_text_TextFormat(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);
		newFormat.align = this.align;
		newFormat.leftMargin = this.leftMargin;
		newFormat.rightMargin = this.rightMargin;
		newFormat.indent = this.indent;
		newFormat.leading = this.leading;
		newFormat.blockIndent = this.blockIndent;
		newFormat.bullet = this.bullet;
		newFormat.kerning = this.kerning;
		newFormat.letterSpacing = this.letterSpacing;
		newFormat.tabStops = this.tabStops;
		return newFormat;
	}
	,__merge: function(format) {
		if(format.font != null) {
			this.font = format.font;
		}
		if(format.size != null) {
			this.size = format.size;
		}
		if(format.color != null) {
			this.color = format.color;
		}
		if(format.bold != null) {
			this.bold = format.bold;
		}
		if(format.italic != null) {
			this.italic = format.italic;
		}
		if(format.underline != null) {
			this.underline = format.underline;
		}
		if(format.url != null) {
			this.url = format.url;
		}
		if(format.target != null) {
			this.target = format.target;
		}
		if(format.align != null) {
			this.align = format.align;
		}
		if(format.leftMargin != null) {
			this.leftMargin = format.leftMargin;
		}
		if(format.rightMargin != null) {
			this.rightMargin = format.rightMargin;
		}
		if(format.indent != null) {
			this.indent = format.indent;
		}
		if(format.leading != null) {
			this.leading = format.leading;
		}
		if(format.blockIndent != null) {
			this.blockIndent = format.blockIndent;
		}
		if(format.bullet != null) {
			this.bullet = format.bullet;
		}
		if(format.kerning != null) {
			this.kerning = format.kerning;
		}
		if(format.letterSpacing != null) {
			this.letterSpacing = format.letterSpacing;
		}
		if(format.tabStops != null) {
			this.tabStops = format.tabStops;
		}
	}
	,__class__: openfl_text_TextFormat
};
var openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$ = {};
$hxClasses["openfl.text._TextFormatAlign.TextFormatAlign_Impl_"] = openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.__name__ = ["openfl","text","_TextFormatAlign","TextFormatAlign_Impl_"];
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString = function(value) {
	switch(value) {
	case "center":
		return 0;
	case "end":
		return 1;
	case "justify":
		return 2;
	case "left":
		return 3;
	case "right":
		return 4;
	case "start":
		return 5;
	default:
		return null;
	}
};
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "center";
	case 1:
		return "end";
	case 2:
		return "justify";
	case 3:
		return "left";
	case 4:
		return "right";
	case 5:
		return "start";
	default:
		return null;
	}
};
var openfl_text_TextLineMetrics = function(x,width,height,ascent,descent,leading) {
	this.x = x;
	this.width = width;
	this.height = height;
	this.ascent = ascent;
	this.descent = descent;
	this.leading = leading;
};
$hxClasses["openfl.text.TextLineMetrics"] = openfl_text_TextLineMetrics;
openfl_text_TextLineMetrics.__name__ = ["openfl","text","TextLineMetrics"];
openfl_text_TextLineMetrics.prototype = {
	__class__: openfl_text_TextLineMetrics
};
var openfl_ui_GameInputControl = function(device,id,minValue,maxValue,value) {
	if(value == null) {
		value = 0;
	}
	openfl_events_EventDispatcher.call(this);
	this.device = device;
	this.id = id;
	this.minValue = minValue;
	this.maxValue = maxValue;
	this.value = value;
};
$hxClasses["openfl.ui.GameInputControl"] = openfl_ui_GameInputControl;
openfl_ui_GameInputControl.__name__ = ["openfl","ui","GameInputControl"];
openfl_ui_GameInputControl.__super__ = openfl_events_EventDispatcher;
openfl_ui_GameInputControl.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_ui_GameInputControl
});
var openfl_ui_GameInputDevice = function(id,name) {
	this.__controls = [];
	this.__button = new haxe_ds_IntMap();
	this.__axis = new haxe_ds_IntMap();
	this.id = id;
	this.name = name;
	var control;
	var _g = 0;
	while(_g < 6) {
		var i = _g++;
		control = new openfl_ui_GameInputControl(this,"AXIS_" + i,-1,1);
		this.__axis.h[i] = control;
		this.__controls.push(control);
	}
	var _g1 = 0;
	while(_g1 < 15) {
		var i1 = _g1++;
		control = new openfl_ui_GameInputControl(this,"BUTTON_" + i1,0,1);
		this.__button.h[i1] = control;
		this.__controls.push(control);
	}
};
$hxClasses["openfl.ui.GameInputDevice"] = openfl_ui_GameInputDevice;
openfl_ui_GameInputDevice.__name__ = ["openfl","ui","GameInputDevice"];
openfl_ui_GameInputDevice.prototype = {
	getCachedSamples: function(data,append) {
		if(append == null) {
			append = false;
		}
		return 0;
	}
	,getControlAt: function(i) {
		if(i >= 0 && i < this.__controls.length) {
			return this.__controls[i];
		}
		return null;
	}
	,startCachingSamples: function(numSamples,controls) {
	}
	,stopCachingSamples: function() {
	}
	,get_numControls: function() {
		return this.__controls.length;
	}
	,__class__: openfl_ui_GameInputDevice
	,__properties__: {get_numControls:"get_numControls"}
};
var openfl_ui_Keyboard = function() { };
$hxClasses["openfl.ui.Keyboard"] = openfl_ui_Keyboard;
openfl_ui_Keyboard.__name__ = ["openfl","ui","Keyboard"];
openfl_ui_Keyboard.capsLock = null;
openfl_ui_Keyboard.numLock = null;
openfl_ui_Keyboard.isAccessible = function() {
	return false;
};
openfl_ui_Keyboard.__convertKeyCode = function(key) {
	switch(key) {
	case 8:
		return 8;
	case 9:
		return 9;
	case 13:
		return 13;
	case 27:
		return 27;
	case 32:
		return 32;
	case 33:
		return 49;
	case 34:
		return 222;
	case 35:
		return 51;
	case 36:
		return 52;
	case 37:
		return 53;
	case 38:
		return 55;
	case 39:
		return 222;
	case 40:
		return 57;
	case 41:
		return 48;
	case 42:
		return 56;
	case 44:
		return 188;
	case 45:
		return 189;
	case 46:
		return 190;
	case 47:
		return 191;
	case 48:
		return 48;
	case 49:
		return 49;
	case 50:
		return 50;
	case 51:
		return 51;
	case 52:
		return 52;
	case 53:
		return 53;
	case 54:
		return 54;
	case 55:
		return 55;
	case 56:
		return 56;
	case 57:
		return 57;
	case 58:
		return 186;
	case 59:
		return 186;
	case 60:
		return 60;
	case 61:
		return 187;
	case 62:
		return 190;
	case 63:
		return 191;
	case 64:
		return 50;
	case 91:
		return 219;
	case 92:
		return 220;
	case 93:
		return 221;
	case 94:
		return 54;
	case 95:
		return 189;
	case 96:
		return 192;
	case 97:
		return 65;
	case 98:
		return 66;
	case 99:
		return 67;
	case 100:
		return 68;
	case 101:
		return 69;
	case 102:
		return 70;
	case 103:
		return 71;
	case 104:
		return 72;
	case 105:
		return 73;
	case 106:
		return 74;
	case 107:
		return 75;
	case 108:
		return 76;
	case 109:
		return 77;
	case 110:
		return 78;
	case 111:
		return 79;
	case 112:
		return 80;
	case 113:
		return 81;
	case 114:
		return 82;
	case 115:
		return 83;
	case 116:
		return 84;
	case 117:
		return 85;
	case 118:
		return 86;
	case 119:
		return 87;
	case 120:
		return 88;
	case 121:
		return 89;
	case 122:
		return 90;
	case 127:
		return 46;
	case 1073741881:
		return 20;
	case 1073741882:
		return 112;
	case 1073741883:
		return 113;
	case 1073741884:
		return 114;
	case 1073741885:
		return 115;
	case 1073741886:
		return 116;
	case 1073741887:
		return 117;
	case 1073741888:
		return 118;
	case 1073741889:
		return 119;
	case 1073741890:
		return 120;
	case 1073741891:
		return 121;
	case 1073741892:
		return 122;
	case 1073741893:
		return 123;
	case 1073741894:
		return 301;
	case 1073741895:
		return 145;
	case 1073741896:
		return 19;
	case 1073741897:
		return 45;
	case 1073741898:
		return 36;
	case 1073741899:
		return 33;
	case 1073741901:
		return 35;
	case 1073741902:
		return 34;
	case 1073741903:
		return 39;
	case 1073741904:
		return 37;
	case 1073741905:
		return 40;
	case 1073741906:
		return 38;
	case 1073741907:
		return 144;
	case 1073741908:
		return 111;
	case 1073741909:
		return 106;
	case 1073741910:
		return 109;
	case 1073741911:
		return 107;
	case 1073741912:
		return 108;
	case 1073741913:
		return 97;
	case 1073741914:
		return 98;
	case 1073741915:
		return 99;
	case 1073741916:
		return 100;
	case 1073741917:
		return 101;
	case 1073741918:
		return 102;
	case 1073741919:
		return 103;
	case 1073741920:
		return 104;
	case 1073741921:
		return 105;
	case 1073741922:
		return 96;
	case 1073741923:
		return 110;
	case 1073741925:
		return 302;
	case 1073741928:
		return 124;
	case 1073741929:
		return 125;
	case 1073741930:
		return 126;
	case 1073741982:
		return 13;
	case 1073742044:
		return 110;
	case 1073742048:
		return 17;
	case 1073742049:
		return 16;
	case 1073742050:
		return 18;
	case 1073742051:
		return 15;
	case 1073742052:
		return 17;
	case 1073742053:
		return 16;
	case 1073742054:
		return 18;
	case 1073742055:
		return 15;
	default:
		return key;
	}
};
openfl_ui_Keyboard.__getCharCode = function(key,shift) {
	if(shift == null) {
		shift = false;
	}
	if(!shift) {
		switch(key) {
		case 8:
			return 8;
		case 9:
			return 9;
		case 13:
			return 13;
		case 27:
			return 27;
		case 32:
			return 32;
		case 186:
			return 59;
		case 187:
			return 61;
		case 188:
			return 44;
		case 189:
			return 45;
		case 190:
			return 46;
		case 191:
			return 47;
		case 192:
			return 96;
		case 219:
			return 91;
		case 220:
			return 92;
		case 221:
			return 93;
		case 222:
			return 39;
		}
		if(key >= 48 && key <= 57) {
			return key - 48 + 48;
		}
		if(key >= 65 && key <= 90) {
			return key - 65 + 97;
		}
	} else {
		switch(key) {
		case 48:
			return 41;
		case 49:
			return 33;
		case 50:
			return 64;
		case 51:
			return 35;
		case 52:
			return 36;
		case 53:
			return 37;
		case 54:
			return 94;
		case 55:
			return 38;
		case 56:
			return 42;
		case 57:
			return 40;
		case 186:
			return 58;
		case 187:
			return 43;
		case 188:
			return 60;
		case 189:
			return 95;
		case 190:
			return 62;
		case 191:
			return 63;
		case 192:
			return 126;
		case 219:
			return 123;
		case 220:
			return 124;
		case 221:
			return 125;
		case 222:
			return 34;
		}
		if(key >= 65 && key <= 90) {
			return key - 65 + 65;
		}
	}
	if(key >= 96 && key <= 105) {
		return key - 96 + 48;
	}
	switch(key) {
	case 8:
		return 8;
	case 13:
		return 13;
	case 46:
		return 127;
	case 106:
		return 42;
	case 107:
		return 43;
	case 108:
		return 44;
	case 110:
		return 45;
	case 111:
		return 46;
	}
	return 0;
};
openfl_ui_Keyboard.__getKeyLocation = function(key) {
	switch(key) {
	case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:
		return 3;
	case 1073742048:case 1073742049:case 1073742050:case 1073742051:
		return 1;
	case 1073742052:case 1073742053:case 1073742054:case 1073742055:
		return 2;
	default:
		return 0;
	}
};
var openfl_ui_Mouse = function() { };
$hxClasses["openfl.ui.Mouse"] = openfl_ui_Mouse;
openfl_ui_Mouse.__name__ = ["openfl","ui","Mouse"];
openfl_ui_Mouse.hide = function() {
	lime_ui_Mouse.hide();
};
openfl_ui_Mouse.show = function() {
	lime_ui_Mouse.show();
};
var openfl_ui_Multitouch = function() { };
$hxClasses["openfl.ui.Multitouch"] = openfl_ui_Multitouch;
openfl_ui_Multitouch.__name__ = ["openfl","ui","Multitouch"];
openfl_ui_Multitouch.__properties__ = {get_supportsTouchEvents:"get_supportsTouchEvents",set_inputMode:"set_inputMode",get_inputMode:"get_inputMode"};
openfl_ui_Multitouch.maxTouchPoints = null;
openfl_ui_Multitouch.supportedGestures = null;
openfl_ui_Multitouch.supportsGestureEvents = null;
openfl_ui_Multitouch.supportsTouchEvents = null;
openfl_ui_Multitouch.get_inputMode = function() {
	return 2;
};
openfl_ui_Multitouch.set_inputMode = function(inMode) {
	if(inMode == 0) {
		return openfl_ui_Multitouch.get_inputMode();
	}
	return inMode;
};
openfl_ui_Multitouch.get_supportsTouchEvents = function() {
	if(('ontouchstart' in document.documentElement) || (window.DocumentTouch && document instanceof DocumentTouch)) {
		return true;
	}
	return false;
};
var openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$ = {};
$hxClasses["openfl.ui._MultitouchInputMode.MultitouchInputMode_Impl_"] = openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.__name__ = ["openfl","ui","_MultitouchInputMode","MultitouchInputMode_Impl_"];
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "gesture":
		return 0;
	case "none":
		return 1;
	case "touchPoint":
		return 2;
	default:
		return null;
	}
};
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "gesture";
	case 1:
		return "none";
	case 2:
		return "touchPoint";
	default:
		return null;
	}
};
var openfl_utils__$ByteArray_ByteArray_$Impl_$ = {};
$hxClasses["openfl.utils._ByteArray.ByteArray_Impl_"] = openfl_utils__$ByteArray_ByteArray_$Impl_$;
openfl_utils__$ByteArray_ByteArray_$Impl_$.__name__ = ["openfl","utils","_ByteArray","ByteArray_Impl_"];
openfl_utils__$ByteArray_ByteArray_$Impl_$.__properties__ = {set_length:"set_length",get_length:"get_length"};
openfl_utils__$ByteArray_ByteArray_$Impl_$.defaultObjectEncoding = null;
openfl_utils__$ByteArray_ByteArray_$Impl_$._new = function(length) {
	if(length == null) {
		length = 0;
	}
	var this1 = new openfl_utils_ByteArrayData(length);
	return this1;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.get = function(this1,index) {
	return this1.b[index];
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.set = function(this1,index,value) {
	this1.b[index] = value & 255;
	return value;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer = function(buffer) {
	return openfl_utils_ByteArrayData.fromBytes(haxe_io_Bytes.ofData(buffer));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes = function(bytes) {
	if(js_Boot.__instanceof(bytes,openfl_utils_ByteArrayData)) {
		return bytes;
	} else {
		return openfl_utils_ByteArrayData.fromBytes(bytes);
	}
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytesData = function(bytesData) {
	return openfl_utils_ByteArrayData.fromBytes(haxe_io_Bytes.ofData(bytesData));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer = function(byteArray) {
	return byteArray.b.bufferValue;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes = function(byteArray) {
	return byteArray;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytesData = function(byteArray) {
	return byteArray.b.bufferValue;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toLimeBytes = function(byteArray) {
	return new lime_utils_Bytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(byteArray),byteArray.b.bufferValue);
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length = function(this1) {
	return this1.__length;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length = function(this1,value) {
	if(value > 0) {
		this1.__resize(value);
	}
	this1.__length = value;
	return value;
};
var openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$ = {};
$hxClasses["openfl.utils._CompressionAlgorithm.CompressionAlgorithm_Impl_"] = openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.__name__ = ["openfl","utils","_CompressionAlgorithm","CompressionAlgorithm_Impl_"];
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.fromString = function(value) {
	switch(value) {
	case "deflate":
		return 0;
	case "lzma":
		return 1;
	case "zlib":
		return 2;
	default:
		return null;
	}
};
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "deflate";
	case 1:
		return "lzma";
	case 2:
		return "zlib";
	default:
		return null;
	}
};
var openfl_utils__$Endian_Endian_$Impl_$ = {};
$hxClasses["openfl.utils._Endian.Endian_Impl_"] = openfl_utils__$Endian_Endian_$Impl_$;
openfl_utils__$Endian_Endian_$Impl_$.__name__ = ["openfl","utils","_Endian","Endian_Impl_"];
openfl_utils__$Endian_Endian_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bigEndian":
		return 0;
	case "littleEndian":
		return 1;
	default:
		return null;
	}
};
openfl_utils__$Endian_Endian_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bigEndian";
	case 1:
		return "littleEndian";
	default:
		return null;
	}
};
var openfl_utils__$Object_Object_$Impl_$ = {};
$hxClasses["openfl.utils._Object.Object_Impl_"] = openfl_utils__$Object_Object_$Impl_$;
openfl_utils__$Object_Object_$Impl_$.__name__ = ["openfl","utils","_Object","Object_Impl_"];
openfl_utils__$Object_Object_$Impl_$._new = function() {
	var this1 = { };
	return this1;
};
openfl_utils__$Object_Object_$Impl_$.hasOwnProperty = function(this1,name) {
	if(this1 != null) {
		return Object.prototype.hasOwnProperty.call(this1,name);
	} else {
		return false;
	}
};
openfl_utils__$Object_Object_$Impl_$.isPrototypeOf = function(this1,theClass) {
	var o = this1;
	var c = o == null ? null : js_Boot.getClass(o);
	while(c != null) {
		if(c == theClass) {
			return true;
		}
		c = Type.getSuperClass(c);
	}
	return false;
};
openfl_utils__$Object_Object_$Impl_$.iterator = function(this1) {
	var fields = Reflect.fields(this1);
	if(fields == null) {
		fields = [];
	}
	return HxOverrides.iter(fields);
};
openfl_utils__$Object_Object_$Impl_$.propertyIsEnumerable = function(this1,name) {
	if(this1 != null && Object.prototype.hasOwnProperty.call(this1,name)) {
		return js_Boot.__instanceof(Reflect.field(this1,name),haxe_lang_Iterable);
	} else {
		return false;
	}
};
openfl_utils__$Object_Object_$Impl_$.toLocaleString = function(this1) {
	return Std.string(this1);
};
openfl_utils__$Object_Object_$Impl_$.toString = function(this1) {
	return Std.string(this1);
};
openfl_utils__$Object_Object_$Impl_$.valueOf = function(this1) {
	return this1;
};
openfl_utils__$Object_Object_$Impl_$.__get = function(this1,key) {
	return Reflect.field(this1,key);
};
openfl_utils__$Object_Object_$Impl_$.__set = function(this1,key,value) {
	this1[key] = value;
	return value;
};
var haxe_lang_Iterator = function() { };
$hxClasses["haxe.lang.Iterator"] = haxe_lang_Iterator;
haxe_lang_Iterator.__name__ = ["haxe","lang","Iterator"];
haxe_lang_Iterator.prototype = {
	__class__: haxe_lang_Iterator
};
var haxe_lang_Iterable = function() { };
$hxClasses["haxe.lang.Iterable"] = haxe_lang_Iterable;
haxe_lang_Iterable.__name__ = ["haxe","lang","Iterable"];
haxe_lang_Iterable.prototype = {
	__class__: haxe_lang_Iterable
};
function $iterator(o) { if( o instanceof Array ) return function() { return HxOverrides.iter(o); }; return typeof(o.iterator) == 'function' ? $bind(o,o.iterator) : o.iterator; }
var $_, $fid = 0;
function $bind(o,m) { if( m == null ) return null; if( m.__id__ == null ) m.__id__ = $fid++; var f; if( o.hx__closures__ == null ) o.hx__closures__ = {}; else f = o.hx__closures__[m.__id__]; if( f == null ) { f = function(){ return f.method.apply(f.scope, arguments); }; f.scope = o; f.method = m; o.hx__closures__[m.__id__] = f; } return f; }
$hxClasses["Math"] = Math;
String.prototype.__class__ = $hxClasses["String"] = String;
String.__name__ = ["String"];
$hxClasses["Array"] = Array;
Array.__name__ = ["Array"];
Date.prototype.__class__ = $hxClasses["Date"] = Date;
Date.__name__ = ["Date"];
var Int = $hxClasses["Int"] = { __name__ : ["Int"]};
var Dynamic = $hxClasses["Dynamic"] = { __name__ : ["Dynamic"]};
var Float = $hxClasses["Float"] = Number;
Float.__name__ = ["Float"];
var Bool = $hxClasses["Bool"] = Boolean;
Bool.__ename__ = ["Bool"];
var Class = $hxClasses["Class"] = { __name__ : ["Class"]};
var Enum = { };
haxe_Resource.content = [{ name : "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMaximizeButton", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFvQUFBQUtDQVlBQUFDTk1zKzlBQUFBQm1KTFIwUUEvd0QvQVArZ3ZhZVRBQUFBQ1hCSVdYTUFBQUIyQUFBQWRnRk9leVlJQUFBQUIzUkpUVVVIM2dNSkNSOFVCaGtEeVFBQUFFOUpSRUZVR05PdGtFRVN3REFJQW92Ly8vUDJvb2FhOUJaUFpvQXdxd0NlTlpMVUQ5ZkNIVzc2VFkyZmR3MklVOVVwZUhlVU5kMVlBRm5kTUFGUW1ndTV0eGFWM202VDV5bW9EL0gwT3ZrTFNBOUI4bis0Y2pvQUFBQUFTVVZPUks1Q1lJST0"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicArrowRight", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQUQ1SlJFRlVlTnBpK1AvLy96SWdqZ1JpQmtJWVJNQUFRVTNJaWdscXdxWVlweVo4aWpFME1mNEhheUVLTENmSlpJcmRURlJvRUJYT1JNY2dRSUFCQU1xdGZ6aUhGZ2JoQUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_system_GraphicLogo", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicWatch", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFEY1NVUkJWSGphakpBaFM4TmhHTVIvZTFGWkdNSmd3U2FyVnNPS1dSSGJtcGo4Qkg0Q205L0JabDJ3R3NSZ0U5Um1GbHcwQ0NKWUxIZG44UDF2KzZ1SUIwOTU3cmk3NStrazRiOG9BTmdGZXhmN0d2c0ZlNHA5Z2oxb3FaTVFhVDlTSXQxSE9vNTBGdWs5MG1Xa2ZoS1N6TVRUU0xlUnVnMFI2VENTSXgwMHUxSUQxb0VIU3ZsWUNMMEJYb0ZodS9NWHNZYzlxamVzQWtkQXQzS3R6cHVSSGlPOVJicUtkRmR2T0krMDFOVG96RjVuYndEakd0c0hkb0JuWUp0U251Yk9peU90Uk9wRk9xM3VGeitkdjhOZUF5YkFNcVZzQVgrSWY4SG5BTlI0d3BRazlwRnhBQUFBQUVsRlRrU3VRbUND"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicInteractive", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQkhOQ1NWUUlDQWdJZkFoa2lBQUFBQWx3U0ZsekFBQUxFZ0FBQ3hJQjB0MSsvQUFBQUJ4MFJWaDBVMjltZEhkaGNtVUFRV1J2WW1VZ1JtbHlaWGR2Y210eklFTlROdWk4c293QUFBQndTVVJCVkJpVmpaR3hEWUF3REFSZnpNSTYyU0JTT3RaZ0tBWmdBYW9NUVU5SmRSUUprUXVjOE5MTHNuVitGeGFnanFQdEovbUtrdVphaXpxSkFiaXJvNWNjSlYyU1ZqTXJGNXpFQXpockRXL3liOURDeXdpMDhFNlJDelk0NTR4WitBUWJuRkxDTEN6ZWt3UnNneTgyUDZENlFrZUFUREtHQUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicMoverTool", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicCursorCross", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQkhOQ1NWUUlDQWdJZkFoa2lBQUFBQWx3U0ZsekFBQUxFZ0FBQ3hJQjB0MSsvQUFBQUJaMFJWaDBRM0psWVhScGIyNGdWR2x0WlFBd05TOHlPUzh4TnJ0VlFGa0FBQUFjZEVWWWRGTnZablIzWVhKbEFFRmtiMkpsSUVacGNtVjNiM0pyY3lCRFV6Ym92TEtNQUFBQUxrbEVRVlFZbFdQOC8vOC9BeGJ3bjRHQmdSRmRrQW1iU2x4Z2tDaG1ZWUI0Qmh2QUVHZGh3T0pyaG1FVUdnQjN1Z2NXZXB2bWtRQUFBQUJKUlU1RXJrSmdnZz09"},{ name : "__ASSET__:file_flixel_system_VirtualInputData", data : "YmFzZSA9IDI2NiA0NiA4NCA4NA0KdGh1bWIgPSAyNjYgMTMxIDUyIDUyDQphID0gMCAwIDEzMiA0NQ0KYiA9IDAgNDYgMTMyIDQ1DQpjID0gMCA5MiAxMzIgNDUNCmRvd24gPSAwIDEzOCAxMzIgNDUNCmxlZnQgPSAxMzMgMCAxMzIgNDUNCnJpZ2h0ID0gMTMzIDQ2IDEzMiA0NQ0KdXAgPSAxMzMgOTIgMTMyIDQ1DQp4ID0gMjY2IDAgMTMyIDQ1DQp5ID0gMTMzIDEzOCAxMzIgNDUNCg"},{ name : "__ASSET__:bitmap_flixel_system_GraphicVirtualInput", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicArrowLeft", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQm1KTFIwUUFBQUFBQUFENVE3dC9BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUIzUkpUVVVIM2dRWkVqQTAzU0hjY2dBQUFFQkpSRUZVR05Oai9QLy9Qd01SSUpLQmdjR1g0Zi8vLy9odzVQLy8vNWY5aHdLaUZPRlNqRlVSdW1LOGlwQVZFMVJFdHNra3U1bXMwTUNyaVpHVUdBUUFzOU5wbXo4SWloRUFBQUFBU1VWT1JLNUNZSUk9"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicCloseButton", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFnQUFBQUlDQVlBQUFERUQ3NkxBQUFBQkhOQ1NWUUlDQWdJZkFoa2lBQUFBQWx3U0ZsekFBQUFkZ0FBQUhZQlRuc21DQUFBQUJsMFJWaDBVMjltZEhkaGNtVUFkM2QzTG1sdWEzTmpZWEJsTG05eVo1dnVQQm9BQUFCL1NVUkJWQmlWVFkweENzSlFFQVhIYnlTZXdNdWxUV2R2YTZPbGxXSnBDQ0syaWsxT1krY3RRc1lpcS9rREM4dnM3bHZVU3UzVXBVcFdPN1ZDM1RqU3FXVU1EK0dldisxdGlKZDZ5dm95ajl3NzhWQVhLb21SR2JCaW9nY0dBTlNrTm5GNVY0L1IzOVNFMm9hNHF2TjRkdzUzS1lBMzBBRDFQeGJXUUFGOHZwYVlyTldBYU5WMEFBQUFBRWxGVGtTdVFtQ0M"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicBitmapLog", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQm1KTFIwUUFBQUFBQUFENVE3dC9BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUIzUkpUVVVIM2dRWkV4c2Fka1ZHNHdBQUFFRkpSRUZVR05PVnpjc0pBREFJQk5FdDFUSnl0UFBKS2VSbnhBd3NlSGlnOUJOUW1mRURBU3REUUdXWTRRdStjQWhQN013cytqaU94cDR5dk9ZWkxrRkFIVzZYWUMwODhkcWRBQUFBQUVsRlRrU3VRbUND"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicStats", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFBeFNVUkJWSGphWXZ6Ly96OERzWUNKZ1FSQWpPTC9VRXdkaytHbTBkVE5XQlZqdFpvK3ptQWtKUVlCQUFBQS8vOERBTDhIREFscWRHWVJBQUFBQUVsRlRrU3VRbUND"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicLog", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFBa1NVUkJWSGphWXZ6Ly96OERzWUFGaVkxUEZ5TzZZc1pSa3dlSHlRQUFBQUQvL3dNQStmWUlMQWhqbnhZQUFBQUFTVVZPUks1Q1lJST0"},{ name : "__ASSET__:bitmap_flixel_system_debug__Window_GraphicWindowHandle", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFvQUFBQUtDQVlBQUFDTk1zKzlBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQUZCSlJFRlVlTnFNandFS0FDQUlBeFgyeWg3b055MmpRa3lwUWJUMGRFU3FTblllRXZoWE5zRE1ZblhlelZHNHdBME5OVlJaSGpLUEgyaDYvNWwxVzBPaXgzTlRFbDFDSjdxS0MvNExraTdBQUQ1WWZydllMZlJQQUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoCorners", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUVBQUFBQkFDQVlBQUFDcWFYSGVBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQlkxSlJFRlVlTnJrV3d1eW16Z1FsR1Q4d1g1Sk52ZS9UUTYwdFhrdi9tRkFDNjRaMG01TEFwejFPaENxcHJEQnh1NmVuaGtKUnRZWTg2MnhkV1A3eG40MDloM3NIem4yMGRpeHNaTlkwZGlsc2JLeENxd0c4MkQ4M3NDZVg3ZWJoWDFyRHZacVdXTUwyUzhiV3dtT1RXTnZZbDhhKzlyWVg3TC9MTWZiejJ3Yk8yZHljQ2tBQ3JtZ0FTQkZ3QzZ5Ui9BZVNJZ0Jad0lZT0pPQVJDandSZUQ2K1BrTS9sc054OVlDZWlmN055VmdMeGQ5QjYrMzlyZnN2NHNLV2dXY3lmczFlVDRGT3VUOVBnSVFXRWdKQzFCQklZNjhpT20xVVNVWlhIZWhCSnprd0VHQUtoSHZRc0M3a0hRU0FpNEF1b29BcjhuTEtlQkRWR0FEUkRnaTRnSktacy9uNHZWYzNxL1VrVXFBRjVBZllrakNoNUNqM2k4SFNOMzBBQjlDZ0Uwb0FVbXdRa0JKdVVpUHJ5RG1jM205RkNJNkFpcngvZzhnUU1Hci9BdncvcEQ0N2dPYzh2eFFFcFNJQ3ZhbFhKc1Y4Q2J4bndNcFZTYmVMWUVBQkw2WDh5ZUsrMGRCRHdYK0tCRTFPQWdKVUd4YklzQm5VTmEwREI3azlSRkszeGtraGpFK3hMc2h3SDRrZUQrQUNFM0VXc1cwVkI0QW0xWUFMWmMyZzlwK0lQQUhxdmxWSk5iTlNFOC9vZ0QrYm93SXZMWVR4eDBCMTE0STJJZ3RNZ0NxSHp4Q3lWUFpsMVRxbmdteTcxcVdsR1poYjZqOEZZUnRUOGt3eXdUb2lZQVhFZkQxTDRKOGxCZzdrSFF2d0d2NDc1Y0F4b09RMEJHQTRNODB6T1doN2JNOVBsUUZzWE0xNUlRU0JrWWhFbFlaZ01haGJxeld2d0o4MzIvYWdBbzhPSzZDb1R1VFVDTUJPTkJoNzc4YThKakU2R2wwV29FS0NzQjYwaktJRTV3TGxic3hZL2ZmZ1FoV0ErYXVNa0NDeVFMU0x3Zkd2Zm5OeVdBVmxLU0VRc2NCUlVUNmZpS2VUeW1ocGx6QUpGd0pLQlAxZnFvSzRMQ3RZYUtFSkRoSDRLc1pTRDgwTnFnREpGd3R3emNrbWFtSGdROGt3NHBJV0RqeS90UVZFQ01pUmtMbElqYzFwK2oxUGdKOElDRldMbkZuMTgvTSsxWGdIdWFOQXVvQk56dW1Gdis5WWVBQ1NXL29sSGVxT2VER2hpcGc2dU9BS0JFdVVmYm1zREVKRlpQZ1RQcWh4bHhJQ0QybTZ3Z1krOGhxVHZuQXU1bDZQVFl6dkZPRCt3T2tINW9YZE9kY1l2dzg1ZEdnSHhvT3pveDdiaitYSE5BZGMyYittMDlNazQyYmFlSWJzbGtsd1A0cFlFUHZYZVFEcVMvUGFsTUZoR3lPS3Jqck8zSXpCODBLdm51czdoTGVueklwc2NmbmQ2cDNpVENZaStkakpEZ2t3TTI4SW9SYTdib2NNR2NWaE1CamE1M3JYZ1NJbUVNSkRMWGNJdVlGZGxzdUlpVE1EZnhObDZrTGdIZG1Yb21RUTBCYlp6c0N0SWRXRDA1OVlHUURCSEJ2c2JiUVpZN0FZM3hNT1JuYW52aS9VVUJHS3BoVFNXVHBZM2Q1aTNuWm5sanBtNTU4WUNlWStFS0xMQlRyQ2dsWXc0bU13c0JNWkdnY0d2bTVsUGVOdE1sZDI4YUZpQlVSNEdES1hKdGhEWXV2bnV2SEZJREFPd1VnQVdzS0IrNFB0aWJjbWhxN0RXVk11TkY1N08yc01mY2wrbGFWNE5xaXE3VUhOd0owQXlmTzhnVnNqMC9kWDdPSlAydi9ZKzhPbWVveStDVTRkdzFxdjRaQUxuOCtGK05HNlJBQi9oYzkrOHg1UG51ZFBhOXJCWElOQVNWZ0srQnpjN3MyQ0lIR1dtZTVXenNXTGo0U0Zxd2VQd0kwMzlwRHI3UGtOMkJyVkVDN3RZc0plRjBncnI3Z0xqSm53azlmWGxYdWVLaTdCTkNxN3EzNTJTNi9WUVZzNVlzS0h0dmxhMkFZMXduZVBXSXkvOCtUSkp1WTZOaEF0a2ZRT3lLZ2E1ZlBoVFgwUGk0OHhEc29xV2JLWnl1aER6eU84VlgyQ253WEljRXBBVXZ5UEpaQWpDdGRXZnFLbmlMYjQza3VkUnNCck10b1B4RUpMVzZMWlhCbjd0Y0xlQ0lnSXhYRXdpRkZRbXdNMFZmelkwdHBPZXVyOTNQQjlFbE1sYUR5YnovVExTc3pKdDR5YitCSGxrUlFUQWtwRXZ6STBoa2I0ckxzMmZ0YklPQU5iQXRWNExwZVlHZCtManIwZ2RLSGlhVnZQZEV6OGtIb2xyYUwxSHYydmtxL1hVWGVyaUQvVEdxb2NQSDB5ZHl2dXViWXFzejlpbTFWZ251Z01neXArVFl5ekkxTmNIQm1pM01aWFIxL3hLVCtyd0FEQUFKQmFpQW1tNXh3QUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_input_mouse__FlxMouse_GraphicCursor", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUJnQUFBQWdDQVlBQUFBSVhyZzRBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQW1SSlJFRlVlTnEwbHM5ckUwRVV4Nzg3MllTZ0psVFNTaVdwVnZyRElxaEZVSUtnK0NlSUlncWVGRS9pVFJDOHBMUVhqeUwwNGc5Q29tWFRKSVcwT1ZVRU1UZEJSSWs1VzZXdGtLSlNiR25EcHNuNlprMlczVFFicytua3dkdVpuVm0rbjMwenczc2pCVUxCQ0lBcGRNbGMrL3orZDlScTVMbHVBT1JhTzhrZkR5ZW5XMGJ5YU9LZVl3RGpEMDNUZEFnSlJFUkhJTkVlYUpWS0ZZeEprQ1NKajAzWVJYTC85bVZib2Q2QmtIMEV1bWxTdlNjMEVnTnc1ZXAxakE2UENJY1lnQU0rUDU0OG5zYXh3VUdoRUdaKzJTaFZNSjlLNCtqQUVXRVFDMkM3cEVKakhpeWswd2dGZzBJZ3JIRmdhYm1vaTJkbWt6amMzNzlueUM3QW44MHQvRjdmMFBlQ1F3NzE5UmtRT29xUlBRTzRmVjBwNnUzdzBCQXl5U1FDZ1VESGtLYUE0czkxYkc2VjlQN3hrVkU5a29NOVBSMUJtTjNFVWkwS2JpZkd4akNuS1BEN2ZJNGh0b0RWNGkrbzVSM2ovZlRKVXdSSk9JYllBbmgrK3I2NlpoazdNejRPSlI2SDErdHRHOEphVFg3N3NZWkt0V29aQzU4OWg5U3JtYlloTFFHcXVxTXZWYU9kRDRjeEU0M0M0M2JEVkU4aWpnR05tMjIyU3hjdUl2Nzh4WDhoY2l2eFdTV0dmUDRUYmV4K0VtcitLVjhxdFZ3MlEyQ3U4YmFBVk9JbEZ1YlQvejZTWFdBdTF1N1J0MENhQXJJa25Na2t3UXVjTE11UW1PUTBReGlRWFlEWGkxa2thR2tZWTVEZExqNzBsdnhCaDhuVVl3SGtjbThRaXo0MUw4a2lMM1pVbzdjN3Jja0c0T09IOXlnVThuQVRzMWI4cytUWFNGd1ZVbkMrRkQ3VFh4czNpemtSNGtZRUx1c0o0ZUkzbTRuYkxZT1RWS0dRM3hEeDU1YUxWNjBmSTcvRDg1ekltMTA5Z21ma3QwU0wxMi9YdmRUZTdkYjEvYThBQXdDWlVNUU16UW9keXdBQUFBQkpSVTVFcmtKZ2dnPT0"},{ name : "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMinimizeButton", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFvQUFBQUtDQVlBQUFDTk1zKzlBQUFBQm1KTFIwUUEvd0QvQVArZ3ZhZVRBQUFBQ1hCSVdYTUFBQUIyQUFBQWRnRk9leVlJQUFBQUIzUkpUVVVIM2dNSkNSMDFlRVp4RlFBQUFEOUpSRUZVR05OaitQLy8vMzhHQWdDdUJzWkExb1JOREM2QnJoQ1p6L1QvLzM4bWZOWVQ0elR5QUNPNjhZeU1qRmpGbUpBbHNacUVMRWRVOEJBYjRBQzRjRkxGc3d1SW53QUFBQUJKUlU1RXJrSmdnZz09"},{ name : "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoLight", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUVBQUFBQkFDQVlBQUFDcWFYSGVBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQnE1SlJFRlVlTnJVVzR0dTR6WVE1TktVYzNmcHQvYWYrcE01MjVLNFJRQ3gySnZiRi8xSTJ3Q0VaRWQyTk1QWnQwTGx6Ny9LQzMvb1NkL0RyN3JCOXNXZzZVN0E5Q295MmhjQXB3ZStpNFB2NC84Q0FSUzhSM2VBbE5ld3VBNC9RNCtTMEw0SU9EMWdDcFM0RC81cUFpeEFsSHd2SW9PVHBQQ0VtcDVHQUUwQ0orTzZqQk5rQjlSVFRLSTlDTndDR0wwWDdUd0xnS3lBWlllSUtUVTg2Z1ExSXNaN1ZRRS9TNEE4NzQ0S1h1b0RNdktPVm5XVWdJQ3NSUWNKRkpBeFJVeDdFSHlGY3dSY0EySTg4QU5rRjY5SlVRWTdEalEwaDVZQWI1RkFEdUFxRnNGNWhvQU93UHZ4K1E0cTZBYjR0Qis0eHdscTREWGdKK1cxWmc3c0VERFdMc0NpQ1hqK0ljd1ZXbkwzU1pFK0FwWkFjVlZGRmFSNGRqN0FzZ0MrSDUvWndROGcwRzRvd1EyUjdRNnZYNVhkSHlBYkFHOEtHZmdkMnU0UDRKczR4OWZqZm5ieG5YMDJTclNKM2RkMi9pU09UUnkxZFlMcjBRZDBBRDhBeTRYa2FVUjRvZkkzTWxvaXhkWGlPMG9ld1M2d21xSUdWSUFrUUlKZWp6WCszbVlrUldnS2x2Ui9lZDBtS2poTi9pY0Q5RmtjeitMMzQ5b0t6cENGbzBQZ0RmeUk1ZUZaMmUzeWlBL3draHEwOHdVQXY4SDVJb2lRU2tCUExuZitKcFpHZ0JWQ2krSVV6YWpRa3BWZURhUXZ3WDg3UUkvMVRmeE9tb1NtQUFSL0ZZUlI0RGhMMER0SU9VRnliSitVVUllN1AwQi9QNERMOVNaSWtHYkFRSUFFdjRqZEw0cGlNR21xQWp3Wi9RVFZDVklpSDdETW9BRUJBL0FuQ1QrTzQzZEJ6aG5zZWhBZzdmNFQvRThnQ3NIdlNzSlVJVzBtbzcvSVVSZ2tKd3lpL1dzRWZBSitQd2dZUzVyRzRoRHdDZjRDU2lsR2xyZ2JaS0FTckVZclo0b2hMZDNGMEhkV0NQaHhrUEN1S0dFUkpFb0h1QjdnaDBwSUFhOGxSaWVSTVZZbFd6VHJnMHd4cEJFaGZjRWlTSkFFSUFudmdvQXpSQUpwLzJkbDUyVitzRUtJYk1mN0o1RU00YkljSWJWRTFXZWx2bG9PZ0k0UUNaQ21nQXBZaGRldjRzWXQ4R05wOVlaSHdpOUtpRExCNGhSQUo4TVJuc0VSRG4vd0J4Q3dnTk5hUWZvTXdHVmtXSlQwR2plcVo3ckhUUWtSTldoalJabmdHWlNBSmpITW9JRUNic0lrQnZnQi9BMXlDU3Uxcm80RDU0d1BvQ0FaaWtwZ0xTcThLZUZ4Z0tuQ0I4aW9JTUZmSUwxdWlWTGJhNzJGWVRBVEZTaHdqTTFSeGpDUlJlejRKbXI5TTZUTkMrUU5sdXk5QnF4cEJqTzFnQlVleVZBRGtxRVJVK0hHUmlSb3prNlRrNm5TN0N5eUpZWVRzeDNpQW0xeEN0cG94ZWtZUlUzVnUwQVh1TW1aMlI4N0ZSZzcvVDJyMVYyVWZvRDNXYTk5bmhtcjNhMEE3WTk3N1d4TVQzZFk2MEV3SmtJYnRMMnNuUDllOEdZWUpLZU5aTzF3VDdTeE1HbTVpci9KSWd6dVVQL2Z4R2MyY2R3VVFsQTkzc3pBRElQUkdKcVYzbDBQMmxpeXJKV2xMWW5QVk1nRHJzcTZBUUdhU3Rnd3lSSjFoVnBDTWw3ZkhuY2VnVjlFL0Vid0MrUUJzZ3orT0k2WFl3MHlWa1VORmhIZUlOWE5BNnkrR2twdGQzYitDbVZ0aGZSMmhZS25ReW44QVNSY3dUUlFBWmFQaUtLYW1ncVQ0Z09zY1pVbCtjWG81bGdWWDRmTTd3T1dSOFNtQUk4YzVUOEthY2FPRjRNRWRxUXZuVnd6cXJvVkNDQWdZQld5bCtDUmdCV1VnSW9vR1FjWW1ZQVg0anFFdEhiY21CeVdrTkx4dllGUGtBckFqdEJGVVlFa3dsSUFubk1tQ2hSbnlvbzl0azNKNkc3S0VGVHVyblJ5NkJUeEd1bEFmOExTRklBT2taMlErRnRWT0JNR05UVnNrUGRYQXp6dVBqWkZPNWpCVGV5MGpBWVhKVS9ZamR6QWNvUnVGR0NuZHU0d2t4dm5ZMngxVlZTek83dGZ3UVIyVUFIbUJSZHh0SnhnRDU0eWNVM0E2NkdqS2V4S3I2REF6ck1DQ25jZkJ5TmFQbkZUdlArcWhNTTlDSU4zT1VFckJTYVIxR3lKTWZkTk5FS3QyV0EzU0pESHEyUDdtZDNIOUQ1VkRHbFBjZlNnNVl4Z21taDV6VXlIVjZXbXNNQjNweVpJSzhDZHBSdkFOeU5ibEFTY2xLNU9FVTdRZXo1Z0Qyb0JiL2VuTTBFdkg3Q2V5Y0dFYVFCcHg4MWxtcGRlaldFOUtUSlRLdk1qaVZCSlBKT3p3WmdMbldBTituajRqSkJHUkUvbS96elRGR21KM2ZjYURkM0lGYW80N2tyTHF6Z0U0UENUamVaSWxQV0Z1NS90Q211NUFRNGdHRVpaVlF3cHZhZkROQ2ZibmVKTEE1d3BnKzl1aVZId1hsZUlRSDlnTlRpTEUyVllxZTZpZmlGUE5IZW5HaUxraEVRQ1U4RHFyMExPRUQwMm55R2lPS0dPWnh1aldSTW9Tbmkwd2lRcFQyaVEwNGttQnp3N3RRZ0hOcDhpWW1ZeTVEMTBxRDJwVGNiTWdCTmtsNENFakpON3lmOExjS0tEck8yOE5ZTG53QXk4bHJ5MzAwODFnZG5Ka1VXSU5YVGxoQkl5NzAwUFJlNGx3RXFPTEFkcDNTQWxBSEJ5V0hNWCtHY29nQnhpSWpJeWl1STdydmt5QWlJMXpONGtUeWpqS2VDZlFVQlcyc1dwS1NJbitCTGd6eVlnVXNXak4vNi8rdS94NkticDN3QnEvZnd0d0FDRGVkRE1KazlyRWdBQUFBQkpSVTVFcmtKZ2dnPT0"},{ name : "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicFlixel", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicConsole", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFCVVNVUkJWSGphdEpIUkNVQWhEQVBqRzhVVjNNbmhuTVZaWE9IOFVTaFBoSW9ZeUUrNXRJRUdRRjU5T3BDRm82UXFLVzFwd0RvRERTaS91WUFGbmk0amxEM3d2SUlOWEcxMmQ0NUFCZEt1V25qMmxENEFLVWJYUXNkOGx3a0FBQUFBU1VWT1JLNUNZSUk9"},{ name : "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicEraserTool", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicDrawDebug", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQUU5SlJFRlVlTnEwa01zTkFDQUlRNnRic3FCcjF2Z25haFFQTnVrRlhna3BTS0phZUZhWVFWSGg1WWdWbEFiZjFJN1E1UVRnc0pmZTBlTkJYMkFwajR4V2RxWnV4QUwzUnRJZ0dLdERGR0FBNGg0Vk01NWl5QnNBQUFBQVNVVk9SSzVDWUlJPQ"}];
var __map_reserved = {};
var ArrayBuffer = $global.ArrayBuffer || js_html_compat_ArrayBuffer;
if(ArrayBuffer.prototype.slice == null) {
	ArrayBuffer.prototype.slice = js_html_compat_ArrayBuffer.sliceImpl;
}
var DataView = $global.DataView || js_html_compat_DataView;
var Float32Array = $global.Float32Array || js_html_compat_Float32Array._new;
var Uint8Array = $global.Uint8Array || js_html_compat_Uint8Array._new;
var this1 = new Uint32Array(256);
lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16 = this1;
var _g = 0;
while(_g < 256) {
	var i = _g++;
	lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[i] = Math.ceil(i * 257.00392156862745);
}
var this2 = new Uint8Array(510);
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp = this2;
var _g1 = 0;
while(_g1 < 255) {
	var i1 = _g1++;
	lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[i1] = i1;
}
var _g11 = 255;
var _g2 = 511;
while(_g11 < _g2) {
	var i2 = _g11++;
	lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[i2] = 255;
}
lime_system_CFFI.available = false;
lime_system_CFFI.enabled = false;
if(window.createjs != null) {
	createjs.Sound.alternateExtensions = ["ogg","mp3","wav"];
}
openfl_ui_Multitouch.maxTouchPoints = 2;
openfl_ui_Multitouch.supportedGestures = null;
openfl_ui_Multitouch.supportsGestureEvents = false;
openfl_display_DisplayObject.__instanceCount = 0;
openfl_display_DisplayObject.__worldRenderDirty = 0;
openfl_display_DisplayObject.__worldTransformDirty = 0;
openfl_display_DisplayObject.__cacheAsBitmapMode = false;
Reg.score = 0;
Reg.hotdogs = 10;
Reg.highScore = 0;
Reg.saves = [];
flixel_math_FlxRect._pool = new flixel_util_FlxPool_$flixel_$math_$FlxRect(flixel_math_FlxRect);
flixel_FlxObject.defaultPixelPerfectPosition = false;
flixel_FlxObject.SEPARATE_BIAS = 4;
flixel_FlxObject.LEFT = 1;
flixel_FlxObject.RIGHT = 16;
flixel_FlxObject.UP = 256;
flixel_FlxObject.DOWN = 4096;
flixel_FlxObject.NONE = 0;
flixel_FlxObject.CEILING = 256;
flixel_FlxObject.FLOOR = 4096;
flixel_FlxObject.WALL = 17;
flixel_FlxObject.ANY = 4369;
flixel_FlxObject._firstSeparateFlxRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	$r = rect;
	return $r;
}(this));
flixel_FlxObject._secondSeparateFlxRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	$r = rect;
	return $r;
}(this));
Xml.Element = 0;
Xml.PCData = 1;
Xml.CData = 2;
Xml.Comment = 3;
Xml.DocType = 4;
Xml.ProcessingInstruction = 5;
Xml.Document = 6;
flixel_math_FlxPoint._pool = new flixel_util_FlxPool_$flixel_$math_$FlxPoint(flixel_math_FlxPoint);
openfl_display_LoaderInfo.__rootURL = window.document.URL;
openfl_system_ApplicationDomain.currentDomain = new openfl_system_ApplicationDomain(null);
openfl_geom_Matrix.__identity = new openfl_geom_Matrix();
openfl_geom_Matrix.__temp = new openfl_geom_Matrix();
flixel_FlxCamera.drawVertices = (function($this) {
	var $r;
	var this1 = new openfl_VectorData();
	var this2 = new Array(0);
	this1.data = this2;
	this1.length = 0;
	this1.fixed = false;
	$r = this1;
	return $r;
}(this));
flixel_FlxCamera.trianglesSprite = new openfl_display_Sprite();
flixel_FlxCamera.renderPoint = (function($this) {
	var $r;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	$r = point;
	return $r;
}(this));
flixel_FlxCamera.renderRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	$r = rect;
	return $r;
}(this));
flixel_system_FlxVersion.sha = "";
js_Boot.__toStr = ({ }).toString;
flixel_math_FlxRandom._arrayFloatHelper = null;
flixel_math_FlxRandom.MULTIPLIER = 48271.0;
flixel_math_FlxRandom.MODULUS = 2147483647;
flixel_FlxG.autoPause = true;
flixel_FlxG.fixedTimestep = true;
flixel_FlxG.timeScale = 1;
flixel_FlxG.worldDivisions = 6;
flixel_FlxG.VERSION = new flixel_system_FlxVersion(4,3,0);
flixel_FlxG.elapsed = 0;
flixel_FlxG.maxElapsed = 0.1;
flixel_FlxG.scaleMode = new flixel_system_scaleModes_RatioScaleMode();
flixel_FlxG.worldBounds = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	$r = rect;
	return $r;
}(this));
flixel_FlxG.save = new flixel_util_FlxSave();
flixel_FlxG.random = new flixel_math_FlxRandom();
flixel_FlxG.swipes = [];
flixel_FlxG.html5 = new flixel_system_frontEnds_HTML5FrontEnd();
flixel_FlxG.inputs = new flixel_system_frontEnds_InputFrontEnd();
flixel_FlxG.console = new flixel_system_frontEnds_ConsoleFrontEnd();
flixel_FlxG.log = new flixel_system_frontEnds_LogFrontEnd();
flixel_FlxG.bitmapLog = new flixel_system_frontEnds_BitmapLogFrontEnd();
flixel_FlxG.watch = new flixel_system_frontEnds_WatchFrontEnd();
flixel_FlxG["debugger"] = new flixel_system_frontEnds_DebuggerFrontEnd();
flixel_FlxG.bitmap = new flixel_system_frontEnds_BitmapFrontEnd();
flixel_FlxG.cameras = new flixel_system_frontEnds_CameraFrontEnd();
flixel_FlxG.initialWidth = 0;
flixel_FlxG.initialHeight = 0;
flixel_FlxG.initialZoom = 0;
flixel_FlxG.signals = new flixel_system_frontEnds_SignalFrontEnd();
flixel_animation_FlxPrerotatedAnimation.PREROTATED = "prerotated_animation";
flixel_effects_FlxFlicker._pool = new flixel_util_FlxPool_$flixel_$effects_$FlxFlicker(flixel_effects_FlxFlicker);
flixel_effects_FlxFlicker._boundObjects = new haxe_ds_ObjectMap();
flixel_graphics_FlxGraphic.defaultPersist = false;
flixel_graphics_atlas_FlxAtlas.point = new openfl_geom_Point();
flixel_graphics_atlas_FlxAtlas.matrix = new openfl_geom_Matrix();
flixel_graphics_atlas_FlxAtlas.defaultMinSize = new flixel_math_FlxPoint(128,128);
flixel_graphics_atlas_FlxAtlas.defaultMaxSize = new flixel_math_FlxPoint(1024,1024);
flixel_graphics_tile_FlxDrawTrianglesItem.point = (function($this) {
	var $r;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	$r = point;
	return $r;
}(this));
flixel_graphics_tile_FlxDrawTrianglesItem.rect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	var rect = _this;
	rect._inPool = false;
	$r = rect;
	return $r;
}(this));
openfl_display_Tilesheet.TILE_SCALE = 1;
openfl_display_Tilesheet.TILE_ROTATION = 2;
openfl_display_Tilesheet.TILE_RGB = 4;
openfl_display_Tilesheet.TILE_ALPHA = 8;
openfl_display_Tilesheet.TILE_TRANS_2x2 = 16;
openfl_display_Tilesheet.TILE_RECT = 32;
openfl_display_Tilesheet.TILE_ORIGIN = 64;
openfl_display_Tilesheet.TILE_TRANS_COLOR = 128;
openfl_display_Tilesheet.TILE_BLEND_NORMAL = 0;
openfl_display_Tilesheet.TILE_BLEND_ADD = 65536;
openfl_display_Tilesheet.TILE_BLEND_MULTIPLY = 131072;
openfl_display_Tilesheet.TILE_BLEND_SCREEN = 262144;
openfl_display_Tilesheet.TILE_BLEND_SUBTRACT = 524288;
openfl_display_Tilesheet.TILE_BLEND_DARKEN = 1048576;
openfl_display_Tilesheet.TILE_BLEND_LIGHTEN = 2097152;
openfl_display_Tilesheet.TILE_BLEND_OVERLAY = 4194304;
openfl_display_Tilesheet.TILE_BLEND_HARDLIGHT = 8388608;
openfl_display_Tilesheet.TILE_BLEND_DIFFERENCE = 16777216;
openfl_display_Tilesheet.TILE_BLEND_INVERT = 33554432;
openfl_display_Tilesheet.__defaultPoint = new openfl_geom_Point(0,0);
flixel_graphics_tile_FlxTilesheet._DRAWCALLS = 0;
flixel_input_FlxPointer._cachedPoint = new flixel_math_FlxPoint();
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_StringMap();
	if(__map_reserved["ANY"] != null) {
		_g.setReserved("ANY",-2);
	} else {
		_g.h["ANY"] = -2;
	}
	if(__map_reserved["A"] != null) {
		_g.setReserved("A",0);
	} else {
		_g.h["A"] = 0;
	}
	if(__map_reserved["B"] != null) {
		_g.setReserved("B",1);
	} else {
		_g.h["B"] = 1;
	}
	if(__map_reserved["X"] != null) {
		_g.setReserved("X",2);
	} else {
		_g.h["X"] = 2;
	}
	if(__map_reserved["Y"] != null) {
		_g.setReserved("Y",3);
	} else {
		_g.h["Y"] = 3;
	}
	if(__map_reserved["LEFT_SHOULDER"] != null) {
		_g.setReserved("LEFT_SHOULDER",4);
	} else {
		_g.h["LEFT_SHOULDER"] = 4;
	}
	if(__map_reserved["RIGHT_SHOULDER"] != null) {
		_g.setReserved("RIGHT_SHOULDER",5);
	} else {
		_g.h["RIGHT_SHOULDER"] = 5;
	}
	if(__map_reserved["BACK"] != null) {
		_g.setReserved("BACK",6);
	} else {
		_g.h["BACK"] = 6;
	}
	if(__map_reserved["START"] != null) {
		_g.setReserved("START",7);
	} else {
		_g.h["START"] = 7;
	}
	if(__map_reserved["LEFT_STICK_CLICK"] != null) {
		_g.setReserved("LEFT_STICK_CLICK",8);
	} else {
		_g.h["LEFT_STICK_CLICK"] = 8;
	}
	if(__map_reserved["RIGHT_STICK_CLICK"] != null) {
		_g.setReserved("RIGHT_STICK_CLICK",9);
	} else {
		_g.h["RIGHT_STICK_CLICK"] = 9;
	}
	if(__map_reserved["GUIDE"] != null) {
		_g.setReserved("GUIDE",10);
	} else {
		_g.h["GUIDE"] = 10;
	}
	if(__map_reserved["DPAD_UP"] != null) {
		_g.setReserved("DPAD_UP",11);
	} else {
		_g.h["DPAD_UP"] = 11;
	}
	if(__map_reserved["DPAD_DOWN"] != null) {
		_g.setReserved("DPAD_DOWN",12);
	} else {
		_g.h["DPAD_DOWN"] = 12;
	}
	if(__map_reserved["DPAD_LEFT"] != null) {
		_g.setReserved("DPAD_LEFT",13);
	} else {
		_g.h["DPAD_LEFT"] = 13;
	}
	if(__map_reserved["DPAD_RIGHT"] != null) {
		_g.setReserved("DPAD_RIGHT",14);
	} else {
		_g.h["DPAD_RIGHT"] = 14;
	}
	if(__map_reserved["LEFT_TRIGGER_BUTTON"] != null) {
		_g.setReserved("LEFT_TRIGGER_BUTTON",15);
	} else {
		_g.h["LEFT_TRIGGER_BUTTON"] = 15;
	}
	if(__map_reserved["RIGHT_TRIGGER_BUTTON"] != null) {
		_g.setReserved("RIGHT_TRIGGER_BUTTON",16);
	} else {
		_g.h["RIGHT_TRIGGER_BUTTON"] = 16;
	}
	if(__map_reserved["LEFT_TRIGGER"] != null) {
		_g.setReserved("LEFT_TRIGGER",17);
	} else {
		_g.h["LEFT_TRIGGER"] = 17;
	}
	if(__map_reserved["RIGHT_TRIGGER"] != null) {
		_g.setReserved("RIGHT_TRIGGER",18);
	} else {
		_g.h["RIGHT_TRIGGER"] = 18;
	}
	if(__map_reserved["LEFT_ANALOG_STICK"] != null) {
		_g.setReserved("LEFT_ANALOG_STICK",19);
	} else {
		_g.h["LEFT_ANALOG_STICK"] = 19;
	}
	if(__map_reserved["RIGHT_ANALOG_STICK"] != null) {
		_g.setReserved("RIGHT_ANALOG_STICK",20);
	} else {
		_g.h["RIGHT_ANALOG_STICK"] = 20;
	}
	if(__map_reserved["DPAD"] != null) {
		_g.setReserved("DPAD",21);
	} else {
		_g.h["DPAD"] = 21;
	}
	if(__map_reserved["TILT_PITCH"] != null) {
		_g.setReserved("TILT_PITCH",26);
	} else {
		_g.h["TILT_PITCH"] = 26;
	}
	if(__map_reserved["TILT_ROLL"] != null) {
		_g.setReserved("TILT_ROLL",27);
	} else {
		_g.h["TILT_ROLL"] = 27;
	}
	if(__map_reserved["POINTER_X"] != null) {
		_g.setReserved("POINTER_X",28);
	} else {
		_g.h["POINTER_X"] = 28;
	}
	if(__map_reserved["POINTER_Y"] != null) {
		_g.setReserved("POINTER_Y",29);
	} else {
		_g.h["POINTER_Y"] = 29;
	}
	if(__map_reserved["EXTRA_0"] != null) {
		_g.setReserved("EXTRA_0",30);
	} else {
		_g.h["EXTRA_0"] = 30;
	}
	if(__map_reserved["EXTRA_1"] != null) {
		_g.setReserved("EXTRA_1",31);
	} else {
		_g.h["EXTRA_1"] = 31;
	}
	if(__map_reserved["EXTRA_2"] != null) {
		_g.setReserved("EXTRA_2",32);
	} else {
		_g.h["EXTRA_2"] = 32;
	}
	if(__map_reserved["EXTRA_3"] != null) {
		_g.setReserved("EXTRA_3",33);
	} else {
		_g.h["EXTRA_3"] = 33;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_UP"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_UP",34);
	} else {
		_g.h["LEFT_STICK_DIGITAL_UP"] = 34;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_RIGHT"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_RIGHT",35);
	} else {
		_g.h["LEFT_STICK_DIGITAL_RIGHT"] = 35;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_DOWN"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_DOWN",36);
	} else {
		_g.h["LEFT_STICK_DIGITAL_DOWN"] = 36;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_LEFT"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_LEFT",37);
	} else {
		_g.h["LEFT_STICK_DIGITAL_LEFT"] = 37;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_UP"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_UP",38);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_UP"] = 38;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_RIGHT"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_RIGHT",39);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_RIGHT"] = 39;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_DOWN"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_DOWN",40);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_DOWN"] = 40;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_LEFT"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_LEFT",41);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_LEFT"] = 41;
	}
	$r = _g;
	return $r;
}(this));
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.toStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_IntMap();
	_g.h[-2] = "ANY";
	_g.h[0] = "A";
	_g.h[1] = "B";
	_g.h[2] = "X";
	_g.h[3] = "Y";
	_g.h[4] = "LEFT_SHOULDER";
	_g.h[5] = "RIGHT_SHOULDER";
	_g.h[6] = "BACK";
	_g.h[7] = "START";
	_g.h[8] = "LEFT_STICK_CLICK";
	_g.h[9] = "RIGHT_STICK_CLICK";
	_g.h[10] = "GUIDE";
	_g.h[11] = "DPAD_UP";
	_g.h[12] = "DPAD_DOWN";
	_g.h[13] = "DPAD_LEFT";
	_g.h[14] = "DPAD_RIGHT";
	_g.h[15] = "LEFT_TRIGGER_BUTTON";
	_g.h[16] = "RIGHT_TRIGGER_BUTTON";
	_g.h[17] = "LEFT_TRIGGER";
	_g.h[18] = "RIGHT_TRIGGER";
	_g.h[19] = "LEFT_ANALOG_STICK";
	_g.h[20] = "RIGHT_ANALOG_STICK";
	_g.h[21] = "DPAD";
	_g.h[26] = "TILT_PITCH";
	_g.h[27] = "TILT_ROLL";
	_g.h[28] = "POINTER_X";
	_g.h[29] = "POINTER_Y";
	_g.h[30] = "EXTRA_0";
	_g.h[31] = "EXTRA_1";
	_g.h[32] = "EXTRA_2";
	_g.h[33] = "EXTRA_3";
	_g.h[34] = "LEFT_STICK_DIGITAL_UP";
	_g.h[35] = "LEFT_STICK_DIGITAL_RIGHT";
	_g.h[36] = "LEFT_STICK_DIGITAL_DOWN";
	_g.h[37] = "LEFT_STICK_DIGITAL_LEFT";
	_g.h[38] = "RIGHT_STICK_DIGITAL_UP";
	_g.h[39] = "RIGHT_STICK_DIGITAL_RIGHT";
	_g.h[40] = "RIGHT_STICK_DIGITAL_DOWN";
	_g.h[41] = "RIGHT_STICK_DIGITAL_LEFT";
	$r = _g;
	return $r;
}(this));
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.ANY = -2;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.NONE = -1;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.A = 0;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.B = 1;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.X = 2;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.Y = 3;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_SHOULDER = 4;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_SHOULDER = 5;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.BACK = 6;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.START = 7;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_CLICK = 8;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_CLICK = 9;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.GUIDE = 10;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_UP = 11;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_DOWN = 12;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_LEFT = 13;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_RIGHT = 14;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_TRIGGER_BUTTON = 15;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_TRIGGER_BUTTON = 16;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_TRIGGER = 17;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_TRIGGER = 18;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_ANALOG_STICK = 19;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_ANALOG_STICK = 20;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD = 21;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.TILT_PITCH = 26;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.TILT_ROLL = 27;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.POINTER_X = 28;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.POINTER_Y = 29;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_0 = 30;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_1 = 31;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_2 = 32;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_3 = 33;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_UP = 34;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_RIGHT = 35;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_DOWN = 36;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_LEFT = 37;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_UP = 38;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_RIGHT = 39;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_DOWN = 40;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_LEFT = 41;
openfl_ui_GameInput.isSupported = true;
openfl_ui_GameInput.numDevices = 0;
openfl_ui_GameInput.__deviceList = [];
openfl_ui_GameInput.__devices = new haxe_ds_ObjectMap();
openfl_ui_GameInput.__instances = [];
flixel_input_gamepad_FlxGamepadManager._gameInput = new openfl_ui_GameInput();
flixel_input_gamepad_id_LogitechID.ONE = 0;
flixel_input_gamepad_id_LogitechID.TWO = 1;
flixel_input_gamepad_id_LogitechID.THREE = 2;
flixel_input_gamepad_id_LogitechID.FOUR = 3;
flixel_input_gamepad_id_LogitechID.FIVE = 4;
flixel_input_gamepad_id_LogitechID.SIX = 5;
flixel_input_gamepad_id_LogitechID.SEVEN = 6;
flixel_input_gamepad_id_LogitechID.EIGHT = 7;
flixel_input_gamepad_id_LogitechID.NINE = 8;
flixel_input_gamepad_id_LogitechID.TEN = 9;
flixel_input_gamepad_id_LogitechID.LEFT_STICK_CLICK = 10;
flixel_input_gamepad_id_LogitechID.RIGHT_STICK_CLICK = 11;
flixel_input_gamepad_id_LogitechID.DPAD_UP = 16;
flixel_input_gamepad_id_LogitechID.DPAD_DOWN = 17;
flixel_input_gamepad_id_LogitechID.DPAD_LEFT = 18;
flixel_input_gamepad_id_LogitechID.DPAD_RIGHT = 19;
flixel_input_gamepad_id_LogitechID.LOGITECH = -5;
flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 24, down : 25, left : 26, right : 27});
flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 28, down : 29, left : 30, right : 31});
flixel_input_gamepad_id_MFiID.A = 6;
flixel_input_gamepad_id_MFiID.B = 7;
flixel_input_gamepad_id_MFiID.X = 8;
flixel_input_gamepad_id_MFiID.Y = 9;
flixel_input_gamepad_id_MFiID.LB = 15;
flixel_input_gamepad_id_MFiID.RB = 16;
flixel_input_gamepad_id_MFiID.BACK = 10;
flixel_input_gamepad_id_MFiID.START = 12;
flixel_input_gamepad_id_MFiID.LEFT_STICK_CLICK = 13;
flixel_input_gamepad_id_MFiID.RIGHT_STICK_CLICK = 14;
flixel_input_gamepad_id_MFiID.GUIDE = 11;
flixel_input_gamepad_id_MFiID.DPAD_UP = 17;
flixel_input_gamepad_id_MFiID.DPAD_DOWN = 18;
flixel_input_gamepad_id_MFiID.DPAD_LEFT = 19;
flixel_input_gamepad_id_MFiID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 25, down : 26, left : 27, right : 28});
flixel_input_gamepad_id_MFiID.LEFT_TRIGGER = 4;
flixel_input_gamepad_id_MFiID.RIGHT_TRIGGER = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_ONE = 8;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_TWO = 9;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_A = 10;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_B = 11;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_MINUS = 12;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_PLUS = 13;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_HOME = 19;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_Z = 14;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_C = 15;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_UP = 4;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_DOWN = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_LEFT = 6;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_RIGHT = 7;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_MINUS = 12;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_PLUS = 13;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_HOME = 19;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_A = 10;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_B = 11;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_ONE = 8;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_TWO = 9;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_Y = 8;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_X = 9;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_B = 10;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_A = 11;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_L = 12;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_R = 13;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_ZL = 14;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_ZR = 15;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_SELECT = 16;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_START = 17;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_HOME = 19;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_ONE = -1;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_TWO = -1;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_UP = 4;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_DOWN = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_LEFT = 6;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_RIGHT = 7;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_POINTER_X = 2;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_POINTER_Y = 3;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 22, down : 23, left : 24, right : 25, threshold : 0.5, mode : flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL});
flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 26, down : 27, left : 28, right : 29});
flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 26, down : 27, left : 28, right : 29});
flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_TRIGGER_FAKE = 4;
flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_TRIGGER_FAKE = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_UP = 22;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_DOWN = 23;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_LEFT = 24;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_RIGHT = 25;
flixel_input_gamepad_id_OUYAID.O = 0;
flixel_input_gamepad_id_OUYAID.U = 3;
flixel_input_gamepad_id_OUYAID.Y = 4;
flixel_input_gamepad_id_OUYAID.A = 1;
flixel_input_gamepad_id_OUYAID.LB = 6;
flixel_input_gamepad_id_OUYAID.RB = 7;
flixel_input_gamepad_id_OUYAID.LEFT_STICK_CLICK = 10;
flixel_input_gamepad_id_OUYAID.RIGHT_STICK_CLICK = 11;
flixel_input_gamepad_id_OUYAID.HOME = 2;
flixel_input_gamepad_id_OUYAID.LEFT_TRIGGER = 8;
flixel_input_gamepad_id_OUYAID.RIGHT_TRIGGER = 9;
flixel_input_gamepad_id_OUYAID.DPAD_LEFT = 13;
flixel_input_gamepad_id_OUYAID.DPAD_RIGHT = 14;
flixel_input_gamepad_id_OUYAID.DPAD_DOWN = 15;
flixel_input_gamepad_id_OUYAID.DPAD_UP = 16;
flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 23, down : 24, left : 25, right : 26});
flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(11,14,{ up : 27, down : 28, left : 29, right : 30});
flixel_input_gamepad_id_OUYAID.LEFT_TRIGGER_ANALOG = 17;
flixel_input_gamepad_id_OUYAID.RIGHT_TRIGGER_ANALOG = 18;
flixel_input_gamepad_id_PS4ID.X = 6;
flixel_input_gamepad_id_PS4ID.CIRCLE = 7;
flixel_input_gamepad_id_PS4ID.SQUARE = 8;
flixel_input_gamepad_id_PS4ID.TRIANGLE = 9;
flixel_input_gamepad_id_PS4ID.SHARE = 10;
flixel_input_gamepad_id_PS4ID.PS = 11;
flixel_input_gamepad_id_PS4ID.OPTIONS = 12;
flixel_input_gamepad_id_PS4ID.LEFT_STICK_CLICK = 13;
flixel_input_gamepad_id_PS4ID.RIGHT_STICK_CLICK = 14;
flixel_input_gamepad_id_PS4ID.L1 = 15;
flixel_input_gamepad_id_PS4ID.R1 = 16;
flixel_input_gamepad_id_PS4ID.TOUCHPAD_CLICK = 21;
flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 22, down : 23, left : 24, right : 25});
flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 26, down : 27, left : 28, right : 29});
flixel_input_gamepad_id_PS4ID.L2 = 4;
flixel_input_gamepad_id_PS4ID.R2 = 5;
flixel_input_gamepad_id_PS4ID.DPAD_UP = 17;
flixel_input_gamepad_id_PS4ID.DPAD_DOWN = 18;
flixel_input_gamepad_id_PS4ID.DPAD_LEFT = 19;
flixel_input_gamepad_id_PS4ID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_PSVitaID.X = 6;
flixel_input_gamepad_id_PSVitaID.CIRCLE = 7;
flixel_input_gamepad_id_PSVitaID.SQUARE = 8;
flixel_input_gamepad_id_PSVitaID.TRIANGLE = 9;
flixel_input_gamepad_id_PSVitaID.SELECT = 10;
flixel_input_gamepad_id_PSVitaID.START = 12;
flixel_input_gamepad_id_PSVitaID.L = 15;
flixel_input_gamepad_id_PSVitaID.R = 16;
flixel_input_gamepad_id_PSVitaID.DPAD_UP = 17;
flixel_input_gamepad_id_PSVitaID.DPAD_DOWN = 18;
flixel_input_gamepad_id_PSVitaID.DPAD_LEFT = 19;
flixel_input_gamepad_id_PSVitaID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_WiiRemoteID.REMOTE_ONE = 9;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_TWO = 10;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_A = 11;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_B = 12;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_PLUS = 13;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_MINUS = 14;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_HOME = 15;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_A = 9;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_B = 10;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_C = 11;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_Z = 12;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_ONE = 13;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_TWO = 14;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_PLUS = 15;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_MINUS = 16;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_HOME = 17;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_UP = 5;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_DOWN = 6;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_LEFT = 7;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_RIGHT = 8;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_A = 9;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_B = 10;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_Y = 11;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_X = 12;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_L = 13;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_R = 14;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_ZL = 15;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_ZR = 16;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_START = 17;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_SELECT = 18;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_HOME = 19;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_ONE = 20;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_TWO = 21;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_UP = 5;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_DOWN = 6;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_LEFT = 7;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_RIGHT = 8;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_TILT_PITCH = 2;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_TILT_ROLL = 3;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_TILT_PITCH = 3;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_TILT_ROLL = 2;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_NULL_AXIS = 4;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_NULL_AXIS = 4;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 22, down : 23, left : 24, right : 25, threshold : 0.5, mode : flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL});
flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 28, down : 29, left : 30, right : 31});
flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 32, down : 33, left : 34, right : 35});
flixel_input_gamepad_id_WiiRemoteID.LEFT_TRIGGER_FAKE = 4;
flixel_input_gamepad_id_WiiRemoteID.RIGHT_TRIGGER_FAKE = 5;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_UP = 22;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_DOWN = 23;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_LEFT = 24;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_RIGHT = 25;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_X = 26;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_Y = 27;
flixel_input_gamepad_id_XInputID.A = 6;
flixel_input_gamepad_id_XInputID.B = 7;
flixel_input_gamepad_id_XInputID.X = 8;
flixel_input_gamepad_id_XInputID.Y = 9;
flixel_input_gamepad_id_XInputID.BACK = 10;
flixel_input_gamepad_id_XInputID.GUIDE = -1;
flixel_input_gamepad_id_XInputID.START = 12;
flixel_input_gamepad_id_XInputID.LEFT_STICK_CLICK = 13;
flixel_input_gamepad_id_XInputID.RIGHT_STICK_CLICK = 14;
flixel_input_gamepad_id_XInputID.LB = 15;
flixel_input_gamepad_id_XInputID.RB = 16;
flixel_input_gamepad_id_XInputID.DPAD_UP = 17;
flixel_input_gamepad_id_XInputID.DPAD_DOWN = 18;
flixel_input_gamepad_id_XInputID.DPAD_LEFT = 19;
flixel_input_gamepad_id_XInputID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 25, down : 26, left : 27, right : 28});
flixel_input_gamepad_id_XInputID.LEFT_TRIGGER = 4;
flixel_input_gamepad_id_XInputID.RIGHT_TRIGGER = 5;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_StringMap();
	if(__map_reserved["ANY"] != null) {
		_g.setReserved("ANY",-2);
	} else {
		_g.h["ANY"] = -2;
	}
	if(__map_reserved["A"] != null) {
		_g.setReserved("A",65);
	} else {
		_g.h["A"] = 65;
	}
	if(__map_reserved["B"] != null) {
		_g.setReserved("B",66);
	} else {
		_g.h["B"] = 66;
	}
	if(__map_reserved["C"] != null) {
		_g.setReserved("C",67);
	} else {
		_g.h["C"] = 67;
	}
	if(__map_reserved["D"] != null) {
		_g.setReserved("D",68);
	} else {
		_g.h["D"] = 68;
	}
	if(__map_reserved["E"] != null) {
		_g.setReserved("E",69);
	} else {
		_g.h["E"] = 69;
	}
	if(__map_reserved["F"] != null) {
		_g.setReserved("F",70);
	} else {
		_g.h["F"] = 70;
	}
	if(__map_reserved["G"] != null) {
		_g.setReserved("G",71);
	} else {
		_g.h["G"] = 71;
	}
	if(__map_reserved["H"] != null) {
		_g.setReserved("H",72);
	} else {
		_g.h["H"] = 72;
	}
	if(__map_reserved["I"] != null) {
		_g.setReserved("I",73);
	} else {
		_g.h["I"] = 73;
	}
	if(__map_reserved["J"] != null) {
		_g.setReserved("J",74);
	} else {
		_g.h["J"] = 74;
	}
	if(__map_reserved["K"] != null) {
		_g.setReserved("K",75);
	} else {
		_g.h["K"] = 75;
	}
	if(__map_reserved["L"] != null) {
		_g.setReserved("L",76);
	} else {
		_g.h["L"] = 76;
	}
	if(__map_reserved["M"] != null) {
		_g.setReserved("M",77);
	} else {
		_g.h["M"] = 77;
	}
	if(__map_reserved["N"] != null) {
		_g.setReserved("N",78);
	} else {
		_g.h["N"] = 78;
	}
	if(__map_reserved["O"] != null) {
		_g.setReserved("O",79);
	} else {
		_g.h["O"] = 79;
	}
	if(__map_reserved["P"] != null) {
		_g.setReserved("P",80);
	} else {
		_g.h["P"] = 80;
	}
	if(__map_reserved["Q"] != null) {
		_g.setReserved("Q",81);
	} else {
		_g.h["Q"] = 81;
	}
	if(__map_reserved["R"] != null) {
		_g.setReserved("R",82);
	} else {
		_g.h["R"] = 82;
	}
	if(__map_reserved["S"] != null) {
		_g.setReserved("S",83);
	} else {
		_g.h["S"] = 83;
	}
	if(__map_reserved["T"] != null) {
		_g.setReserved("T",84);
	} else {
		_g.h["T"] = 84;
	}
	if(__map_reserved["U"] != null) {
		_g.setReserved("U",85);
	} else {
		_g.h["U"] = 85;
	}
	if(__map_reserved["V"] != null) {
		_g.setReserved("V",86);
	} else {
		_g.h["V"] = 86;
	}
	if(__map_reserved["W"] != null) {
		_g.setReserved("W",87);
	} else {
		_g.h["W"] = 87;
	}
	if(__map_reserved["X"] != null) {
		_g.setReserved("X",88);
	} else {
		_g.h["X"] = 88;
	}
	if(__map_reserved["Y"] != null) {
		_g.setReserved("Y",89);
	} else {
		_g.h["Y"] = 89;
	}
	if(__map_reserved["Z"] != null) {
		_g.setReserved("Z",90);
	} else {
		_g.h["Z"] = 90;
	}
	if(__map_reserved["ZERO"] != null) {
		_g.setReserved("ZERO",48);
	} else {
		_g.h["ZERO"] = 48;
	}
	if(__map_reserved["ONE"] != null) {
		_g.setReserved("ONE",49);
	} else {
		_g.h["ONE"] = 49;
	}
	if(__map_reserved["TWO"] != null) {
		_g.setReserved("TWO",50);
	} else {
		_g.h["TWO"] = 50;
	}
	if(__map_reserved["THREE"] != null) {
		_g.setReserved("THREE",51);
	} else {
		_g.h["THREE"] = 51;
	}
	if(__map_reserved["FOUR"] != null) {
		_g.setReserved("FOUR",52);
	} else {
		_g.h["FOUR"] = 52;
	}
	if(__map_reserved["FIVE"] != null) {
		_g.setReserved("FIVE",53);
	} else {
		_g.h["FIVE"] = 53;
	}
	if(__map_reserved["SIX"] != null) {
		_g.setReserved("SIX",54);
	} else {
		_g.h["SIX"] = 54;
	}
	if(__map_reserved["SEVEN"] != null) {
		_g.setReserved("SEVEN",55);
	} else {
		_g.h["SEVEN"] = 55;
	}
	if(__map_reserved["EIGHT"] != null) {
		_g.setReserved("EIGHT",56);
	} else {
		_g.h["EIGHT"] = 56;
	}
	if(__map_reserved["NINE"] != null) {
		_g.setReserved("NINE",57);
	} else {
		_g.h["NINE"] = 57;
	}
	if(__map_reserved["PAGEUP"] != null) {
		_g.setReserved("PAGEUP",33);
	} else {
		_g.h["PAGEUP"] = 33;
	}
	if(__map_reserved["PAGEDOWN"] != null) {
		_g.setReserved("PAGEDOWN",34);
	} else {
		_g.h["PAGEDOWN"] = 34;
	}
	if(__map_reserved["HOME"] != null) {
		_g.setReserved("HOME",36);
	} else {
		_g.h["HOME"] = 36;
	}
	if(__map_reserved["END"] != null) {
		_g.setReserved("END",35);
	} else {
		_g.h["END"] = 35;
	}
	if(__map_reserved["INSERT"] != null) {
		_g.setReserved("INSERT",45);
	} else {
		_g.h["INSERT"] = 45;
	}
	if(__map_reserved["ESCAPE"] != null) {
		_g.setReserved("ESCAPE",27);
	} else {
		_g.h["ESCAPE"] = 27;
	}
	if(__map_reserved["MINUS"] != null) {
		_g.setReserved("MINUS",189);
	} else {
		_g.h["MINUS"] = 189;
	}
	if(__map_reserved["PLUS"] != null) {
		_g.setReserved("PLUS",187);
	} else {
		_g.h["PLUS"] = 187;
	}
	if(__map_reserved["DELETE"] != null) {
		_g.setReserved("DELETE",46);
	} else {
		_g.h["DELETE"] = 46;
	}
	if(__map_reserved["BACKSPACE"] != null) {
		_g.setReserved("BACKSPACE",8);
	} else {
		_g.h["BACKSPACE"] = 8;
	}
	if(__map_reserved["LBRACKET"] != null) {
		_g.setReserved("LBRACKET",219);
	} else {
		_g.h["LBRACKET"] = 219;
	}
	if(__map_reserved["RBRACKET"] != null) {
		_g.setReserved("RBRACKET",221);
	} else {
		_g.h["RBRACKET"] = 221;
	}
	if(__map_reserved["BACKSLASH"] != null) {
		_g.setReserved("BACKSLASH",220);
	} else {
		_g.h["BACKSLASH"] = 220;
	}
	if(__map_reserved["CAPSLOCK"] != null) {
		_g.setReserved("CAPSLOCK",20);
	} else {
		_g.h["CAPSLOCK"] = 20;
	}
	if(__map_reserved["SEMICOLON"] != null) {
		_g.setReserved("SEMICOLON",186);
	} else {
		_g.h["SEMICOLON"] = 186;
	}
	if(__map_reserved["QUOTE"] != null) {
		_g.setReserved("QUOTE",222);
	} else {
		_g.h["QUOTE"] = 222;
	}
	if(__map_reserved["ENTER"] != null) {
		_g.setReserved("ENTER",13);
	} else {
		_g.h["ENTER"] = 13;
	}
	if(__map_reserved["SHIFT"] != null) {
		_g.setReserved("SHIFT",16);
	} else {
		_g.h["SHIFT"] = 16;
	}
	if(__map_reserved["COMMA"] != null) {
		_g.setReserved("COMMA",188);
	} else {
		_g.h["COMMA"] = 188;
	}
	if(__map_reserved["PERIOD"] != null) {
		_g.setReserved("PERIOD",190);
	} else {
		_g.h["PERIOD"] = 190;
	}
	if(__map_reserved["SLASH"] != null) {
		_g.setReserved("SLASH",191);
	} else {
		_g.h["SLASH"] = 191;
	}
	if(__map_reserved["GRAVEACCENT"] != null) {
		_g.setReserved("GRAVEACCENT",192);
	} else {
		_g.h["GRAVEACCENT"] = 192;
	}
	if(__map_reserved["CONTROL"] != null) {
		_g.setReserved("CONTROL",17);
	} else {
		_g.h["CONTROL"] = 17;
	}
	if(__map_reserved["ALT"] != null) {
		_g.setReserved("ALT",18);
	} else {
		_g.h["ALT"] = 18;
	}
	if(__map_reserved["SPACE"] != null) {
		_g.setReserved("SPACE",32);
	} else {
		_g.h["SPACE"] = 32;
	}
	if(__map_reserved["UP"] != null) {
		_g.setReserved("UP",38);
	} else {
		_g.h["UP"] = 38;
	}
	if(__map_reserved["DOWN"] != null) {
		_g.setReserved("DOWN",40);
	} else {
		_g.h["DOWN"] = 40;
	}
	if(__map_reserved["LEFT"] != null) {
		_g.setReserved("LEFT",37);
	} else {
		_g.h["LEFT"] = 37;
	}
	if(__map_reserved["RIGHT"] != null) {
		_g.setReserved("RIGHT",39);
	} else {
		_g.h["RIGHT"] = 39;
	}
	if(__map_reserved["TAB"] != null) {
		_g.setReserved("TAB",9);
	} else {
		_g.h["TAB"] = 9;
	}
	if(__map_reserved["PRINTSCREEN"] != null) {
		_g.setReserved("PRINTSCREEN",301);
	} else {
		_g.h["PRINTSCREEN"] = 301;
	}
	if(__map_reserved["F1"] != null) {
		_g.setReserved("F1",112);
	} else {
		_g.h["F1"] = 112;
	}
	if(__map_reserved["F2"] != null) {
		_g.setReserved("F2",113);
	} else {
		_g.h["F2"] = 113;
	}
	if(__map_reserved["F3"] != null) {
		_g.setReserved("F3",114);
	} else {
		_g.h["F3"] = 114;
	}
	if(__map_reserved["F4"] != null) {
		_g.setReserved("F4",115);
	} else {
		_g.h["F4"] = 115;
	}
	if(__map_reserved["F5"] != null) {
		_g.setReserved("F5",116);
	} else {
		_g.h["F5"] = 116;
	}
	if(__map_reserved["F6"] != null) {
		_g.setReserved("F6",117);
	} else {
		_g.h["F6"] = 117;
	}
	if(__map_reserved["F7"] != null) {
		_g.setReserved("F7",118);
	} else {
		_g.h["F7"] = 118;
	}
	if(__map_reserved["F8"] != null) {
		_g.setReserved("F8",119);
	} else {
		_g.h["F8"] = 119;
	}
	if(__map_reserved["F9"] != null) {
		_g.setReserved("F9",120);
	} else {
		_g.h["F9"] = 120;
	}
	if(__map_reserved["F10"] != null) {
		_g.setReserved("F10",121);
	} else {
		_g.h["F10"] = 121;
	}
	if(__map_reserved["F11"] != null) {
		_g.setReserved("F11",122);
	} else {
		_g.h["F11"] = 122;
	}
	if(__map_reserved["F12"] != null) {
		_g.setReserved("F12",123);
	} else {
		_g.h["F12"] = 123;
	}
	if(__map_reserved["NUMPADZERO"] != null) {
		_g.setReserved("NUMPADZERO",96);
	} else {
		_g.h["NUMPADZERO"] = 96;
	}
	if(__map_reserved["NUMPADONE"] != null) {
		_g.setReserved("NUMPADONE",97);
	} else {
		_g.h["NUMPADONE"] = 97;
	}
	if(__map_reserved["NUMPADTWO"] != null) {
		_g.setReserved("NUMPADTWO",98);
	} else {
		_g.h["NUMPADTWO"] = 98;
	}
	if(__map_reserved["NUMPADTHREE"] != null) {
		_g.setReserved("NUMPADTHREE",99);
	} else {
		_g.h["NUMPADTHREE"] = 99;
	}
	if(__map_reserved["NUMPADFOUR"] != null) {
		_g.setReserved("NUMPADFOUR",100);
	} else {
		_g.h["NUMPADFOUR"] = 100;
	}
	if(__map_reserved["NUMPADFIVE"] != null) {
		_g.setReserved("NUMPADFIVE",101);
	} else {
		_g.h["NUMPADFIVE"] = 101;
	}
	if(__map_reserved["NUMPADSIX"] != null) {
		_g.setReserved("NUMPADSIX",102);
	} else {
		_g.h["NUMPADSIX"] = 102;
	}
	if(__map_reserved["NUMPADSEVEN"] != null) {
		_g.setReserved("NUMPADSEVEN",103);
	} else {
		_g.h["NUMPADSEVEN"] = 103;
	}
	if(__map_reserved["NUMPADEIGHT"] != null) {
		_g.setReserved("NUMPADEIGHT",104);
	} else {
		_g.h["NUMPADEIGHT"] = 104;
	}
	if(__map_reserved["NUMPADNINE"] != null) {
		_g.setReserved("NUMPADNINE",105);
	} else {
		_g.h["NUMPADNINE"] = 105;
	}
	if(__map_reserved["NUMPADMINUS"] != null) {
		_g.setReserved("NUMPADMINUS",109);
	} else {
		_g.h["NUMPADMINUS"] = 109;
	}
	if(__map_reserved["NUMPADPLUS"] != null) {
		_g.setReserved("NUMPADPLUS",107);
	} else {
		_g.h["NUMPADPLUS"] = 107;
	}
	if(__map_reserved["NUMPADPERIOD"] != null) {
		_g.setReserved("NUMPADPERIOD",110);
	} else {
		_g.h["NUMPADPERIOD"] = 110;
	}
	if(__map_reserved["NUMPADMULTIPLY"] != null) {
		_g.setReserved("NUMPADMULTIPLY",106);
	} else {
		_g.h["NUMPADMULTIPLY"] = 106;
	}
	$r = _g;
	return $r;
}(this));
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.toStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_IntMap();
	_g.h[-2] = "ANY";
	_g.h[65] = "A";
	_g.h[66] = "B";
	_g.h[67] = "C";
	_g.h[68] = "D";
	_g.h[69] = "E";
	_g.h[70] = "F";
	_g.h[71] = "G";
	_g.h[72] = "H";
	_g.h[73] = "I";
	_g.h[74] = "J";
	_g.h[75] = "K";
	_g.h[76] = "L";
	_g.h[77] = "M";
	_g.h[78] = "N";
	_g.h[79] = "O";
	_g.h[80] = "P";
	_g.h[81] = "Q";
	_g.h[82] = "R";
	_g.h[83] = "S";
	_g.h[84] = "T";
	_g.h[85] = "U";
	_g.h[86] = "V";
	_g.h[87] = "W";
	_g.h[88] = "X";
	_g.h[89] = "Y";
	_g.h[90] = "Z";
	_g.h[48] = "ZERO";
	_g.h[49] = "ONE";
	_g.h[50] = "TWO";
	_g.h[51] = "THREE";
	_g.h[52] = "FOUR";
	_g.h[53] = "FIVE";
	_g.h[54] = "SIX";
	_g.h[55] = "SEVEN";
	_g.h[56] = "EIGHT";
	_g.h[57] = "NINE";
	_g.h[33] = "PAGEUP";
	_g.h[34] = "PAGEDOWN";
	_g.h[36] = "HOME";
	_g.h[35] = "END";
	_g.h[45] = "INSERT";
	_g.h[27] = "ESCAPE";
	_g.h[189] = "MINUS";
	_g.h[187] = "PLUS";
	_g.h[46] = "DELETE";
	_g.h[8] = "BACKSPACE";
	_g.h[219] = "LBRACKET";
	_g.h[221] = "RBRACKET";
	_g.h[220] = "BACKSLASH";
	_g.h[20] = "CAPSLOCK";
	_g.h[186] = "SEMICOLON";
	_g.h[222] = "QUOTE";
	_g.h[13] = "ENTER";
	_g.h[16] = "SHIFT";
	_g.h[188] = "COMMA";
	_g.h[190] = "PERIOD";
	_g.h[191] = "SLASH";
	_g.h[192] = "GRAVEACCENT";
	_g.h[17] = "CONTROL";
	_g.h[18] = "ALT";
	_g.h[32] = "SPACE";
	_g.h[38] = "UP";
	_g.h[40] = "DOWN";
	_g.h[37] = "LEFT";
	_g.h[39] = "RIGHT";
	_g.h[9] = "TAB";
	_g.h[301] = "PRINTSCREEN";
	_g.h[112] = "F1";
	_g.h[113] = "F2";
	_g.h[114] = "F3";
	_g.h[115] = "F4";
	_g.h[116] = "F5";
	_g.h[117] = "F6";
	_g.h[118] = "F7";
	_g.h[119] = "F8";
	_g.h[120] = "F9";
	_g.h[121] = "F10";
	_g.h[122] = "F11";
	_g.h[123] = "F12";
	_g.h[96] = "NUMPADZERO";
	_g.h[97] = "NUMPADONE";
	_g.h[98] = "NUMPADTWO";
	_g.h[99] = "NUMPADTHREE";
	_g.h[100] = "NUMPADFOUR";
	_g.h[101] = "NUMPADFIVE";
	_g.h[102] = "NUMPADSIX";
	_g.h[103] = "NUMPADSEVEN";
	_g.h[104] = "NUMPADEIGHT";
	_g.h[105] = "NUMPADNINE";
	_g.h[109] = "NUMPADMINUS";
	_g.h[107] = "NUMPADPLUS";
	_g.h[110] = "NUMPADPERIOD";
	_g.h[106] = "NUMPADMULTIPLY";
	$r = _g;
	return $r;
}(this));
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ANY = -2;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NONE = -1;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.A = 65;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.B = 66;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.C = 67;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.D = 68;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.E = 69;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F = 70;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.G = 71;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.H = 72;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.I = 73;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.J = 74;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.K = 75;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.L = 76;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.M = 77;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.N = 78;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.O = 79;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.P = 80;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.Q = 81;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.R = 82;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.S = 83;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.T = 84;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.U = 85;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.V = 86;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.W = 87;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.X = 88;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.Y = 89;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.Z = 90;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ZERO = 48;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ONE = 49;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.TWO = 50;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.THREE = 51;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.FOUR = 52;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.FIVE = 53;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SIX = 54;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SEVEN = 55;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.EIGHT = 56;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NINE = 57;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PAGEUP = 33;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PAGEDOWN = 34;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.HOME = 36;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.END = 35;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.INSERT = 45;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ESCAPE = 27;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.MINUS = 189;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PLUS = 187;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.DELETE = 46;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.BACKSPACE = 8;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.LBRACKET = 219;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.RBRACKET = 221;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.BACKSLASH = 220;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.CAPSLOCK = 20;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SEMICOLON = 186;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.QUOTE = 222;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ENTER = 13;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SHIFT = 16;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.COMMA = 188;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PERIOD = 190;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SLASH = 191;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.GRAVEACCENT = 192;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.CONTROL = 17;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ALT = 18;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SPACE = 32;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.UP = 38;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.DOWN = 40;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.LEFT = 37;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.RIGHT = 39;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.TAB = 9;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PRINTSCREEN = 301;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F1 = 112;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F2 = 113;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F3 = 114;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F4 = 115;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F5 = 116;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F6 = 117;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F7 = 118;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F8 = 119;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F9 = 120;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F10 = 121;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F11 = 122;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F12 = 123;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADZERO = 96;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADONE = 97;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADTWO = 98;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADTHREE = 99;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADFOUR = 100;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADFIVE = 101;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADSIX = 102;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADSEVEN = 103;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADEIGHT = 104;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADNINE = 105;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADMINUS = 109;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADPLUS = 107;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADPERIOD = 110;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADMULTIPLY = 106;
openfl_display_BitmapData.__isGLES = null;
flixel_input_mouse__$FlxMouse_GraphicCursor.resourceType = "image/png";
flixel_input_mouse__$FlxMouse_GraphicCursor.resourceName = "__ASSET__:bitmap_flixel_input_mouse__FlxMouse_GraphicCursor";
flixel_input_touch_FlxTouchManager.maxTouchPoints = 0;
flixel_math_FlxMath.MIN_VALUE_FLOAT = 0.0000000000000001;
flixel_math_FlxMath.MAX_VALUE_FLOAT = 1.79e+308;
flixel_math_FlxMath.MIN_VALUE_INT = -2147483647;
flixel_math_FlxMath.MAX_VALUE_INT = 2147483647;
flixel_math_FlxMath.SQUARE_ROOT_OF_TWO = 1.41421356237;
flixel_math_FlxMath.EPSILON = 0.0000001;
flixel_math_FlxVector.EPSILON = 0.0000001;
flixel_math_FlxVector.EPSILON_SQUARED = 9.9999999999999984e-015;
flixel_math_FlxVector._pool = new flixel_util_FlxPool_$flixel_$math_$FlxVector(flixel_math_FlxVector);
flixel_math_FlxVector._vector1 = new flixel_math_FlxVector();
flixel_math_FlxVector._vector2 = new flixel_math_FlxVector();
flixel_math_FlxVector._vector3 = new flixel_math_FlxVector();
flixel_system_GraphicLogo.resourceType = "image/png";
flixel_system_GraphicLogo.resourceName = "__ASSET__:bitmap_flixel_system_GraphicLogo";
flixel_system_GraphicVirtualInput.resourceType = "image/png";
flixel_system_GraphicVirtualInput.resourceName = "__ASSET__:bitmap_flixel_system_GraphicVirtualInput";
flixel_system_VirtualInputData.resourceName = "__ASSET__:file_flixel_system_VirtualInputData";
flixel_system_FlxAssets.FONT_DEFAULT = "Nokia Cellphone FC Small";
flixel_system_FlxAssets.FONT_DEBUGGER = "Monsterrat";
flixel_system_FlxBasePreloader.LOCAL = "localhost";
flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST = 0;
flixel_system__$FlxPreloader_GraphicLogoLight.resourceType = "image/png";
flixel_system__$FlxPreloader_GraphicLogoLight.resourceName = "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoLight";
flixel_system__$FlxPreloader_GraphicLogoCorners.resourceType = "image/png";
flixel_system__$FlxPreloader_GraphicLogoCorners.resourceName = "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoCorners";
flixel_system_FlxQuadTree.A_LIST = 0;
flixel_system_FlxQuadTree.B_LIST = 1;
flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES = 0;
flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceType = "image/png";
flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceName = "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicFlixel";
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceType = "image/png";
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceName = "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicDrawDebug";
flixel_system_debug_GraphicLog.resourceType = "image/png";
flixel_system_debug_GraphicLog.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicLog";
flixel_system_debug_GraphicStats.resourceType = "image/png";
flixel_system_debug_GraphicStats.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicStats";
flixel_system_debug_GraphicWatch.resourceType = "image/png";
flixel_system_debug_GraphicWatch.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicWatch";
flixel_system_debug_GraphicBitmapLog.resourceType = "image/png";
flixel_system_debug_GraphicBitmapLog.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicBitmapLog";
flixel_system_debug_GraphicConsole.resourceType = "image/png";
flixel_system_debug_GraphicConsole.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicConsole";
flixel_system_debug_GraphicArrowLeft.resourceType = "image/png";
flixel_system_debug_GraphicArrowLeft.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicArrowLeft";
flixel_system_debug_GraphicArrowRight.resourceType = "image/png";
flixel_system_debug_GraphicArrowRight.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicArrowRight";
flixel_system_debug_GraphicCloseButton.resourceType = "image/png";
flixel_system_debug_GraphicCloseButton.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicCloseButton";
flixel_system_debug_GraphicInteractive.resourceType = "image/png";
flixel_system_debug_GraphicInteractive.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicInteractive";
flixel_system_debug_Tooltip._tooltips = [];
flixel_system_debug_TooltipOverlay.BG_COLOR = -12961222;
flixel_system_debug_TooltipOverlay.TEXT_ALPHA = 0.8;
flixel_system_debug_TooltipOverlay.MARGIN_X = 10;
flixel_system_debug_TooltipOverlay.MARGIN_Y = 10;
flixel_system_debug__$Window_GraphicWindowHandle.resourceType = "image/png";
flixel_system_debug__$Window_GraphicWindowHandle.resourceName = "__ASSET__:bitmap_flixel_system_debug__Window_GraphicWindowHandle";
flixel_system_debug_Window.BG_COLOR = -580952225;
flixel_system_debug_Window.HEADER_COLOR = -1157627904;
flixel_system_debug_Window.HEADER_ALPHA = 0.8;
flixel_system_debug_Window.HEADER_HEIGHT = 15;
flixel_system_debug_Window.WINDOW_AMOUNT = 0;
flixel_system_debug_completion_CompletionListEntry.WIDTH = 150;
flixel_system_debug_completion_CompletionListEntry.HEIGHT = 20;
flixel_system_debug_completion_CompletionListEntry.COLOR_NORMAL = -10526881;
flixel_system_debug_completion_CompletionListEntry.COLOR_HIGHLIGHT = -9605779;
flixel_system_debug_completion_CompletionListEntry.GUTTER = 4;
flixel_system_debug_completion_CompletionListScrollBar.BG_COLOR = -12303292;
flixel_system_debug_completion_CompletionListScrollBar.HANDLE_COLOR = -14540254;
flixel_system_debug_interaction_tools_GraphicEraserTool.resourceType = "image/png";
flixel_system_debug_interaction_tools_GraphicEraserTool.resourceName = "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicEraserTool";
flixel_system_debug_interaction_tools_GraphicMoverTool.resourceType = "image/png";
flixel_system_debug_interaction_tools_GraphicMoverTool.resourceName = "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicMoverTool";
flixel_system_debug_interaction_tools_GraphicCursorCross.resourceType = "image/png";
flixel_system_debug_interaction_tools_GraphicCursorCross.resourceName = "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicCursorCross";
flixel_system_debug_log_LogStyle.NORMAL = new flixel_system_debug_log_LogStyle();
flixel_system_debug_log_LogStyle.WARNING = new flixel_system_debug_log_LogStyle("[WARNING] ","D9F85C",12,false,false,false,"flixel/sounds/beep",true);
flixel_system_debug_log_LogStyle.ERROR = new flixel_system_debug_log_LogStyle("[ERROR] ","FF8888",12,false,false,false,"flixel/sounds/beep",true);
flixel_system_debug_log_LogStyle.NOTICE = new flixel_system_debug_log_LogStyle("[NOTICE] ","5CF878",12,false);
flixel_system_debug_log_LogStyle.CONSOLE = new flixel_system_debug_log_LogStyle("&#62; ","5A96FA",12,false);
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceType = "image/png";
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceName = "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMinimizeButton";
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceType = "image/png";
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceName = "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMaximizeButton";
flixel_text_FlxText.VERTICAL_GUTTER = 4;
flixel_text__$FlxText_FlxTextAlign_$Impl_$.LEFT = "left";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.CENTER = "center";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.RIGHT = "right";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.JUSTIFY = "justify";
flixel_tweens_FlxEase.PI2 = Math.PI / 2;
flixel_tweens_FlxEase.EL = 2 * Math.PI / .45;
flixel_tweens_FlxEase.B1 = 0.36363636363636365;
flixel_tweens_FlxEase.B2 = 0.72727272727272729;
flixel_tweens_FlxEase.B3 = 0.54545454545454541;
flixel_tweens_FlxEase.B4 = 0.90909090909090906;
flixel_tweens_FlxEase.B5 = 0.81818181818181823;
flixel_tweens_FlxEase.B6 = 0.95454545454545459;
flixel_tweens_FlxEase.ELASTIC_AMPLITUDE = 1;
flixel_tweens_FlxEase.ELASTIC_PERIOD = 0.4;
flixel_tweens_FlxTween.PERSIST = 1;
flixel_tweens_FlxTween.LOOPING = 2;
flixel_tweens_FlxTween.PINGPONG = 4;
flixel_tweens_FlxTween.ONESHOT = 8;
flixel_tweens_FlxTween.BACKWARD = 16;
flixel_ui_FlxButton.NORMAL = 0;
flixel_ui_FlxButton.HIGHLIGHT = 1;
flixel_ui_FlxButton.PRESSED = 2;
openfl_geom_Rectangle.__temp = new openfl_geom_Rectangle();
flixel_util_FlxBitmapDataPool.maxLength = 8;
flixel_util_FlxBitmapDataPool.$length = 0;
flixel_util_FlxBitmapDataPool._head = null;
flixel_util_FlxBitmapDataPool._tail = null;
flixel_util_FlxBitmapDataPool._rect = new openfl_geom_Rectangle();
flixel_util_FlxBitmapDataUtil.matrix = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.pointA = new flixel_math_FlxVector();
flixel_util_FlxCollision.pointB = new flixel_math_FlxVector();
flixel_util_FlxCollision.centerA = new flixel_math_FlxVector();
flixel_util_FlxCollision.centerB = new flixel_math_FlxVector();
flixel_util_FlxCollision.matrixA = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.matrixB = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.testMatrix = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.boundsA = new flixel_math_FlxRect();
flixel_util_FlxCollision.boundsB = new flixel_math_FlxRect();
flixel_util_FlxCollision.intersect = new flixel_math_FlxRect();
flixel_util_FlxCollision.flashRect = new openfl_geom_Rectangle();
flixel_util__$FlxColor_FlxColor_$Impl_$.TRANSPARENT = 0;
flixel_util__$FlxColor_FlxColor_$Impl_$.WHITE = -1;
flixel_util__$FlxColor_FlxColor_$Impl_$.GRAY = -8355712;
flixel_util__$FlxColor_FlxColor_$Impl_$.BLACK = -16777216;
flixel_util__$FlxColor_FlxColor_$Impl_$.GREEN = -16744448;
flixel_util__$FlxColor_FlxColor_$Impl_$.LIME = -16711936;
flixel_util__$FlxColor_FlxColor_$Impl_$.YELLOW = -256;
flixel_util__$FlxColor_FlxColor_$Impl_$.ORANGE = -23296;
flixel_util__$FlxColor_FlxColor_$Impl_$.RED = -65536;
flixel_util__$FlxColor_FlxColor_$Impl_$.PURPLE = -8388480;
flixel_util__$FlxColor_FlxColor_$Impl_$.BLUE = -16776961;
flixel_util__$FlxColor_FlxColor_$Impl_$.BROWN = -7650029;
flixel_util__$FlxColor_FlxColor_$Impl_$.PINK = -16181;
flixel_util__$FlxColor_FlxColor_$Impl_$.MAGENTA = -65281;
flixel_util__$FlxColor_FlxColor_$Impl_$.CYAN = -16711681;
flixel_util__$FlxColor_FlxColor_$Impl_$.colorLookup = (function($this) {
	var $r;
	var _g = new haxe_ds_StringMap();
	if(__map_reserved["TRANSPARENT"] != null) {
		_g.setReserved("TRANSPARENT",0);
	} else {
		_g.h["TRANSPARENT"] = 0;
	}
	if(__map_reserved["WHITE"] != null) {
		_g.setReserved("WHITE",-1);
	} else {
		_g.h["WHITE"] = -1;
	}
	if(__map_reserved["GRAY"] != null) {
		_g.setReserved("GRAY",-8355712);
	} else {
		_g.h["GRAY"] = -8355712;
	}
	if(__map_reserved["BLACK"] != null) {
		_g.setReserved("BLACK",-16777216);
	} else {
		_g.h["BLACK"] = -16777216;
	}
	if(__map_reserved["GREEN"] != null) {
		_g.setReserved("GREEN",-16744448);
	} else {
		_g.h["GREEN"] = -16744448;
	}
	if(__map_reserved["LIME"] != null) {
		_g.setReserved("LIME",-16711936);
	} else {
		_g.h["LIME"] = -16711936;
	}
	if(__map_reserved["YELLOW"] != null) {
		_g.setReserved("YELLOW",-256);
	} else {
		_g.h["YELLOW"] = -256;
	}
	if(__map_reserved["ORANGE"] != null) {
		_g.setReserved("ORANGE",-23296);
	} else {
		_g.h["ORANGE"] = -23296;
	}
	if(__map_reserved["RED"] != null) {
		_g.setReserved("RED",-65536);
	} else {
		_g.h["RED"] = -65536;
	}
	if(__map_reserved["PURPLE"] != null) {
		_g.setReserved("PURPLE",-8388480);
	} else {
		_g.h["PURPLE"] = -8388480;
	}
	if(__map_reserved["BLUE"] != null) {
		_g.setReserved("BLUE",-16776961);
	} else {
		_g.h["BLUE"] = -16776961;
	}
	if(__map_reserved["BROWN"] != null) {
		_g.setReserved("BROWN",-7650029);
	} else {
		_g.h["BROWN"] = -7650029;
	}
	if(__map_reserved["PINK"] != null) {
		_g.setReserved("PINK",-16181);
	} else {
		_g.h["PINK"] = -16181;
	}
	if(__map_reserved["MAGENTA"] != null) {
		_g.setReserved("MAGENTA",-65281);
	} else {
		_g.h["MAGENTA"] = -65281;
	}
	if(__map_reserved["CYAN"] != null) {
		_g.setReserved("CYAN",-16711681);
	} else {
		_g.h["CYAN"] = -16711681;
	}
	$r = _g;
	return $r;
}(this));
flixel_util__$FlxColor_FlxColor_$Impl_$.COLOR_REGEX = new EReg("^(0x|#)(([A-F0-9]{2}){3,4})$","i");
flixel_util_FlxPath.FORWARD = 0;
flixel_util_FlxPath.BACKWARD = 1;
flixel_util_FlxPath.LOOP_FORWARD = 16;
flixel_util_FlxPath.LOOP_BACKWARD = 256;
flixel_util_FlxPath.YOYO = 4096;
flixel_util_FlxPath.HORIZONTAL_ONLY = 65536;
flixel_util_FlxPath.VERTICAL_ONLY = 1048576;
flixel_util_FlxPath._point = (function($this) {
	var $r;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	$r = point;
	return $r;
}(this));
flixel_util_FlxSort.ASCENDING = -1;
flixel_util_FlxSort.DESCENDING = 1;
flixel_util_FlxSpriteUtil.flashGfxSprite = new openfl_display_Sprite();
flixel_util_FlxSpriteUtil.flashGfx = flixel_util_FlxSpriteUtil.flashGfxSprite.get_graphics();
flixel_util_LabelValuePair._pool = new flixel_util_FlxPool_$flixel_$util_$LabelValuePair(flixel_util_LabelValuePair);
haxe_Serializer.USE_CACHE = false;
haxe_Serializer.USE_ENUM_INDEX = false;
haxe_Serializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe_Serializer.BASE64_CODES = null;
haxe_Unserializer.DEFAULT_RESOLVER = new haxe__$Unserializer_DefaultResolver();
haxe_Unserializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe_Unserializer.CODES = null;
haxe_crypto_Base64.CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
haxe_crypto_Base64.BYTES = haxe_io_Bytes.ofString(haxe_crypto_Base64.CHARS);
haxe_ds_ObjectMap.count = 0;
haxe_io_FPHelper.i64tmp = (function($this) {
	var $r;
	var this1 = new haxe__$Int64__$_$_$Int64(0,0);
	$r = this1;
	return $r;
}(this));
haxe_xml_Parser.escapes = (function($this) {
	var $r;
	var h = new haxe_ds_StringMap();
	if(__map_reserved["lt"] != null) {
		h.setReserved("lt","<");
	} else {
		h.h["lt"] = "<";
	}
	if(__map_reserved["gt"] != null) {
		h.setReserved("gt",">");
	} else {
		h.h["gt"] = ">";
	}
	if(__map_reserved["amp"] != null) {
		h.setReserved("amp","&");
	} else {
		h.h["amp"] = "&";
	}
	if(__map_reserved["quot"] != null) {
		h.setReserved("quot","\"");
	} else {
		h.h["quot"] = "\"";
	}
	if(__map_reserved["apos"] != null) {
		h.setReserved("apos","'");
	} else {
		h.h["apos"] = "'";
	}
	$r = h;
	return $r;
}(this));
js_html_compat_Float32Array.BYTES_PER_ELEMENT = 4;
js_html_compat_Uint8Array.BYTES_PER_ELEMENT = 1;
lime_Assets.cache = new lime_AssetCache();
lime_Assets.libraries = new haxe_ds_StringMap();
lime_Assets.onChange = new lime_app_Event_$Void_$Void();
lime_Assets.initialized = false;
lime__$backend_html5_HTML5Window.windowID = 0;
lime_app_Preloader.images = new haxe_ds_StringMap();
lime_app_Preloader.loaders = new haxe_ds_StringMap();
lime_audio_openal_AL.NONE = 0;
lime_audio_openal_AL.FALSE = 0;
lime_audio_openal_AL.TRUE = 1;
lime_audio_openal_AL.SOURCE_RELATIVE = 514;
lime_audio_openal_AL.CONE_INNER_ANGLE = 4097;
lime_audio_openal_AL.CONE_OUTER_ANGLE = 4098;
lime_audio_openal_AL.PITCH = 4099;
lime_audio_openal_AL.POSITION = 4100;
lime_audio_openal_AL.DIRECTION = 4101;
lime_audio_openal_AL.VELOCITY = 4102;
lime_audio_openal_AL.LOOPING = 4103;
lime_audio_openal_AL.BUFFER = 4105;
lime_audio_openal_AL.GAIN = 4106;
lime_audio_openal_AL.MIN_GAIN = 4109;
lime_audio_openal_AL.MAX_GAIN = 4110;
lime_audio_openal_AL.ORIENTATION = 4111;
lime_audio_openal_AL.SOURCE_STATE = 4112;
lime_audio_openal_AL.INITIAL = 4113;
lime_audio_openal_AL.PLAYING = 4114;
lime_audio_openal_AL.PAUSED = 4115;
lime_audio_openal_AL.STOPPED = 4116;
lime_audio_openal_AL.BUFFERS_QUEUED = 4117;
lime_audio_openal_AL.BUFFERS_PROCESSED = 4118;
lime_audio_openal_AL.REFERENCE_DISTANCE = 4128;
lime_audio_openal_AL.ROLLOFF_FACTOR = 4129;
lime_audio_openal_AL.CONE_OUTER_GAIN = 4130;
lime_audio_openal_AL.MAX_DISTANCE = 4131;
lime_audio_openal_AL.SEC_OFFSET = 4132;
lime_audio_openal_AL.SAMPLE_OFFSET = 4133;
lime_audio_openal_AL.BYTE_OFFSET = 4134;
lime_audio_openal_AL.SOURCE_TYPE = 4135;
lime_audio_openal_AL.STATIC = 4136;
lime_audio_openal_AL.STREAMING = 4137;
lime_audio_openal_AL.UNDETERMINED = 4144;
lime_audio_openal_AL.FORMAT_MONO8 = 4352;
lime_audio_openal_AL.FORMAT_MONO16 = 4353;
lime_audio_openal_AL.FORMAT_STEREO8 = 4354;
lime_audio_openal_AL.FORMAT_STEREO16 = 4355;
lime_audio_openal_AL.FREQUENCY = 8193;
lime_audio_openal_AL.BITS = 8194;
lime_audio_openal_AL.CHANNELS = 8195;
lime_audio_openal_AL.SIZE = 8196;
lime_audio_openal_AL.NO_ERROR = 0;
lime_audio_openal_AL.INVALID_NAME = 40961;
lime_audio_openal_AL.INVALID_ENUM = 40962;
lime_audio_openal_AL.INVALID_VALUE = 40963;
lime_audio_openal_AL.INVALID_OPERATION = 40964;
lime_audio_openal_AL.OUT_OF_MEMORY = 40965;
lime_audio_openal_AL.VENDOR = 45057;
lime_audio_openal_AL.VERSION = 45058;
lime_audio_openal_AL.RENDERER = 45059;
lime_audio_openal_AL.EXTENSIONS = 45060;
lime_audio_openal_AL.DOPPLER_FACTOR = 49152;
lime_audio_openal_AL.SPEED_OF_SOUND = 49155;
lime_audio_openal_AL.DOPPLER_VELOCITY = 49153;
lime_audio_openal_AL.DISTANCE_MODEL = 53248;
lime_audio_openal_AL.INVERSE_DISTANCE = 53249;
lime_audio_openal_AL.INVERSE_DISTANCE_CLAMPED = 53250;
lime_audio_openal_AL.LINEAR_DISTANCE = 53251;
lime_audio_openal_AL.LINEAR_DISTANCE_CLAMPED = 53252;
lime_audio_openal_AL.EXPONENT_DISTANCE = 53253;
lime_audio_openal_AL.EXPONENT_DISTANCE_CLAMPED = 53254;
lime_audio_openal_ALC.FALSE = 0;
lime_audio_openal_ALC.TRUE = 1;
lime_audio_openal_ALC.FREQUENCY = 4103;
lime_audio_openal_ALC.REFRESH = 4104;
lime_audio_openal_ALC.SYNC = 4105;
lime_audio_openal_ALC.MONO_SOURCES = 4112;
lime_audio_openal_ALC.STEREO_SOURCES = 4113;
lime_audio_openal_ALC.NO_ERROR = 0;
lime_audio_openal_ALC.INVALID_DEVICE = 40961;
lime_audio_openal_ALC.INVALID_CONTEXT = 40962;
lime_audio_openal_ALC.INVALID_ENUM = 40963;
lime_audio_openal_ALC.INVALID_VALUE = 40964;
lime_audio_openal_ALC.OUT_OF_MEMORY = 40965;
lime_audio_openal_ALC.ATTRIBUTES_SIZE = 4098;
lime_audio_openal_ALC.ALL_ATTRIBUTES = 4099;
lime_audio_openal_ALC.DEFAULT_DEVICE_SPECIFIER = 4100;
lime_audio_openal_ALC.DEVICE_SPECIFIER = 4101;
lime_audio_openal_ALC.EXTENSIONS = 4102;
lime_audio_openal_ALC.ENUMERATE_ALL_EXT = 1;
lime_audio_openal_ALC.DEFAULT_ALL_DEVICES_SPECIFIER = 4114;
lime_audio_openal_ALC.ALL_DEVICES_SPECIFIER = 4115;
lime_graphics_Image.__base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.FT_LOAD_FORCE_AUTOHINT = 32;
lime_graphics_opengl_GL.DEPTH_BUFFER_BIT = 256;
lime_graphics_opengl_GL.STENCIL_BUFFER_BIT = 1024;
lime_graphics_opengl_GL.COLOR_BUFFER_BIT = 16384;
lime_graphics_opengl_GL.POINTS = 0;
lime_graphics_opengl_GL.LINES = 1;
lime_graphics_opengl_GL.LINE_LOOP = 2;
lime_graphics_opengl_GL.LINE_STRIP = 3;
lime_graphics_opengl_GL.TRIANGLES = 4;
lime_graphics_opengl_GL.TRIANGLE_STRIP = 5;
lime_graphics_opengl_GL.TRIANGLE_FAN = 6;
lime_graphics_opengl_GL.ZERO = 0;
lime_graphics_opengl_GL.ONE = 1;
lime_graphics_opengl_GL.SRC_COLOR = 768;
lime_graphics_opengl_GL.ONE_MINUS_SRC_COLOR = 769;
lime_graphics_opengl_GL.SRC_ALPHA = 770;
lime_graphics_opengl_GL.ONE_MINUS_SRC_ALPHA = 771;
lime_graphics_opengl_GL.DST_ALPHA = 772;
lime_graphics_opengl_GL.ONE_MINUS_DST_ALPHA = 773;
lime_graphics_opengl_GL.DST_COLOR = 774;
lime_graphics_opengl_GL.ONE_MINUS_DST_COLOR = 775;
lime_graphics_opengl_GL.SRC_ALPHA_SATURATE = 776;
lime_graphics_opengl_GL.FUNC_ADD = 32774;
lime_graphics_opengl_GL.BLEND_EQUATION = 32777;
lime_graphics_opengl_GL.BLEND_EQUATION_RGB = 32777;
lime_graphics_opengl_GL.BLEND_EQUATION_ALPHA = 34877;
lime_graphics_opengl_GL.FUNC_SUBTRACT = 32778;
lime_graphics_opengl_GL.FUNC_REVERSE_SUBTRACT = 32779;
lime_graphics_opengl_GL.BLEND_DST_RGB = 32968;
lime_graphics_opengl_GL.BLEND_SRC_RGB = 32969;
lime_graphics_opengl_GL.BLEND_DST_ALPHA = 32970;
lime_graphics_opengl_GL.BLEND_SRC_ALPHA = 32971;
lime_graphics_opengl_GL.CONSTANT_COLOR = 32769;
lime_graphics_opengl_GL.ONE_MINUS_CONSTANT_COLOR = 32770;
lime_graphics_opengl_GL.CONSTANT_ALPHA = 32771;
lime_graphics_opengl_GL.ONE_MINUS_CONSTANT_ALPHA = 32772;
lime_graphics_opengl_GL.BLEND_COLOR = 32773;
lime_graphics_opengl_GL.ARRAY_BUFFER = 34962;
lime_graphics_opengl_GL.ELEMENT_ARRAY_BUFFER = 34963;
lime_graphics_opengl_GL.ARRAY_BUFFER_BINDING = 34964;
lime_graphics_opengl_GL.ELEMENT_ARRAY_BUFFER_BINDING = 34965;
lime_graphics_opengl_GL.STREAM_DRAW = 35040;
lime_graphics_opengl_GL.STATIC_DRAW = 35044;
lime_graphics_opengl_GL.DYNAMIC_DRAW = 35048;
lime_graphics_opengl_GL.BUFFER_SIZE = 34660;
lime_graphics_opengl_GL.BUFFER_USAGE = 34661;
lime_graphics_opengl_GL.CURRENT_VERTEX_ATTRIB = 34342;
lime_graphics_opengl_GL.FRONT = 1028;
lime_graphics_opengl_GL.BACK = 1029;
lime_graphics_opengl_GL.FRONT_AND_BACK = 1032;
lime_graphics_opengl_GL.CULL_FACE = 2884;
lime_graphics_opengl_GL.BLEND = 3042;
lime_graphics_opengl_GL.DITHER = 3024;
lime_graphics_opengl_GL.STENCIL_TEST = 2960;
lime_graphics_opengl_GL.DEPTH_TEST = 2929;
lime_graphics_opengl_GL.SCISSOR_TEST = 3089;
lime_graphics_opengl_GL.POLYGON_OFFSET_FILL = 32823;
lime_graphics_opengl_GL.SAMPLE_ALPHA_TO_COVERAGE = 32926;
lime_graphics_opengl_GL.SAMPLE_COVERAGE = 32928;
lime_graphics_opengl_GL.NO_ERROR = 0;
lime_graphics_opengl_GL.INVALID_ENUM = 1280;
lime_graphics_opengl_GL.INVALID_VALUE = 1281;
lime_graphics_opengl_GL.INVALID_OPERATION = 1282;
lime_graphics_opengl_GL.OUT_OF_MEMORY = 1285;
lime_graphics_opengl_GL.CW = 2304;
lime_graphics_opengl_GL.CCW = 2305;
lime_graphics_opengl_GL.LINE_WIDTH = 2849;
lime_graphics_opengl_GL.ALIASED_POINT_SIZE_RANGE = 33901;
lime_graphics_opengl_GL.ALIASED_LINE_WIDTH_RANGE = 33902;
lime_graphics_opengl_GL.CULL_FACE_MODE = 2885;
lime_graphics_opengl_GL.FRONT_FACE = 2886;
lime_graphics_opengl_GL.DEPTH_RANGE = 2928;
lime_graphics_opengl_GL.DEPTH_WRITEMASK = 2930;
lime_graphics_opengl_GL.DEPTH_CLEAR_VALUE = 2931;
lime_graphics_opengl_GL.DEPTH_FUNC = 2932;
lime_graphics_opengl_GL.STENCIL_CLEAR_VALUE = 2961;
lime_graphics_opengl_GL.STENCIL_FUNC = 2962;
lime_graphics_opengl_GL.STENCIL_FAIL = 2964;
lime_graphics_opengl_GL.STENCIL_PASS_DEPTH_FAIL = 2965;
lime_graphics_opengl_GL.STENCIL_PASS_DEPTH_PASS = 2966;
lime_graphics_opengl_GL.STENCIL_REF = 2967;
lime_graphics_opengl_GL.STENCIL_VALUE_MASK = 2963;
lime_graphics_opengl_GL.STENCIL_WRITEMASK = 2968;
lime_graphics_opengl_GL.STENCIL_BACK_FUNC = 34816;
lime_graphics_opengl_GL.STENCIL_BACK_FAIL = 34817;
lime_graphics_opengl_GL.STENCIL_BACK_PASS_DEPTH_FAIL = 34818;
lime_graphics_opengl_GL.STENCIL_BACK_PASS_DEPTH_PASS = 34819;
lime_graphics_opengl_GL.STENCIL_BACK_REF = 36003;
lime_graphics_opengl_GL.STENCIL_BACK_VALUE_MASK = 36004;
lime_graphics_opengl_GL.STENCIL_BACK_WRITEMASK = 36005;
lime_graphics_opengl_GL.VIEWPORT = 2978;
lime_graphics_opengl_GL.SCISSOR_BOX = 3088;
lime_graphics_opengl_GL.COLOR_CLEAR_VALUE = 3106;
lime_graphics_opengl_GL.COLOR_WRITEMASK = 3107;
lime_graphics_opengl_GL.UNPACK_ALIGNMENT = 3317;
lime_graphics_opengl_GL.PACK_ALIGNMENT = 3333;
lime_graphics_opengl_GL.MAX_TEXTURE_SIZE = 3379;
lime_graphics_opengl_GL.MAX_VIEWPORT_DIMS = 3386;
lime_graphics_opengl_GL.SUBPIXEL_BITS = 3408;
lime_graphics_opengl_GL.RED_BITS = 3410;
lime_graphics_opengl_GL.GREEN_BITS = 3411;
lime_graphics_opengl_GL.BLUE_BITS = 3412;
lime_graphics_opengl_GL.ALPHA_BITS = 3413;
lime_graphics_opengl_GL.DEPTH_BITS = 3414;
lime_graphics_opengl_GL.STENCIL_BITS = 3415;
lime_graphics_opengl_GL.POLYGON_OFFSET_UNITS = 10752;
lime_graphics_opengl_GL.POLYGON_OFFSET_FACTOR = 32824;
lime_graphics_opengl_GL.TEXTURE_BINDING_2D = 32873;
lime_graphics_opengl_GL.SAMPLE_BUFFERS = 32936;
lime_graphics_opengl_GL.SAMPLES = 32937;
lime_graphics_opengl_GL.SAMPLE_COVERAGE_VALUE = 32938;
lime_graphics_opengl_GL.SAMPLE_COVERAGE_INVERT = 32939;
lime_graphics_opengl_GL.COMPRESSED_TEXTURE_FORMATS = 34467;
lime_graphics_opengl_GL.DONT_CARE = 4352;
lime_graphics_opengl_GL.FASTEST = 4353;
lime_graphics_opengl_GL.NICEST = 4354;
lime_graphics_opengl_GL.GENERATE_MIPMAP_HINT = 33170;
lime_graphics_opengl_GL.BYTE = 5120;
lime_graphics_opengl_GL.UNSIGNED_BYTE = 5121;
lime_graphics_opengl_GL.SHORT = 5122;
lime_graphics_opengl_GL.UNSIGNED_SHORT = 5123;
lime_graphics_opengl_GL.INT = 5124;
lime_graphics_opengl_GL.UNSIGNED_INT = 5125;
lime_graphics_opengl_GL.FLOAT = 5126;
lime_graphics_opengl_GL.DEPTH_COMPONENT = 6402;
lime_graphics_opengl_GL.ALPHA = 6406;
lime_graphics_opengl_GL.RGB = 6407;
lime_graphics_opengl_GL.RGBA = 6408;
lime_graphics_opengl_GL.BGR_EXT = 32992;
lime_graphics_opengl_GL.BGRA_EXT = 32993;
lime_graphics_opengl_GL.LUMINANCE = 6409;
lime_graphics_opengl_GL.LUMINANCE_ALPHA = 6410;
lime_graphics_opengl_GL.UNSIGNED_SHORT_4_4_4_4 = 32819;
lime_graphics_opengl_GL.UNSIGNED_SHORT_5_5_5_1 = 32820;
lime_graphics_opengl_GL.UNSIGNED_SHORT_5_6_5 = 33635;
lime_graphics_opengl_GL.FRAGMENT_SHADER = 35632;
lime_graphics_opengl_GL.VERTEX_SHADER = 35633;
lime_graphics_opengl_GL.MAX_VERTEX_ATTRIBS = 34921;
lime_graphics_opengl_GL.MAX_VERTEX_UNIFORM_VECTORS = 36347;
lime_graphics_opengl_GL.MAX_VARYING_VECTORS = 36348;
lime_graphics_opengl_GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661;
lime_graphics_opengl_GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660;
lime_graphics_opengl_GL.MAX_TEXTURE_IMAGE_UNITS = 34930;
lime_graphics_opengl_GL.MAX_FRAGMENT_UNIFORM_VECTORS = 36349;
lime_graphics_opengl_GL.SHADER_TYPE = 35663;
lime_graphics_opengl_GL.DELETE_STATUS = 35712;
lime_graphics_opengl_GL.LINK_STATUS = 35714;
lime_graphics_opengl_GL.VALIDATE_STATUS = 35715;
lime_graphics_opengl_GL.ATTACHED_SHADERS = 35717;
lime_graphics_opengl_GL.ACTIVE_UNIFORMS = 35718;
lime_graphics_opengl_GL.ACTIVE_ATTRIBUTES = 35721;
lime_graphics_opengl_GL.SHADING_LANGUAGE_VERSION = 35724;
lime_graphics_opengl_GL.CURRENT_PROGRAM = 35725;
lime_graphics_opengl_GL.NEVER = 512;
lime_graphics_opengl_GL.LESS = 513;
lime_graphics_opengl_GL.EQUAL = 514;
lime_graphics_opengl_GL.LEQUAL = 515;
lime_graphics_opengl_GL.GREATER = 516;
lime_graphics_opengl_GL.NOTEQUAL = 517;
lime_graphics_opengl_GL.GEQUAL = 518;
lime_graphics_opengl_GL.ALWAYS = 519;
lime_graphics_opengl_GL.KEEP = 7680;
lime_graphics_opengl_GL.REPLACE = 7681;
lime_graphics_opengl_GL.INCR = 7682;
lime_graphics_opengl_GL.DECR = 7683;
lime_graphics_opengl_GL.INVERT = 5386;
lime_graphics_opengl_GL.INCR_WRAP = 34055;
lime_graphics_opengl_GL.DECR_WRAP = 34056;
lime_graphics_opengl_GL.VENDOR = 7936;
lime_graphics_opengl_GL.RENDERER = 7937;
lime_graphics_opengl_GL.VERSION = 7938;
lime_graphics_opengl_GL.NEAREST = 9728;
lime_graphics_opengl_GL.LINEAR = 9729;
lime_graphics_opengl_GL.NEAREST_MIPMAP_NEAREST = 9984;
lime_graphics_opengl_GL.LINEAR_MIPMAP_NEAREST = 9985;
lime_graphics_opengl_GL.NEAREST_MIPMAP_LINEAR = 9986;
lime_graphics_opengl_GL.LINEAR_MIPMAP_LINEAR = 9987;
lime_graphics_opengl_GL.TEXTURE_MAG_FILTER = 10240;
lime_graphics_opengl_GL.TEXTURE_MIN_FILTER = 10241;
lime_graphics_opengl_GL.TEXTURE_WRAP_S = 10242;
lime_graphics_opengl_GL.TEXTURE_WRAP_T = 10243;
lime_graphics_opengl_GL.TEXTURE_2D = 3553;
lime_graphics_opengl_GL.TEXTURE = 5890;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP = 34067;
lime_graphics_opengl_GL.TEXTURE_BINDING_CUBE_MAP = 34068;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_X = 34069;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074;
lime_graphics_opengl_GL.MAX_CUBE_MAP_TEXTURE_SIZE = 34076;
lime_graphics_opengl_GL.TEXTURE0 = 33984;
lime_graphics_opengl_GL.TEXTURE1 = 33985;
lime_graphics_opengl_GL.TEXTURE2 = 33986;
lime_graphics_opengl_GL.TEXTURE3 = 33987;
lime_graphics_opengl_GL.TEXTURE4 = 33988;
lime_graphics_opengl_GL.TEXTURE5 = 33989;
lime_graphics_opengl_GL.TEXTURE6 = 33990;
lime_graphics_opengl_GL.TEXTURE7 = 33991;
lime_graphics_opengl_GL.TEXTURE8 = 33992;
lime_graphics_opengl_GL.TEXTURE9 = 33993;
lime_graphics_opengl_GL.TEXTURE10 = 33994;
lime_graphics_opengl_GL.TEXTURE11 = 33995;
lime_graphics_opengl_GL.TEXTURE12 = 33996;
lime_graphics_opengl_GL.TEXTURE13 = 33997;
lime_graphics_opengl_GL.TEXTURE14 = 33998;
lime_graphics_opengl_GL.TEXTURE15 = 33999;
lime_graphics_opengl_GL.TEXTURE16 = 34000;
lime_graphics_opengl_GL.TEXTURE17 = 34001;
lime_graphics_opengl_GL.TEXTURE18 = 34002;
lime_graphics_opengl_GL.TEXTURE19 = 34003;
lime_graphics_opengl_GL.TEXTURE20 = 34004;
lime_graphics_opengl_GL.TEXTURE21 = 34005;
lime_graphics_opengl_GL.TEXTURE22 = 34006;
lime_graphics_opengl_GL.TEXTURE23 = 34007;
lime_graphics_opengl_GL.TEXTURE24 = 34008;
lime_graphics_opengl_GL.TEXTURE25 = 34009;
lime_graphics_opengl_GL.TEXTURE26 = 34010;
lime_graphics_opengl_GL.TEXTURE27 = 34011;
lime_graphics_opengl_GL.TEXTURE28 = 34012;
lime_graphics_opengl_GL.TEXTURE29 = 34013;
lime_graphics_opengl_GL.TEXTURE30 = 34014;
lime_graphics_opengl_GL.TEXTURE31 = 34015;
lime_graphics_opengl_GL.ACTIVE_TEXTURE = 34016;
lime_graphics_opengl_GL.REPEAT = 10497;
lime_graphics_opengl_GL.CLAMP_TO_EDGE = 33071;
lime_graphics_opengl_GL.MIRRORED_REPEAT = 33648;
lime_graphics_opengl_GL.FLOAT_VEC2 = 35664;
lime_graphics_opengl_GL.FLOAT_VEC3 = 35665;
lime_graphics_opengl_GL.FLOAT_VEC4 = 35666;
lime_graphics_opengl_GL.INT_VEC2 = 35667;
lime_graphics_opengl_GL.INT_VEC3 = 35668;
lime_graphics_opengl_GL.INT_VEC4 = 35669;
lime_graphics_opengl_GL.BOOL = 35670;
lime_graphics_opengl_GL.BOOL_VEC2 = 35671;
lime_graphics_opengl_GL.BOOL_VEC3 = 35672;
lime_graphics_opengl_GL.BOOL_VEC4 = 35673;
lime_graphics_opengl_GL.FLOAT_MAT2 = 35674;
lime_graphics_opengl_GL.FLOAT_MAT3 = 35675;
lime_graphics_opengl_GL.FLOAT_MAT4 = 35676;
lime_graphics_opengl_GL.SAMPLER_2D = 35678;
lime_graphics_opengl_GL.SAMPLER_CUBE = 35680;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_ENABLED = 34338;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_SIZE = 34339;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_STRIDE = 34340;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_TYPE = 34341;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_POINTER = 34373;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975;
lime_graphics_opengl_GL.VERTEX_PROGRAM_POINT_SIZE = 34370;
lime_graphics_opengl_GL.POINT_SPRITE = 34913;
lime_graphics_opengl_GL.COMPILE_STATUS = 35713;
lime_graphics_opengl_GL.LOW_FLOAT = 36336;
lime_graphics_opengl_GL.MEDIUM_FLOAT = 36337;
lime_graphics_opengl_GL.HIGH_FLOAT = 36338;
lime_graphics_opengl_GL.LOW_INT = 36339;
lime_graphics_opengl_GL.MEDIUM_INT = 36340;
lime_graphics_opengl_GL.HIGH_INT = 36341;
lime_graphics_opengl_GL.FRAMEBUFFER = 36160;
lime_graphics_opengl_GL.RENDERBUFFER = 36161;
lime_graphics_opengl_GL.RGBA4 = 32854;
lime_graphics_opengl_GL.RGB5_A1 = 32855;
lime_graphics_opengl_GL.RGB565 = 36194;
lime_graphics_opengl_GL.DEPTH_COMPONENT16 = 33189;
lime_graphics_opengl_GL.STENCIL_INDEX = 6401;
lime_graphics_opengl_GL.STENCIL_INDEX8 = 36168;
lime_graphics_opengl_GL.DEPTH_STENCIL = 34041;
lime_graphics_opengl_GL.RENDERBUFFER_WIDTH = 36162;
lime_graphics_opengl_GL.RENDERBUFFER_HEIGHT = 36163;
lime_graphics_opengl_GL.RENDERBUFFER_INTERNAL_FORMAT = 36164;
lime_graphics_opengl_GL.RENDERBUFFER_RED_SIZE = 36176;
lime_graphics_opengl_GL.RENDERBUFFER_GREEN_SIZE = 36177;
lime_graphics_opengl_GL.RENDERBUFFER_BLUE_SIZE = 36178;
lime_graphics_opengl_GL.RENDERBUFFER_ALPHA_SIZE = 36179;
lime_graphics_opengl_GL.RENDERBUFFER_DEPTH_SIZE = 36180;
lime_graphics_opengl_GL.RENDERBUFFER_STENCIL_SIZE = 36181;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051;
lime_graphics_opengl_GL.COLOR_ATTACHMENT0 = 36064;
lime_graphics_opengl_GL.DEPTH_ATTACHMENT = 36096;
lime_graphics_opengl_GL.STENCIL_ATTACHMENT = 36128;
lime_graphics_opengl_GL.DEPTH_STENCIL_ATTACHMENT = 33306;
lime_graphics_opengl_GL.NONE = 0;
lime_graphics_opengl_GL.FRAMEBUFFER_COMPLETE = 36053;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057;
lime_graphics_opengl_GL.FRAMEBUFFER_UNSUPPORTED = 36061;
lime_graphics_opengl_GL.FRAMEBUFFER_BINDING = 36006;
lime_graphics_opengl_GL.RENDERBUFFER_BINDING = 36007;
lime_graphics_opengl_GL.MAX_RENDERBUFFER_SIZE = 34024;
lime_graphics_opengl_GL.INVALID_FRAMEBUFFER_OPERATION = 1286;
lime_graphics_opengl_GL.UNPACK_FLIP_Y_WEBGL = 37440;
lime_graphics_opengl_GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441;
lime_graphics_opengl_GL.CONTEXT_LOST_WEBGL = 37442;
lime_graphics_opengl_GL.UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443;
lime_graphics_opengl_GL.BROWSER_DEFAULT_WEBGL = 37444;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__identity = [1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0];
lime_math_Matrix3.__identity = new lime_math_Matrix3();
lime_math__$Matrix4_Matrix4_$Impl_$.__identity = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_SSL = 1;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_WIN32 = 2;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_ALL = 3;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_NOTHING = 0;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_DEFAULT = 3;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_ACK_EINTR = 4;
lime_system_BackgroundWorker.MESSAGE_COMPLETE = "__COMPLETE__";
lime_system_BackgroundWorker.MESSAGE_ERROR = "__ERROR__";
lime_system_CFFI.__moduleNames = null;
lime_text__$TextDirection_TextDirection_$Impl_$.INVALID = 0;
lime_text__$TextDirection_TextDirection_$Impl_$.LEFT_TO_RIGHT = 4;
lime_text__$TextDirection_TextDirection_$Impl_$.RIGHT_TO_LEFT = 5;
lime_text__$TextDirection_TextDirection_$Impl_$.TOP_TO_BOTTOM = 6;
lime_text__$TextDirection_TextDirection_$Impl_$.BOTTOM_TO_TOP = 7;
lime_text__$TextScript_TextScript_$Impl_$.COMMON = "Zyyy";
lime_text__$TextScript_TextScript_$Impl_$.INHERITED = "Zinh";
lime_text__$TextScript_TextScript_$Impl_$.UNKNOWN = "Zzzz";
lime_text__$TextScript_TextScript_$Impl_$.ARABIC = "Arab";
lime_text__$TextScript_TextScript_$Impl_$.ARMENIAN = "Armn";
lime_text__$TextScript_TextScript_$Impl_$.BENGALI = "Beng";
lime_text__$TextScript_TextScript_$Impl_$.CYRILLIC = "Cyrl";
lime_text__$TextScript_TextScript_$Impl_$.DEVANAGARI = "Deva";
lime_text__$TextScript_TextScript_$Impl_$.GEORGIAN = "Geor";
lime_text__$TextScript_TextScript_$Impl_$.GREEK = "Grek";
lime_text__$TextScript_TextScript_$Impl_$.GUJARATI = "Gujr";
lime_text__$TextScript_TextScript_$Impl_$.GURMUKHI = "Guru";
lime_text__$TextScript_TextScript_$Impl_$.HANGUL = "Hang";
lime_text__$TextScript_TextScript_$Impl_$.HAN = "Hani";
lime_text__$TextScript_TextScript_$Impl_$.HEBREW = "Hebr";
lime_text__$TextScript_TextScript_$Impl_$.HIRAGANA = "Hira";
lime_text__$TextScript_TextScript_$Impl_$.KANNADA = "Knda";
lime_text__$TextScript_TextScript_$Impl_$.KATAKANA = "Kana";
lime_text__$TextScript_TextScript_$Impl_$.LAO = "Laoo";
lime_text__$TextScript_TextScript_$Impl_$.LATIN = "Latn";
lime_text__$TextScript_TextScript_$Impl_$.MALAYALAM = "Mlym";
lime_text__$TextScript_TextScript_$Impl_$.ORIYA = "Orya";
lime_text__$TextScript_TextScript_$Impl_$.TAMIL = "Taml";
lime_text__$TextScript_TextScript_$Impl_$.TELUGA = "Telu";
lime_text__$TextScript_TextScript_$Impl_$.THAI = "Thai";
lime_text__$TextScript_TextScript_$Impl_$.TIBETAN = "Tibt";
lime_text__$TextScript_TextScript_$Impl_$.BOPOMOFO = "Bopo";
lime_text__$TextScript_TextScript_$Impl_$.BRAILLE = "Brai";
lime_text__$TextScript_TextScript_$Impl_$.CANADIAN_SYLLABICS = "Cans";
lime_text__$TextScript_TextScript_$Impl_$.CHEROKEE = "Cher";
lime_text__$TextScript_TextScript_$Impl_$.ETHIOPIC = "Ethi";
lime_text__$TextScript_TextScript_$Impl_$.KHMER = "Khmr";
lime_text__$TextScript_TextScript_$Impl_$.MONGOLIAN = "Mong";
lime_text__$TextScript_TextScript_$Impl_$.MYANMAR = "Mymr";
lime_text__$TextScript_TextScript_$Impl_$.OGHAM = "Ogam";
lime_text__$TextScript_TextScript_$Impl_$.RUNIC = "Runr";
lime_text__$TextScript_TextScript_$Impl_$.SINHALA = "Sinh";
lime_text__$TextScript_TextScript_$Impl_$.SYRIAC = "Syrc";
lime_text__$TextScript_TextScript_$Impl_$.THAANA = "Thaa";
lime_text__$TextScript_TextScript_$Impl_$.YI = "Yiii";
lime_text__$TextScript_TextScript_$Impl_$.DESERET = "Dsrt";
lime_text__$TextScript_TextScript_$Impl_$.GOTHIC = "Goth";
lime_text__$TextScript_TextScript_$Impl_$.OLD_ITALIC = "Ital";
lime_text__$TextScript_TextScript_$Impl_$.BUHID = "Buhd";
lime_text__$TextScript_TextScript_$Impl_$.HANUNOO = "Hano";
lime_text__$TextScript_TextScript_$Impl_$.TAGALOG = "Tglg";
lime_text__$TextScript_TextScript_$Impl_$.TAGBANWA = "Tagb";
lime_text__$TextScript_TextScript_$Impl_$.CYPRIOT = "Cprt";
lime_text__$TextScript_TextScript_$Impl_$.LIMBU = "Limb";
lime_text__$TextScript_TextScript_$Impl_$.LINEAR_B = "Linb";
lime_text__$TextScript_TextScript_$Impl_$.OSMANYA = "Osma";
lime_text__$TextScript_TextScript_$Impl_$.SHAVIAN = "Shaw";
lime_text__$TextScript_TextScript_$Impl_$.TAI_LE = "Tale";
lime_text__$TextScript_TextScript_$Impl_$.UGARITIC = "Ugar";
lime_text__$TextScript_TextScript_$Impl_$.BUGINESE = "Bugi";
lime_text__$TextScript_TextScript_$Impl_$.COPTIC = "Copt";
lime_text__$TextScript_TextScript_$Impl_$.GLAGOLITIC = "Glag";
lime_text__$TextScript_TextScript_$Impl_$.KHAROSHTHI = "Khar";
lime_text__$TextScript_TextScript_$Impl_$.NEW_TAI_LUE = "Talu";
lime_text__$TextScript_TextScript_$Impl_$.OLD_PERSIAN = "Xpeo";
lime_text__$TextScript_TextScript_$Impl_$.SYLOTI_NAGRI = "Sylo";
lime_text__$TextScript_TextScript_$Impl_$.TIFINAGH = "Tfng";
lime_text__$TextScript_TextScript_$Impl_$.BALINESE = "Bali";
lime_text__$TextScript_TextScript_$Impl_$.CUNEIFORM = "Xsux";
lime_text__$TextScript_TextScript_$Impl_$.NKO = "Nkoo";
lime_text__$TextScript_TextScript_$Impl_$.PHAGS_PA = "Phag";
lime_text__$TextScript_TextScript_$Impl_$.PHOENICIAN = "Phnx";
lime_text__$TextScript_TextScript_$Impl_$.CARIAN = "Cari";
lime_text__$TextScript_TextScript_$Impl_$.CHAM = "Cham";
lime_text__$TextScript_TextScript_$Impl_$.KAYAH_LI = "Kali";
lime_text__$TextScript_TextScript_$Impl_$.LEPCHA = "Lepc";
lime_text__$TextScript_TextScript_$Impl_$.LYCIAN = "Lyci";
lime_text__$TextScript_TextScript_$Impl_$.LYDIAN = "Lydi";
lime_text__$TextScript_TextScript_$Impl_$.OL_CHIKI = "Olck";
lime_text__$TextScript_TextScript_$Impl_$.REJANG = "Rjng";
lime_text__$TextScript_TextScript_$Impl_$.SAURASHTRA = "Saur";
lime_text__$TextScript_TextScript_$Impl_$.SUNDANESE = "Sund";
lime_text__$TextScript_TextScript_$Impl_$.VAI = "Vaii";
lime_text__$TextScript_TextScript_$Impl_$.AVESTAN = "Avst";
lime_text__$TextScript_TextScript_$Impl_$.BAMUM = "Bamu";
lime_text__$TextScript_TextScript_$Impl_$.EGYPTIAN_HIEROGLYPHS = "Egyp";
lime_text__$TextScript_TextScript_$Impl_$.IMPERIAL_ARAMAIC = "Armi";
lime_text__$TextScript_TextScript_$Impl_$.INSCRIPTIONAL_PAHLAVI = "Phli";
lime_text__$TextScript_TextScript_$Impl_$.INSCRIPTIONAL_PARTHIAN = "Prti";
lime_text__$TextScript_TextScript_$Impl_$.JAVANESE = "Java";
lime_text__$TextScript_TextScript_$Impl_$.KAITHI = "Kthi";
lime_text__$TextScript_TextScript_$Impl_$.LISU = "Lisu";
lime_text__$TextScript_TextScript_$Impl_$.MEETEI_MAYEK = "Mtei";
lime_text__$TextScript_TextScript_$Impl_$.OLD_SOUTH_ARABIAN = "Sarb";
lime_text__$TextScript_TextScript_$Impl_$.OLD_TURKIC = "Orkh";
lime_text__$TextScript_TextScript_$Impl_$.SAMARITAN = "Samr";
lime_text__$TextScript_TextScript_$Impl_$.TAI_THAM = "Lana";
lime_text__$TextScript_TextScript_$Impl_$.TAI_VIET = "Tavt";
lime_text__$TextScript_TextScript_$Impl_$.BATAK = "Batk";
lime_text__$TextScript_TextScript_$Impl_$.BRAHMI = "Brah";
lime_text__$TextScript_TextScript_$Impl_$.MANDAIC = "Mand";
lime_text__$TextScript_TextScript_$Impl_$.CHAKMA = "Cakm";
lime_text__$TextScript_TextScript_$Impl_$.MEROITIC_CURSIVE = "Merc";
lime_text__$TextScript_TextScript_$Impl_$.MEROITIC_HIEROGLYPHS = "Mero";
lime_text__$TextScript_TextScript_$Impl_$.MIAO = "Plrd";
lime_text__$TextScript_TextScript_$Impl_$.SHARADA = "Shrd";
lime_text__$TextScript_TextScript_$Impl_$.SORA_SOMPENG = "Sora";
lime_text__$TextScript_TextScript_$Impl_$.TAKRI = "Takr";
lime_text__$TextScript_TextScript_$Impl_$.BASSA_VAH = "Bass";
lime_text__$TextScript_TextScript_$Impl_$.CAUCASIAN_ALBANIAN = "Aghb";
lime_text__$TextScript_TextScript_$Impl_$.DUPLOYAN = "Dupl";
lime_text__$TextScript_TextScript_$Impl_$.ELBASAN = "Elba";
lime_text__$TextScript_TextScript_$Impl_$.GRANTHA = "Gran";
lime_text__$TextScript_TextScript_$Impl_$.KHOJKI = "Khoj";
lime_text__$TextScript_TextScript_$Impl_$.KHUDAWADI = "Sind";
lime_text__$TextScript_TextScript_$Impl_$.LINEAR_A = "Lina";
lime_text__$TextScript_TextScript_$Impl_$.MAHAJANI = "Mahj";
lime_text__$TextScript_TextScript_$Impl_$.MANICHAEAN = "Mani";
lime_text__$TextScript_TextScript_$Impl_$.MENDE_KIKAKUI = "Mend";
lime_text__$TextScript_TextScript_$Impl_$.MODI = "Modi";
lime_text__$TextScript_TextScript_$Impl_$.MRO = "Mroo";
lime_text__$TextScript_TextScript_$Impl_$.NABATAEAN = "Nbat";
lime_text__$TextScript_TextScript_$Impl_$.OLD_NORTH_ARABIAN = "Narb";
lime_text__$TextScript_TextScript_$Impl_$.OLD_PERMIC = "Perm";
lime_text__$TextScript_TextScript_$Impl_$.PAHAWH_HMONG = "Hmng";
lime_text__$TextScript_TextScript_$Impl_$.PALMYRENE = "Palm";
lime_text__$TextScript_TextScript_$Impl_$.PAU_CIN_HAU = "Pauc";
lime_text__$TextScript_TextScript_$Impl_$.PSALTER_PAHLAVI = "Phlp";
lime_text__$TextScript_TextScript_$Impl_$.SIDDHAM = "Sidd";
lime_text__$TextScript_TextScript_$Impl_$.TIRHUTA = "Tirh";
lime_text__$TextScript_TextScript_$Impl_$.WARANG_CITI = "Wara";
lime_ui_Gamepad.devices = new haxe_ds_IntMap();
lime_ui_Gamepad.onConnect = new lime_app_Event_$lime_$ui_$Gamepad_$Void();
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.LEFT_X = 0;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.LEFT_Y = 1;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.RIGHT_X = 2;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.RIGHT_Y = 3;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.TRIGGER_LEFT = 4;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.TRIGGER_RIGHT = 5;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.A = 0;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.B = 1;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.X = 2;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.Y = 3;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.BACK = 4;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.GUIDE = 5;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.START = 6;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.LEFT_STICK = 7;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.RIGHT_STICK = 8;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.LEFT_SHOULDER = 9;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.RIGHT_SHOULDER = 10;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_UP = 11;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_DOWN = 12;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_LEFT = 13;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_RIGHT = 14;
lime_ui_Joystick.devices = new haxe_ds_IntMap();
lime_ui_Joystick.onConnect = new lime_app_Event_$lime_$ui_$Joystick_$Void();
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.CENTER = 0;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN = 4;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.LEFT = 8;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.RIGHT = 2;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP = 1;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN_LEFT = 12;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN_RIGHT = 6;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP_LEFT = 9;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP_RIGHT = 3;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNKNOWN = 0;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKSPACE = 8;
lime_ui__$KeyCode_KeyCode_$Impl_$.TAB = 9;
lime_ui__$KeyCode_KeyCode_$Impl_$.RETURN = 13;
lime_ui__$KeyCode_KeyCode_$Impl_$.ESCAPE = 27;
lime_ui__$KeyCode_KeyCode_$Impl_$.SPACE = 32;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXCLAMATION = 33;
lime_ui__$KeyCode_KeyCode_$Impl_$.QUOTE = 34;
lime_ui__$KeyCode_KeyCode_$Impl_$.HASH = 35;
lime_ui__$KeyCode_KeyCode_$Impl_$.DOLLAR = 36;
lime_ui__$KeyCode_KeyCode_$Impl_$.PERCENT = 37;
lime_ui__$KeyCode_KeyCode_$Impl_$.AMPERSAND = 38;
lime_ui__$KeyCode_KeyCode_$Impl_$.SINGLE_QUOTE = 39;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_PARENTHESIS = 40;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_PARENTHESIS = 41;
lime_ui__$KeyCode_KeyCode_$Impl_$.ASTERISK = 42;
lime_ui__$KeyCode_KeyCode_$Impl_$.PLUS = 43;
lime_ui__$KeyCode_KeyCode_$Impl_$.COMMA = 44;
lime_ui__$KeyCode_KeyCode_$Impl_$.MINUS = 45;
lime_ui__$KeyCode_KeyCode_$Impl_$.PERIOD = 46;
lime_ui__$KeyCode_KeyCode_$Impl_$.SLASH = 47;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_0 = 48;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_1 = 49;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_2 = 50;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_3 = 51;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_4 = 52;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_5 = 53;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_6 = 54;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_7 = 55;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_8 = 56;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_9 = 57;
lime_ui__$KeyCode_KeyCode_$Impl_$.COLON = 58;
lime_ui__$KeyCode_KeyCode_$Impl_$.SEMICOLON = 59;
lime_ui__$KeyCode_KeyCode_$Impl_$.LESS_THAN = 60;
lime_ui__$KeyCode_KeyCode_$Impl_$.EQUALS = 61;
lime_ui__$KeyCode_KeyCode_$Impl_$.GREATER_THAN = 62;
lime_ui__$KeyCode_KeyCode_$Impl_$.QUESTION = 63;
lime_ui__$KeyCode_KeyCode_$Impl_$.AT = 64;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_BRACKET = 91;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKSLASH = 92;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_BRACKET = 93;
lime_ui__$KeyCode_KeyCode_$Impl_$.CARET = 94;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNDERSCORE = 95;
lime_ui__$KeyCode_KeyCode_$Impl_$.GRAVE = 96;
lime_ui__$KeyCode_KeyCode_$Impl_$.A = 97;
lime_ui__$KeyCode_KeyCode_$Impl_$.B = 98;
lime_ui__$KeyCode_KeyCode_$Impl_$.C = 99;
lime_ui__$KeyCode_KeyCode_$Impl_$.D = 100;
lime_ui__$KeyCode_KeyCode_$Impl_$.E = 101;
lime_ui__$KeyCode_KeyCode_$Impl_$.F = 102;
lime_ui__$KeyCode_KeyCode_$Impl_$.G = 103;
lime_ui__$KeyCode_KeyCode_$Impl_$.H = 104;
lime_ui__$KeyCode_KeyCode_$Impl_$.I = 105;
lime_ui__$KeyCode_KeyCode_$Impl_$.J = 106;
lime_ui__$KeyCode_KeyCode_$Impl_$.K = 107;
lime_ui__$KeyCode_KeyCode_$Impl_$.L = 108;
lime_ui__$KeyCode_KeyCode_$Impl_$.M = 109;
lime_ui__$KeyCode_KeyCode_$Impl_$.N = 110;
lime_ui__$KeyCode_KeyCode_$Impl_$.O = 111;
lime_ui__$KeyCode_KeyCode_$Impl_$.P = 112;
lime_ui__$KeyCode_KeyCode_$Impl_$.Q = 113;
lime_ui__$KeyCode_KeyCode_$Impl_$.R = 114;
lime_ui__$KeyCode_KeyCode_$Impl_$.S = 115;
lime_ui__$KeyCode_KeyCode_$Impl_$.T = 116;
lime_ui__$KeyCode_KeyCode_$Impl_$.U = 117;
lime_ui__$KeyCode_KeyCode_$Impl_$.V = 118;
lime_ui__$KeyCode_KeyCode_$Impl_$.W = 119;
lime_ui__$KeyCode_KeyCode_$Impl_$.X = 120;
lime_ui__$KeyCode_KeyCode_$Impl_$.Y = 121;
lime_ui__$KeyCode_KeyCode_$Impl_$.Z = 122;
lime_ui__$KeyCode_KeyCode_$Impl_$.DELETE = 127;
lime_ui__$KeyCode_KeyCode_$Impl_$.CAPS_LOCK = 1073741881;
lime_ui__$KeyCode_KeyCode_$Impl_$.F1 = 1073741882;
lime_ui__$KeyCode_KeyCode_$Impl_$.F2 = 1073741883;
lime_ui__$KeyCode_KeyCode_$Impl_$.F3 = 1073741884;
lime_ui__$KeyCode_KeyCode_$Impl_$.F4 = 1073741885;
lime_ui__$KeyCode_KeyCode_$Impl_$.F5 = 1073741886;
lime_ui__$KeyCode_KeyCode_$Impl_$.F6 = 1073741887;
lime_ui__$KeyCode_KeyCode_$Impl_$.F7 = 1073741888;
lime_ui__$KeyCode_KeyCode_$Impl_$.F8 = 1073741889;
lime_ui__$KeyCode_KeyCode_$Impl_$.F9 = 1073741890;
lime_ui__$KeyCode_KeyCode_$Impl_$.F10 = 1073741891;
lime_ui__$KeyCode_KeyCode_$Impl_$.F11 = 1073741892;
lime_ui__$KeyCode_KeyCode_$Impl_$.F12 = 1073741893;
lime_ui__$KeyCode_KeyCode_$Impl_$.PRINT_SCREEN = 1073741894;
lime_ui__$KeyCode_KeyCode_$Impl_$.SCROLL_LOCK = 1073741895;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAUSE = 1073741896;
lime_ui__$KeyCode_KeyCode_$Impl_$.INSERT = 1073741897;
lime_ui__$KeyCode_KeyCode_$Impl_$.HOME = 1073741898;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAGE_UP = 1073741899;
lime_ui__$KeyCode_KeyCode_$Impl_$.END = 1073741901;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAGE_DOWN = 1073741902;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT = 1073741903;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT = 1073741904;
lime_ui__$KeyCode_KeyCode_$Impl_$.DOWN = 1073741905;
lime_ui__$KeyCode_KeyCode_$Impl_$.UP = 1073741906;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUM_LOCK = 1073741907;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DIVIDE = 1073741908;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MULTIPLY = 1073741909;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MINUS = 1073741910;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PLUS = 1073741911;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_ENTER = 1073741912;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_1 = 1073741913;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_2 = 1073741914;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_3 = 1073741915;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_4 = 1073741916;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_5 = 1073741917;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_6 = 1073741918;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_7 = 1073741919;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_8 = 1073741920;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_9 = 1073741921;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_0 = 1073741922;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PERIOD = 1073741923;
lime_ui__$KeyCode_KeyCode_$Impl_$.APPLICATION = 1073741925;
lime_ui__$KeyCode_KeyCode_$Impl_$.POWER = 1073741926;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_EQUALS = 1073741927;
lime_ui__$KeyCode_KeyCode_$Impl_$.F13 = 1073741928;
lime_ui__$KeyCode_KeyCode_$Impl_$.F14 = 1073741929;
lime_ui__$KeyCode_KeyCode_$Impl_$.F15 = 1073741930;
lime_ui__$KeyCode_KeyCode_$Impl_$.F16 = 1073741931;
lime_ui__$KeyCode_KeyCode_$Impl_$.F17 = 1073741932;
lime_ui__$KeyCode_KeyCode_$Impl_$.F18 = 1073741933;
lime_ui__$KeyCode_KeyCode_$Impl_$.F19 = 1073741934;
lime_ui__$KeyCode_KeyCode_$Impl_$.F20 = 1073741935;
lime_ui__$KeyCode_KeyCode_$Impl_$.F21 = 1073741936;
lime_ui__$KeyCode_KeyCode_$Impl_$.F22 = 1073741937;
lime_ui__$KeyCode_KeyCode_$Impl_$.F23 = 1073741938;
lime_ui__$KeyCode_KeyCode_$Impl_$.F24 = 1073741939;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXECUTE = 1073741940;
lime_ui__$KeyCode_KeyCode_$Impl_$.HELP = 1073741941;
lime_ui__$KeyCode_KeyCode_$Impl_$.MENU = 1073741942;
lime_ui__$KeyCode_KeyCode_$Impl_$.SELECT = 1073741943;
lime_ui__$KeyCode_KeyCode_$Impl_$.STOP = 1073741944;
lime_ui__$KeyCode_KeyCode_$Impl_$.AGAIN = 1073741945;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNDO = 1073741946;
lime_ui__$KeyCode_KeyCode_$Impl_$.CUT = 1073741947;
lime_ui__$KeyCode_KeyCode_$Impl_$.COPY = 1073741948;
lime_ui__$KeyCode_KeyCode_$Impl_$.PASTE = 1073741949;
lime_ui__$KeyCode_KeyCode_$Impl_$.FIND = 1073741950;
lime_ui__$KeyCode_KeyCode_$Impl_$.MUTE = 1073741951;
lime_ui__$KeyCode_KeyCode_$Impl_$.VOLUME_UP = 1073741952;
lime_ui__$KeyCode_KeyCode_$Impl_$.VOLUME_DOWN = 1073741953;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_COMMA = 1073741957;
lime_ui__$KeyCode_KeyCode_$Impl_$.ALT_ERASE = 1073741977;
lime_ui__$KeyCode_KeyCode_$Impl_$.SYSTEM_REQUEST = 1073741978;
lime_ui__$KeyCode_KeyCode_$Impl_$.CANCEL = 1073741979;
lime_ui__$KeyCode_KeyCode_$Impl_$.CLEAR = 1073741980;
lime_ui__$KeyCode_KeyCode_$Impl_$.PRIOR = 1073741981;
lime_ui__$KeyCode_KeyCode_$Impl_$.RETURN2 = 1073741982;
lime_ui__$KeyCode_KeyCode_$Impl_$.SEPARATOR = 1073741983;
lime_ui__$KeyCode_KeyCode_$Impl_$.OUT = 1073741984;
lime_ui__$KeyCode_KeyCode_$Impl_$.OPER = 1073741985;
lime_ui__$KeyCode_KeyCode_$Impl_$.CLEAR_AGAIN = 1073741986;
lime_ui__$KeyCode_KeyCode_$Impl_$.CRSEL = 1073741987;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXSEL = 1073741988;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_00 = 1073742000;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_000 = 1073742001;
lime_ui__$KeyCode_KeyCode_$Impl_$.THOUSAND_SEPARATOR = 1073742002;
lime_ui__$KeyCode_KeyCode_$Impl_$.DECIMAL_SEPARATOR = 1073742003;
lime_ui__$KeyCode_KeyCode_$Impl_$.CURRENCY_UNIT = 1073742004;
lime_ui__$KeyCode_KeyCode_$Impl_$.CURRENCY_SUBUNIT = 1073742005;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LEFT_PARENTHESIS = 1073742006;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_RIGHT_PARENTHESIS = 1073742007;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LEFT_BRACE = 1073742008;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_RIGHT_BRACE = 1073742009;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_TAB = 1073742010;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_BACKSPACE = 1073742011;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_A = 1073742012;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_B = 1073742013;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_C = 1073742014;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_D = 1073742015;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_E = 1073742016;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_F = 1073742017;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_XOR = 1073742018;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_POWER = 1073742019;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PERCENT = 1073742020;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LESS_THAN = 1073742021;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_GREATER_THAN = 1073742022;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_AMPERSAND = 1073742023;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DOUBLE_AMPERSAND = 1073742024;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_VERTICAL_BAR = 1073742025;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DOUBLE_VERTICAL_BAR = 1073742026;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_COLON = 1073742027;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_HASH = 1073742028;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_SPACE = 1073742029;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_AT = 1073742030;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_EXCLAMATION = 1073742031;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_STORE = 1073742032;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_RECALL = 1073742033;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_CLEAR = 1073742034;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_ADD = 1073742035;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_SUBTRACT = 1073742036;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_MULTIPLY = 1073742037;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_DIVIDE = 1073742038;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PLUS_MINUS = 1073742039;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_CLEAR = 1073742040;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_CLEAR_ENTRY = 1073742041;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_BINARY = 1073742042;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_OCTAL = 1073742043;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DECIMAL = 1073742044;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_HEXADECIMAL = 1073742045;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_CTRL = 1073742048;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_SHIFT = 1073742049;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_ALT = 1073742050;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_META = 1073742051;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_CTRL = 1073742052;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_SHIFT = 1073742053;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_ALT = 1073742054;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_META = 1073742055;
lime_ui__$KeyCode_KeyCode_$Impl_$.MODE = 1073742081;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_NEXT = 1073742082;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_PREVIOUS = 1073742083;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_STOP = 1073742084;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_PLAY = 1073742085;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_MUTE = 1073742086;
lime_ui__$KeyCode_KeyCode_$Impl_$.MEDIA_SELECT = 1073742087;
lime_ui__$KeyCode_KeyCode_$Impl_$.WWW = 1073742088;
lime_ui__$KeyCode_KeyCode_$Impl_$.MAIL = 1073742089;
lime_ui__$KeyCode_KeyCode_$Impl_$.CALCULATOR = 1073742090;
lime_ui__$KeyCode_KeyCode_$Impl_$.COMPUTER = 1073742091;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_SEARCH = 1073742092;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_HOME = 1073742093;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_BACK = 1073742094;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_FORWARD = 1073742095;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_STOP = 1073742096;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_REFRESH = 1073742097;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_BOOKMARKS = 1073742098;
lime_ui__$KeyCode_KeyCode_$Impl_$.BRIGHTNESS_DOWN = 1073742099;
lime_ui__$KeyCode_KeyCode_$Impl_$.BRIGHTNESS_UP = 1073742100;
lime_ui__$KeyCode_KeyCode_$Impl_$.DISPLAY_SWITCH = 1073742101;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_TOGGLE = 1073742102;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_DOWN = 1073742103;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_UP = 1073742104;
lime_ui__$KeyCode_KeyCode_$Impl_$.EJECT = 1073742105;
lime_ui__$KeyCode_KeyCode_$Impl_$.SLEEP = 1073742106;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.NONE = 0;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_SHIFT = 1;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_SHIFT = 2;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_CTRL = 64;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_CTRL = 128;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_ALT = 256;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_ALT = 512;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_META = 1024;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_META = 2048;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.NUM_LOCK = 4096;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.CAPS_LOCK = 8192;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.MODE = 16384;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.CTRL = 192;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.SHIFT = 3;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.ALT = 768;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.META = 3072;
lime_ui_Touch.onEnd = new lime_app_Event_$lime_$ui_$Touch_$Void();
lime_ui_Touch.onMove = new lime_app_Event_$lime_$ui_$Touch_$Void();
lime_ui_Touch.onStart = new lime_app_Event_$lime_$ui_$Touch_$Void();
lime_utils_Bytes.cffi_lime_bytes_from_data_pointer = (function($this) {
	var $r;
	var this1 = lime_system_CFFI.load("lime","lime_bytes_from_data_pointer",2,false);
	$r = this1;
	return $r;
}(this));
lime_utils_Bytes.cffi_lime_bytes_get_data_pointer = (function($this) {
	var $r;
	var this1 = lime_system_CFFI.load("lime","lime_bytes_get_data_pointer",1,false);
	$r = this1;
	return $r;
}(this));
lime_utils_Bytes.cffi_lime_bytes_read_file = (function($this) {
	var $r;
	var this1 = lime_system_CFFI.load("lime","lime_bytes_read_file",1,false);
	$r = this1;
	return $r;
}(this));
lime_utils__$Float32Array_Float32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$Int16Array_Int16Array_$Impl_$.BYTES_PER_ELEMENT = 2;
lime_utils__$Int32Array_Int32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$UInt16Array_UInt16Array_$Impl_$.BYTES_PER_ELEMENT = 2;
lime_utils__$UInt32Array_UInt32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$UInt8Array_UInt8Array_$Impl_$.BYTES_PER_ELEMENT = 1;
openfl_Assets.cache = new openfl_AssetCache();
openfl_Assets.dispatcher = new openfl_events_EventDispatcher();
openfl_Lib.current = new openfl_display_MovieClip();
openfl_Lib.__sentWarnings = new haxe_ds_StringMap();
openfl__$internal_renderer_GraphicsPaths.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_GraphicsPaths.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_cairo_CairoGraphics.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_cairo_CairoGraphics.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_cairo_CairoGraphics.fillCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_canvas_CanvasGraphics.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_opengl_GLBitmap.fbData = [];
openfl__$internal_renderer_opengl_GLRenderer.glContextId = 0;
openfl__$internal_renderer_opengl_GLRenderer.glContexts = [];
openfl__$internal_renderer_opengl_shaders2_Shader.UID = 0;
openfl__$internal_renderer_opengl_shaders2_DefaultShader.VERTEX_SRC = ["attribute vec2 " + "openfl_aPosition" + ";","attribute vec2 " + "openfl_aTexCoord0" + ";","attribute vec4 " + "openfl_aColor" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform bool " + "openfl_uUseColorTransform" + ";","varying vec2 " + "openfl_vTexCoord" + ";","varying vec4 " + "openfl_vColor" + ";","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   " + "openfl_vTexCoord" + " = " + "openfl_aTexCoord0" + ";","   if(" + "openfl_uUseColorTransform" + ")","   \t" + "openfl_vColor" + " = " + "openfl_aColor" + ";","   else","   \t" + "openfl_vColor" + " = vec4(" + "openfl_aColor" + ".rgb * " + "openfl_aColor" + ".a, " + "openfl_aColor" + ".a);","}"];
openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex = 0;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.fillVertexAttributes = [new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition")];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.drawTrianglesVertexAttributes = [new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition"),new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aTexCoord0"),new openfl__$internal_renderer_opengl_utils_VertexAttribute(4,5121,true,"openfl_aColor")];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.primitiveVertexAttributes = [new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition"),new openfl__$internal_renderer_opengl_utils_VertexAttribute(4,5126,false,"openfl_aColor")];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.graphicsDataPool = [];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bucketPool = [];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectPosition = new openfl_geom_Point();
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds = new openfl_geom_Rectangle();
openfl__$internal_renderer_opengl_utils_ShaderManager.compiledShadersCache = new haxe_ds_StringMap();
openfl__$internal_renderer_opengl_utils_SpriteBatch.VERTS_PER_SPRITE = 4;
openfl__$internal_text_TextEngine.UTF8_TAB = 9;
openfl__$internal_text_TextEngine.UTF8_ENDLINE = 10;
openfl__$internal_text_TextEngine.UTF8_SPACE = 32;
openfl__$internal_text_TextEngine.UTF8_HYPHEN = 45;
openfl__$internal_text_TextEngine.__defaultFonts = new haxe_ds_StringMap();
openfl_display__$BlendMode_BlendMode_$Impl_$.ADD = 0;
openfl_display__$BlendMode_BlendMode_$Impl_$.ALPHA = 1;
openfl_display__$BlendMode_BlendMode_$Impl_$.DARKEN = 2;
openfl_display__$BlendMode_BlendMode_$Impl_$.DIFFERENCE = 3;
openfl_display__$BlendMode_BlendMode_$Impl_$.ERASE = 4;
openfl_display__$BlendMode_BlendMode_$Impl_$.HARDLIGHT = 5;
openfl_display__$BlendMode_BlendMode_$Impl_$.INVERT = 6;
openfl_display__$BlendMode_BlendMode_$Impl_$.LAYER = 7;
openfl_display__$BlendMode_BlendMode_$Impl_$.LIGHTEN = 8;
openfl_display__$BlendMode_BlendMode_$Impl_$.MULTIPLY = 9;
openfl_display__$BlendMode_BlendMode_$Impl_$.NORMAL = 10;
openfl_display__$BlendMode_BlendMode_$Impl_$.OVERLAY = 11;
openfl_display__$BlendMode_BlendMode_$Impl_$.SCREEN = 12;
openfl_display__$BlendMode_BlendMode_$Impl_$.SHADER = 13;
openfl_display__$BlendMode_BlendMode_$Impl_$.SUBTRACT = 14;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.NONE = 0;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.ROUND = 1;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.SQUARE = 2;
openfl_display__$GradientType_GradientType_$Impl_$.LINEAR = 0;
openfl_display__$GradientType_GradientType_$Impl_$.RADIAL = 1;
openfl_display_Graphics.TILE_SCALE = 1;
openfl_display_Graphics.TILE_ROTATION = 2;
openfl_display_Graphics.TILE_RGB = 4;
openfl_display_Graphics.TILE_ALPHA = 8;
openfl_display_Graphics.TILE_TRANS_2x2 = 16;
openfl_display_Graphics.TILE_RECT = 32;
openfl_display_Graphics.TILE_ORIGIN = 64;
openfl_display_Graphics.TILE_BLEND_NORMAL = 0;
openfl_display_Graphics.TILE_BLEND_ADD = 65536;
openfl_display_Graphics.TILE_BLEND_MULTIPLY = 131072;
openfl_display_Graphics.TILE_BLEND_SCREEN = 262144;
openfl_display_Graphics.TILE_BLEND_SUBTRACT = 524288;
openfl_display_Graphics.TILE_BLEND_DARKEN = 1048576;
openfl_display_Graphics.TILE_BLEND_LIGHTEN = 2097152;
openfl_display_Graphics.TILE_BLEND_OVERLAY = 4194304;
openfl_display_Graphics.TILE_BLEND_HARDLIGHT = 8388608;
openfl_display_Graphics.TILE_BLEND_DIFFERENCE = 16777216;
openfl_display_Graphics.TILE_BLEND_INVERT = 33554432;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.LINEAR_RGB = 0;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.RGB = 1;
openfl_display__$JointStyle_JointStyle_$Impl_$.BEVEL = 0;
openfl_display__$JointStyle_JointStyle_$Impl_$.MITER = 1;
openfl_display__$JointStyle_JointStyle_$Impl_$.ROUND = 2;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.HORIZONTAL = 0;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.NONE = 1;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.NORMAL = 2;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.VERTICAL = 3;
openfl_display_OpenGLView.CONTEXT_LOST = "glcontextlost";
openfl_display_OpenGLView.CONTEXT_RESTORED = "glcontextrestored";
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.ALWAYS = 0;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.AUTO = 1;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.NEVER = 2;
openfl_display_Shader.uniformRegex = new EReg("^\\s*uniform\\s+(sampler(?:2D|Cube)|[bi]?vec[234]|float|int|bool|mat[234])\\s+(\\w+)\\s*(?:\\[(\\d+)\\])?\\s*;.*$","gmi");
openfl_display_Shader.aPosition = "openfl_aPosition";
openfl_display_Shader.aTexCoord = "openfl_aTexCoord0";
openfl_display_Shader.aColor = "openfl_aColor";
openfl_display_Shader.uSampler = "openfl_uSampler0";
openfl_display_Shader.uProjectionMatrix = "openfl_uProjectionMatrix";
openfl_display_Shader.uColorMultiplier = "openfl_uColorMultiplier";
openfl_display_Shader.uColorOffset = "openfl_uColorOffset";
openfl_display_Shader.uObjectSize = "openfl_uObjectSize";
openfl_display_Shader.uTextureSize = "openfl_uTextureSize";
openfl_display_Shader.vTexCoord = "openfl_vTexCoord";
openfl_display_Shader.vColor = "openfl_vColor";
openfl_display_Shader.vertexHeader = ["attribute vec2 " + openfl_display_Shader.aPosition + ";","attribute vec2 " + openfl_display_Shader.aTexCoord + ";","attribute vec4 " + openfl_display_Shader.aColor + ";","uniform mat3 " + openfl_display_Shader.uProjectionMatrix + ";","uniform vec2 " + openfl_display_Shader.uObjectSize + ";","uniform vec2 " + openfl_display_Shader.uTextureSize + ";","varying vec2 " + openfl_display_Shader.vTexCoord + ";","varying vec4 " + openfl_display_Shader.vColor + ";"];
openfl_display_Shader.fragmentHeader = ["uniform sampler2D " + openfl_display_Shader.uSampler + ";","uniform vec4 " + openfl_display_Shader.uColorMultiplier + ";","uniform vec4 " + openfl_display_Shader.uColorOffset + ";","uniform vec2 " + openfl_display_Shader.uObjectSize + ";","uniform vec2 " + openfl_display_Shader.uTextureSize + ";","varying vec2 " + openfl_display_Shader.vTexCoord + ";","varying vec4 " + openfl_display_Shader.vColor + ";","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {","   vec4 unmultiply = vec4(color.rgb / color.a, color.a);","   vec4 result = unmultiply * tint * multiplier;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}"];
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.PAD = 0;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.REFLECT = 1;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.REPEAT = 2;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM = 0;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM_LEFT = 1;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM_RIGHT = 2;
openfl_display__$StageAlign_StageAlign_$Impl_$.LEFT = 3;
openfl_display__$StageAlign_StageAlign_$Impl_$.RIGHT = 4;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP = 5;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP_LEFT = 6;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP_RIGHT = 7;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.FULL_SCREEN = 0;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.FULL_SCREEN_INTERACTIVE = 1;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.NORMAL = 2;
openfl_display__$StageQuality_StageQuality_$Impl_$.BEST = 0;
openfl_display__$StageQuality_StageQuality_$Impl_$.HIGH = 1;
openfl_display__$StageQuality_StageQuality_$Impl_$.LOW = 2;
openfl_display__$StageQuality_StageQuality_$Impl_$.MEDIUM = 3;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.EXACT_FIT = 0;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.NO_BORDER = 1;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.NO_SCALE = 2;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.SHOW_ALL = 3;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.NEGATIVE = 0;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.NONE = 1;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.POSITIVE = 2;
openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT = 34046;
openfl_display3D_Context3D.MAX_SAMPLERS = 8;
openfl_display3D_Context3D.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 34047;
openfl_display3D_Context3D.anisotropySupportTested = false;
openfl_display3D_Context3D.supportsAnisotropy = false;
openfl_display3D_Context3D.maxSupportedAnisotropy = 256;
openfl_display3D_Context3DClearMask.ALL = 17664;
openfl_display3D_Context3DClearMask.COLOR = 16384;
openfl_display3D_Context3DClearMask.DEPTH = 256;
openfl_display3D_Context3DClearMask.STENCIL = 1024;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.ALWAYS = 519;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.EQUAL = 514;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.GREATER = 516;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.GREATER_EQUAL = 518;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.LESS = 513;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.LESS_EQUAL = 515;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.NEVER = 512;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.NOT_EQUAL = 517;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.BACK = 1028;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.FRONT = 1029;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.FRONT_AND_BACK = 1032;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.NONE = 0;
openfl_display3D_textures_Texture.internalFormat = -1;
openfl_errors_Error.DEFAULT_TO_STRING = "Error";
openfl_events_Event.ACTIVATE = "activate";
openfl_events_Event.ADDED = "added";
openfl_events_Event.ADDED_TO_STAGE = "addedToStage";
openfl_events_Event.CANCEL = "cancel";
openfl_events_Event.CHANGE = "change";
openfl_events_Event.CLOSE = "close";
openfl_events_Event.COMPLETE = "complete";
openfl_events_Event.CONNECT = "connect";
openfl_events_Event.CONTEXT3D_CREATE = "context3DCreate";
openfl_events_Event.DEACTIVATE = "deactivate";
openfl_events_Event.ENTER_FRAME = "enterFrame";
openfl_events_Event.ID3 = "id3";
openfl_events_Event.INIT = "init";
openfl_events_Event.MOUSE_LEAVE = "mouseLeave";
openfl_events_Event.OPEN = "open";
openfl_events_Event.REMOVED = "removed";
openfl_events_Event.REMOVED_FROM_STAGE = "removedFromStage";
openfl_events_Event.RENDER = "render";
openfl_events_Event.RESIZE = "resize";
openfl_events_Event.SCROLL = "scroll";
openfl_events_Event.SELECT = "select";
openfl_events_Event.SOUND_COMPLETE = "soundComplete";
openfl_events_Event.TAB_CHILDREN_CHANGE = "tabChildrenChange";
openfl_events_Event.TAB_ENABLED_CHANGE = "tabEnabledChange";
openfl_events_Event.TAB_INDEX_CHANGE = "tabIndexChange";
openfl_events_Event.UNLOAD = "unload";
openfl_events_ActivityEvent.ACTIVITY = "activity";
openfl_events_TextEvent.LINK = "link";
openfl_events_TextEvent.TEXT_INPUT = "textInput";
openfl_events_ErrorEvent.ERROR = "error";
openfl_events_FocusEvent.FOCUS_IN = "focusIn";
openfl_events_FocusEvent.FOCUS_OUT = "focusOut";
openfl_events_FocusEvent.KEY_FOCUS_CHANGE = "keyFocusChange";
openfl_events_FocusEvent.MOUSE_FOCUS_CHANGE = "mouseFocusChange";
openfl_events_FullScreenEvent.FULL_SCREEN = "fullScreen";
openfl_events_FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED = "fullScreenInteractiveAccepted";
openfl_events_GameInputEvent.DEVICE_ADDED = "deviceAdded";
openfl_events_GameInputEvent.DEVICE_REMOVED = "deviceRemoved";
openfl_events_GameInputEvent.DEVICE_UNUSABLE = "deviceUnusable";
openfl_events_HTTPStatusEvent.HTTP_RESPONSE_STATUS = "httpResponseStatus";
openfl_events_HTTPStatusEvent.HTTP_STATUS = "httpStatus";
openfl_events_IOErrorEvent.IO_ERROR = "ioError";
openfl_events_KeyboardEvent.KEY_DOWN = "keyDown";
openfl_events_KeyboardEvent.KEY_UP = "keyUp";
openfl_events_MouseEvent.CLICK = "click";
openfl_events_MouseEvent.DOUBLE_CLICK = "doubleClick";
openfl_events_MouseEvent.MIDDLE_CLICK = "middleClick";
openfl_events_MouseEvent.MIDDLE_MOUSE_DOWN = "middleMouseDown";
openfl_events_MouseEvent.MIDDLE_MOUSE_UP = "middleMouseUp";
openfl_events_MouseEvent.MOUSE_DOWN = "mouseDown";
openfl_events_MouseEvent.MOUSE_MOVE = "mouseMove";
openfl_events_MouseEvent.MOUSE_OUT = "mouseOut";
openfl_events_MouseEvent.MOUSE_OVER = "mouseOver";
openfl_events_MouseEvent.MOUSE_UP = "mouseUp";
openfl_events_MouseEvent.MOUSE_WHEEL = "mouseWheel";
openfl_events_MouseEvent.RIGHT_CLICK = "rightClick";
openfl_events_MouseEvent.RIGHT_MOUSE_DOWN = "rightMouseDown";
openfl_events_MouseEvent.RIGHT_MOUSE_UP = "rightMouseUp";
openfl_events_MouseEvent.ROLL_OUT = "rollOut";
openfl_events_MouseEvent.ROLL_OVER = "rollOver";
openfl_events_NetStatusEvent.NET_STATUS = "netStatus";
openfl_events_ProgressEvent.PROGRESS = "progress";
openfl_events_ProgressEvent.SOCKET_DATA = "socketData";
openfl_events_SecurityErrorEvent.SECURITY_ERROR = "securityError";
openfl_events_TouchEvent.TOUCH_BEGIN = "touchBegin";
openfl_events_TouchEvent.TOUCH_END = "touchEnd";
openfl_events_TouchEvent.TOUCH_MOVE = "touchMove";
openfl_events_TouchEvent.TOUCH_OUT = "touchOut";
openfl_events_TouchEvent.TOUCH_OVER = "touchOver";
openfl_events_TouchEvent.TOUCH_ROLL_OUT = "touchRollOut";
openfl_events_TouchEvent.TOUCH_ROLL_OVER = "touchRollOver";
openfl_events_TouchEvent.TOUCH_TAP = "touchTap";
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.AXIS_ANGLE = 0;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.EULER_ANGLES = 1;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.QUATERNION = 2;
openfl_media_Sound.__registeredSounds = new haxe_ds_StringMap();
openfl_net_NetConnection.CONNECT_SUCCESS = "connectSuccess";
openfl_net_SharedObject.defaultObjectEncoding = 3;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.FLUSHED = 0;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.PENDING = 1;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.BINARY = 0;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.TEXT = 1;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.VARIABLES = 2;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.DELETE = 0;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.GET = 1;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.HEAD = 2;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.OPTIONS = 3;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.POST = 4;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.PUT = 5;
openfl_system_SecurityDomain.currentDomain = new openfl_system_SecurityDomain();
openfl_system_System.useCodePage = false;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.ADVANCED = 0;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.NORMAL = 1;
openfl_text_Font.__registeredFonts = [];
openfl_text__$FontStyle_FontStyle_$Impl_$.BOLD = 0;
openfl_text__$FontStyle_FontStyle_$Impl_$.BOLD_ITALIC = 1;
openfl_text__$FontStyle_FontStyle_$Impl_$.ITALIC = 2;
openfl_text__$FontStyle_FontStyle_$Impl_$.REGULAR = 3;
openfl_text__$FontType_FontType_$Impl_$.DEVICE = 0;
openfl_text__$FontType_FontType_$Impl_$.EMBEDDED = 1;
openfl_text__$FontType_FontType_$Impl_$.EMBEDDED_CFF = 2;
openfl_text__$GridFitType_GridFitType_$Impl_$.NONE = 0;
openfl_text__$GridFitType_GridFitType_$Impl_$.PIXEL = 1;
openfl_text__$GridFitType_GridFitType_$Impl_$.SUBPIXEL = 2;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.CENTER = 0;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.LEFT = 1;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.NONE = 2;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.RIGHT = 3;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.DYNAMIC = 0;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.INPUT = 1;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.CENTER = 0;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.END = 1;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.JUSTIFY = 2;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.LEFT = 3;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.RIGHT = 4;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.START = 5;
openfl_ui_GameInputDevice.MAX_BUFFER_SIZE = 32000;
openfl_ui_Keyboard.NUMBER_0 = 48;
openfl_ui_Keyboard.NUMBER_1 = 49;
openfl_ui_Keyboard.NUMBER_2 = 50;
openfl_ui_Keyboard.NUMBER_3 = 51;
openfl_ui_Keyboard.NUMBER_4 = 52;
openfl_ui_Keyboard.NUMBER_5 = 53;
openfl_ui_Keyboard.NUMBER_6 = 54;
openfl_ui_Keyboard.NUMBER_7 = 55;
openfl_ui_Keyboard.NUMBER_8 = 56;
openfl_ui_Keyboard.NUMBER_9 = 57;
openfl_ui_Keyboard.A = 65;
openfl_ui_Keyboard.B = 66;
openfl_ui_Keyboard.C = 67;
openfl_ui_Keyboard.D = 68;
openfl_ui_Keyboard.E = 69;
openfl_ui_Keyboard.F = 70;
openfl_ui_Keyboard.G = 71;
openfl_ui_Keyboard.H = 72;
openfl_ui_Keyboard.I = 73;
openfl_ui_Keyboard.J = 74;
openfl_ui_Keyboard.K = 75;
openfl_ui_Keyboard.L = 76;
openfl_ui_Keyboard.M = 77;
openfl_ui_Keyboard.N = 78;
openfl_ui_Keyboard.O = 79;
openfl_ui_Keyboard.P = 80;
openfl_ui_Keyboard.Q = 81;
openfl_ui_Keyboard.R = 82;
openfl_ui_Keyboard.S = 83;
openfl_ui_Keyboard.T = 84;
openfl_ui_Keyboard.U = 85;
openfl_ui_Keyboard.V = 86;
openfl_ui_Keyboard.W = 87;
openfl_ui_Keyboard.X = 88;
openfl_ui_Keyboard.Y = 89;
openfl_ui_Keyboard.Z = 90;
openfl_ui_Keyboard.NUMPAD_0 = 96;
openfl_ui_Keyboard.NUMPAD_1 = 97;
openfl_ui_Keyboard.NUMPAD_2 = 98;
openfl_ui_Keyboard.NUMPAD_3 = 99;
openfl_ui_Keyboard.NUMPAD_4 = 100;
openfl_ui_Keyboard.NUMPAD_5 = 101;
openfl_ui_Keyboard.NUMPAD_6 = 102;
openfl_ui_Keyboard.NUMPAD_7 = 103;
openfl_ui_Keyboard.NUMPAD_8 = 104;
openfl_ui_Keyboard.NUMPAD_9 = 105;
openfl_ui_Keyboard.NUMPAD_MULTIPLY = 106;
openfl_ui_Keyboard.NUMPAD_ADD = 107;
openfl_ui_Keyboard.NUMPAD_ENTER = 108;
openfl_ui_Keyboard.NUMPAD_SUBTRACT = 109;
openfl_ui_Keyboard.NUMPAD_DECIMAL = 110;
openfl_ui_Keyboard.NUMPAD_DIVIDE = 111;
openfl_ui_Keyboard.F1 = 112;
openfl_ui_Keyboard.F2 = 113;
openfl_ui_Keyboard.F3 = 114;
openfl_ui_Keyboard.F4 = 115;
openfl_ui_Keyboard.F5 = 116;
openfl_ui_Keyboard.F6 = 117;
openfl_ui_Keyboard.F7 = 118;
openfl_ui_Keyboard.F8 = 119;
openfl_ui_Keyboard.F9 = 120;
openfl_ui_Keyboard.F10 = 121;
openfl_ui_Keyboard.F11 = 122;
openfl_ui_Keyboard.F12 = 123;
openfl_ui_Keyboard.F13 = 124;
openfl_ui_Keyboard.F14 = 125;
openfl_ui_Keyboard.F15 = 126;
openfl_ui_Keyboard.BACKSPACE = 8;
openfl_ui_Keyboard.TAB = 9;
openfl_ui_Keyboard.ALTERNATE = 18;
openfl_ui_Keyboard.ENTER = 13;
openfl_ui_Keyboard.COMMAND = 15;
openfl_ui_Keyboard.SHIFT = 16;
openfl_ui_Keyboard.CONTROL = 17;
openfl_ui_Keyboard.BREAK = 19;
openfl_ui_Keyboard.CAPS_LOCK = 20;
openfl_ui_Keyboard.NUMPAD = 21;
openfl_ui_Keyboard.ESCAPE = 27;
openfl_ui_Keyboard.SPACE = 32;
openfl_ui_Keyboard.PAGE_UP = 33;
openfl_ui_Keyboard.PAGE_DOWN = 34;
openfl_ui_Keyboard.END = 35;
openfl_ui_Keyboard.HOME = 36;
openfl_ui_Keyboard.LEFT = 37;
openfl_ui_Keyboard.RIGHT = 39;
openfl_ui_Keyboard.UP = 38;
openfl_ui_Keyboard.DOWN = 40;
openfl_ui_Keyboard.INSERT = 45;
openfl_ui_Keyboard.DELETE = 46;
openfl_ui_Keyboard.NUMLOCK = 144;
openfl_ui_Keyboard.SEMICOLON = 186;
openfl_ui_Keyboard.EQUAL = 187;
openfl_ui_Keyboard.COMMA = 188;
openfl_ui_Keyboard.MINUS = 189;
openfl_ui_Keyboard.PERIOD = 190;
openfl_ui_Keyboard.SLASH = 191;
openfl_ui_Keyboard.BACKQUOTE = 192;
openfl_ui_Keyboard.LEFTBRACKET = 219;
openfl_ui_Keyboard.BACKSLASH = 220;
openfl_ui_Keyboard.RIGHTBRACKET = 221;
openfl_ui_Keyboard.QUOTE = 222;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.GESTURE = 0;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.NONE = 1;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.TOUCH_POINT = 2;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.DEFLATE = 0;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.LZMA = 1;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.ZLIB = 2;
openfl_utils__$Endian_Endian_$Impl_$.BIG_ENDIAN = 0;
openfl_utils__$Endian_Endian_$Impl_$.LITTLE_ENDIAN = 1;
ApplicationMain.main();
})(typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);
