Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
2
Versions
501
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 4.3.0-rc.2 to 4.3.0-rc.3

33

package.json
{
"name": "react-router",
"version": "4.3.0-rc.2",
"version": "4.3.0-rc.3",
"description": "Declarative routing for React",

@@ -28,2 +28,3 @@ "repository": "ReactTraining/react-router",

"module": "es/index.js",
"sideEffects": false,
"scripts": {

@@ -43,6 +44,6 @@ "build": "node ./tools/build.js",

"hoist-non-react-statics": "^2.5.0",
"invariant": "^2.2.2",
"invariant": "^2.2.4",
"loose-envify": "^1.3.1",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.0",
"prop-types": "^15.6.1",
"warning": "^3.0.0"

@@ -52,24 +53,24 @@ },

"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-jest": "^22.1.0",
"babel-eslint": "^8.2.3",
"babel-jest": "^22.4.3",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.12",
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"eslint": "^4.16.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-react": "^7.6.0",
"eslint": "^4.19.1",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-react": "^7.7.0",
"gzip-size": "^4.1.0",
"jest": "^22.1.4",
"jest": "^22.4.3",
"pretty-bytes": "^4.0.2",
"raf": "^3.4.0",
"react": "^16.2.0",
"react": "^16.3.2",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.2.0",
"rollup": "^0.50.1",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-node-resolve": "^3.0.2",
"react-dom": "^16.3.2",
"rollup": "^0.58.2",
"rollup-plugin-babel": "^3.0.4",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-replace": "^2.0.0",

@@ -76,0 +77,0 @@ "rollup-plugin-uglify": "^3.0.0"

@@ -1,1 +0,1 @@

!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;var a=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}},c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,s=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 p="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",l=n(function(t){t.exports=function(){function t(t,e,n,r,o,i){i!==p&&a(!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}()}),h=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 f(t){return"/"===t.charAt(0)}function y(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}var d="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};var m=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},b=function(t,e,n,r){var o=void 0;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=v({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],o=t&&f(t),i=e&&f(e),a=o||i;if(t&&f(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?y(r,p):".."===l?(y(r,p),s++):s&&(y(r,p),s--)}if(!a)for(;s--;s)r.unshift("..");!a||""===r[0]||r[0]&&f(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},g=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":d(e);if(r!==(void 0===n?"undefined":d(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)},x=("function"==typeof Symbol&&Symbol.iterator,Object.assign,function(){function t(t){this.value=t}function e(e){var n,r;function o(n,r){try{var a=e[n](r),c=a.value;c instanceof t?Promise.resolve(c.value).then(function(t){o("next",t)},function(t){o("throw",t)}):i(a.done?"return":"normal",a.value)}catch(t){i("throw",t)}}function i(t,e){switch(t){case"return":n.resolve({value:e,done:!0});break;case"throw":n.reject(e);break;default:n.resolve({value:e,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(t,e){return new Promise(function(i,a){var c={key:t,arg:e,resolve:i,reject:a,next:null};r?r=r.next=c:(n=r=c,o(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}),w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},R=function(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)},O=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},j=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},C=function(t){function n(){var e,r,o;x(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=babelHelpers.possibleConstructorReturn(this,t.call.apply(t,[this].concat(a))),r.state={match:r.computeMatch(r.props.history.location.pathname)},o=e,babelHelpers.possibleConstructorReturn(r,o)}return R(n,t),n.prototype.getChildContext=function(){return{router:w({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},n.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},n.prototype.componentWillMount=function(){var t=this,n=this.props,r=n.children,o=n.history;null!=r&&1!==e.Children.count(r)&&h(!1),this.unlisten=o.listen(function(){t.setState({match:t.computeMatch(o.location.pathname)})})},n.prototype.componentWillReceiveProps=function(t){},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var t=this.props.children;return t?e.Children.only(t):null},n}(e.Component);C.contextTypes={router:l.object},C.childContextTypes={router:l.object.isRequired};var P=function(t){function n(){var e,r,o;x(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=babelHelpers.possibleConstructorReturn(this,t.call.apply(t,[this].concat(a))),r.history=createHistory(r.props),o=e,babelHelpers.possibleConstructorReturn(r,o)}return R(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(C,{history:this.history,children:this.props.children})},n}(e.Component),E=function(t){function e(){return x(this,e),j(this,t.apply(this,arguments))}return R(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.context.router||h(!1),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);E.defaultProps={when:!0},E.contextTypes={router:l.shape({history:l.shape({block:l.func.isRequired}).isRequired}).isRequired};var k=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},T=F,S=W,A=function(t,e){return I(W(t,e))},M=I,_=L,q=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function W(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=q.exec(t));){var u=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+u.length,s)a+=s[1];else{var l=t[i],h=n[2],f=n[3],y=n[4],d=n[5],m=n[6],v=n[7];a&&(r.push(a),a="");var b=null!=h&&null!=l&&l!==h,g="+"===m||"*"===m,x="?"===m||"*"===m,w=n[2]||c,R=y||d;r.push({name:f||o++,prefix:h||"",delimiter:w,optional:x,repeat:g,partial:b,asterisk:!!v,pattern:R?N(R):v?".*":"[^"+U(w)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function H(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function I(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",i=n||{},a=(r||{}).pretty?H:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var s,p=i[u.name];if(null==p){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(k(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(s=a(p[l]),!e[c].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===l?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');o+=u.prefix+s}}else o+=u}return o}}function U(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function N(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function $(t,e){return t.keys=e,t}function D(t){return t.sensitive?"":"i"}function L(t,e,n){k(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=U(c);else{var u=U(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=U(n.delimiter||"/"),l=i.slice(-p.length)===p;return r||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&l?"":"(?="+p+"|$)",$(new RegExp("^"+i,D(n)),e)}function F(t,e,n){return k(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return $(t,e)}(t,e):k(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(F(t[o],e,n).source);return $(new RegExp("(?:"+r.join("|")+")",D(n)),e)}(t,e,n):function(t,e,n){return L(W(t,n),e,n)}(t,e,n)}T.parse=S,T.compile=A,T.tokensToFunction=M,T.tokensToRegExp=_;var B={},V=0,J=function(){var t=arguments.length>0&&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=B[e]||(B[e]={});if(n[t])return n[t];var r=T.compile(t);return V<1e4&&(n[t]=r,V++),r}(t)(e)},Y=function(t){function e(){return x(this,e),j(this,t.apply(this,arguments))}return R(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.context.router||h(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=b(t.to),n=b(this.props.to);g(e,n)||this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?J(n,e.params):w({},n,{pathname:J(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);Y.defaultProps={push:!1},Y.contextTypes={router:l.shape({history:l.shape({push:l.func.isRequired,replace:l.func.isRequired}).isRequired,staticContext:l.object}).isRequired};var z={},G=0,K=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=z[n]||(z[n]={});if(r[t])return r[t];var o=[],i={re:T(t,o,e),keys:o};return G<1e4&&(r[t]=i,G++),i}(o,{end:a,strict:u,sensitive:p}),h=l.re,f=l.keys,y=h.exec(t);if(!y)return null;var d=y[0],m=y.slice(1),v=t===d;return a&&!v?null:{path:o,url:"/"===o&&""===d?"/":d,isExact:v,params:f.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},Q=function(t){function n(){var e,r,o;x(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=babelHelpers.possibleConstructorReturn(this,t.call.apply(t,[this].concat(a))),r.state={match:r.computeMatch(r.props,r.context.router)},o=e,babelHelpers.possibleConstructorReturn(r,o)}return R(n,t),n.prototype.getChildContext=function(){return{router:w({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},n.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,o=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(n)return n;e||h(!1);var u=e.route,s=(r||u.location).pathname;return K(s,{path:o,strict:i,exact:a,sensitive:c},u.match)},n.prototype.componentWillMount=function(){},n.prototype.componentWillReceiveProps=function(t,e){this.setState({match:this.computeMatch(t,e.router)})},n.prototype.render=function(){var t=this.state.match,n=this.props,r=n.children,o=n.component,i=n.render,a=this.context.router,c=a.history,u=a.route,s=a.staticContext,p={match:t,location:this.props.location||u.location,history:c,staticContext:s};return o?t?e.createElement(o,p):null:i?t?i(p):null:"function"==typeof r?r(p):r&&!function(t){return 0===e.Children.count(t)}(r)?e.Children.only(r):null},n}(e.Component);Q.contextTypes={router:l.shape({history:l.object.isRequired,route:l.object.isRequired,staticContext:l.object})},Q.childContextTypes={router:l.object.isRequired};var X=function(t){return"/"===t.charAt(0)?t:"/"+t},Z=function(t,e){return t?w({},e,{pathname:X(t)+e.pathname}):e},tt=function(t){return"string"==typeof t?t:m(t)},et=function(t){return function(){h(!1)}},nt=function(){},rt=function(t){function n(){var e,r,o;x(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=babelHelpers.possibleConstructorReturn(this,t.call.apply(t,[this].concat(a))),r.createHref=function(t){return addLeadingSlash(r.props.basename+tt(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=Z(n,b(t)),o.url=tt(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=Z(n,b(t)),o.url=tt(o.location)},r.handleListen=function(){return nt},r.handleBlock=function(){return nt},o=e,babelHelpers.possibleConstructorReturn(r,o)}return R(n,t),n.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},n.prototype.componentWillMount=function(){},n.prototype.render=function(){var t=this.props,n=t.basename,r=(t.context,t.location),o=O(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=X(t);return 0!==e.pathname.indexOf(n)?e:w({},e,{pathname:e.pathname.substr(n.length)})}(n,b(r)),push:this.handlePush,replace:this.handleReplace,go:et(),goBack:et(),goForward:et(),listen:this.handleListen,block:this.handleBlock};return e.createElement(C,w({},o,{history:i}))},n}(e.Component);rt.defaultProps={basename:"",location:"/"},rt.childContextTypes={router:l.object.isRequired};var ot=function(t){function n(){return x(this,n),j(this,t.apply(this,arguments))}return R(n,t),n.prototype.componentWillMount=function(){this.context.router||h(!1)},n.prototype.componentWillReceiveProps=function(t){},n.prototype.render=function(){var t=this.context.router.route,n=this.props.children,r=this.props.location||t.location,o=void 0,i=void 0;return e.Children.forEach(n,function(n){if(null==o&&e.isValidElement(n)){var a=n.props,c=a.path,u=a.exact,s=a.strict,p=a.sensitive,l=a.from,h=c||l;i=n,o=K(r.pathname,{path:h,exact:u,strict:s,sensitive:p},t.match)}}),o?e.cloneElement(i,{location:r,computedMatch:o}):null},n}(e.Component);ot.contextTypes={router:l.shape({route:l.object.isRequired}).isRequired};var it=n(function(t,e){var n,r,o,i,a,c,u,s;t.exports=(n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,s=u&&u(Object),function t(e,p,l){if("string"!=typeof p){if(s){var h=u(p);h&&h!==s&&t(e,h,l)}var f=i(p);a&&(f=f.concat(a(p)));for(var y=0;y<f.length;++y){var d=f[y];if(!(n[d]||r[d]||l&&l[d])){var m=c(p,d);try{o(e,d,m)}catch(t){}}}return e}return e})});t.MemoryRouter=P,t.Prompt=E,t.Redirect=Y,t.Route=Q,t.Router=C,t.StaticRouter=rt,t.Switch=ot,t.generatePath=J,t.matchPath=K,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=O(n,["wrappedComponentRef"]);return e.createElement(Q,{children:function(n){return e.createElement(t,w({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,it(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});
!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;var n=function(){};var r=n;"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function o(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 c=a,u=Object.freeze({default:c,__moduleExports:c}),s=function(t){};var p=function(t,e,n,r,o,i,a,c){if(s(e),!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 p=[n,r,o,i,a,c],l=0;(u=new Error(e.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},l=Object.freeze({default:p,__moduleExports:p}),f=u&&c||u,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,y=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 m="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",v=Object.freeze({default:m,__moduleExports:m}),g=l&&p||l,b=v?m:v,x=function(){function t(t,e,n,r,o,i){i!==b&&g(!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=f,n.PropTypes=n,n},O=Object.freeze({default:x,__moduleExports:x}),w=O&&x||O,j=o(function(t){t.exports=w()}),R=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 P(t){return"/"===t.charAt(0)}function E(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}var C="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};var T=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},S=function(t,e,n,r){var o=void 0;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=k({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],o=t&&P(t),i=e&&P(e),a=o||i;if(t&&P(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?E(r,p):".."===l?(E(r,p),s++):s&&(E(r,p),s--)}if(!a)for(;s--;s)r.unshift("..");!a||""===r[0]||r[0]&&P(r[0])||r.unshift("");var f=r.join("/");return c&&"/"!==f.substr(-1)&&(f+="/"),f}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},A=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":C(e);if(r!==(void 0===n?"undefined":C(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)},_=("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}),M=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},q=function(t,e,n){return Math.min(Math.max(t,e),n)},U=function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.getUserConfirmation,i=n.initialEntries,a=void 0===i?["/"]:i,c=n.initialIndex,u=void 0===c?0:c,s=n.keyLength,p=void 0===s?6:s,l=(t=null,e=[],{setPrompt:function(e){return r(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,o,i){if(null!=t){var a="function"==typeof t?t(e,n):t;"string"==typeof a?"function"==typeof o?o(a,i):(r(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!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;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}),f=function(t){M(g,t),g.length=g.entries.length,l.notifyListeners(g.location,g.action)},h=function(){return Math.random().toString(36).substr(2,p)},d=q(u,0,a.length-1),y=a.map(function(t){return S(t,void 0,"string"==typeof t?h():t.key||h())}),m=T,v=function(t){var e=q(g.index+t,0,g.entries.length-1),n=g.entries[e];l.confirmTransitionTo(n,"POP",o,function(t){t?f({action:"POP",location:n,index:e}):f()})},g={length:y.length,action:"POP",location:y[d],index:d,entries:y,createHref:m,push:function(t,e){r(!("object"===(void 0===t?"undefined":_(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var n=S(t,e,h(),g.location);l.confirmTransitionTo(n,"PUSH",o,function(t){if(t){var e=g.index+1,r=g.entries.slice(0);r.length>e?r.splice(e,r.length-e,n):r.push(n),f({action:"PUSH",location:n,index:e,entries:r})}})},replace:function(t,e){r(!("object"===(void 0===t?"undefined":_(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=S(t,e,h(),g.location);l.confirmTransitionTo(n,"REPLACE",o,function(t){t&&(g.entries[g.index]=n,f({action:"REPLACE",location:n}))})},go:v,goBack:function(){return v(-1)},goForward:function(){return v(1)},canGo:function(t){var e=g.index+t;return e>=0&&e<g.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return g},W=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},I=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},L=function(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)},N=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},H=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},$=function(t){function n(){var e,r;W(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=H(this,t.call.apply(t,[this].concat(i))),r.state={match:r.computeMatch(r.props.history.location.pathname)},H(r,e)}return L(n,t),n.prototype.getChildContext=function(){return{router:I({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},n.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},n.prototype.componentWillMount=function(){var t=this,n=this.props,r=n.children,o=n.history;null!=r&&1!==e.Children.count(r)&&R(!1),this.unlisten=o.listen(function(){t.setState({match:t.computeMatch(o.location.pathname)})})},n.prototype.componentWillReceiveProps=function(t){},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var t=this.props.children;return t?e.Children.only(t):null},n}(e.Component);$.contextTypes={router:j.object},$.childContextTypes={router:j.object.isRequired};var D=function(t){function n(){var e,r;W(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=H(this,t.call.apply(t,[this].concat(i))),r.history=U(r.props),H(r,e)}return L(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement($,{history:this.history,children:this.props.children})},n}(e.Component),F=function(t){function e(){return W(this,e),H(this,t.apply(this,arguments))}return L(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.context.router||R(!1),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);F.defaultProps={when:!0},F.contextTypes={router:j.shape({history:j.shape({block:j.func.isRequired}).isRequired}).isRequired};var z=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},B=Object.freeze({default:z,__moduleExports:z}),V=B&&z||B,Y=ct,J=Z,G=function(t,e){return et(Z(t,e))},K=et,Q=at,X=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function Z(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=X.exec(t));){var u=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+u.length,s)a+=s[1];else{var l=t[i],f=n[2],h=n[3],d=n[4],y=n[5],m=n[6],v=n[7];a&&(r.push(a),a="");var g=null!=f&&null!=l&&l!==f,b="+"===m||"*"===m,x="?"===m||"*"===m,O=n[2]||c,w=d||y;r.push({name:h||o++,prefix:f||"",delimiter:O,optional:x,repeat:b,partial:g,asterisk:!!v,pattern:w?rt(w):v?".*":"[^"+nt(O)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function tt(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function et(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",i=n||{},a=(r||{}).pretty?tt:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var s,p=i[u.name];if(null==p){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(V(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(s=a(p[l]),!e[c].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===l?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');o+=u.prefix+s}}else o+=u}return o}}function nt(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function rt(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function ot(t,e){return t.keys=e,t}function it(t){return t.sensitive?"":"i"}function at(t,e,n){V(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=nt(c);else{var u=nt(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=nt(n.delimiter||"/"),l=i.slice(-p.length)===p;return r||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&l?"":"(?="+p+"|$)",ot(new RegExp("^"+i,it(n)),e)}function ct(t,e,n){return V(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return ot(t,e)}(t,e):V(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(ct(t[o],e,n).source);return ot(new RegExp("(?:"+r.join("|")+")",it(n)),e)}(t,e,n):function(t,e,n){return at(Z(t,n),e,n)}(t,e,n)}Y.parse=J,Y.compile=G,Y.tokensToFunction=K,Y.tokensToRegExp=Q;var ut={},st=0,pt=function(){var t=arguments.length>0&&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=ut[e]||(ut[e]={});if(n[t])return n[t];var r=Y.compile(t);return st<1e4&&(n[t]=r,st++),r}(t)(e)},lt=function(t){function e(){return W(this,e),H(this,t.apply(this,arguments))}return L(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.context.router||R(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=S(t.to),n=S(this.props.to);A(e,n)||this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?pt(n,e.params):I({},n,{pathname:pt(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);lt.defaultProps={push:!1},lt.contextTypes={router:j.shape({history:j.shape({push:j.func.isRequired,replace:j.func.isRequired}).isRequired,staticContext:j.object}).isRequired};var ft={},ht=0,dt=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=ft[n]||(ft[n]={});if(r[t])return r[t];var o=[],i={re:Y(t,o,e),keys:o};return ht<1e4&&(r[t]=i,ht++),i}(o,{end:a,strict:u,sensitive:p}),f=l.re,h=l.keys,d=f.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:h.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},yt=function(t){function n(){var e,r;W(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=H(this,t.call.apply(t,[this].concat(i))),r.state={match:r.computeMatch(r.props,r.context.router)},H(r,e)}return L(n,t),n.prototype.getChildContext=function(){return{router:I({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},n.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,o=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(n)return n;e||R(!1);var u=e.route,s=(r||u.location).pathname;return dt(s,{path:o,strict:i,exact:a,sensitive:c},u.match)},n.prototype.componentWillMount=function(){},n.prototype.componentWillReceiveProps=function(t,e){this.setState({match:this.computeMatch(t,e.router)})},n.prototype.render=function(){var t=this.state.match,n=this.props,r=n.children,o=n.component,i=n.render,a=this.context.router,c=a.history,u=a.route,s=a.staticContext,p={match:t,location:this.props.location||u.location,history:c,staticContext:s};return o?t?e.createElement(o,p):null:i?t?i(p):null:"function"==typeof r?r(p):r&&!function(t){return 0===e.Children.count(t)}(r)?e.Children.only(r):null},n}(e.Component);yt.contextTypes={router:j.shape({history:j.object.isRequired,route:j.object.isRequired,staticContext:j.object})},yt.childContextTypes={router:j.object.isRequired};var mt=function(t){return"/"===t.charAt(0)?t:"/"+t},vt=function(t,e){return t?I({},e,{pathname:mt(t)+e.pathname}):e},gt=function(t){return"string"==typeof t?t:T(t)},bt=function(t){return function(){R(!1)}},xt=function(){},Ot=function(t){function n(){var e,r;W(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=H(this,t.call.apply(t,[this].concat(i))),r.createHref=function(t){return mt(r.props.basename+gt(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=vt(n,S(t)),o.url=gt(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=vt(n,S(t)),o.url=gt(o.location)},r.handleListen=function(){return xt},r.handleBlock=function(){return xt},H(r,e)}return L(n,t),n.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},n.prototype.componentWillMount=function(){},n.prototype.render=function(){var t=this.props,n=t.basename,r=(t.context,t.location),o=N(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=mt(t);return 0!==e.pathname.indexOf(n)?e:I({},e,{pathname:e.pathname.substr(n.length)})}(n,S(r)),push:this.handlePush,replace:this.handleReplace,go:bt(),goBack:bt(),goForward:bt(),listen:this.handleListen,block:this.handleBlock};return e.createElement($,I({},o,{history:i}))},n}(e.Component);Ot.defaultProps={basename:"",location:"/"},Ot.childContextTypes={router:j.object.isRequired};var wt=function(t){function n(){return W(this,n),H(this,t.apply(this,arguments))}return L(n,t),n.prototype.componentWillMount=function(){this.context.router||R(!1)},n.prototype.componentWillReceiveProps=function(t){},n.prototype.render=function(){var t=this.context.router.route,n=this.props.children,r=this.props.location||t.location,o=void 0,i=void 0;return e.Children.forEach(n,function(n){if(null==o&&e.isValidElement(n)){var a=n.props,c=a.path,u=a.exact,s=a.strict,p=a.sensitive,l=a.from,f=c||l;i=n,o=dt(r.pathname,{path:f,exact:u,strict:s,sensitive:p},t.match)}}),o?e.cloneElement(i,{location:r,computedMatch:o}):null},n}(e.Component);wt.contextTypes={router:j.shape({route:j.object.isRequired}).isRequired};var jt=o(function(t,e){var n,r,o,i,a,c,u,s;t.exports=(n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,s=u&&u(Object),function t(e,p,l){if("string"!=typeof p){if(s){var f=u(p);f&&f!==s&&t(e,f,l)}var h=i(p);a&&(h=h.concat(a(p)));for(var d=0;d<h.length;++d){var y=h[d];if(!(n[y]||r[y]||l&&l[y])){var m=c(p,y);try{o(e,y,m)}catch(t){}}}return e}return e})});t.MemoryRouter=D,t.Prompt=F,t.Redirect=lt,t.Route=yt,t.Router=$,t.StaticRouter=Ot,t.Switch=wt,t.generatePath=pt,t.matchPath=dt,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=N(n,["wrappedComponentRef"]);return e.createElement(yt,{children:function(n){return e.createElement(t,I({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,jt(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc