!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReachRouter={},t.React)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function r(t,e){return t(e={exports:{}},e.exports),e.exports}function i(t){return function(){return t}}var a=function(){};a.thatReturns=i,a.thatReturnsFalse=i(!1),a.thatReturnsTrue=i(!0),a.thatReturnsNull=i(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(t){return t};var u=a;var c=function(t,e,n,o,r,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,o,r,i,a,u],p=0;(c=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},s=u,p=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}})()&&Object.assign;var h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",d=r(function(t){t.exports=function(){function t(t,e,n,o,r,i){i!==h&&c(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=u,n.PropTypes=n,n}()}),v=function(t,e,n,o,r,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,o,r,i,a,u],p=0;(c=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},m="__global_unique_id__",y=function(){return n[m]=(n[m]||0)+1},g=r(function(t,n){n.__esModule=!0;var o=a(e),r=a(d),i=a(y);a(s);function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=1073741823;n.default=o.default.createContext||function(t,n){var o,a,s="__create-react-context-"+(0,i.default)()+"__",f=function(t){function e(){var n,o,r,i;u(this,e);for(var a=arguments.length,s=Array(a),p=0;pe.score?-1:t.index-e.index})},F=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},T=function(t,e){return t+(e?"?"+e:"")},D=["uri","path"],W=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},M=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},I=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},q=function(t){return M({},t.location,{state:t.history.state,key:t.history.state&&t.history.state.key||"initial"})},N=function(t,e){var n=[],o=q(t),r=!1,i=function(){};return{get location(){return o},get transitioning(){return r},_onTransitionComplete:function(){r=!1,i()},listen:function(e){n.push(e);var r=function(){o=q(t),e({location:o,action:"POP"})};return t.addEventListener("popstate",r),function(){t.removeEventListener("popstate",r),n=n.filter(function(t){return t!==e})}},navigate:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=a.state,c=a.replace,s=void 0!==c&&c;u=M({},u,{key:Date.now()+""});try{r||s?t.history.replaceState(u,null,e):t.history.pushState(u,null,e)}catch(n){t.location[s?"replace":"assign"](e)}o=q(t),r=!0;var p=new Promise(function(t){return i=t});return n.forEach(function(t){return t({location:o,action:"PUSH"})}),p}}},B=function(){var t=0,e=[{pathname:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",search:""}],n=[];return{get location(){return e[t]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return e},get index(){return t},get state(){return n[t]},pushState:function(o,r,i){var a=i.split("?"),u=a[0],c=a[1],s=void 0===c?"":c;t++,e.push({pathname:u,search:s}),n.push(o)},replaceState:function(o,r,i){var a=i.split("?"),u=a[0],c=a[1],s=void 0===c?"":c;e[t]={pathname:u,search:s},n[t]=o}}}},L=N(!("undefined"==typeof window||!window.document||!window.document.createElement)?window:B()),V=L.navigate,H=function(t,e){var n=b(e);return n.Consumer.displayName=t+".Consumer",n.Provider.displayName=t+".Provider",n},K=H("Location"),$=function(t){var n=t.children;return e.createElement(K.Consumer,null,function(t){return t?n(t):e.createElement(Y,null,n)})},Y=function(t){function n(){var e,o;W(this,n);for(var r=arguments.length,i=Array(r),a=0;a