(function(console) {
    "use strict";
    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 DateTools = function() {};
    $hxClasses["DateTools"] = DateTools;
    DateTools.__name__ = ["DateTools"];
    DateTools.__format_get = function(d, e) {
        switch (e) {
            case "%":
                return "%";
            case "C":
                return StringTools.lpad(Std.string(Std["int"](d.getFullYear() / 100)), "0", 2);
            case "d":
                return StringTools.lpad(Std.string(d.getDate()), "0", 2);
            case "D":
                return DateTools.__format(d, "%m/%d/%y");
            case "e":
                return Std.string(d.getDate());
            case "F":
                return DateTools.__format(d, "%Y-%m-%d");
            case "H":
            case "k":
                return StringTools.lpad(Std.string(d.getHours()), e == "H" ? "0" : " ", 2);
            case "I":
            case "l":
                var hour = d.getHours() % 12;
                return StringTools.lpad(Std.string(hour == 0 ? 12 : hour), e == "I" ? "0" : " ", 2);
            case "m":
                return StringTools.lpad(Std.string(d.getMonth() + 1), "0", 2);
            case "M":
                return StringTools.lpad(Std.string(d.getMinutes()), "0", 2);
            case "n":
                return "\n";
            case "p":
                if (d.getHours() > 11) return "PM";
                else return "AM";
                break;
            case "r":
                return DateTools.__format(d, "%I:%M:%S %p");
            case "R":
                return DateTools.__format(d, "%H:%M");
            case "s":
                return Std.string(Std["int"](d.getTime() / 1000));
            case "S":
                return StringTools.lpad(Std.string(d.getSeconds()), "0", 2);
            case "t":
                return "\t";
            case "T":
                return DateTools.__format(d, "%H:%M:%S");
            case "u":
                var t = d.getDay();
                if (t == 0) return "7";
                else if (t == null) return "null";
                else return "" + t;
                break;
            case "w":
                return Std.string(d.getDay());
            case "y":
                return StringTools.lpad(Std.string(d.getFullYear() % 100), "0", 2);
            case "Y":
                return Std.string(d.getFullYear());
            default:
                throw new js._Boot.HaxeError("Date.format %" + e + "- not implemented yet.");
        }
    };
    DateTools.__format = function(d, f) {
        var r = new StringBuf();
        var p = 0;
        while (true) {
            var np = f.indexOf("%", p);
            if (np < 0) break;
            r.addSub(f, p, np - p);
            r.add(DateTools.__format_get(d, HxOverrides.substr(f, np + 1, 1)));
            p = np + 2;
        }
        r.addSub(f, p, f.length - p);
        return r.b;
    };
    DateTools.format = function(d, f) {
        return DateTools.__format(d, f);
    };
    DateTools.delta = function(d, t) {
        var t1 = d.getTime() + t;
        var d1 = new Date();
        d1.setTime(t1);
        return d1;
    };
    DateTools.getMonthDays = function(d) {
        var month = d.getMonth();
        var year = d.getFullYear();
        if (month != 1) return DateTools.DAYS_OF_MONTH[month];
        var isB = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
        if (isB) return 29;
        else return 28;
    };
    DateTools.seconds = function(n) {
        return n * 1000.0;
    };
    DateTools.minutes = function(n) {
        return n * 60.0 * 1000.0;
    };
    DateTools.hours = function(n) {
        return n * 60.0 * 60.0 * 1000.0;
    };
    DateTools.days = function(n) {
        return n * 24.0 * 60.0 * 60.0 * 1000.0;
    };
    DateTools.parse = function(t) {
        var s = t / 1000;
        var m = s / 60;
        var h = m / 60;
        return {
            ms: t % 1000,
            seconds: s % 60 | 0,
            minutes: m % 60 | 0,
            hours: h % 24 | 0,
            days: h / 24 | 0
        };
    };
    DateTools.make = function(o) {
        return o.ms + 1000.0 * (o.seconds + 60.0 * (o.minutes + 60.0 * (o.hours + 24.0 * o.days)));
    };
    DateTools.makeUtc = function(year, month, day, hour, min, sec) {
        return Date.UTC(year, month, day, hour, min, sec);
    };
    var EReg = function(r, opt) {
        opt = opt.split("u").join("");
        this.r = new RegExp(r, opt);
    };
    $hxClasses["EReg"] = EReg;
    EReg.__name__ = ["EReg"];
    EReg.prototype = {
        r: null,
        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");
        },
        matchedLeft: function() {
            if (this.r.m == null) throw new js._Boot.HaxeError("No string matched");
            return HxOverrides.substr(this.r.s, 0, this.r.m.index);
        },
        matchedRight: function() {
            if (this.r.m == null) throw new js._Boot.HaxeError("No string matched");
            var sz = this.r.m.index + this.r.m[0].length;
            return HxOverrides.substr(this.r.s, sz, this.r.s.length - sz);
        },
        matchedPos: function() {
            if (this.r.m == null) throw new js._Boot.HaxeError("No string matched");
            return {
                pos: this.r.m.index,
                len: this.r.m[0].length
            };
        },
        matchSub: function(s, pos, len) {
            if (len == null) len = -1;
            if (this.r.global) {
                this.r.lastIndex = pos;
                this.r.m = this.r.exec(len < 0 ? s : HxOverrides.substr(s, 0, pos + len));
                var b = this.r.m != null;
                if (b) this.r.s = s;
                return b;
            } else {
                var b1 = this.match(len < 0 ? HxOverrides.substr(s, pos, null) : HxOverrides.substr(s, pos, len));
                if (b1) {
                    this.r.s = s;
                    this.r.m.index += pos;
                }
                return b1;
            }
        },
        split: function(s) {
            var d = "#__delim__#";
            return s.replace(this.r, d).split(d);
        },
        replace: function(s, by) {
            return s.replace(this.r, by);
        },
        map: function(s, f) {
            var offset = 0;
            var buf = new StringBuf();
            do {
                if (offset >= s.length) break;
                else if (!this.matchSub(s, offset)) {
                    buf.add(HxOverrides.substr(s, offset, null));
                    break;
                }
                var p = this.matchedPos();
                buf.add(HxOverrides.substr(s, offset, p.pos - offset));
                buf.add(f(this));
                if (p.len == 0) {
                    buf.add(HxOverrides.substr(s, p.pos, 1));
                    offset = p.pos + 1;
                } else offset = p.pos + p.len;
            } while (this.r.global);
            if (!this.r.global && offset > 0 && offset < s.length) buf.add(HxOverrides.substr(s, offset, null));
            return buf.b;
        },
        __class__: EReg
    };
    var HxOverrides = function() {};
    $hxClasses["HxOverrides"] = HxOverrides;
    HxOverrides.__name__ = ["HxOverrides"];
    HxOverrides.dateStr = function(date) {
        var m = date.getMonth() + 1;
        var d = date.getDate();
        var h = date.getHours();
        var mi = date.getMinutes();
        var s = date.getSeconds();
        return date.getFullYear() + "-" + (m < 10 ? "0" + m : "" + m) + "-" + (d < 10 ? "0" + d : "" + d) + " " + (h < 10 ? "0" + h : "" + h) + ":" + (mi < 10 ? "0" + mi : "" + mi) + ":" + (s < 10 ? "0" + s : "" + s);
    };
    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 (pos != null && pos != 0 && len != null && len < 0) return "";
        if (len == null) len = s.length;
        if (pos < 0) {
            pos = s.length + pos;
            if (pos < 0) pos = 0;
        } else if (len < 0) len = s.length + len - pos;
        return s.substr(pos, len);
    };
    HxOverrides.indexOf = function(a, obj, i) {
        var len = a.length;
        if (i < 0) {
            i += len;
            if (i < 0) i = 0;
        }
        while (i < len) {
            if (a[i] === obj) return i;
            i++;
        }
        return -1;
    };
    HxOverrides.lastIndexOf = function(a, obj, i) {
        var len = a.length;
        if (i >= len) i = len - 1;
        else if (i < 0) i += len;
        while (i >= 0) {
            if (a[i] === obj) return i;
            i--;
        }
        return -1;
    };
    HxOverrides.remove = function(a, obj) {
        var i = HxOverrides.indexOf(a, obj, 0);
        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 IntIterator = function(min, max) {
        this.min = min;
        this.max = max;
    };
    $hxClasses["IntIterator"] = IntIterator;
    IntIterator.__name__ = ["IntIterator"];
    IntIterator.prototype = {
        min: null,
        max: null,
        hasNext: function() {
            return this.min < this.max;
        },
        next: function() {
            return this.min++;
        },
        __class__: IntIterator
    };
    var Lambda = function() {};
    $hxClasses["Lambda"] = Lambda;
    Lambda.__name__ = ["Lambda"];
    Lambda.array = function(it) {
        var a = [];
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var i = $it0.next();
            a.push(i);
        }
        return a;
    };
    Lambda.list = function(it) {
        var l = new List();
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var i = $it0.next();
            l.add(i);
        }
        return l;
    };
    Lambda.map = function(it, f) {
        var l = new List();
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            l.add(f(x));
        }
        return l;
    };
    Lambda.mapi = function(it, f) {
        var l = new List();
        var i = 0;
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            l.add(f(i++, x));
        }
        return l;
    };
    Lambda.has = function(it, elt) {
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            if (x == elt) return true;
        }
        return false;
    };
    Lambda.exists = function(it, f) {
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            if (f(x)) return true;
        }
        return false;
    };
    Lambda.foreach = function(it, f) {
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            if (!f(x)) return false;
        }
        return true;
    };
    Lambda.iter = function(it, f) {
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            f(x);
        }
    };
    Lambda.filter = function(it, f) {
        var l = new List();
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            if (f(x)) l.add(x);
        }
        return l;
    };
    Lambda.fold = function(it, f, first) {
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            first = f(x, first);
        }
        return first;
    };
    Lambda.count = function(it, pred) {
        var n = 0;
        if (pred == null) {
            var $it0 = $iterator(it)();
            while ($it0.hasNext()) {
                var _ = $it0.next();
                n++;
            }
        } else {
            var $it1 = $iterator(it)();
            while ($it1.hasNext()) {
                var x = $it1.next();
                if (pred(x)) n++;
            }
        }
        return n;
    };
    Lambda.empty = function(it) {
        return !$iterator(it)().hasNext();
    };
    Lambda.indexOf = function(it, v) {
        var i = 0;
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var v2 = $it0.next();
            if (v == v2) return i;
            i++;
        }
        return -1;
    };
    Lambda.find = function(it, f) {
        var $it0 = $iterator(it)();
        while ($it0.hasNext()) {
            var v = $it0.next();
            if (f(v)) return v;
        }
        return null;
    };
    Lambda.concat = function(a, b) {
        var l = new List();
        var $it0 = $iterator(a)();
        while ($it0.hasNext()) {
            var x = $it0.next();
            l.add(x);
        }
        var $it1 = $iterator(b)();
        while ($it1.hasNext()) {
            var x1 = $it1.next();
            l.add(x1);
        }
        return l;
    };
    var List = function() {
        this.length = 0;
    };
    $hxClasses["List"] = List;
    List.__name__ = ["List"];
    List.prototype = {
        h: null,
        q: null,
        length: null,
        add: function(item) {
            var x = [item];
            if (this.h == null) this.h = x;
            else this.q[1] = x;
            this.q = x;
            this.length++;
        },
        push: function(item) {
            var x = [item, this.h];
            this.h = x;
            if (this.q == null) this.q = x;
            this.length++;
        },
        first: function() {
            if (this.h == null) return null;
            else return this.h[0];
        },
        last: function() {
            if (this.q == null) return null;
            else return this.q[0];
        },
        pop: function() {
            if (this.h == null) return null;
            var x = this.h[0];
            this.h = this.h[1];
            if (this.h == null) this.q = null;
            this.length--;
            return x;
        },
        isEmpty: function() {
            return this.h == null;
        },
        clear: function() {
            this.h = null;
            this.q = null;
            this.length = 0;
        },
        remove: function(v) {
            var prev = null;
            var l = this.h;
            while (l != null) {
                if (l[0] == v) {
                    if (prev == null) this.h = l[1];
                    else prev[1] = l[1];
                    if (this.q == l) this.q = prev;
                    this.length--;
                    return true;
                }
                prev = l;
                l = l[1];
            }
            return false;
        },
        iterator: function() {
            return new _List.ListIterator(this.h);
        },
        toString: function() {
            var s_b = "";
            var first = true;
            var l = this.h;
            s_b += "{";
            while (l != null) {
                if (first) first = false;
                else s_b += ", ";
                s_b += Std.string(Std.string(l[0]));
                l = l[1];
            }
            s_b += "}";
            return s_b;
        },
        join: function(sep) {
            var s = new StringBuf();
            var first = true;
            var l = this.h;
            while (l != null) {
                if (first) first = false;
                else if (sep == null) s.b += "null";
                else s.b += "" + sep;
                s.add(l[0]);
                l = l[1];
            }
            return s.b;
        },
        filter: function(f) {
            var l2 = new List();
            var l = this.h;
            while (l != null) {
                var v = l[0];
                l = l[1];
                if (f(v)) l2.add(v);
            }
            return l2;
        },
        map: function(f) {
            var b = new List();
            var l = this.h;
            while (l != null) {
                var v = l[0];
                l = l[1];
                b.add(f(v));
            }
            return b;
        },
        __class__: List
    };
    var _List = {};
    _List.ListIterator = function(head) {
        this.head = head;
        this.val = null;
    };
    $hxClasses["_List.ListIterator"] = _List.ListIterator;
    _List.ListIterator.__name__ = ["_List", "ListIterator"];
    _List.ListIterator.prototype = {
        head: null,
        val: null,
        hasNext: function() {
            return this.head != null;
        },
        next: function() {
            this.val = this.head[0];
            this.head = this.head[1];
            return this.val;
        },
        __class__: _List.ListIterator
    };
    var Main = function() {};
    $hxClasses["Main"] = Main;
    Main.__name__ = ["Main"];
    Main.main = function() {
        window._hcmn_ = {};
        window._hcmn_.Std = Std;
        window._hcmn_.EReg = EReg;
        window._hcmn_.List = List;
        window._hcmn_.Lambda = Lambda;
        window._hcmn_.Reflect = Reflect;
        window._hcmn_.StringBuf = StringBuf;
        window._hcmn_.StringTools = StringTools;
        window._hcmn_.DateTools = DateTools;
        window._hcmn_.Date = Date;
        window._hcmn_.HxOverrides = HxOverrides;
        window._hcmn_.ValueType = ValueType;
        window._hcmn_.Type = Type;
        window._hcmn_.Math = Math;
        window._hcmn_.Int = Int;
        window._hcmn_.Float = Float;
        window._hcmn_.Bool = Bool;
        window._hcmn_.Dynamic = Dynamic;
        window._hcmn_.Class = Class;
        window._hcmn_.Enum = Enum;
        window._hcmn_.js_Boot = js.Boot;
        window._hcmn_.haxe_ds_StringMap = haxe.ds.StringMap;
        window._hcmn_.haxe_ds_IntMap = haxe.ds.IntMap;
        window._hcmn_.haxe_ds_BalancedTree = haxe.ds.BalancedTree;
        window._hcmn_.haxe_ds_EnumValueMap = haxe.ds.EnumValueMap;
        window._hcmn_.haxe_Timer = haxe.Timer;
        window._hcmn_.__map_reserved = __map_reserved;
        window._hcmn_.haxe_Log = haxe.Log;
        window._hcmn_.msignal_Event = msignal.Event;
        window._hcmn_.msignal_EventSlot = msignal.EventSlot;
        window._hcmn_.msignal_EventSignal = msignal.EventSignal;
        window._hcmn_.msignal_Signal = msignal.Signal;
        window._hcmn_.msignal_Signal0 = msignal.Signal0;
        window._hcmn_.msignal_Signal1 = msignal.Signal1;
        window._hcmn_.msignal_Signal2 = msignal.Signal2;
        window._hcmn_.msignal_Slot = msignal.Slot;
        window._hcmn_.msignal_Slot0 = msignal.Slot0;
        window._hcmn_.msignal_Slot1 = msignal.Slot1;
        window._hcmn_.msignal_Slot2 = msignal.Slot2;
        window._hcmn_.msignal_SlotList = msignal.SlotList;
        window._hcmn_.msignal_EventDispatcher = msignal.EventDispatcher;
        window._hcmn_.Float32Array = Float32Array;
        window._hcmn_.Float64Array = Float64Array;
        window._hcmn_.Int32Array = Int32Array;
        window._hcmn_.Int16Array = Int16Array;
        window._hcmn_.Int8Array = Int8Array;
        window._hcmn_.Uint8Array = Uint8Array;
        window._hcmn_.Uint8ClampedArray = Uint8ClampedArray;
        window._hcmn_.Uint16Array = Uint16Array;
        window._hcmn_.Uint32Array = Uint32Array;
    };
    Math.__name__ = ["Math"];
    var Reflect = function() {};
    $hxClasses["Reflect"] = Reflect;
    Reflect.__name__ = ["Reflect"];
    Reflect.hasField = function(o, field) {
        return Object.prototype.hasOwnProperty.call(o, field);
    };
    Reflect.field = function(o, field) {
        try {
            return o[field];
        } catch (e) {
            haxe.CallStack.lastException = e;
            if (e instanceof js._Boot.HaxeError) e = e.val;
            return null;
        }
    };
    Reflect.setField = function(o, field, value) {
        o[field] = value;
    };
    Reflect.getProperty = function(o, field) {
        var tmp;
        if (o == null) return null;
        else if (o.__properties__ && (tmp = o.__properties__["get_" + field])) return o[tmp]();
        else return o[field];
    };
    Reflect.setProperty = function(o, field, value) {
        var tmp;
        if (o.__properties__ && (tmp = o.__properties__["set_" + field])) o[tmp](value);
        else o[field] = value;
    };
    Reflect.callMethod = function(o, func, args) {
        return func.apply(o, args);
    };
    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) {
        return typeof(f) == "function" && !(f.__name__ || f.__ename__);
    };
    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;
        return f1.scope == f2.scope && f1.method == f2.method && f1.method != null;
    };
    Reflect.isObject = function(v) {
        if (v == null) return false;
        var t = typeof(v);
        return t == "string" || t == "object" && v.__enum__ == null || t == "function" && (v.__name__ || v.__ename__) != null;
    };
    Reflect.isEnumValue = function(v) {
        return v != null && v.__enum__ != null;
    };
    Reflect.deleteField = function(o, field) {
        if (!Object.prototype.hasOwnProperty.call(o, field)) return false;
        delete(o[field]);
        return true;
    };
    Reflect.copy = function(o) {
        var o2 = {};
        var _g = 0;
        var _g1 = Reflect.fields(o);
        while (_g < _g1.length) {
            var f = _g1[_g];
            ++_g;
            Reflect.setField(o2, f, Reflect.field(o, f));
        }
        return o2;
    };
    Reflect.makeVarArgs = function(f) {
        return function() {
            var a = Array.prototype.slice.call(arguments);
            return f(a);
        };
    };
    var Std = function() {};
    $hxClasses["Std"] = Std;
    Std.__name__ = ["Std"];
    Std["is"] = function(v, t) {
        return js.Boot.__instanceof(v, t);
    };
    Std.instance = function(value, c) {
        if ((value instanceof c)) return value;
        else return null;
    };
    Std.string = function(s) {
        return js.Boot.__string_rec(s, "");
    };
    Std["int"] = function(x) {
        return x | 0;
    };
    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;
    };
    Std.parseFloat = function(x) {
        return parseFloat(x);
    };
    Std.random = function(x) {
        if (x <= 0) return 0;
        else return Math.floor(Math.random() * x);
    };
    var StringBuf = function() {
        this.b = "";
    };
    $hxClasses["StringBuf"] = StringBuf;
    StringBuf.__name__ = ["StringBuf"];
    StringBuf.prototype = {
        b: null,
        get_length: function() {
            return this.b.length;
        },
        add: function(x) {
            this.b += Std.string(x);
        },
        addChar: function(c) {
            this.b += String.fromCharCode(c);
        },
        addSub: function(s, pos, len) {
            if (len == null) this.b += HxOverrides.substr(s, pos, null);
            else this.b += HxOverrides.substr(s, pos, len);
        },
        toString: function() {
            return this.b;
        },
        __class__: StringBuf,
        __properties__: {
            get_length: "get_length"
        }
    };
    var StringTools = function() {};
    $hxClasses["StringTools"] = StringTools;
    StringTools.__name__ = ["StringTools"];
    StringTools.urlEncode = function(s) {
        return encodeURIComponent(s);
    };
    StringTools.urlDecode = function(s) {
        return decodeURIComponent(s.split("+").join(" "));
    };
    StringTools.htmlEscape = function(s, quotes) {
        s = s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
        if (quotes) return s.split("\"").join("&quot;").split("'").join("&#039;");
        else return s;
    };
    StringTools.htmlUnescape = function(s) {
        return s.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join("\"").split("&#039;").join("'").split("&amp;").join("&");
    };
    StringTools.startsWith = function(s, start) {
        return s.length >= start.length && HxOverrides.substr(s, 0, start.length) == start;
    };
    StringTools.endsWith = function(s, end) {
        var elen = end.length;
        var slen = s.length;
        return slen >= elen && HxOverrides.substr(s, slen - elen, elen) == end;
    };
    StringTools.isSpace = function(s, pos) {
        var c = HxOverrides.cca(s, pos);
        return c > 8 && c < 14 || c == 32;
    };
    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.lpad = function(s, c, l) {
        if (c.length <= 0) return s;
        while (s.length < l) s = c + s;
        return s;
    };
    StringTools.rpad = function(s, c, l) {
        if (c.length <= 0) return s;
        while (s.length < l) s = s + c;
        return s;
    };
    StringTools.replace = function(s, sub, by) {
        return s.split(sub).join(by);
    };
    StringTools.hex = function(n, digits) {
        var s = "";
        var hexChars = "0123456789ABCDEF";
        do {
            s = hexChars.charAt(n & 15) + s;
            n >>>= 4;
        } while (n > 0);
        if (digits != null)
            while (s.length < digits) s = "0" + s;
        return s;
    };
    StringTools.fastCodeAt = function(s, index) {
        return s.charCodeAt(index);
    };
    StringTools.isEof = function(c) {
        return c != c;
    };
    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;
    ValueType.__empty_constructs__ = [ValueType.TNull, ValueType.TInt, ValueType.TFloat, ValueType.TBool, ValueType.TObject, ValueType.TFunction, ValueType.TUnknown];
    var Type = function() {};
    $hxClasses["Type"] = Type;
    Type.__name__ = ["Type"];
    Type.getClass = function(o) {
        if (o == null) return null;
        else return js.Boot.getClass(o);
    };
    Type.getEnum = function(o) {
        if (o == null) return null;
        return o.__enum__;
    };
    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]);
            default:
                throw new js._Boot.HaxeError("Too many arguments");
        }
        return null;
    };
    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 Reflect.callMethod(e, f, params);
        }
        if (params != null && params.length != 0) throw new js._Boot.HaxeError("Constructor " + constr + " does not need parameters");
        return f;
    };
    Type.createEnumIndex = function(e, index, params) {
        var c = e.__constructs__[index];
        if (c == null) throw new js._Boot.HaxeError(index + " is not a valid enum constructor index");
        return Type.createEnum(e, c, params);
    };
    Type.getInstanceFields = function(c) {
        var a = [];
        for (var i in c.prototype) a.push(i);
        HxOverrides.remove(a, "__class__");
        HxOverrides.remove(a, "__properties__");
        return a;
    };
    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.getEnumConstructs = function(e) {
        var a = e.__constructs__;
        return a.slice();
    };
    Type["typeof"] = function(v) {
        var _g = typeof(v);
        switch (_g) {
            case "boolean":
                return ValueType.TBool;
            case "string":
                return ValueType.TClass(String);
            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 "function":
                if (v.__name__ || v.__ename__) return ValueType.TObject;
                return ValueType.TFunction;
            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;
            if (e1 instanceof js._Boot.HaxeError) e1 = e1.val;
            return false;
        }
        return true;
    };
    Type.enumConstructor = function(e) {
        return e[0];
    };
    Type.enumParameters = function(e) {
        return e.slice(2);
    };
    Type.enumIndex = function(e) {
        return e[1];
    };
    Type.allEnums = function(e) {
        return e.__empty_constructs__;
    };
    var haxe = {};
    haxe.IMap = function() {};
    $hxClasses["haxe.IMap"] = haxe.IMap;
    haxe.IMap.__name__ = ["haxe", "IMap"];
    haxe.IMap.prototype = {
        get: null,
        set: null,
        exists: null,
        remove: null,
        keys: null,
        iterator: null,
        toString: null,
        __class__: haxe.IMap
    };
    haxe.Log = function() {};
    $hxClasses["haxe.Log"] = haxe.Log;
    haxe.Log.__name__ = ["haxe", "Log"];
    haxe.Log.trace = function(v, infos) {
        js.Boot.__trace(v, infos);
    };
    haxe.Log.clear = function() {
        js.Boot.__clear_trace();
    };
    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 = {
        id: null,
        stop: function() {
            if (this.id == null) return;
            clearInterval(this.id);
            this.id = null;
        },
        run: function() {},
        __class__: haxe.Timer
    };
    haxe.ds = {};
    haxe.ds.BalancedTree = function() {};
    $hxClasses["haxe.ds.BalancedTree"] = haxe.ds.BalancedTree;
    haxe.ds.BalancedTree.__name__ = ["haxe", "ds", "BalancedTree"];
    haxe.ds.BalancedTree.prototype = {
        root: null,
        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;
        },
        iterator: function() {
            var ret = [];
            this.iteratorLoop(this.root, ret);
            return HxOverrides.iter(ret);
        },
        keys: function() {
            var ret = [];
            this.keysLoop(this.root, ret);
            return HxOverrides.iter(ret);
        },
        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));
        },
        iteratorLoop: function(node, acc) {
            if (node != null) {
                this.iteratorLoop(node.left, acc);
                acc.push(node.value);
                this.iteratorLoop(node.right, acc);
            }
        },
        keysLoop: function(node, acc) {
            if (node != null) {
                this.keysLoop(node.left, acc);
                acc.push(node.key);
                this.keysLoop(node.right, acc);
            }
        },
        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;
            if (l == null) hl = 0;
            else hl = l._height;
            var hr;
            if (r == null) hr = 0;
            else hr = r._height;
            if (hl > hr + 2) {
                if ((function($this) {
                        var $r;
                        var _this = l.left;
                        $r = _this == null ? 0 : _this._height;
                        return $r;
                    }(this)) >= (function($this) {
                        var $r;
                        var _this1 = l.right;
                        $r = _this1 == null ? 0 : _this1._height;
                        return $r;
                    }(this))) 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) {
                if ((function($this) {
                        var $r;
                        var _this2 = r.right;
                        $r = _this2 == null ? 0 : _this2._height;
                        return $r;
                    }(this)) > (function($this) {
                        var $r;
                        var _this3 = r.left;
                        $r = _this3 == null ? 0 : _this3._height;
                        return $r;
                    }(this))) 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);
        },
        toString: function() {
            if (this.root == null) return "{}";
            else return "{" + this.root.toString() + "}";
        },
        __class__: haxe.ds.BalancedTree
    };
    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) this._height = ((function($this) {
            var $r;
            var _this = $this.left;
            $r = _this == null ? 0 : _this._height;
            return $r;
        }(this)) > (function($this) {
            var $r;
            var _this1 = $this.right;
            $r = _this1 == null ? 0 : _this1._height;
            return $r;
        }(this)) ? (function($this) {
            var $r;
            var _this2 = $this.left;
            $r = _this2 == null ? 0 : _this2._height;
            return $r;
        }(this)) : (function($this) {
            var $r;
            var _this3 = $this.right;
            $r = _this3 == null ? 0 : _this3._height;
            return $r;
        }(this))) + 1;
        else this._height = h;
    };
    $hxClasses["haxe.ds.TreeNode"] = haxe.ds.TreeNode;
    haxe.ds.TreeNode.__name__ = ["haxe", "ds", "TreeNode"];
    haxe.ds.TreeNode.prototype = {
        left: null,
        right: null,
        key: null,
        value: null,
        _height: null,
        toString: function() {
            return (this.left == null ? "" : this.left.toString() + ", ") + ("" + Std.string(this.key) + "=" + Std.string(this.value)) + (this.right == null ? "" : ", " + this.right.toString());
        },
        __class__: haxe.ds.TreeNode
    };
    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
    });
    haxe.ds._HashMap = {};
    haxe.ds._HashMap.HashMap_Impl_ = {};
    $hxClasses["haxe.ds._HashMap.HashMap_Impl_"] = haxe.ds._HashMap.HashMap_Impl_;
    haxe.ds._HashMap.HashMap_Impl_.__name__ = ["haxe", "ds", "_HashMap", "HashMap_Impl_"];
    haxe.ds._HashMap.HashMap_Impl_._new = function() {
        return new haxe.ds._HashMap.HashMapData();
    };
    haxe.ds._HashMap.HashMap_Impl_.set = function(this1, k, v) {
        this1.keys.set(k.hashCode(), k);
        this1.values.set(k.hashCode(), v);
    };
    haxe.ds._HashMap.HashMap_Impl_.get = function(this1, k) {
        return this1.values.get(k.hashCode());
    };
    haxe.ds._HashMap.HashMap_Impl_.exists = function(this1, k) {
        return this1.values.exists(k.hashCode());
    };
    haxe.ds._HashMap.HashMap_Impl_.remove = function(this1, k) {
        this1.values.remove(k.hashCode());
        return this1.keys.remove(k.hashCode());
    };
    haxe.ds._HashMap.HashMap_Impl_.keys = function(this1) {
        return this1.keys.iterator();
    };
    haxe.ds._HashMap.HashMap_Impl_.iterator = function(this1) {
        return this1.values.iterator();
    };
    haxe.ds._HashMap.HashMapData = function() {
        this.keys = new haxe.ds.IntMap();
        this.values = new haxe.ds.IntMap();
    };
    $hxClasses["haxe.ds._HashMap.HashMapData"] = haxe.ds._HashMap.HashMapData;
    haxe.ds._HashMap.HashMapData.__name__ = ["haxe", "ds", "_HashMap", "HashMapData"];
    haxe.ds._HashMap.HashMapData.prototype = {
        keys: null,
        values: null,
        __class__: haxe.ds._HashMap.HashMapData
    };
    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 = {
        h: null,
        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);
        },
        iterator: function() {
            return {
                ref: this.h,
                it: this.keys(),
                hasNext: function() {
                    return this.it.hasNext();
                },
                next: function() {
                    var i = this.it.next();
                    return this.ref[i];
                }
            };
        },
        toString: function() {
            var s_b = "";
            s_b += "{";
            var it = this.keys();
            while (it.hasNext()) {
                var i = it.next();
                if (i == null) s_b += "null";
                else s_b += "" + i;
                s_b += " => ";
                s_b += Std.string(Std.string(this.h[i]));
                if (it.hasNext()) s_b += ", ";
            }
            s_b += "}";
            return s_b;
        },
        __class__: haxe.ds.IntMap
    };
    haxe.ds._StringMap = {};
    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 = {
        map: null,
        keys: null,
        index: null,
        count: null,
        hasNext: function() {
            return this.index < this.count;
        },
        next: function() {
            return this.map.get(this.keys[this.index++]);
        },
        __class__: haxe.ds._StringMap.StringMapIterator
    };
    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 = {
        h: null,
        rh: null,
        isReserved: function(key) {
            return __map_reserved[key] != null;
        },
        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() {
            var _this = this.arrayKeys();
            return HxOverrides.iter(_this);
        },
        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;
        },
        iterator: function() {
            return new haxe.ds._StringMap.StringMapIterator(this, this.arrayKeys());
        },
        toString: function() {
            var s = new StringBuf();
            s.b += "{";
            var keys = this.arrayKeys();
            var _g1 = 0;
            var _g = keys.length;
            while (_g1 < _g) {
                var i = _g1++;
                var k = keys[i];
                if (k == null) s.b += "null";
                else s.b += "" + k;
                s.b += " => ";
                s.add(Std.string(__map_reserved[k] != null ? this.getReserved(k) : this.h[k]));
                if (i < keys.length) s.b += ", ";
            }
            s.b += "}";
            return s.b;
        },
        __class__: haxe.ds.StringMap
    };
    var js = {};
    js._Boot = {};
    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.__super__ = Error;
    js._Boot.HaxeError.prototype = $extend(Error.prototype, {
        val: null,
        __class__: js._Boot.HaxeError
    });
    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;
        if (i != null) msg = i.fileName + ":" + i.lineNumber + ": ";
        else msg = "";
        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;
        if (typeof(document) != "undefined" && (d = document.getElementById("haxe:trace")) != null) d.innerHTML += js.Boot.__unhtml(msg) + "<br/>";
        else if (typeof console != "undefined" && console.log != null) console.log(msg);
    };
    js.Boot.__clear_trace = function() {
        var d = document.getElementById("haxe:trace");
        if (d != null) d.innerHTML = "";
    };
    js.Boot.isClass = function(o) {
        return o.__name__;
    };
    js.Boot.isEnum = function(e) {
        return e.__ename__;
    };
    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 "object":
                if (o instanceof Array) {
                    if (o.__enum__) {
                        if (o.length == 2) return o[0];
                        var str2 = o[0] + "(";
                        s += "\t";
                        var _g1 = 2;
                        var _g = o.length;
                        while (_g1 < _g) {
                            var i1 = _g1++;
                            if (i1 != 2) str2 += "," + js.Boot.__string_rec(o[i1], s);
                            else str2 += js.Boot.__string_rec(o[i1], s);
                        }
                        return str2 + ")";
                    }
                    var l = o.length;
                    var i;
                    var str1 = "[";
                    s += "\t";
                    var _g2 = 0;
                    while (_g2 < l) {
                        var i2 = _g2++;
                        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;
                    if (e instanceof js._Boot.HaxeError) e = e.val;
                    return "???";
                }
                if (tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
                    var s2 = o.toString();
                    if (s2 != "[object Object]") return s2;
                }
                var k = null;
                var str = "{\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 (str.length != 2) str += ", \n";
                    str += s + k + " : " + js.Boot.__string_rec(o[k], s);
                }
                s = s.substring(1);
                str += "\n" + s + "}";
                return str;
            case "function":
                return "<function>";
            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 Int:
                return (o | 0) === o;
            case Float:
                return typeof(o) == "number";
            case Bool:
                return typeof(o) == "boolean";
            case String:
                return typeof(o) == "string";
            case Array:
                return (o instanceof Array) && o.__enum__ == null;
            case Dynamic:
                return true;
            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) return true;
                if (cl == Enum && o.__ename__ != null) 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 (Function("return typeof " + name + " != \"undefined\" ? " + name + " : null"))();
    };
    js.Browser = function() {};
    $hxClasses["js.Browser"] = js.Browser;
    js.Browser.__name__ = ["js", "Browser"];
    js.Browser.__properties__ = {
        get_supported: "get_supported",
        get_console: "get_console",
        get_navigator: "get_navigator",
        get_location: "get_location",
        get_document: "get_document",
        get_window: "get_window"
    }
    js.Browser.get_window = function() {
        return window;
    };
    js.Browser.get_document = function() {
        return window.document;
    };
    js.Browser.get_location = function() {
        return window.location;
    };
    js.Browser.get_navigator = function() {
        return window.navigator;
    };
    js.Browser.get_console = function() {
        return window.console;
    };
    js.Browser.get_supported = function() {
        return typeof(window) != "undefined";
    };
    js.Browser.getLocalStorage = function() {
        try {
            var s = window.localStorage;
            s.getItem("");
            return s;
        } catch (e) {
            haxe.CallStack.lastException = e;
            if (e instanceof js._Boot.HaxeError) e = e.val;
            return null;
        }
    };
    js.Browser.getSessionStorage = function() {
        try {
            var s = window.sessionStorage;
            s.getItem("");
            return s;
        } catch (e) {
            haxe.CallStack.lastException = e;
            if (e instanceof js._Boot.HaxeError) e = e.val;
            return null;
        }
    };
    js.Browser.createXMLHttpRequest = function() {
        if (typeof XMLHttpRequest != "undefined") return new XMLHttpRequest();
        if (typeof ActiveXObject != "undefined") return new ActiveXObject("Microsoft.XMLHTTP");
        throw new js._Boot.HaxeError("Unable to create XMLHttpRequest object.");
    };
    js.Browser.alert = function(v) {
        window.alert(js.Boot.__string_rec(v, ""));
    };
    js.html = {};
    js.html._CanvasElement = {};
    js.html._CanvasElement.CanvasUtil = function() {};
    $hxClasses["js.html._CanvasElement.CanvasUtil"] = js.html._CanvasElement.CanvasUtil;
    js.html._CanvasElement.CanvasUtil.__name__ = ["js", "html", "_CanvasElement", "CanvasUtil"];
    js.html._CanvasElement.CanvasUtil.getContextWebGL = function(canvas, attribs) {
        var _g = 0;
        var _g1 = ["webgl", "experimental-webgl"];
        while (_g < _g1.length) {
            var name = _g1[_g];
            ++_g;
            var ctx = canvas.getContext(name, attribs);
            if (ctx != null) return ctx;
        }
        return null;
    };
    var msignal = {};
    msignal.Signal = function(valueClasses) {
        if (valueClasses == null) valueClasses = [];
        this.valueClasses = valueClasses;
        this.slots = msignal.SlotList.NIL;
        this.priorityBased = false;
    };
    $hxClasses["msignal.Signal"] = msignal.Signal;
    msignal.Signal.__name__ = ["msignal", "Signal"];
    msignal.Signal.prototype = {
        valueClasses: null,
        numListeners: null,
        slots: null,
        priorityBased: null,
        add: function(listener) {
            return this.registerListener(listener);
        },
        addOnce: function(listener) {
            return this.registerListener(listener, true);
        },
        addWithPriority: function(listener, priority) {
            if (priority == null) priority = 0;
            return this.registerListener(listener, false, priority);
        },
        addOnceWithPriority: function(listener, priority) {
            if (priority == null) priority = 0;
            return this.registerListener(listener, true, priority);
        },
        remove: function(listener) {
            var slot = this.slots.find(listener);
            if (slot == null) return null;
            this.slots = this.slots.filterNot(listener);
            return slot;
        },
        removeAll: function() {
            this.slots = msignal.SlotList.NIL;
        },
        registerListener: function(listener, once, priority) {
            if (priority == null) priority = 0;
            if (once == null) once = false;
            if (this.registrationPossible(listener, once)) {
                var newSlot = this.createSlot(listener, once, priority);
                if (!this.priorityBased && priority != 0) this.priorityBased = true;
                if (!this.priorityBased && priority == 0) this.slots = this.slots.prepend(newSlot);
                else this.slots = this.slots.insertWithPriority(newSlot);
                return newSlot;
            }
            return this.slots.find(listener);
        },
        registrationPossible: function(listener, once) {
            if (!this.slots.nonEmpty) return true;
            var existingSlot = this.slots.find(listener);
            if (existingSlot == null) return true;
            if (existingSlot.once != once) throw new js._Boot.HaxeError("You cannot addOnce() then add() the same listener without removing the relationship first.");
            return false;
        },
        createSlot: function(listener, once, priority) {
            if (priority == null) priority = 0;
            if (once == null) once = false;
            return null;
        },
        get_numListeners: function() {
            return this.slots.get_length();
        },
        __class__: msignal.Signal,
        __properties__: {
            get_numListeners: "get_numListeners"
        }
    };
    msignal.EventSignal = function(target) {
        msignal.Signal.call(this, [msignal.Event]);
        this.target = target;
    };
    $hxClasses["msignal.EventSignal"] = msignal.EventSignal;
    msignal.EventSignal.__name__ = ["msignal", "EventSignal"];
    msignal.EventSignal.__super__ = msignal.Signal;
    msignal.EventSignal.prototype = $extend(msignal.Signal.prototype, {
        target: null,
        dispatch: function(event) {
            if (event.target == null) {
                event.target = this.target;
                event.signal = this;
            }
            event.currentTarget = this.target;
            var slotsToProcess = this.slots;
            while (slotsToProcess.nonEmpty) {
                slotsToProcess.head.execute(event);
                slotsToProcess = slotsToProcess.tail;
            }
        },
        dispatchType: function(type) {
            this.dispatch(new msignal.Event(type));
        },
        bubble: function(event) {
            this.dispatch(event);
            var currentTarget = this.target;
            while (currentTarget != null && Object.prototype.hasOwnProperty.call(currentTarget, "parent")) {
                currentTarget = Reflect.field(currentTarget, "parent");
                if (js.Boot.__instanceof(currentTarget, msignal.EventDispatcher)) {
                    event.currentTarget = currentTarget;
                    var dispatcher;
                    dispatcher = js.Boot.__cast(currentTarget, msignal.EventDispatcher);
                    if (!dispatcher.dispatchEvent(event)) break;
                }
            }
        },
        bubbleType: function(type) {
            this.bubble(new msignal.Event(type));
        },
        createSlot: function(listener, once, priority) {
            if (priority == null) priority = 0;
            if (once == null) once = false;
            return new msignal.EventSlot(this, listener, once, priority);
        },
        __class__: msignal.EventSignal
    });
    msignal.Slot = function(signal, listener, once, priority) {
        if (priority == null) priority = 0;
        if (once == null) once = false;
        this.signal = signal;
        this.set_listener(listener);
        this.once = once;
        this.priority = priority;
        this.enabled = true;
    };
    $hxClasses["msignal.Slot"] = msignal.Slot;
    msignal.Slot.__name__ = ["msignal", "Slot"];
    msignal.Slot.prototype = {
        listener: null,
        once: null,
        priority: null,
        enabled: null,
        signal: null,
        remove: function() {
            this.signal.remove(this.listener);
        },
        set_listener: function(value) {
            if (value == null) throw new js._Boot.HaxeError("listener cannot be null");
            return this.listener = value;
        },
        __class__: msignal.Slot,
        __properties__: {
            set_listener: "set_listener"
        }
    };
    msignal.EventSlot = function(signal, listener, once, priority) {
        if (priority == null) priority = 0;
        if (once == null) once = false;
        msignal.Slot.call(this, signal, listener, once, priority);
    };
    $hxClasses["msignal.EventSlot"] = msignal.EventSlot;
    msignal.EventSlot.__name__ = ["msignal", "EventSlot"];
    msignal.EventSlot.typeEq = function(a, b) {
        if (a == b) return true; {
            var _g = Type["typeof"](a);
            switch (_g[1]) {
                case 7:
                    return msignal.EventSlot.enumTypeEq(a, b);
                default:
                    return false;
            }
        }
        return false;
    };
    msignal.EventSlot.enumTypeEq = function(a, b) {
        if (a == b) return true;
        if (Type.getEnum(a) != Type.getEnum(b)) return false;
        if (a[1] != b[1]) return false;
        var aParams = a.slice(2);
        if (aParams.length == 0) return true;
        var bParams = b.slice(2);
        var _g1 = 0;
        var _g = aParams.length;
        while (_g1 < _g) {
            var i = _g1++;
            var aParam = aParams[i];
            var bParam = bParams[i];
            if (aParam == null) continue;
            if (!msignal.EventSlot.typeEq(aParam, bParam)) return false;
        }
        return true;
    };
    msignal.EventSlot.__super__ = msignal.Slot;
    msignal.EventSlot.prototype = $extend(msignal.Slot.prototype, {
        filterType: null,
        execute: function(value1) {
            if (!this.enabled) return;
            if (this.filterType != null && !msignal.EventSlot.typeEq(this.filterType, value1.type)) return;
            if (this.once) this.remove();
            this.listener(value1);
        },
        forType: function(value) {
            this.filterType = value;
        },
        __class__: msignal.EventSlot
    });
    msignal.Event = function(type) {
        this.type = type;
    };
    $hxClasses["msignal.Event"] = msignal.Event;
    msignal.Event.__name__ = ["msignal", "Event"];
    msignal.Event.prototype = {
        signal: null,
        target: null,
        type: null,
        currentTarget: null,
        __class__: msignal.Event
    };
    msignal.EventDispatcher = function() {};
    $hxClasses["msignal.EventDispatcher"] = msignal.EventDispatcher;
    msignal.EventDispatcher.__name__ = ["msignal", "EventDispatcher"];
    msignal.EventDispatcher.prototype = {
        dispatchEvent: null,
        __class__: msignal.EventDispatcher
    };
    msignal.Signal0 = function() {
        msignal.Signal.call(this);
    };
    $hxClasses["msignal.Signal0"] = msignal.Signal0;
    msignal.Signal0.__name__ = ["msignal", "Signal0"];
    msignal.Signal0.__super__ = msignal.Signal;
    msignal.Signal0.prototype = $extend(msignal.Signal.prototype, {
        dispatch: function() {
            var slotsToProcess = this.slots;
            while (slotsToProcess.nonEmpty) {
                slotsToProcess.head.execute();
                slotsToProcess = slotsToProcess.tail;
            }
        },
        createSlot: function(listener, once, priority) {
            if (priority == null) priority = 0;
            if (once == null) once = false;
            return new msignal.Slot0(this, listener, once, priority);
        },
        __class__: msignal.Signal0
    });
    msignal.Signal1 = function(type) {
        msignal.Signal.call(this, [type]);
    };
    $hxClasses["msignal.Signal1"] = msignal.Signal1;
    msignal.Signal1.__name__ = ["msignal", "Signal1"];
    msignal.Signal1.__super__ = msignal.Signal;
    msignal.Signal1.prototype = $extend(msignal.Signal.prototype, {
        dispatch: function(value) {
            var slotsToProcess = this.slots;
            while (slotsToProcess.nonEmpty) {
                slotsToProcess.head.execute(value);
                slotsToProcess = slotsToProcess.tail;
            }
        },
        createSlot: function(listener, once, priority) {
            if (priority == null) priority = 0;
            if (once == null) once = false;
            return new msignal.Slot1(this, listener, once, priority);
        },
        __class__: msignal.Signal1
    });
    msignal.Signal2 = function(type1, type2) {
        msignal.Signal.call(this, [type1, type2]);
    };
    $hxClasses["msignal.Signal2"] = msignal.Signal2;
    msignal.Signal2.__name__ = ["msignal", "Signal2"];
    msignal.Signal2.__super__ = msignal.Signal;
    msignal.Signal2.prototype = $extend(msignal.Signal.prototype, {
        dispatch: function(value1, value2) {
            var slotsToProcess = this.slots;
            while (slotsToProcess.nonEmpty) {
                slotsToProcess.head.execute(value1, value2);
                slotsToProcess = slotsToProcess.tail;
            }
        },
        createSlot: function(listener, once, priority) {
            if (priority == null) priority = 0;
            if (once == null) once = false;
            return new msignal.Slot2(this, listener, once, priority);
        },
        __class__: msignal.Signal2
    });
    msignal.Slot0 = function(signal, listener, once, priority) {
        if (priority == null) priority = 0;
        if (once == null) once = false;
        msignal.Slot.call(this, signal, listener, once, priority);
    };
    $hxClasses["msignal.Slot0"] = msignal.Slot0;
    msignal.Slot0.__name__ = ["msignal", "Slot0"];
    msignal.Slot0.__super__ = msignal.Slot;
    msignal.Slot0.prototype = $extend(msignal.Slot.prototype, {
        execute: function() {
            if (!this.enabled) return;
            if (this.once) this.remove();
            this.listener();
        },
        __class__: msignal.Slot0
    });
    msignal.Slot1 = function(signal, listener, once, priority) {
        if (priority == null) priority = 0;
        if (once == null) once = false;
        msignal.Slot.call(this, signal, listener, once, priority);
    };
    $hxClasses["msignal.Slot1"] = msignal.Slot1;
    msignal.Slot1.__name__ = ["msignal", "Slot1"];
    msignal.Slot1.__super__ = msignal.Slot;
    msignal.Slot1.prototype = $extend(msignal.Slot.prototype, {
        param: null,
        execute: function(value1) {
            if (!this.enabled) return;
            if (this.once) this.remove();
            if (this.param != null) value1 = this.param;
            this.listener(value1);
        },
        __class__: msignal.Slot1
    });
    msignal.Slot2 = function(signal, listener, once, priority) {
        if (priority == null) priority = 0;
        if (once == null) once = false;
        msignal.Slot.call(this, signal, listener, once, priority);
    };
    $hxClasses["msignal.Slot2"] = msignal.Slot2;
    msignal.Slot2.__name__ = ["msignal", "Slot2"];
    msignal.Slot2.__super__ = msignal.Slot;
    msignal.Slot2.prototype = $extend(msignal.Slot.prototype, {
        param1: null,
        param2: null,
        execute: function(value1, value2) {
            if (!this.enabled) return;
            if (this.once) this.remove();
            if (this.param1 != null) value1 = this.param1;
            if (this.param2 != null) value2 = this.param2;
            this.listener(value1, value2);
        },
        __class__: msignal.Slot2
    });
    msignal.SlotList = function(head, tail) {
        this.nonEmpty = false;
        if (head == null && tail == null) {
            if (msignal.SlotList.NIL != null) throw new js._Boot.HaxeError("Parameters head and tail are null. Use the NIL element instead.");
            this.nonEmpty = false;
        } else if (head == null) throw new js._Boot.HaxeError("Parameter head cannot be null.");
        else {
            this.head = head;
            if (tail == null) this.tail = msignal.SlotList.NIL;
            else this.tail = tail;
            this.nonEmpty = true;
        }
    };
    $hxClasses["msignal.SlotList"] = msignal.SlotList;
    msignal.SlotList.__name__ = ["msignal", "SlotList"];
    msignal.SlotList.NIL = null;
    msignal.SlotList.prototype = {
        head: null,
        tail: null,
        nonEmpty: null,
        length: null,
        get_length: function() {
            if (!this.nonEmpty) return 0;
            if (this.tail == msignal.SlotList.NIL) return 1;
            var result = 0;
            var p = this;
            while (p.nonEmpty) {
                ++result;
                p = p.tail;
            }
            return result;
        },
        prepend: function(slot) {
            return new msignal.SlotList(slot, this);
        },
        append: function(slot) {
            if (slot == null) return this;
            if (!this.nonEmpty) return new msignal.SlotList(slot);
            if (this.tail == msignal.SlotList.NIL) return new msignal.SlotList(slot).prepend(this.head);
            var wholeClone = new msignal.SlotList(this.head);
            var subClone = wholeClone;
            var current = this.tail;
            while (current.nonEmpty) {
                subClone = subClone.tail = new msignal.SlotList(current.head);
                current = current.tail;
            }
            subClone.tail = new msignal.SlotList(slot);
            return wholeClone;
        },
        insertWithPriority: function(slot) {
            if (!this.nonEmpty) return new msignal.SlotList(slot);
            var priority = slot.priority;
            if (priority >= this.head.priority) return this.prepend(slot);
            var wholeClone = new msignal.SlotList(this.head);
            var subClone = wholeClone;
            var current = this.tail;
            while (current.nonEmpty) {
                if (priority > current.head.priority) {
                    subClone.tail = current.prepend(slot);
                    return wholeClone;
                }
                subClone = subClone.tail = new msignal.SlotList(current.head);
                current = current.tail;
            }
            subClone.tail = new msignal.SlotList(slot);
            return wholeClone;
        },
        filterNot: function(listener) {
            if (!this.nonEmpty || listener == null) return this;
            if (Reflect.compareMethods(this.head.listener, listener)) return this.tail;
            var wholeClone = new msignal.SlotList(this.head);
            var subClone = wholeClone;
            var current = this.tail;
            while (current.nonEmpty) {
                if (Reflect.compareMethods(current.head.listener, listener)) {
                    subClone.tail = current.tail;
                    return wholeClone;
                }
                subClone = subClone.tail = new msignal.SlotList(current.head);
                current = current.tail;
            }
            return this;
        },
        contains: function(listener) {
            if (!this.nonEmpty) return false;
            var p = this;
            while (p.nonEmpty) {
                if (Reflect.compareMethods(p.head.listener, listener)) return true;
                p = p.tail;
            }
            return false;
        },
        find: function(listener) {
            if (!this.nonEmpty) return null;
            var p = this;
            while (p.nonEmpty) {
                if (Reflect.compareMethods(p.head.listener, listener)) return p.head;
                p = p.tail;
            }
            return null;
        },
        __class__: msignal.SlotList,
        __properties__: {
            get_length: "get_length"
        }
    };

    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;
    }

    function $arrayPushClosure(a) {
        return function(x) {
            a.push(x);
        };
    }
    if (Array.prototype.indexOf) HxOverrides.indexOf = function(a, o, i) {
        return Array.prototype.indexOf.call(a, o, i);
    };
    if (Array.prototype.lastIndexOf) HxOverrides.lastIndexOf = function(a1, o1, i1) {
        return Array.prototype.lastIndexOf.call(a1, o1, i1);
    };
    $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 = {};
    var Void = $hxClasses.Void = {
        __ename__: ["Void"]
    };
    if (Array.prototype.map == null) Array.prototype.map = function(f) {
        var a = [];
        var _g1 = 0;
        var _g = this.length;
        while (_g1 < _g) {
            var i = _g1++;
            a[i] = f(this[i]);
        }
        return a;
    };
    if (Array.prototype.filter == null) Array.prototype.filter = function(f1) {
        var a1 = [];
        var _g11 = 0;
        var _g2 = this.length;
        while (_g11 < _g2) {
            var i1 = _g11++;
            var e = this[i1];
            if (f1(e)) a1.push(e);
        }
        return a1;
    };
    var __map_reserved = {}
    msignal.SlotList.NIL = new msignal.SlotList(null, null);
    DateTools.DAYS_OF_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    js.Boot.__toStr = {}.toString;
    Main.main();
})(typeof console != "undefined" ? console : {
    log: function() {}
});

//# sourceURL=haxeCommon.js