<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var PathFinding = window.PathFinding = function(t, e) {
    var i = {
        __internals: [],
        __packages: {},
        __classmap: {
            Object: Object,
            Function: Function,
            Array: Array,
            String: String
        },
        __sysClass: {
            object: "Object",
            array: "Array",
            string: "String",
            dictionary: "Dictionary"
        },
        __propun: {
            writable: !0,
            enumerable: !1,
            configurable: !0
        },
        __presubstr: String.prototype.substr,
        __substr: function(t, e) {
            return 1 == arguments.length ? i.__presubstr.call(this, t) : i.__presubstr.call(this, t, e &gt; 0 ? e : this.length + e);
        },
        __init: function(t) {
            t.forEach(function(t) {
                t.__init$ &amp;&amp; t.__init$();
            });
        },
        __isClass: function(t) {
            return t &amp;&amp; (t.__isclass || t == Object || t == String || t == Array);
        },
        __newvec: function(t, e) {
            var i = [];
            i.length = t;
            for (var n = 0; n &lt; t; n++) i[n] = e;
            return i;
        },
        __extend: function(t, e) {
            for (var n in e) if (e.hasOwnProperty(n)) {
                var s = Object.getOwnPropertyDescriptor(e, n), r = s.get, a = s.set;
                r || a ? r &amp;&amp; a ? Object.defineProperty(t, n, s) : (r &amp;&amp; Object.defineProperty(t, n, r), 
                a &amp;&amp; Object.defineProperty(t, n, a)) : t[n] = e[n];
            }
            function __() {
                i.un(this, "constructor", t);
            }
            __.prototype = e.prototype, t.prototype = new __(), i.un(t.prototype, "__imps", i.__copy({}, e.prototype.__imps));
        },
        __copy: function(t, e) {
            if (!e) return null;
            for (var i in t = t || {}, e) t[i] = e[i];
            return t;
        },
        __package: function(e, n) {
            if (!i.__packages[e]) {
                i.__packages[e] = !0;
                var s = t, r = e.split(".");
                if (r.length &gt; 1) for (var a = 0, o = r.length - 1; a &lt; o; a++) {
                    var l = s[r[a]];
                    s = l || (s[r[a]] = {});
                }
                s[r[r.length - 1]] || (s[r[r.length - 1]] = n || {});
            }
        },
        __hasOwnProperty: function(t, e) {
            return e = e || this, Object.hasOwnProperty.call(e, t) || function classHas(t, e) {
                if (Object.hasOwnProperty.call(e.prototype, t)) return !0;
                var i = e.prototype.__super;
                return null == i ? null : classHas(t, i);
            }(t, e.__class);
        },
        __typeof: function(t, e) {
            if (!t || !e) return !1;
            if (e === String) return "string" == typeof t;
            if (e === Number) return "number" == typeof t;
            if (e.__interface__) e = e.__interface__; else if ("string" != typeof e) return t instanceof e;
            return t.__imps &amp;&amp; t.__imps[e] || t.__class == e;
        },
        __as: function(t, e) {
            return this.__typeof(t, e) ? t : null;
        },
        __int: function(t) {
            return t ? parseInt(t) : 0;
        },
        interface: function(e, n) {
            i.__package(e, {});
            var s = i.__internals, r = s[e] = s[e] || {
                self: e
            };
            if (n) {
                var a = n.split(",");
                r.extend = [];
                for (var o = 0; o &lt; a.length; o++) {
                    var l = a[o];
                    s[l] = s[l] || {
                        self: l
                    }, r.extend.push(s[l]);
                }
            }
            var u = t, c = e.split(".");
            for (o = 0; o &lt; c.length - 1; o++) u = u[c[o]];
            u[c[c.length - 1]] = {
                __interface__: e
            };
        },
        class: function(e, n, s, r) {
            if (s &amp;&amp; i.__extend(e, s), n) if (i.__package(n, e), i.__classmap[n] = e, n.indexOf(".") &gt; 0) {
                if (0 == n.indexOf("laya.")) {
                    var a = n.split(".");
                    r = r || a[a.length - 1], i[r] &amp;&amp; console.log("Warning!,this class[" + r + "] already exist:", i[r]), 
                    i[r] = e;
                }
            } else "Main" == n ? t.Main = e : (i[n] &amp;&amp; console.log("Error!,this class[" + n + "] already exist:", i[n]), 
            i[n] = e);
            var o = i.un, l = e.prototype;
            o(l, "hasOwnProperty", i.__hasOwnProperty), o(l, "__class", e), o(l, "__super", s), 
            o(l, "__className", n), o(e, "__super", s), o(e, "__className", n), o(e, "__isclass", !0), 
            o(e, "super", function(t) {
                this.__super.call(t);
            });
        },
        imps: function(t, e) {
            if (!e) return null;
            var n = t.__imps || i.un(t, "__imps", {});
            function __(t) {
                var e, s;
                if ((e = i.__internals[t]) &amp;&amp; (n[t] = !0, s = e.extend)) for (var r = 0; r &lt; s.length; r++) __(s[r].self);
            }
            for (var s in e) __(s);
        },
        superSet: function(t, e, i, n) {
            var s = t.prototype["_$set_" + i];
            s &amp;&amp; s.call(e, n);
        },
        superGet: function(t, e, i) {
            var n = t.prototype["_$get_" + i];
            return n ? n.call(e) : null;
        },
        getset: function(t, e, n, s, r) {
            t ? (s &amp;&amp; (e["_$GET_" + n] = s), r &amp;&amp; (e["_$SET_" + n] = r)) : (s &amp;&amp; i.un(e, "_$get_" + n, s), 
            r &amp;&amp; i.un(e, "_$set_" + n, r)), s &amp;&amp; r ? Object.defineProperty(e, n, {
                get: s,
                set: r,
                enumerable: !1,
                configurable: !0
            }) : (s &amp;&amp; Object.defineProperty(e, n, {
                get: s,
                enumerable: !1,
                configurable: !0
            }), r &amp;&amp; Object.defineProperty(e, n, {
                set: r,
                enumerable: !1,
                configurable: !0
            }));
        },
        static: function(t, e) {
            for (var i = 0, n = e.length; i &lt; n; i += 2) if ("length" == e[i]) t.length = e[i + 1].call(t); else {
                function tmp() {
                    var n = e[i], s = e[i + 1];
                    Object.defineProperty(t, n, {
                        get: function() {
                            return delete this[n], this[n] = s.call(this);
                        },
                        set: function(t) {
                            delete this[n], this[n] = t;
                        },
                        enumerable: !0,
                        configurable: !0
                    });
                }
                tmp();
            }
        },
        un: function(t, e, n) {
            return n || (n = t[e]), i.__propun.value = n, Object.defineProperty(t, e, i.__propun), 
            n;
        },
        uns: function(t, e) {
            e.forEach(function(e) {
                i.un(t, e);
            });
        }
    };
    return t.console = t.console || {
        log: function() {}
    }, t.trace = t.console.log, Error.prototype.throwError = function() {
        throw arguments;
    }, Object.defineProperty(Array.prototype, "fixed", {
        enumerable: !1
    }), i;
}(window, document);

