-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathPathfinder.js
10 lines (10 loc) · 17.4 KB
/
Pathfinder.js
1
2
3
4
5
6
7
8
9
10
/**
* ____ _ _ _____ _ _ _ _
* | _ \ __ _| |_| |__ | ___(_)_ __ __| (_)_ __ __ _ (_)___
* | |_) / _` | __| '_ \| |_ | | '_ \ / _` | | '_ \ / _` | | / __|
* | __/ (_| | |_| | | | _| | | | | | (_| | | | | | (_| |_ | \__ \
* |_| \__,_|\__|_| |_|_| |_|_| |_|\__,_|_|_| |_|\__, (_)/ |___/
* |___/ |__/
* https://github.com/qiao/PathFinding.js
*/
var PF=function(){var a=function(b,c){var d=a.resolve(b,c||"/"),e=a.modules[d];if(!e)throw new Error("Failed to resolve module "+b+", tried "+d);var f=e._cached?e._cached:e();return f};return a.paths=[],a.modules={},a.extensions=[".js",".coffee"],a._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},a.resolve=function(){return function(b,c){function h(b){if(a.modules[b])return b;for(var c=0;c<a.extensions.length;c++){var d=a.extensions[c];if(a.modules[b+d])return b+d}}function i(b){b=b.replace(/\/+$/,"");var c=b+"/package.json";if(a.modules[c]){var e=a.modules[c](),f=e.browserify;if(typeof f=="object"&&f.main){var g=h(d.resolve(b,f.main));if(g)return g}else if(typeof f=="string"){var g=h(d.resolve(b,f));if(g)return g}else if(e.main){var g=h(d.resolve(b,e.main));if(g)return g}}return h(b+"/index")}function j(a,b){var c=k(b);for(var d=0;d<c.length;d++){var e=c[d],f=h(e+"/"+a);if(f)return f;var g=i(e+"/"+a);if(g)return g}var f=h(a);if(f)return f}function k(a){var b;a==="/"?b=[""]:b=d.normalize(a).split("/");var c=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";c.push(f)}return c}c||(c="/");if(a._core[b])return b;var d=a.modules.path();c=d.resolve("/",c);var e=c||"/";if(b.match(/^(?:\.\.?\/|\/)/)){var f=h(d.resolve(e,b))||i(d.resolve(e,b));if(f)return f}var g=j(b,e);if(g)return g;throw new Error("Cannot find module '"+b+"'")}}(),a.alias=function(b,c){var d=a.modules.path(),e=null;try{e=a.resolve(b+"/package.json","/")}catch(f){e=a.resolve(b,"/")}var g=d.dirname(e),h=(Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b})(a.modules);for(var i=0;i<h.length;i++){var j=h[i];if(j.slice(0,g.length+1)===g+"/"){var k=j.slice(g.length);a.modules[c+k]=a.modules[g+k]}else j===g&&(a.modules[c]=a.modules[g])}},a.define=function(b,c){var d=a._core[b]?"":a.modules.path().dirname(b),e=function(b){return a(b,d)};e.resolve=function(b){return a.resolve(b,d)},e.modules=a.modules,e.define=a.define;var f={exports:{}};a.modules[b]=function(){return a.modules[b]._cached=f.exports,c.call(f.exports,e,f,f.exports,d,b),a.modules[b]._cached=f.exports,f.exports}},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(){var a=[],b=typeof window!="undefined"&&window.postMessage&&window.addEventListener;return b&&window.addEventListener("message",function(b){if(b.source===window&&b.data==="browserify-tick"){b.stopPropagation();if(a.length>0){var c=a.shift();c()}}},!0),function(c){b?(a.push(c),window.postMessage("browserify-tick","*")):setTimeout(c,0)}}()),process.title||(process.title="browser"),process.binding||(process.binding=function(b){if(b==="evals")return a("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),process.env||(process.env={}),process.argv||(process.argv=[]),a.define("path",function(a,b,c,d,e){function f(a,b){var c=[];for(var d=0;d<a.length;d++)b(a[d],d,a)&&c.push(a[d]);return c}function g(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var h=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;c.resolve=function(){var a="",b=!1;for(var c=arguments.length;c>=-1&&!b;c--){var d=c>=0?arguments[c]:process.cwd();if(typeof d!="string"||!d)continue;a=d+"/"+a,b=d.charAt(0)==="/"}return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(f(a,function(a,b){return a&&typeof a=="string"}).join("/"))},c.dirname=function(a){var b=h.exec(a)[1]||"",c=!1;return b?b.length===1||c&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},c.basename=function(a,b){var c=h.exec(a)[2]||"";return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),c},c.extname=function(a){return h.exec(a)[3]||""}}),a.define("/core/Node.js",function(a,b,c,d,e){function f(a,b,c){this.x=a,this.y=b,this.walkable=c===undefined?!0:c}b.exports=f}),a.define("/core/Grid.js",function(a,b,c,d,e){function g(a,b,c){this.width=a,this.height=b,this.nodes=this._buildNodes(a,b,c)}var f=a("./Node");g.prototype._buildNodes=function(a,b,c){var d,e,g=new Array(b),h;for(d=0;d<b;++d){g[d]=new Array(a);for(e=0;e<a;++e)g[d][e]=new f(e,d)}if(c===undefined)return g;if(c.length!==b||c[0].length!==a)throw new Error("Matrix size does not fit");for(d=0;d<b;++d)for(e=0;e<a;++e)c[d][e]&&(g[d][e].walkable=!1);return g},g.prototype.getNodeAt=function(a,b){return this.nodes[b][a]},g.prototype.isWalkableAt=function(a,b){return this.isInside(a,b)&&this.nodes[b][a].walkable},g.prototype.isInside=function(a,b){return a>=0&&a<this.width&&b>=0&&b<this.height},g.prototype.setWalkableAt=function(a,b,c){this.nodes[b][a].walkable=c},g.prototype.getNeighbors=function(a,b){var c=a.x,d=a.y,e=[],f=!1,g=!1,h=!1,i=!1,j=this.nodes;return this.isWalkableAt(c,d-1)&&(e.push(j[d-1][c]),f=g=!0),this.isWalkableAt(c+1,d)&&(e.push(j[d][c+1]),g=h=!0),this.isWalkableAt(c,d+1)&&(e.push(j[d+1][c]),h=i=!0),this.isWalkableAt(c-1,d)&&(e.push(j[d][c-1]),i=f=!0),b?(f&&this.isWalkableAt(c-1,d-1)&&e.push(j[d-1][c-1]),g&&this.isWalkableAt(c+1,d-1)&&e.push(j[d-1][c+1]),h&&this.isWalkableAt(c+1,d+1)&&e.push(j[d+1][c+1]),i&&this.isWalkableAt(c-1,d+1)&&e.push(j[d+1][c-1]),e):e},g.prototype.clone=function(){var a,b,c=this.width,d=this.height,e=this.nodes,h=new g(c,d),i=new Array(d),j;for(a=0;a<d;++a){i[a]=new Array(c);for(b=0;b<c;++b)i[a][b]=new f(b,a,e[a][b].walkable)}return h.nodes=i,h},b.exports=g}),a.define("/core/Heap.js",function(a,b,c,d,e){(function(){var a,c,d,e,f,g,h,i,j,k,l,m,n,o,p;d=Math.floor,k=Math.min,c=function(a,b){return a<b?-1:a>b?1:0},j=function(a,b,e,f,g){var h;e==null&&(e=0),g==null&&(g=c);if(e<0)throw new Error("lo must be non-negative");f==null&&(f=a.length);while(g(e,f)<0)h=d((e+f)/2),g(b,a[h])<0?f=h:e=h+1;return[].splice.apply(a,[e,e-e].concat(b)),b},g=function(a,b,d){return d==null&&(d=c),a.push(b),o(a,0,a.length-1,d)},f=function(a,b){var d,e;return b==null&&(b=c),d=a.pop(),a.length?(e=a[0],a[0]=d,p(a,0,b)):e=d,e},i=function(a,b,d){var e;return d==null&&(d=c),e=a[0],a[0]=b,p(a,0,d),e},h=function(a,b,d){var e;return d==null&&(d=c),a.length&&d(a[0],b)<0&&(e=[a[0],b],b=e[0],a[0]=e[1],p(a,0,d)),b},e=function(a,b){var e,f,g,h,i,j,k,l;b==null&&(b=c),j=function(){l=[];for(var b=0,c=d(a.length/2);0<=c?b<c:b>c;0<=c?b++:b--)l.push(b);return l}.apply(this).reverse(),k=[];for(f=0,h=j.length;f<h;f++)e=j[f],k.push(p(a,e,b));return k},n=function(a,b,d){var e;return d==null&&(d=c),e=a.indexOf(b),o(a,0,e,d),p(a,e,d)},l=function(a,b,d){var f,g,i,j,k;d==null&&(d=c),g=a.slice(0,b);if(!g.length)return g;e(g,d),k=a.slice(b);for(i=0,j=k.length;i<j;i++)f=k[i],h(g,f,d);return g.sort(d).reverse()},m=function(a,b,d){var g,h,i,l,m,n,o,p,q,r;d==null&&(d=c);if(b*10<=a.length){l=a.slice(0,b).sort(d);if(!l.length)return l;i=l[l.length-1],p=a.slice(b);for(m=0,o=p.length;m<o;m++)g=p[m],d(g,i)<0&&(j(l,g,0,null,d),l.pop(),i=l[l.length-1]);return l}e(a,d),r=[];for(h=n=0,q=k(b,a.length);0<=q?n<q:n>q;h=0<=q?++n:--n)r.push(f(a,d));return r},o=function(a,b,d,e){var f,g,h;e==null&&(e=c),f=a[d];while(d>b){h=d-1>>1,g=a[h];if(e(f,g)<0){a[d]=g,d=h;continue}break}return a[d]=f},p=function(a,b,d){var e,f,g,h,i;d==null&&(d=c),f=a.length,i=b,g=a[b],e=2*b+1;while(e<f)h=e+1,h<f&&!(d(a[e],a[h])<0)&&(e=h),a[b]=a[e],b=e,e=2*b+1;return a[b]=g,o(a,i,b,d)},a=function(){function a(a){this.cmp=a!=null?a:c,this.nodes=[]}return a.name="Heap",a.push=g,a.pop=f,a.replace=i,a.pushpop=h,a.heapify=e,a.nlargest=l,a.nsmallest=m,a.prototype.push=function(a){return g(this.nodes,a,this.cmp)},a.prototype.pop=function(){return f(this.nodes,this.cmp)},a.prototype.peek=function(){return this.nodes[0]},a.prototype.contains=function(a){return this.nodes.indexOf(a)!==-1},a.prototype.replace=function(a){return i(this.nodes,a,this.cmp)},a.prototype.pushpop=function(a){return h(this.nodes,a,this.cmp)},a.prototype.heapify=function(){return e(this.nodes,this.cmp)},a.prototype.updateItem=function(a){return n(this.nodes,a,this.cmp)},a.prototype.clear=function(){return this.nodes=[]},a.prototype.empty=function(){return this.nodes.length===0},a.prototype.size=function(){return this.nodes.length},a.prototype.clone=function(){var b;return b=new a,b.nodes=this.nodes.slice(0),b},a.prototype.toArray=function(){return this.nodes.slice(0)},a.prototype.insert=a.prototype.push,a.prototype.remove=a.prototype.pop,a.prototype.top=a.prototype.peek,a.prototype.front=a.prototype.peek,a.prototype.has=a.prototype.contains,a.prototype.copy=a.prototype.clone,a}(),(typeof b!="undefined"&&b!==null?b.exports:void 0)?b.exports=a:window.Heap=a}).call(this)}),a.define("/core/Util.js",function(a,c,d,e,f){function g(a){var b=[[a.x,a.y]];while(a.parent)a=a.parent,b.push([a.x,a.y]);return b.reverse()}function h(a,b){var c=g(a),d=g(b);return c.concat(d.reverse())}function i(a){var b,c=0,d,e,f,g;for(b=1;b<a.length;++b)d=a[b-1],e=a[b],f=d[0]-e[0],g=d[1]-e[1],c+=Math.sqrt(f*f+g*g);return c}d.backtrace=g,d.biBacktrace=h,d.pathLength=i,d.smoothenPath=function(){function a(a,c){var d=a[0],e=a[1],f=c[0],g=c[1],h=(g-e)/(f-d);return b=e-h*d,{slope:h,intercept:b}}function c(b,c,d){var e,f,g,h,i,j;b[1]>c[1]&&(e=b,b=c,c=e),f=a(b,c),g=f.slope,h=f.intercept;if(slope==Infinity){i=b[0];for(j=b[1];j<c[1];++j)if(!d.isWalkableAt(i,j))return!0;return!1}for(j=b[1];j<c[1];++j){i=~~(j/g-h+.5);if(!d.isWalkableAt(i,j))return!0}b[0]>c[0]&&(e=b,b=c,c=e);for(i=b[0];i<c[0];++i){j=~~(g*i+h+.5);if(!d.isWalkableAt(i,j))return!0}return!1}}()}),a.define("/core/Heuristic.js",function(a,b,c,d,e){b.exports={manhattan:function(a,b){return a+b},euclidean:function(a,b){return Math.sqrt(a*a+b*b)},chebyshev:function(a,b){return Math.max(a,b)}}}),a.define("/finders/AStarFinder.js",function(a,b,c,d,e){function i(a){a=a||{},this.allowDiagonal=a.allowDiagonal,this.heuristic=a.heuristic||h.manhattan}var f=a("../core/Heap"),g=a("../core/Util"),h=a("../core/Heuristic");i.prototype.findPath=function(a,b,c,d,e){var h=new f(function(a,b){return a.f-b.f}),i=e.getNodeAt(a,b),j=e.getNodeAt(c,d),k=this.heuristic,l=this.allowDiagonal,m=Math.abs,n=Math.SQRT2,o,p,q,r,s,t,u,v;i.g=0,i.f=0,h.push(i),i.opened=!0;while(!h.empty()){o=h.pop(),o.closed=!0;if(o===j)return g.backtrace(j);p=e.getNeighbors(o,l);for(r=0,s=p.length;r<s;++r){q=p[r];if(q.closed)continue;t=q.x,u=q.y,v=o.g+(t-o.x===0||u-o.y===0?1:n);if(!q.opened||v<q.g)q.g=v,q.h=q.h||k(m(t-c),m(u-d)),q.f=q.g+q.h,q.parent=o,q.opened?h.updateItem(q):(h.push(q),q.opened=!0)}}return[]},b.exports=i}),a.define("/finders/BestFirstFinder.js",function(a,b,c,d,e){function g(a){f.call(this,a);var b=this.heuristic;this.heuristic=function(a,c){return b(a,c)*1e6}}var f=a("./AStarFinder");g.prototype=new f,g.prototype.constructor=g,b.exports=g}),a.define("/finders/BreadthFirstFinder.js",function(a,b,c,d,e){function g(a){a=a||{},this.allowDiagonal=a.allowDiagonal}var f=a("../core/Util");g.prototype.findPath=function(a,b,c,d,e){var g=[],h=this.allowDiagonal,i=e.getNodeAt(a,b),j=e.getNodeAt(c,d),k,l,m,n,o;g.push(i),i.opened=!0;while(g.length){m=g.shift(),m.closed=!0;if(m===j)return f.backtrace(j);k=e.getNeighbors(m,h);for(n=0,o=k.length;n<o;++n){l=k[n];if(l.closed||l.opened)continue;g.push(l),l.opened=!0,l.parent=m}}return[]},b.exports=g}),a.define("/finders/DijkstraFinder.js",function(a,b,c,d,e){function g(a){f.call(this,a),this.heuristic=function(a,b){return 0}}var f=a("./AStarFinder");g.prototype=new f,g.prototype.constructor=g,b.exports=g}),a.define("/finders/BiAStarFinder.js",function(a,b,c,d,e){function i(a){a=a||{},this.allowDiagonal=a.allowDiagonal,this.heuristic=a.heuristic||h.manhattan}var f=a("../core/Heap"),g=a("../core/Util"),h=a("../core/Heuristic");i.prototype.findPath=function(a,b,c,d,e){var h=function(a,b){return a.f-b.f},i=new f(h),j=new f(h),k=e.getNodeAt(a,b),l=e.getNodeAt(c,d),m=this.heuristic,n=this.allowDiagonal,o=Math.abs,p=Math.SQRT2,q,r,s,t,u,v,w,x,y=1,z=2;k.g=0,k.f=0,i.push(k),k.opened=y,l.g=0,l.f=0,j.push(l),l.opened=z;while(!i.empty()&&!j.empty()){q=i.pop(),q.closed=!0,r=e.getNeighbors(q,n);for(t=0,u=r.length;t<u;++t){s=r[t];if(s.closed)continue;if(s.opened===z)return g.biBacktrace(q,s);v=s.x,w=s.y,x=q.g+(v-q.x===0||w-q.y===0?1:p);if(!s.opened||x<s.g)s.g=x,s.h=s.h||m(o(v-c),o(w-d)),s.f=s.g+s.h,s.parent=q,s.opened?i.updateItem(s):(i.push(s),s.opened=y)}q=j.pop(),q.closed=!0,r=e.getNeighbors(q,n);for(t=0,u=r.length;t<u;++t){s=r[t];if(s.closed)continue;if(s.opened===y)return g.biBacktrace(s,q);v=s.x,w=s.y,x=q.g+(v-q.x===0||w-q.y===0?1:p);if(!s.opened||x<s.g)s.g=x,s.h=s.h||m(o(v-a),o(w-b)),s.f=s.g+s.h,s.parent=q,s.opened?j.updateItem(s):(j.push(s),s.opened=z)}}return[]},b.exports=i}),a.define("/finders/BiBestFirstFinder.js",function(a,b,c,d,e){function g(a){f.call(this,a);var b=this.heuristic;this.heuristic=function(a,c){return b(a,c)*1e6}}var f=a("./BiAStarFinder");g.prototype=new f,g.prototype.constructor=g,b.exports=g}),a.define("/finders/BiBreadthFirstFinder.js",function(a,b,c,d,e){function g(a){a=a||{},this.allowDiagonal=a.allowDiagonal}var f=a("../core/Util");g.prototype.findPath=function(a,b,c,d,e){var g=e.getNodeAt(a,b),h=e.getNodeAt(c,d),i=[],j=[],k,l,m,n=this.allowDiagonal,o=0,p=1,q,r;i.push(g),g.opened=!0,g.by=o,j.push(h),h.opened=!0,h.by=p;while(i.length&&j.length){m=i.shift(),m.closed=!0,k=e.getNeighbors(m,n);for(q=0,r=k.length;q<r;++q){l=k[q];if(l.closed)continue;if(l.opened){if(l.by===p)return f.biBacktrace(m,l);continue}i.push(l),l.parent=m,l.opened=!0,l.by=o}m=j.shift(),m.closed=!0,k=e.getNeighbors(m,n);for(q=0,r=k.length;q<r;++q){l=k[q];if(l.closed)continue;if(l.opened){if(l.by===o)return f.biBacktrace(l,m);continue}j.push(l),l.parent=m,l.opened=!0,l.by=p}}return[]},b.exports=g}),a.define("/finders/BiDijkstraFinder.js",function(a,b,c,d,e){function g(a){f.call(this,a),this.heuristic=function(a,b){return 0}}var f=a("./BiAStarFinder");g.prototype=new f,g.prototype.constructor=g,b.exports=g}),a.define("/finders/JumpPointFinder.js",function(a,b,c,d,e){function i(a){a=a||{},this.heuristic=a.heuristic||h.manhattan}var f=a("../core/Heap"),g=a("../core/Util"),h=a("../core/Heuristic");i.prototype.findPath=function(a,b,c,d,e){var h=this.openList=new f(function(a,b){return a.f-b.f}),i=this.startNode=e.getNodeAt(a,b),j=this.endNode=e.getNodeAt(c,d),k;this.grid=e,i.g=0,i.f=0,h.push(i),i.opened=!0;while(!h.empty()){k=h.pop(),k.closed=!0;if(k===j)return g.backtrace(j);this._identifySuccessors(k)}return[]},i.prototype._identifySuccessors=function(a){var b=this.grid,c=this.heuristic,d=this.openList,e=this.endNode.x,f=this.endNode.y,g,i,j,k,l,m=a.x,n=a.y,o,p,q,r,s,t,u,v=Math.abs,w=Math.max;g=this._findNeighbors(a);for(k=0,l=g.length;k<l;++k){i=g[k],j=this._jump(i[0],i[1],m,n);if(j){o=j[0],p=j[1],u=b.getNodeAt(o,p);if(u.closed)continue;s=h.euclidean(v(o-m),v(p-n)),t=a.g+s;if(!u.opened||t<u.g)u.g=t,u.h=u.h||c(v(o-e),v(p-f)),u.f=u.g+u.h,u.parent=a,u.opened?d.updateItem(u):(d.push(u),u.opened=!0)}}},i.prototype._jump=function(a,b,c,d){var e=this.grid,f=a-c,g=b-d,h,i;if(!e.isWalkableAt(a,b))return null;if(e.getNodeAt(a,b)===this.endNode)return[a,b];if(f!==0&&g!==0){if(e.isWalkableAt(a-f,b+g)&&!e.isWalkableAt(a-f,b)||e.isWalkableAt(a+f,b-g)&&!e.isWalkableAt(a,b-g))return[a,b]}else if(f!==0){if(e.isWalkableAt(a+f,b+1)&&!e.isWalkableAt(a,b+1)||e.isWalkableAt(a+f,b-1)&&!e.isWalkableAt(a,b-1))return[a,b]}else if(e.isWalkableAt(a+1,b+g)&&!e.isWalkableAt(a+1,b)||e.isWalkableAt(a-1,b+g)&&!e.isWalkableAt(a-1,b))return[a,b];if(f!==0&&g!==0){h=this._jump(a+f,b,a,b),i=this._jump(a,b+g,a,b);if(h||i)return[a,b]}return e.isWalkableAt(a+f,b)||e.isWalkableAt(a,b+g)?this._jump(a+f,b+g,a,b):null},i.prototype._findNeighbors=function(a){var b=a.parent,c=a.x,d=a.y,e=this.grid,f,g,h,i,j,k,l=[],m,n,o,p;if(b)f=b.x,g=b.y,j=(c-f)/Math.max(Math.abs(c-f),1),k=(d-g)/Math.max(Math.abs(d-g),1),j!==0&&k!==0?(e.isWalkableAt(c,d+k)&&l.push([c,d+k]),e.isWalkableAt(c+j,d)&&l.push([c+j,d]),(e.isWalkableAt(c,d+k)||e.isWalkableAt(c+j,d))&&l.push([c+j,d+k]),!e.isWalkableAt(c-j,d)&&e.isWalkableAt(c,d+k)&&l.push([c-j,d+k]),!e.isWalkableAt(c,d-k)&&e.isWalkableAt(c+j,d)&&l.push([c+j,d-k])):j===0?e.isWalkableAt(c,d+k)&&(e.isWalkableAt(c,d+k)&&l.push([c,d+k]),e.isWalkableAt(c+1,d)||l.push([c+1,d+k]),e.isWalkableAt(c-1,d)||l.push([c-1,d+k])):e.isWalkableAt(c+j,d)&&(e.isWalkableAt(c+j,d)&&l.push([c+j,d]),e.isWalkableAt(c,d+1)||l.push([c+j,d+1]),e.isWalkableAt(c,d-1)||l.push([c+j,d-1]));else{m=e.getNeighbors(a,!0);for(o=0,p=m.length;o<p;++o)n=m[o],l.push([n.x,n.y])}return l},b.exports=i}),a.define("/PathFinding.js",function(a,b,c,d,e){b.exports={Node:a("./core/Node"),Grid:a("./core/Grid"),Heap:a("./core/Heap"),Util:a("./core/Util"),Heuristic:a("./core/Heuristic"),AStarFinder:a("./finders/AStarFinder"),BestFirstFinder:a("./finders/BestFirstFinder"),BreadthFirstFinder:a("./finders/BreadthFirstFinder"),DijkstraFinder:a("./finders/DijkstraFinder"),BiAStarFinder:a("./finders/BiAStarFinder"),BiBestFirstFinder:a("./finders/BiBestFirstFinder"),BiBreadthFirstFinder:a("./finders/BiBreadthFirstFinder"),BiDijkstraFinder:a("./finders/BiDijkstraFinder"),JumpPointFinder:a("./finders/JumpPointFinder")}}),a("/PathFinding.js"),a("/PathFinding")}()