text: (function(){var g={},h=function(a,d){for(var c=g[a]||[],b=0,f=c.length;b<f;b++)c[b](d)},e=function(){this.routes=[]};e.prototype.addRoute=function(a){var d=Array.prototype.slice.call(arguments,1),c=/:([A-Za-z0-9_]+)/g,b=(a.match(c)||[]).map(function(a){return a.slice(1)}),f="^";f+=a.replace(c,"([^/?#]+)");f+="/?";f+="(?:\\?([^#]+))?";f+="(?:\\#(.+))?";f+="$";this.routes.push({tokens:b,fns:d,re:RegExp(f),route:a})};e.prototype.dispatchRoute=function(a){h("dispatch",{path:a});for(var d=null,c=this.routes,
  b=0,f=c.length;b<f;b++)if(a.match(c[b].re)){d=c[b];break}if(!d)return h("error",{path:a,error:404});var e={params:{},query:{},path:a,route:d.route},b=a.match(d.re),a=b.slice(1,d.tokens.length+1),c=b.slice(-2,-1)[0],b=b.slice(-1)[0];a.forEach(function(a,b){e.params[d.tokens[b]]=a});c&&(c=c.split("&"),c.forEach(function(a){a=a.split("=");e.query[a[0]]=a[1]||true}));e.hash=b;var g=d.fns.map(function(a,b){return function(){return a(e,function(a){var c=g[b++];if(a)return h("error",a);if(c)return c})}});
  g[0]()};e.prototype.on=function(a,d){g[a]||(g[a]=[]);return g[a].push(d)};typeof module!=="undefined"&&module.exports?module.exports=e:typeof define!=="undefined"?define(function(){return e}):this.Edmond=e})();