!function(t, e, i) {
    i.un, i.uns, i.static;
    var n = i.class, s = (i.getset, i.__newvec, function() {
        function DiagonalMovement() {}
        return n(DiagonalMovement, "PathFinding.core.DiagonalMovement"), DiagonalMovement.Always = 1, 
        DiagonalMovement.Never = 2, DiagonalMovement.IfAtMostOneObstacle = 3, DiagonalMovement.OnlyWhenNoObstacles = 4, 
        DiagonalMovement;
    }()), r = (function() {
        function Grid(t, e, i) {
            this.width = 0, this.height = 0, this.nodes = null;
            var n = 0;
            "number" == typeof t ? n = t : (e = t.length, n = t[0].length, i = t), this.width = n, 
            this.height = e, this.nodes = this._buildNodes(n, e, i);
        }
        n(Grid, "PathFinding.core.Grid");
        var t = Grid.prototype;
        t._buildNodes = function(t, e, i) {
            var n = 0, s = 0, r = [];
            for (n = 0; n &lt; e; ++n) for (r[n] = [], s = 0; s &lt; t; ++s) r[n][s] = new a(s, n);
            if (null == i) return r;
            if (i.length != e || i[0].length != t) throw new Error("Matrix size does not fit");
            for (n = 0; n &lt; e; ++n) for (s = 0; s &lt; t; ++s) i[n][s] &amp;&amp; (r[n][s].walkable = !1);
            return r;
        }, t.getNodeAt = function(t, e) {
            return this.nodes[e][t];
        }, t.isWalkableAt = function(t, e) {
            return this.isInside(t, e) &amp;&amp; this.nodes[e][t].walkable;
        }, t.isInside = function(t, e) {
            return t &gt;= 0 &amp;&amp; t &lt; this.width &amp;&amp; e &gt;= 0 &amp;&amp; e &lt; this.height;
        }, t.setWalkableAt = function(t, e, i) {
            this.nodes[e][t].walkable = i;
        }, t.getNeighbors = function(t, e) {
            var i = t.x, n = t.y, r = [], a = !1, o = !1, l = !1, u = !1, c = !1, f = !1, d = !1, p = !1, g = this.nodes;
            if (this.isWalkableAt(i, n - 1) &amp;&amp; (r.push(g[n - 1][i]), a = !0), this.isWalkableAt(i + 1, n) &amp;&amp; (r.push(g[n][i + 1]), 
            l = !0), this.isWalkableAt(i, n + 1) &amp;&amp; (r.push(g[n + 1][i]), c = !0), this.isWalkableAt(i - 1, n) &amp;&amp; (r.push(g[n][i - 1]), 
            d = !0), e == s.Never) return r;
            if (e == s.OnlyWhenNoObstacles) o = d &amp;&amp; a, u = a &amp;&amp; l, f = l &amp;&amp; c, p = c &amp;&amp; d; else if (e == s.IfAtMostOneObstacle) o = d || a, 
            u = a || l, f = l || c, p = c || d; else {
                if (e != s.Always) throw new Error("Incorrect value of diagonalMovement");
                o = !0, u = !0, f = !0, p = !0;
            }
            return o &amp;&amp; this.isWalkableAt(i - 1, n - 1) &amp;&amp; r.push(g[n - 1][i - 1]), u &amp;&amp; this.isWalkableAt(i + 1, n - 1) &amp;&amp; r.push(g[n - 1][i + 1]), 
            f &amp;&amp; this.isWalkableAt(i + 1, n + 1) &amp;&amp; r.push(g[n + 1][i + 1]), p &amp;&amp; this.isWalkableAt(i - 1, n + 1) &amp;&amp; r.push(g[n + 1][i - 1]), 
            r;
        }, t.clone = function() {
            var t = 0, e = 0, i = this.width, n = this.height, s = this.nodes, r = new Grid(i, n), o = [];
            for (t = 0; t &lt; n; ++t) for (o[t] = [], e = 0; e &lt; i; ++e) o[t][e] = new a(e, t, s[t][e].walkable);
            return r.nodes = o, r;
        }, t.reset = function() {
            for (var t, e = 0; e &lt; this.height; ++e) for (var i = 0; i &lt; this.width; ++i) (t = this.nodes[e][i]).g = 0, 
            t.f = 0, t.h = 0, t.by = 0, t.parent = null, t.opened = null, t.closed = null, t.tested = null;
        }, Grid.createGridFromAStarMap = function(t) {
            for (var e = t.width, i = t.height, n = t.getPixels(), s = [], r = 0, a = 0; a &lt; e; a++) for (var o = s[a] = [], l = 0; l &lt; i; l++) {
                var u = n[r++], c = n[r++], f = n[r++], d = n[r++];
                o[l] = 255 == u &amp;&amp; 255 == c &amp;&amp; 255 == f &amp;&amp; 255 == d ? 1 : 0;
            }
            return new Grid(e, i, s);
        };
    }(), function() {
        function Heuristic() {}
        return n(Heuristic, "PathFinding.core.Heuristic"), Heuristic.manhattan = function(t, e) {
            return t + e;
        }, Heuristic.euclidean = function(t, e) {
            return Math.sqrt(t * t + e * e);
        }, Heuristic.octile = function(t, e) {
            var i = Math.SQRT2 - 1;
            return t &lt; e ? i * t + e : i * e + t;
        }, Heuristic.chebyshev = function(t, e) {
            return Math.max(t, e);
        }, Heuristic;
    }()), a = function() {
        function Node(t, e, i) {
            this.x = 0, this.y = 0, this.g = 0, this.f = 0, this.h = 0, this.by = 0, this.parent = null, 
            this.opened = null, this.closed = null, this.tested = null, this.retainCount = null, 
            this.walkable = !1, void 0 === i &amp;&amp; (i = !0), this.x = t, this.y = e, this.walkable = i;
        }
        return n(Node, "PathFinding.core.Node", null, "Node$1"), Node;
    }(), o = function() {
        function Util() {}
        return n(Util, "PathFinding.core.Util"), Util.backtrace = function(t) {
            for (var e = [ [ t.x, t.y ] ]; t.parent; ) t = t.parent, e.push([ t.x, t.y ]);
            return e.reverse();
        }, Util.biBacktrace = function(t, e) {
            var i = Util.backtrace(t), n = Util.backtrace(e);
            return i.concat(n.reverse());
        }, Util.pathLength = function(t) {
            var e = 0, i = 0, n = 0, s = 0, r = 0, a = 0;
            for (e = 1; e &lt; t.length; ++e) n = t[e - 1], s = t[e], r = n[0] - s[0], a = n[1] - s[1], 
            i += Math.sqrt(r * r + a * a);
            return i;
        }, Util.interpolate = function(t, e, i, n) {
            var s, r, a, o, l = Math.abs, u = [], c = 0, f = 0;
            for (s = t &lt; i ? 1 : -1, r = e &lt; n ? 1 : -1, c = (a = l(i - t)) - (o = l(n - e)); u.push([ t, e ]), 
            t != i || e != n; ) (f = 2 * c) &gt; -o &amp;&amp; (c -= o, t += s), f &lt; a &amp;&amp; (c += a, e += r);
            return u;
        }, Util.expandPath = function(t) {
            var e, i, n, s = [], r = t.length, a = 0, o = 0, l = 0;
            if (r &lt; 2) return s;
            for (o = 0; o &lt; r - 1; ++o) for (e = t[o], i = t[o + 1], a = (n = Util.interpolate(e[0], e[1], i[0], i[1])).length, 
            l = 0; l &lt; a - 1; ++l) s.push(n[l]);
            return s.push(t[r - 1]), s;
        }, Util.smoothenPath = function(t, e) {
            var i, n, s, r, a, o = e.length, l = e[0][0], u = e[0][1], c = e[o - 1][0], f = e[o - 1][1], d = 0, p = 0, g = 0, b = 0, v = 0, _ = 0, m = !1;
            for (i = [ [ d = l, p = u ] ], v = 2; v &lt; o; ++v) {
                for (g = (n = e[v])[0], b = n[1], s = Util.interpolate(d, p, g, b), m = !1, _ = 1; _ &lt; s.length; ++_) if (r = s[_], 
                !t.isWalkableAt(r[0], r[1])) {
                    m = !0;
                    break;
                }
                m &amp;&amp; (a = e[v - 1], i.push(a), d = a[0], p = a[1]);
            }
            return i.push([ c, f ]), i;
        }, Util.compressPath = function(t) {
            if (t.length &lt; 3) return t;
            var e = [], i = t[0][0], n = t[0][1], s = t[1][0], r = t[1][1], a = s - i, o = r - n, l = 0, u = 0, c = 0, f = 0, d = NaN, p = 0;
            for (a /= d = Math.sqrt(a * a + o * o), o /= d, e.push([ i, n ]), p = 2; p &lt; t.length; p++) l = s, 
            u = r, c = a, f = o, a = (s = t[p][0]) - l, o = (r = t[p][1]) - u, o /= d = Math.sqrt(a * a + o * o), 
            (a /= d) === c &amp;&amp; o === f || e.push([ l, u ]);
            return e.push([ s, r ]), e;
        }, Util;
    }(), l = function() {
        function AStarFinder(t) {
            this.allowDiagonal = !1, this.dontCrossCorners = !1, this.heuristic = null, this.weight = 0, 
            this.diagonalMovement = 0, t = t || {}, this.allowDiagonal = t.allowDiagonal, this.dontCrossCorners = t.dontCrossCorners, 
            this.heuristic = t.heuristic || r.manhattan, this.weight = t.weight || 1, this.diagonalMovement = t.diagonalMovement, 
            this.diagonalMovement || (this.allowDiagonal ? this.dontCrossCorners ? this.diagonalMovement = s.OnlyWhenNoObstacles : this.diagonalMovement = s.IfAtMostOneObstacle : this.diagonalMovement = s.Never), 
            this.diagonalMovement === s.Never ? this.heuristic = t.heuristic || r.manhattan : this.heuristic = t.heuristic || r.octile;
        }
        return n(AStarFinder, "PathFinding.finders.AStarFinder"), AStarFinder.prototype.findPath = function(t, e, i, n, s) {
            var r, a, l, u = new f(function(t, e) {
                return t.f - e.f;
            }), c = s.getNodeAt(t, e), d = s.getNodeAt(i, n), p = this.heuristic, g = this.diagonalMovement, b = this.weight, v = Math.abs, _ = Math.SQRT2, m = 0, A = 0, y = 0, k = 0, M = 0;
            for (c.g = 0, c.f = 0, u.push(c), c.opened = !0; !u.empty(); ) {
                if ((r = u.pop()).closed = !0, r === d) return o.backtrace(d);
                for (m = 0, A = (a = s.getNeighbors(r, g)).length; m &lt; A; ++m) (l = a[m]).closed || (y = l.x, 
                k = l.y, M = r.g + (y - r.x == 0 || k - r.y == 0 ? 1 : _), (!l.opened || M &lt; l.g) &amp;&amp; (l.g = M, 
                l.h = l.h || b * p(v(y - i), v(k - n)), l.f = l.g + l.h, l.parent = r, l.opened ? u.updateItem(l) : (u.push(l), 
                l.opened = !0)));
            }
            return [];
        }, AStarFinder;
    }(), u = function() {
        function BiAStarFinder(t) {
            this.allowDiagonal = !1, this.dontCrossCorners = !1, this.diagonalMovement = 0, 
            this.heuristic = null, this.weight = 0, t = t || {}, this.allowDiagonal = t.allowDiagonal, 
            this.dontCrossCorners = t.dontCrossCorners, this.diagonalMovement = t.diagonalMovement, 
            this.heuristic = t.heuristic || r.manhattan, this.weight = t.weight || 1, this.diagonalMovement || (this.allowDiagonal ? this.dontCrossCorners ? this.diagonalMovement = s.OnlyWhenNoObstacles : this.diagonalMovement = s.IfAtMostOneObstacle : this.diagonalMovement = s.Never), 
            this.diagonalMovement == s.Never ? this.heuristic = t.heuristic || r.manhattan : this.heuristic = t.heuristic || r.octile;
        }
        return n(BiAStarFinder, "PathFinding.finders.BiAStarFinder"), BiAStarFinder.prototype.findPath = function(t, e, i, n, s) {
            var r, a, l, cmp = function(t, e) {
                return t.f - e.f;
            }, u = new f(cmp), c = new f(cmp), d = s.getNodeAt(t, e), p = s.getNodeAt(i, n), g = this.heuristic, b = this.diagonalMovement, v = this.weight, _ = Math.abs, m = Math.SQRT2, A = 0, y = 0, k = 0, M = 0, F = 0;
            for (d.g = 0, d.f = 0, u.push(d), d.opened = 1, p.g = 0, p.f = 0, c.push(p), p.opened = 2; !u.empty() &amp;&amp; !c.empty(); ) {
                for ((r = u.pop()).closed = !0, A = 0, y = (a = s.getNeighbors(r, b)).length; A &lt; y; ++A) if (!(l = a[A]).closed) {
                    if (2 === l.opened) return o.biBacktrace(r, l);
                    k = l.x, M = l.y, F = r.g + (k - r.x == 0 || M - r.y == 0 ? 1 : m), (!l.opened || F &lt; l.g) &amp;&amp; (l.g = F, 
                    l.h = l.h || v * g(_(k - i), _(M - n)), l.f = l.g + l.h, l.parent = r, l.opened ? u.updateItem(l) : (u.push(l), 
                    l.opened = 1));
                }
                for ((r = c.pop()).closed = !0, A = 0, y = (a = s.getNeighbors(r, b)).length; A &lt; y; ++A) if (!(l = a[A]).closed) {
                    if (1 === l.opened) return o.biBacktrace(l, r);
                    k = l.x, M = l.y, F = r.g + (k - r.x == 0 || M - r.y == 0 ? 1 : m), (!l.opened || F &lt; l.g) &amp;&amp; (l.g = F, 
                    l.h = l.h || v * g(_(k - t), _(M - e)), l.f = l.g + l.h, l.parent = r, l.opened ? c.updateItem(l) : (c.push(l), 
                    l.opened = 2));
                }
            }
            return [];
        }, BiAStarFinder;
    }(), c = (function() {
        function BiBreadthFirstFinder(t) {
            this.allowDiagonal = !1, this.dontCrossCorners = !1, this.heuristic = null, this.weight = 0, 
            this.diagonalMovement = 0, t = t || {}, this.allowDiagonal = t.allowDiagonal, this.dontCrossCorners = t.dontCrossCorners, 
            this.diagonalMovement = t.diagonalMovement, this.diagonalMovement || (this.allowDiagonal ? this.dontCrossCorners ? this.diagonalMovement = s.OnlyWhenNoObstacles : this.diagonalMovement = s.IfAtMostOneObstacle : this.diagonalMovement = s.Never);
        }
        n(BiBreadthFirstFinder, "PathFinding.finders.BiBreadthFirstFinder"), BiBreadthFirstFinder.prototype.findPath = function(t, e, i, n, s) {
            var r, a, l, u = s.getNodeAt(t, e), c = s.getNodeAt(i, n), f = [], d = [], p = this.diagonalMovement, g = 0, b = 0;
            for (f.push(u), u.opened = !0, u.by = 0, d.push(c), c.opened = !0, c.by = 1; f.length &amp;&amp; d.length; ) {
                for ((l = f.shift()).closed = !0, g = 0, b = (r = s.getNeighbors(l, p)).length; g &lt; b; ++g) if (!(a = r[g]).closed) if (a.opened) {
                    if (1 === a.by) return o.biBacktrace(l, a);
                } else f.push(a), a.parent = l, a.opened = !0, a.by = 0;
                for ((l = d.shift()).closed = !0, g = 0, b = (r = s.getNeighbors(l, p)).length; g &lt; b; ++g) if (!(a = r[g]).closed) if (a.opened) {
                    if (0 === a.by) return o.biBacktrace(a, l);
                } else d.push(a), a.parent = l, a.opened = !0, a.by = 1;
            }
            return [];
        };
    }(), function() {
        function BreadthFirstFinder(t) {
            this.allowDiagonal = !1, this.dontCrossCorners = !1, this.heuristic = null, this.weight = 0, 
            this.diagonalMovement = 0, t = t || {}, this.allowDiagonal = t.allowDiagonal, this.dontCrossCorners = t.dontCrossCorners, 
            this.diagonalMovement = t.diagonalMovement, this.diagonalMovement || (this.allowDiagonal ? this.dontCrossCorners ? this.diagonalMovement = s.OnlyWhenNoObstacles : this.diagonalMovement = s.IfAtMostOneObstacle : this.diagonalMovement = s.Never);
        }
        n(BreadthFirstFinder, "PathFinding.finders.BreadthFirstFinder"), BreadthFirstFinder.prototype.findPath = function(t, e, i, n, s) {
            var r, a, l, u = [], c = this.diagonalMovement, f = s.getNodeAt(t, e), d = s.getNodeAt(i, n), p = 0, g = 0;
            for (u.push(f), f.opened = !0; u.length; ) {
                if ((l = u.shift()).closed = !0, l === d) return o.backtrace(d);
                for (p = 0, g = (r = s.getNeighbors(l, c)).length; p &lt; g; ++p) (a = r[p]).closed || a.opened || (u.push(a), 
                a.opened = !0, a.parent = l);
            }
            return [];
        };
    }(), function() {
        function IDAStarFinder(t) {
            this.allowDiagonal = !1, this.dontCrossCorners = !1, this.heuristic = null, this.weight = 0, 
            this.diagonalMovement = 0, this.trackRecursion = !1, this.timeLimit = NaN, t = t || {}, 
            this.allowDiagonal = t.allowDiagonal, this.dontCrossCorners = t.dontCrossCorners, 
            this.diagonalMovement = t.diagonalMovement, this.heuristic = t.heuristic || r.manhattan, 
            this.weight = t.weight || 1, this.trackRecursion = t.trackRecursion || !1, this.timeLimit = t.timeLimit || 1 / 0, 
            this.diagonalMovement || (this.allowDiagonal ? this.dontCrossCorners ? this.diagonalMovement = s.OnlyWhenNoObstacles : this.diagonalMovement = s.IfAtMostOneObstacle : this.diagonalMovement = s.Never), 
            this.diagonalMovement === s.Never ? this.heuristic = t.heuristic || r.manhattan : this.heuristic = t.heuristic || r.octile;
        }
        n(IDAStarFinder, "PathFinding.finders.IDAStarFinder"), IDAStarFinder.prototype.findPath = function(t, e, n, s, r) {
            var a, o = this, l = new Date().getTime(), h = function(t, e) {
                return o.heuristic(Math.abs(e.x - t.x), Math.abs(e.y - t.y));
            }, search = function(t, e, n, s, a) {
                if (o.timeLimit &gt; 0 &amp;&amp; new Date().getTime() - l &gt; 1e3 * o.timeLimit) return 1 / 0;
                var u = e + h(t, c) * o.weight;
                if (u &gt; n) return u;
                if (t == c) return s[a] = [ t.x, t.y ], t;
                var f, d, p, g = 0, b = 0, v = 0, _ = r.getNeighbors(t, o.diagonalMovement);
                for (v = 0, g = 1 / 0; f = _[v]; ++v) {
                    if (o.trackRecursion &amp;&amp; (f.retainCount = f.retainCount + 1 || 1, 1 != f.tested &amp;&amp; (f.tested = !0)), 
                    (b = search(f, e + (p = f, (d = t).x === p.x || d.y === p.y ? 1 : Math.SQRT2), n, s, a + 1)) instanceof i.core.Node) return s[a] = [ t.x, t.y ], 
                    b;
                    o.trackRecursion &amp;&amp; 0 == --f.retainCount &amp;&amp; (f.tested = !1), b &lt; g &amp;&amp; (g = b);
                }
                return g;
            }, u = r.getNodeAt(t, e), c = r.getNodeAt(n, s), f = h(u, c), d = 0, p = 0;
            for (d = 0; ;++d) {
                if ((p = search(u, 0, f, a = [], 0)) == 1 / 0) {
                    a = [];
                    break;
                }
                if (p instanceof i.core.Node) break;
                f = p;
            }
            return a;
        };
    }(), function() {
        function JumpPointFinderBase(t) {
            this.grid = null, this.openList = null, this.startNode = null, this.endNode = null, 
            this.heuristic = null, this.trackJumpRecursion = !1, t = t || {}, this.heuristic = t.heuristic || r.manhattan, 
            this.trackJumpRecursion = t.trackJumpRecursion || !1;
        }
        n(JumpPointFinderBase, "PathFinding.finders.JumpPointFinderBase");
        var t = JumpPointFinderBase.prototype;
        return t.findPath = function(t, e, i, n, s) {
            var r, a = this.openList = new f(function(t, e) {
                return t.f - e.f;
            }), l = this.startNode = s.getNodeAt(t, e), u = this.endNode = s.getNodeAt(i, n);
            for (this.grid = s, l.g = 0, l.f = 0, a.push(l), l.opened = !0; !a.empty(); ) {
                if ((r = a.pop()).closed = !0, r == u) return o.expandPath(o.backtrace(u));
                this._identifySuccessors(r);
            }
            return [];
        }, t._identifySuccessors = function(t) {
            var e, i, n, s, a, o = this.grid, l = this.heuristic, u = this.openList, c = this.endNode.x, f = this.endNode.y, d = 0, p = t.x, g = t.y, b = 0, v = 0, _ = 0, m = 0, A = Math.abs;
            Math.max;
            for (d = 0, s = (e = this._findNeighbors(t)).length; d &lt; s; ++d) if (i = e[d], n = this._jump(i[0], i[1], p, g)) {
                if (b = n[0], v = n[1], (a = o.getNodeAt(b, v)).closed) continue;
                _ = r.octile(A(b - p), A(v - g)), m = t.g + _, (!a.opened || m &lt; a.g) &amp;&amp; (a.g = m, 
                a.h = a.h || l(A(b - c), A(v - f)), a.f = a.g + a.h, a.parent = t, a.opened ? u.updateItem(a) : (u.push(a), 
                a.opened = !0));
            }
        }, t._jump = function(t, e, i, n) {
            return [];
        }, t._findNeighbors = function(t) {
            return [];
        }, JumpPointFinderBase;
    }()), f = (function() {
        function JumpPointFinder(t) {}
        n(JumpPointFinder, "PathFinding.finders.JumpPointFinder");
    }(), function() {
        function TraceFinder(t) {
            this.allowDiagonal = !1, this.dontCrossCorners = !1, this.diagonalMovement = 0, 
            this.heuristic = null, t = t || {}, this.allowDiagonal = t.allowDiagonal, this.dontCrossCorners = t.dontCrossCorners, 
            this.heuristic = t.heuristic || r.manhattan, this.diagonalMovement = t.diagonalMovement, 
            this.diagonalMovement || (this.allowDiagonal ? this.dontCrossCorners ? this.diagonalMovement = s.OnlyWhenNoObstacles : this.diagonalMovement = s.IfAtMostOneObstacle : this.diagonalMovement = s.Never), 
            this.diagonalMovement == s.Never ? this.heuristic = t.heuristic || r.manhattan : this.heuristic = t.heuristic || r.octile;
        }
        n(TraceFinder, "PathFinding.finders.TraceFinder"), TraceFinder.prototype.findPath = function(t, e, i, n, s) {
            var r, a, l, u = new f(function(t, e) {
                return t.f - e.f;
            }), c = s.getNodeAt(t, e), d = s.getNodeAt(i, n), p = this.heuristic, g = (this.allowDiagonal, 
            this.dontCrossCorners, Math.abs), b = Math.SQRT2, v = 0, _ = 0, m = 0, A = 0, y = 0;
            for (c.g = 0, c.f = 0, u.push(c), c.opened = !0; !u.empty(); ) {
                if ((r = u.pop()).closed = !0, r === d) return o.backtrace(d);
                for (v = 0, _ = (a = s.getNeighbors(r, this.diagonalMovement)).length; v &lt; _; ++v) (l = a[v]).closed || (m = l.x, 
                A = l.y, y = r.g + (m - r.x == 0 || A - r.y == 0 ? 1 : b), (!l.opened || y &lt; l.g) &amp;&amp; (l.g = y * _ / 9, 
                l.h = l.h || p(g(m - i), g(A - n)), l.f = l.g + l.h, l.parent = r, l.opened ? u.updateItem(l) : (u.push(l), 
                l.opened = !0)));
            }
            return [];
        };
    }(), function() {
        function Heap(t) {
            this.cmp = null, this.nodes = null, this.heapFunction = new d(), this.cmp = null != t ? t : this.heapFunction.defaultCmp, 
            this.nodes = [];
        }
        n(Heap, "PathFinding.libs.Heap");
        var t = Heap.prototype;
        return t.push = function(t) {
            return this.heapFunction.heappush(this.nodes, t, this.cmp);
        }, t.pop = function() {
            return this.heapFunction.heappop(this.nodes, this.cmp);
        }, t.peek = function() {
            return this.nodes[0];
        }, t.contains = function(t) {
            return -1 !== this.nodes.indexOf(t);
        }, t.replace = function(t) {
            return this.heapFunction.heapreplace(this.nodes, t, this.cmp);
        }, t.pushpop = function(t) {
            return this.heapFunction.heappushpop(this.nodes, t, this.cmp);
        }, t.heapify = function() {
            return this.heapFunction.heapify(this.nodes, this.cmp);
        }, t.updateItem = function(t) {
            return this.heapFunction.updateItem(this.nodes, t, this.cmp);
        }, t.clear = function() {
            return this.nodes = [];
        }, t.empty = function() {
            return 0 === this.nodes.length;
        }, t.size = function() {
            return this.nodes.length;
        }, t.clone = function() {
            var t = new Heap();
            return t.nodes = this.nodes.slice(0), t;
        }, t.toArray = function() {
            return this.nodes.slice(0);
        }, Heap;
    }()), d = function() {
        function HeapFunction() {
            this.defaultCmp = function(t, e) {
                return t &lt; e ? -1 : t &gt; e ? 1 : 0;
            };
        }
        n(HeapFunction, "PathFinding.libs.HeapFunction");
        var t = HeapFunction.prototype;
        return t.insort = function(t, e, i, n, s) {
            var r = NaN;
            if (null == i &amp;&amp; (i = 0), null == s &amp;&amp; (s = this.defaultCmp), i &lt; 0) throw new Error("lo must be non-negative");
            for (null == n &amp;&amp; (n = t.length); i &lt; n; ) s(e, t[r = Math.floor((i + n) / 2)]) &lt; 0 ? n = r : i = r + 1;
            return [].splice.apply(t, [ i, i - i ].concat(e)), e;
        }, t.heappush = function(t, e, i) {
            return null == i &amp;&amp; (i = this.defaultCmp), t.push(e), this._siftdown(t, 0, t.length - 1, i);
        }, t.heappop = function(t, e) {
            var i, n;
            return null == e &amp;&amp; (e = this.defaultCmp), i = t.pop(), t.length ? (n = t[0], t[0] = i, 
            this._siftup(t, 0, e)) : n = i, n;
        }, t.heapreplace = function(t, e, i) {
            var n;
            return null == i &amp;&amp; (i = this.defaultCmp), n = t[0], t[0] = e, this._siftup(t, 0, i), 
            n;
        }, t.heappushpop = function(t, e, i) {
            var n;
            return null == i &amp;&amp; (i = this.defaultCmp), t.length &amp;&amp; i(t[0], e) &lt; 0 &amp;&amp; (e = (n = [ t[0], e ])[0], 
            t[0] = n[1], this._siftup(t, 0, i)), e;
        }, t.heapify = function(t, e) {
            var i, n, s, r, a, o = 0, l = 0, u = 0;
            for (null == e &amp;&amp; (e = this.defaultCmp), r = [], l = 0, i = (s = function() {
                for (a = [], u = 0, n = Math.floor(t.length / 2); 0 &lt;= n ? u &lt; n : u &gt; n; 0 &lt;= n ? u++ : u--) a.push(u);
                return a;
            }.apply(this).reverse()).length; l &lt; i; l++) o = s[l], r.push(this._siftup(t, o, e));
            return r;
        }, t.updateItem = function(t, e, i) {
            var n;
            return null == i &amp;&amp; (i = this.defaultCmp), -1 === (n = t.indexOf(e)) ? null : (this._siftdown(t, 0, n, i), 
            this._siftup(t, n, i));
        }, t.nlargest = function(t, e, i) {
            var n, s, r, a, o = 0;
            if (null == i &amp;&amp; (i = this.defaultCmp), !(s = t.slice(0, e)).length) return s;
            for (this.heapify(s, i), o = 0, r = (a = t.slice(e)).length; o &lt; r; o++) n = a[o], 
            this.heappushpop(s, n, i);
            return s.sort(i).reverse();
        }, t.nsmallest = function(t, e, i) {
            var n, s, r, a, o, l, u, c = 0, f = 0;
            if (null == i &amp;&amp; (i = this.defaultCmp), 10 * e &lt;= t.length) {
                if (!(r = t.slice(0, e).sort(i)).length) return r;
                for (s = r[r.length - 1], c = 0, a = (o = t.slice(e)).length; c &lt; a; c++) i(n = o[c], s) &lt; 0 &amp;&amp; (this.insort(r, n, 0, null, i), 
                r.pop(), s = r[r.length - 1]);
                return r;
            }
            for (this.heapify(t, i), u = [], f = 0, l = Math.min(e, t.length); 0 &lt;= l ? f &lt; l : f &gt; l; 0 &lt;= l ? ++f : --f) u.push(this.heappop(t, i));
            return u;
        }, t._siftdown = function(t, e, i, n) {
            var s, r, a = 0;
            for (null == n &amp;&amp; (n = this.defaultCmp), s = t[i]; i &gt; e &amp;&amp; n(s, r = t[a = i - 1 &gt;&gt; 1]) &lt; 0; ) t[i] = r, 
            i = a;
            return t[i] = s;
        }, t._siftup = function(t, e, i) {
            var n, s, r, a = 0, o = 0;
            for (null == i &amp;&amp; (i = this.defaultCmp), n = t.length, r = e, s = t[e], a = 2 * e + 1; a &lt; n; ) (o = a + 1) &lt; n &amp;&amp; !(i(t[a], t[o]) &lt; 0) &amp;&amp; (a = o), 
            t[e] = t[a], a = 2 * (e = a) + 1;
            return t[e] = s, this._siftdown(t, r, e, i);
        }, HeapFunction;
    }();
    (function(t) {
        function BestFirstFinder(t) {
            BestFirstFinder.__super.call(this, t);
            var e = this.heuristic;
            this.heuristic = function(t, i) {
                return 1e6 * e(t, i);
            };
        }
        n(BestFirstFinder, "PathFinding.finders.BestFirstFinder", t);
    })(l), function(t) {
        function BiBestFirstFinder(t) {
            BiBestFirstFinder.__super.call(this, t);
            var e = this.heuristic;
            this.heuristic = function(t, i) {
                return 1e6 * e(t, i);
            };
        }
        n(BiBestFirstFinder, "PathFinding.finders.BiBestFirstFinder", t);
    }(u), function(t) {
        function BiDijkstraFinder(t) {
            BiDijkstraFinder.__super.call(this, t), this.heuristic = function(t, e) {
                return 0;
            };
        }
        n(BiDijkstraFinder, "PathFinding.finders.BiDijkstraFinder", t);
    }(u), function(t) {
        function DijkstraFinder(t) {
            DijkstraFinder.__super.call(this, t), this.heuristic = function(t, e) {
                return 0;
            };
        }
        n(DijkstraFinder, "PathFinding.finders.DijkstraFinder", t);
    }(l), function(t) {
        function JPFAlwaysMoveDiagonally(t) {
            JPFAlwaysMoveDiagonally.__super.call(this, t);
        }
        n(JPFAlwaysMoveDiagonally, "PathFinding.finders.JPFAlwaysMoveDiagonally", t);
        var e = JPFAlwaysMoveDiagonally.prototype;
        e._jump = function(t, e, i, n) {
            var s = this.grid, r = t - i, a = e - n;
            if (!s.isWalkableAt(t, e)) return null;
            if (1 == this.trackJumpRecursion &amp;&amp; (s.getNodeAt(t, e).tested = !0), s.getNodeAt(t, e) == this.endNode) return [ t, e ];
            if (0 !== r &amp;&amp; 0 !== a) {
                if (s.isWalkableAt(t - r, e + a) &amp;&amp; !s.isWalkableAt(t - r, e) || s.isWalkableAt(t + r, e - a) &amp;&amp; !s.isWalkableAt(t, e - a)) return [ t, e ];
                if (this._jump(t + r, e, t, e) || this._jump(t, e + a, t, e)) return [ t, e ];
            } else if (0 !== r) {
                if (s.isWalkableAt(t + r, e + 1) &amp;&amp; !s.isWalkableAt(t, e + 1) || s.isWalkableAt(t + r, e - 1) &amp;&amp; !s.isWalkableAt(t, e - 1)) return [ t, e ];
            } else if (s.isWalkableAt(t + 1, e + a) &amp;&amp; !s.isWalkableAt(t + 1, e) || s.isWalkableAt(t - 1, e + a) &amp;&amp; !s.isWalkableAt(t - 1, e)) return [ t, e ];
            return this._jump(t + r, e + a, t, e);
        }, e._findNeighbors = function(t) {
            var e, i, n = t.parent, r = t.x, a = t.y, o = this.grid, l = 0, u = 0, c = 0, f = 0, d = [], p = 0, g = 0;
            if (n) l = n.x, u = n.y, c = (r - l) / Math.max(Math.abs(r - l), 1), f = (a - u) / Math.max(Math.abs(a - u), 1), 
            0 !== c &amp;&amp; 0 !== f ? (o.isWalkableAt(r, a + f) &amp;&amp; d.push([ r, a + f ]), o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a ]), 
            o.isWalkableAt(r + c, a + f) &amp;&amp; d.push([ r + c, a + f ]), o.isWalkableAt(r - c, a) || d.push([ r - c, a + f ]), 
            o.isWalkableAt(r, a - f) || d.push([ r + c, a - f ])) : 0 === c ? (o.isWalkableAt(r, a + f) &amp;&amp; d.push([ r, a + f ]), 
            o.isWalkableAt(r + 1, a) || d.push([ r + 1, a + f ]), o.isWalkableAt(r - 1, a) || d.push([ r - 1, a + f ])) : (o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a ]), 
            o.isWalkableAt(r, a + 1) || d.push([ r + c, a + 1 ]), o.isWalkableAt(r, a - 1) || d.push([ r + c, a - 1 ])); else for (p = 0, 
            g = (e = o.getNeighbors(t, s.Always)).length; p &lt; g; ++p) i = e[p], d.push([ i.x, i.y ]);
            return d;
        };
    }(c), function(t) {
        function JPFMoveDiagonallyIfAtMostOneObstacle(t) {
            JPFMoveDiagonallyIfAtMostOneObstacle.__super.call(this, t);
        }
        n(JPFMoveDiagonallyIfAtMostOneObstacle, "PathFinding.finders.JPFMoveDiagonallyIfAtMostOneObstacle", t);
        var e = JPFMoveDiagonallyIfAtMostOneObstacle.prototype;
        e._jump = function(t, e, i, n) {
            var s = this.grid, r = t - i, a = e - n;
            if (!s.isWalkableAt(t, e)) return null;
            if (!0 === this.trackJumpRecursion &amp;&amp; (s.getNodeAt(t, e).tested = !0), s.getNodeAt(t, e) == this.endNode) return [ t, e ];
            if (0 !== r &amp;&amp; 0 !== a) {
                if (s.isWalkableAt(t - r, e + a) &amp;&amp; !s.isWalkableAt(t - r, e) || s.isWalkableAt(t + r, e - a) &amp;&amp; !s.isWalkableAt(t, e - a)) return [ t, e ];
                if (this._jump(t + r, e, t, e) || this._jump(t, e + a, t, e)) return [ t, e ];
            } else if (0 !== r) {
                if (s.isWalkableAt(t + r, e + 1) &amp;&amp; !s.isWalkableAt(t, e + 1) || s.isWalkableAt(t + r, e - 1) &amp;&amp; !s.isWalkableAt(t, e - 1)) return [ t, e ];
            } else if (s.isWalkableAt(t + 1, e + a) &amp;&amp; !s.isWalkableAt(t + 1, e) || s.isWalkableAt(t - 1, e + a) &amp;&amp; !s.isWalkableAt(t - 1, e)) return [ t, e ];
            return s.isWalkableAt(t + r, e) || s.isWalkableAt(t, e + a) ? this._jump(t + r, e + a, t, e) : null;
        }, e._findNeighbors = function(t) {
            var e, i, n = t.parent, r = t.x, a = t.y, o = this.grid, l = 0, u = 0, c = 0, f = 0, d = [], p = 0, g = 0;
            if (n) l = n.x, u = n.y, c = (r - l) / Math.max(Math.abs(r - l), 1), f = (a - u) / Math.max(Math.abs(a - u), 1), 
            0 !== c &amp;&amp; 0 !== f ? (o.isWalkableAt(r, a + f) &amp;&amp; d.push([ r, a + f ]), o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a ]), 
            (o.isWalkableAt(r, a + f) || o.isWalkableAt(r + c, a)) &amp;&amp; d.push([ r + c, a + f ]), 
            !o.isWalkableAt(r - c, a) &amp;&amp; o.isWalkableAt(r, a + f) &amp;&amp; d.push([ r - c, a + f ]), 
            !o.isWalkableAt(r, a - f) &amp;&amp; o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a - f ])) : 0 === c ? o.isWalkableAt(r, a + f) &amp;&amp; (d.push([ r, a + f ]), 
            o.isWalkableAt(r + 1, a) || d.push([ r + 1, a + f ]), o.isWalkableAt(r - 1, a) || d.push([ r - 1, a + f ])) : o.isWalkableAt(r + c, a) &amp;&amp; (d.push([ r + c, a ]), 
            o.isWalkableAt(r, a + 1) || d.push([ r + c, a + 1 ]), o.isWalkableAt(r, a - 1) || d.push([ r + c, a - 1 ])); else for (p = 0, 
            g = (e = o.getNeighbors(t, s.IfAtMostOneObstacle)).length; p &lt; g; ++p) i = e[p], 
            d.push([ i.x, i.y ]);
            return d;
        };
    }(c), function(t) {
        function JPFMoveDiagonallyIfNoObstacles(t) {
            JPFMoveDiagonallyIfNoObstacles.__super.call(this, t);
        }
        n(JPFMoveDiagonallyIfNoObstacles, "PathFinding.finders.JPFMoveDiagonallyIfNoObstacles", t);
        var e = JPFMoveDiagonallyIfNoObstacles.prototype;
        e._jump = function(t, e, i, n) {
            var s = this.grid, r = t - i, a = e - n;
            if (!s.isWalkableAt(t, e)) return null;
            if (!0 === this.trackJumpRecursion &amp;&amp; (s.getNodeAt(t, e).tested = !0), s.getNodeAt(t, e) === this.endNode) return [ t, e ];
            if (0 !== r &amp;&amp; 0 !== a) {
                if (this._jump(t + r, e, t, e) || this._jump(t, e + a, t, e)) return [ t, e ];
            } else if (0 !== r) {
                if (s.isWalkableAt(t, e - 1) &amp;&amp; !s.isWalkableAt(t - r, e - 1) || s.isWalkableAt(t, e + 1) &amp;&amp; !s.isWalkableAt(t - r, e + 1)) return [ t, e ];
            } else if (0 !== a &amp;&amp; (s.isWalkableAt(t - 1, e) &amp;&amp; !s.isWalkableAt(t - 1, e - a) || s.isWalkableAt(t + 1, e) &amp;&amp; !s.isWalkableAt(t + 1, e - a))) return [ t, e ];
            return s.isWalkableAt(t + r, e) &amp;&amp; s.isWalkableAt(t, e + a) ? this._jump(t + r, e + a, t, e) : null;
        }, e._findNeighbors = function(t) {
            var e, i, n = t.parent, r = t.x, a = t.y, o = this.grid, l = 0, u = 0, c = 0, f = 0, d = [], p = 0, g = 0;
            if (n) if (l = n.x, u = n.y, c = (r - l) / Math.max(Math.abs(r - l), 1), f = (a - u) / Math.max(Math.abs(a - u), 1), 
            0 !== c &amp;&amp; 0 !== f) o.isWalkableAt(r, a + f) &amp;&amp; d.push([ r, a + f ]), o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a ]), 
            o.isWalkableAt(r, a + f) &amp;&amp; o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a + f ]); else {
                var b = !1;
                if (0 !== c) {
                    b = o.isWalkableAt(r + c, a);
                    var v = o.isWalkableAt(r, a + 1), _ = o.isWalkableAt(r, a - 1);
                    b &amp;&amp; (d.push([ r + c, a ]), v &amp;&amp; d.push([ r + c, a + 1 ]), _ &amp;&amp; d.push([ r + c, a - 1 ])), 
                    v &amp;&amp; d.push([ r, a + 1 ]), _ &amp;&amp; d.push([ r, a - 1 ]);
                } else if (0 !== f) {
                    b = o.isWalkableAt(r, a + f);
                    var m = o.isWalkableAt(r + 1, a), A = o.isWalkableAt(r - 1, a);
                    b &amp;&amp; (d.push([ r, a + f ]), m &amp;&amp; d.push([ r + 1, a + f ]), A &amp;&amp; d.push([ r - 1, a + f ])), 
                    m &amp;&amp; d.push([ r + 1, a ]), A &amp;&amp; d.push([ r - 1, a ]);
                }
            } else for (p = 0, g = (e = o.getNeighbors(t, s.OnlyWhenNoObstacles)).length; p &lt; g; ++p) i = e[p], 
            d.push([ i.x, i.y ]);
            return d;
        };
    }(c), function(t) {
        function JPFNeverMoveDiagonally(t) {
            JPFNeverMoveDiagonally.__super.call(this, t);
        }
        n(JPFNeverMoveDiagonally, "PathFinding.finders.JPFNeverMoveDiagonally", t);
        var e = JPFNeverMoveDiagonally.prototype;
        e._jump = function(t, e, i, n) {
            var s = this.grid, r = t - i, a = e - n;
            if (!s.isWalkableAt(t, e)) return null;
            if (!0 === this.trackJumpRecursion &amp;&amp; (s.getNodeAt(t, e).tested = !0), s.getNodeAt(t, e) == this.endNode) return [ t, e ];
            if (0 !== r) {
                if (s.isWalkableAt(t, e - 1) &amp;&amp; !s.isWalkableAt(t - r, e - 1) || s.isWalkableAt(t, e + 1) &amp;&amp; !s.isWalkableAt(t - r, e + 1)) return [ t, e ];
            } else {
                if (0 === a) throw new Error("Only horizontal and vertical movements are allowed");
                if (s.isWalkableAt(t - 1, e) &amp;&amp; !s.isWalkableAt(t - 1, e - a) || s.isWalkableAt(t + 1, e) &amp;&amp; !s.isWalkableAt(t + 1, e - a)) return [ t, e ];
                if (this._jump(t + 1, e, t, e) || this._jump(t - 1, e, t, e)) return [ t, e ];
            }
            return this._jump(t + r, e + a, t, e);
        }, e._findNeighbors = function(t) {
            var e, i, n = t.parent, r = t.x, a = t.y, o = this.grid, l = 0, u = 0, c = 0, f = 0, d = [], p = 0, g = 0;
            if (n) l = n.x, u = n.y, c = (r - l) / Math.max(Math.abs(r - l), 1), f = (a - u) / Math.max(Math.abs(a - u), 1), 
            0 !== c ? (o.isWalkableAt(r, a - 1) &amp;&amp; d.push([ r, a - 1 ]), o.isWalkableAt(r, a + 1) &amp;&amp; d.push([ r, a + 1 ]), 
            o.isWalkableAt(r + c, a) &amp;&amp; d.push([ r + c, a ])) : 0 !== f &amp;&amp; (o.isWalkableAt(r - 1, a) &amp;&amp; d.push([ r - 1, a ]), 
            o.isWalkableAt(r + 1, a) &amp;&amp; d.push([ r + 1, a ]), o.isWalkableAt(r, a + f) &amp;&amp; d.push([ r, a + f ])); else for (p = 0, 
            g = (e = o.getNeighbors(t, s.Never)).length; p &lt; g; ++p) i = e[p], d.push([ i.x, i.y ]);
            return d;
        };
    }(c);
}(window, document, PathFinding), "function" == typeof define &amp;&amp; define.amd &amp;&amp; define("laya.core", [ "require", "exports" ], function(t, e) {
    "use strict";
    for (var i in Object.defineProperty(e, "__esModule", {
        value: !0
    }), PathFinding) {
        var n = PathFinding[i];
        n &amp;&amp; n.__isclass &amp;&amp; (e[i] = n);
    }
});</pre></body></html>