!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouter={},t.React)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function n(t,e){return t(e={exports:{}},e.exports),e.exports}function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t};var i=o,a=function(t){};var c=function(t,e,n,r,o,i,c,u){if(a(e),!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,r,o,i,c,u],l=0;(s=new Error(e.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},u=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,p=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 r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}})()&&Object.assign;var l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",h=n(function(t){t.exports=function(){function t(t,e,n,r,o,i){i!==l&&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=i,n.PropTypes=n,n}()}),f=function(){},d=function(t,e,n,r,o,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}};function y(t){return"/"===t.charAt(0)}function m(t,e){for(var n=e,r=n+1,o=t.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],o=t&&y(t),i=e&&y(e),a=o||i;if(t&&y(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var c=void 0;if(r.length){var u=r[r.length-1];c="."===u||".."===u||""===u}else c=!1;for(var s=0,p=r.length;p>=0;p--){var l=r[p];"."===l?m(r,p):".."===l?(m(r,p),s++):s&&(m(r,p),s--)}if(!a)for(;s--;s)r.unshift("..");!a||""===r[0]||r[0]&&y(r[0])||r.unshift("");var h=r.join("/");return c&&"/"!==h.substr(-1)&&(h+="/"),h}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},w=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});var r=void 0===e?"undefined":v(e);if(r!==(void 0===n?"undefined":v(n)))return!1;if("object"===r){var o=e.valueOf(),i=n.valueOf();if(o!==e||i!==n)return t(o,i);var a=Object.keys(e),c=Object.keys(n);return a.length===c.length&&a.every(function(r){return t(e[r],n[r])})}return!1}(t.state,e.state)},O=("undefined"==typeof window||!window.document||window.document.createElement,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}),R=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},r=n.getUserConfirmation,o=n.initialEntries,i=void 0===o?["/"]:o,a=n.initialIndex,c=void 0===a?0:a,u=n.keyLength,s=void 0===u?6:u,p=(t=null,e=[],{setPrompt:function(e){return f(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):(f(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;re?r.splice(e,r.length-e,n):r.push(n),l({action:"PUSH",location:n,index:e,entries:r})}})},replace:function(t,e){f(!("object"===(void 0===t?"undefined":O(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var n=x(t,e,h(),b.location);p.confirmTransitionTo(n,"REPLACE",r,function(t){t&&(b.entries[b.index]=n,l({action:"REPLACE",location:n}))})},go:v,goBack:function(){return v(-1)},goForward:function(){return v(1)},canGo:function(t){var e=b.index+t;return e>=0&&e0&&void 0!==arguments[0]&&arguments[0];return p.setPrompt(t)},listen:function(t){return p.appendListener(t)}};return b},E=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},C=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},S=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},A=function(t){function n(){var e,r;E(this,n);for(var o=arguments.length,i=Array(o),a=0;a0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=K[e]||(K[e]={});if(n[t])return n[t];var r=_.compile(t);return Q<1e4&&(n[t]=r,Q++),r}(t)(e,{pretty:!0})},Z=function(t){function e(){return E(this,e),S(this,t.apply(this,arguments))}return T(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.context.router||d(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=x(t.to),n=x(this.props.to);w(e,n)||this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?X(n,e.params):C({},n,{pathname:X(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(e.Component);Z.defaultProps={push:!1},Z.contextTypes={router:h.shape({history:h.shape({push:h.func.isRequired,replace:h.func.isRequired}).isRequired,staticContext:h.object}).isRequired};var tt={},et=0,nt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var r=e,o=r.path,i=r.exact,a=void 0!==i&&i,c=r.strict,u=void 0!==c&&c,s=r.sensitive,p=void 0!==s&&s;if(null==o)return n;var l=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=tt[n]||(tt[n]={});if(r[t])return r[t];var o=[],i={re:_(t,o,e),keys:o};return et<1e4&&(r[t]=i,et++),i}(o,{end:a,strict:u,sensitive:p}),h=l.re,f=l.keys,d=h.exec(t);if(!d)return null;var y=d[0],m=d.slice(1),v=t===y;return a&&!v?null:{path:o,url:"/"===o&&""===y?"/":y,isExact:v,params:f.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},rt=function(t){function n(){var e,r;E(this,n);for(var o=arguments.length,i=Array(o),a=0;a