wm-react-router
Advanced tools
Comparing version 4.3.8 to 4.3.9
@@ -13,2 +13,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
*/ | ||
var withRouter = function withRouter(Component) { | ||
@@ -19,5 +20,5 @@ var C = function C(props) { | ||
if (/iP.*OS\s14/.test(window.navigator.userAgent) && props.history) { | ||
var pushOV = props.history.push; | ||
if (!/setTimeout/.test(pushOV.toString())) { | ||
if (/iP.*OS\s1(4|5|6|7)/.test(window.navigator.userAgent) && props.history) { | ||
var push = props.history.push; | ||
if (!/setTimeout/.test(push.toString())) { | ||
props.history.push = function () { | ||
@@ -28,4 +29,5 @@ for (var _len = arguments.length, arg = Array(_len), _key = 0; _key < _len; _key++) { | ||
setTimeout(function () { | ||
pushOV.apply(undefined, arg); | ||
var ios14fixedTimer = setTimeout(function () { | ||
push.apply(undefined, arg); | ||
window.clearTimeout(ios14fixedTimer); | ||
}, 100); | ||
@@ -32,0 +34,0 @@ }; |
{ | ||
"name": "wm-react-router", | ||
"version": "4.3.8", | ||
"version": "4.3.9", | ||
"description": "Declarative routing for React", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -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";function n(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}e=e&&e.hasOwnProperty("default")?e.default:e;var o=r(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,l=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116;function m(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case p:case l:case i:case c:case a:case h:return t;default:switch(t=t&&t.$$typeof){case u:case f:case s:return t;default:return e}}case d:case y:case o:return e}}}function v(t){return m(t)===l}e.typeOf=m,e.AsyncMode=p,e.ConcurrentMode=l,e.ContextConsumer=u,e.ContextProvider=s,e.Element=r,e.ForwardRef=f,e.Fragment=i,e.Lazy=d,e.Memo=y,e.Portal=o,e.Profiler=c,e.StrictMode=a,e.Suspense=h,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===c||t===a||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===y||t.$$typeof===s||t.$$typeof===u||t.$$typeof===f)},e.isAsyncMode=function(t){return v(t)||m(t)===p},e.isConcurrentMode=v,e.isContextConsumer=function(t){return m(t)===u},e.isContextProvider=function(t){return m(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return m(t)===f},e.isFragment=function(t){return m(t)===i},e.isLazy=function(t){return m(t)===d},e.isMemo=function(t){return m(t)===y},e.isPortal=function(t){return m(t)===o},e.isProfiler=function(t){return m(t)===c},e.isStrictMode=function(t){return m(t)===a},e.isSuspense=function(t){return m(t)===h}});n(o);o.typeOf,o.AsyncMode,o.ConcurrentMode,o.ContextConsumer,o.ContextProvider,o.Element,o.ForwardRef,o.Fragment,o.Lazy,o.Memo,o.Portal,o.Profiler,o.StrictMode,o.Suspense,o.isValidElementType,o.isAsyncMode,o.isConcurrentMode,o.isContextConsumer,o.isContextProvider,o.isElement,o.isForwardRef,o.isFragment,o.isLazy,o.isMemo,o.isPortal,o.isProfiler,o.isStrictMode,o.isSuspense;var i=r(function(t,e){});n(i);i.typeOf,i.AsyncMode,i.ConcurrentMode,i.ContextConsumer,i.ContextProvider,i.Element,i.ForwardRef,i.Fragment,i.Lazy,i.Memo,i.Portal,i.Profiler,i.StrictMode,i.Suspense,i.isValidElementType,i.isAsyncMode,i.isConcurrentMode,i.isContextConsumer,i.isContextProvider,i.isElement,i.isForwardRef,i.isFragment,i.isLazy,i.isMemo,i.isPortal,i.isProfiler,i.isStrictMode,i.isSuspense,r(function(t){t.exports=o});var a=Object.getOwnPropertySymbols,c=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 u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Function.call.bind(Object.prototype.hasOwnProperty);function p(){}function l(){}l.resetWarningCache=p;var f=r(function(t){t.exports=function(){function t(t,e,n,r,o,i){if(i!==u){var a=new Error("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");throw a.name="Invariant Violation",a}}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,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:l,resetWarningCache:p};return n.PropTypes=n,n}()});function h(){return(h=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}).apply(this,arguments)}function y(t){return"/"===t.charAt(0)}function d(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 m="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};function v(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}function b(t,e,n,r){var o;"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=h({},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&&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 s=r[r.length-1];c="."===s||".."===s||""===s}else c=!1;for(var u=0,p=r.length;p>=0;p--){var l=r[p];"."===l?d(r,p):".."===l?(d(r,p),u++):u&&(d(r,p),u--)}if(!a)for(;u--;u)r.unshift("..");!a||""===r[0]||r[0]&&y(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}function g(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":m(e);if(r!==(void 0===n?"undefined":m(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 x(t,e,n){return Math.min(Math.max(t,e),n)}function w(t){void 0===t&&(t={});var e,n,r=t,o=r.getUserConfirmation,i=r.initialEntries,a=void 0===i?["/"]:i,c=r.initialIndex,s=void 0===c?0:c,u=r.keyLength,p=void 0===u?6:u,l=(e=null,n=[],{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var e=!0;function r(){e&&t.apply(void 0,arguments)}return n.push(r),function(){e=!1,n=n.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];n.forEach(function(t){return t.apply(void 0,e)})}});function f(t){h(P,t),P.length=P.entries.length,l.notifyListeners(P.location,P.action)}function y(){return Math.random().toString(36).substr(2,p)}var d=x(s,0,a.length-1),m=a.map(function(t){return b(t,void 0,"string"==typeof t?y():t.key||y())}),g=v;function w(t){var e=x(P.index+t,0,P.entries.length-1),n=P.entries[e];l.confirmTransitionTo(n,"POP",o,function(t){t?f({action:"POP",location:n,index:e}):f()})}var P={length:m.length,action:"POP",location:m[d],index:d,entries:m,createHref:g,push:function(t,e){var n=b(t,e,y(),P.location);l.confirmTransitionTo(n,"PUSH",o,function(t){if(t){var e=P.index+1,r=P.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){var n=b(t,e,y(),P.location);l.confirmTransitionTo(n,"REPLACE",o,function(t){t&&(P.entries[P.index]=n,f({action:"REPLACE",location:n}))})},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},canGo:function(t){var e=P.index+t;return e>=0&&e<P.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return P}var P=function(t,e,n,r,o,i,a,c){if(!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 u=[n,r,o,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},O=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<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)},E=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},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},j=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.state={match:r.computeMatch(r.props.history.location.pathname)},S(r,e)}return R(n,t),n.prototype.getChildContext=function(){return{router:C({},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)&&P(!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);j.contextTypes={router:f.object},j.childContextTypes={router:f.object.isRequired};var M=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.history=w(r.props),S(r,e)}return R(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(j,{history:this.history,children:this.props.children})},n}(e.Component),T=function(t){function e(){return O(this,e),S(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||P(!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);T.defaultProps={when:!0},T.contextTypes={router:f.shape({history:f.shape({block:f.func.isRequired}).isRequired}).isRequired};var A=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},k=B,$=U,_=function(t,e){return I(U(t,e))},F=I,q=V,L=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function U(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=L.exec(t));){var s=n[0],u=n[1],p=n.index;if(a+=t.slice(i,p),i=p+s.length,u)a+=u[1];else{var l=t[i],f=n[2],h=n[3],y=n[4],d=n[5],m=n[6],v=n[7];a&&(r.push(a),a="");var b=null!=f&&null!=l&&l!==f,g="+"===m||"*"===m,x="?"===m||"*"===m,w=n[2]||c,P=y||d;r.push({name:h||o++,prefix:f||"",delimiter:w,optional:x,repeat:g,partial:b,asterisk:!!v,pattern:P?H(P):v?".*":"[^"+N(w)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function W(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?W:encodeURIComponent,c=0;c<t.length;c++){var s=t[c];if("string"!=typeof s){var u,p=i[s.name];if(null==p){if(s.optional){s.partial&&(o+=s.prefix);continue}throw new TypeError('Expected "'+s.name+'" to be defined')}if(A(p)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(u=a(p[l]),!e[c].test(u))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received `'+JSON.stringify(u)+"`");o+=(0===l?s.prefix:s.delimiter)+u}}else{if(u=s.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(u))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+u+'"');o+=s.prefix+u}}else o+=s}return o}}function N(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function H(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function z(t,e){return t.keys=e,t}function D(t){return t.sensitive?"":"i"}function V(t,e,n){A(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+=N(c);else{var s=N(c.prefix),u="(?:"+c.pattern+")";e.push(c),c.repeat&&(u+="(?:"+s+u+")*"),i+=u=c.optional?c.partial?s+"("+u+")?":"(?:"+s+"("+u+"))?":s+"("+u+")"}}var p=N(n.delimiter||"/"),l=i.slice(-p.length)===p;return r||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&l?"":"(?="+p+"|$)",z(new RegExp("^"+i,D(n)),e)}function B(t,e,n){return A(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 z(t,e)}(t,e):A(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(B(t[o],e,n).source);return z(new RegExp("(?:"+r.join("|")+")",D(n)),e)}(t,e,n):function(t,e,n){return V(U(t,n),e,n)}(t,e,n)}k.parse=$,k.compile=_,k.tokensToFunction=F,k.tokensToRegExp=q;var J={},G=0,Y=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=J[e]||(J[e]={});if(n[t])return n[t];var r=k.compile(t);return G<1e4&&(n[t]=r,G++),r}(t)(e,{pretty:!0})},K=function(t){function e(){return O(this,e),S(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||P(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){g(b(t.to),b(this.props.to))||this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?Y(n,e.params):C({},n,{pathname:Y(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);K.defaultProps={push:!1},K.contextTypes={router:f.shape({history:f.shape({push:f.func.isRequired,replace:f.func.isRequired}).isRequired,staticContext:f.object}).isRequired};var Q={},X=0,Z=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,s=void 0!==c&&c,u=r.sensitive,p=void 0!==u&&u;if(null==o)return n;var l=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=Q[n]||(Q[n]={});if(r[t])return r[t];var o=[],i={re:k(t,o,e),keys:o};return X<1e4&&(r[t]=i,X++),i}(o,{end:a,strict:s,sensitive:p}),f=l.re,h=l.keys,y=f.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:h.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},tt=function(t){return e.createElement("div",{id:t.match.params.uuid})};Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var et=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.state={match:r.computeMatch(r.props,r.context.router)},S(r,e)}return R(n,t),n.prototype.getChildContext=function(){return{router:C({},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||P(!1);var s=e.route,u=(r||s.location).pathname;return Z(u,{path:o,strict:i,exact:a,sensitive:c},s.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.children,r=this.props,o=r.component,i=r.render,a=this.context.router,c=a.history,s=a.route,u=a.staticContext,p={match:t,location:this.props.location||s.location,history:c,staticContext:u};window.rewriteMobileRoute&&"function"==typeof window.rewriteMobileRoute&&(o=window.rewriteMobileRoute(o,this.props,this.state,this.context,i));var l=["/","/req"];window.generateRoutePathArray&&Array.isArray(l)&&(l=window.generateRoutePathArray);var f=this.props.path;return o?l.indexOf(f)>=0?t?nt(p,o,f):null:t?e.createElement(o,p):null:(window.rewriteMobileRouteRender&&"function"==typeof window.rewriteMobileRouteRender&&(i=window.rewriteMobileRouteRender(o,this.props,this.state,this.context,i)),i?l.indexOf(f)>=0?t?rt(p,i):null:t?i(p):null:"function"==typeof n?n(p):n&&!function(t){return 0===e.Children.count(t)}(n)?e.Children.only(n):null)},n}(e.Component);et.contextTypes={router:f.shape({history:f.object.isRequired,route:f.object.isRequired,staticContext:f.object})},et.childContextTypes={router:f.object.isRequired};var nt=function(t,n,r){return[e.createElement(et,{key:1,path:r+"/cs/app/:uuid",component:tt}),e.createElement(e.Fragment,{key:2},e.createElement(n,t))]},rt=function(t,n){return[e.createElement(et,{key:1,path:"/cs/app/:uuid",component:tt}),e.createElement(e.Fragment,{key:2},n(t))]},ot=function(t){return"/"===t.charAt(0)?t:"/"+t},it=function(t,e){return t?C({},e,{pathname:ot(t)+e.pathname}):e},at=function(t){return"string"==typeof t?t:v(t)},ct=function(t){return function(){P(!1)}},st=function(){},ut=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.createHref=function(t){return ot(r.props.basename+at(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=it(n,b(t)),o.url=at(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=it(n,b(t)),o.url=at(o.location)},r.handleListen=function(){return st},r.handleBlock=function(){return st},S(r,e)}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=E(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=ot(t);return 0!==e.pathname.indexOf(n)?e:C({},e,{pathname:e.pathname.substr(n.length)})}(n,b(r)),push:this.handlePush,replace:this.handleReplace,go:ct(),goBack:ct(),goForward:ct(),listen:this.handleListen,block:this.handleBlock};return e.createElement(j,C({},o,{history:i}))},n}(e.Component);ut.defaultProps={basename:"",location:"/"},ut.childContextTypes={router:f.object.isRequired};var pt=function(t){function n(){return O(this,n),S(this,t.apply(this,arguments))}return R(n,t),n.prototype.componentWillMount=function(){this.context.router||P(!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,s=a.exact,u=a.strict,p=a.sensitive,l=a.from,f=c||l;i=n,o=Z(r.pathname,{path:f,exact:s,strict:u,sensitive:p},t.match)}}),o?e.cloneElement(i,{location:r,computedMatch:o}):null},n}(e.Component);pt.contextTypes={router:f.shape({route:f.object.isRequired}).isRequired};var lt={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ft={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ht=Object.defineProperty,yt=Object.getOwnPropertyNames,dt=Object.getOwnPropertySymbols,mt=Object.getOwnPropertyDescriptor,vt=Object.getPrototypeOf,bt=vt&&vt(Object);var gt=function t(e,n,r){if("string"!=typeof n){if(bt){var o=vt(n);o&&o!==bt&&t(e,o,r)}var i=yt(n);dt&&(i=i.concat(dt(n)));for(var a=0;a<i.length;++a){var c=i[a];if(!(lt[c]||ft[c]||r&&r[c])){var s=mt(n,c);try{ht(e,c,s)}catch(t){}}}return e}return e};t.MemoryRouter=M,t.Prompt=T,t.Redirect=K,t.Route=et,t.Router=j,t.StaticRouter=ut,t.Switch=pt,t.generatePath=Y,t.matchPath=Z,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=E(n,["wrappedComponentRef"]);if(/iP.*OS\s14/.test(window.navigator.userAgent)&&n.history){var i=n.history.push;/setTimeout/.test(i.toString())||(n.history.push=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];setTimeout(function(){i.apply(void 0,e)},100)})}return e.createElement(et,{children:function(n){return e.createElement(t,C({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,gt(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";function n(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}e=e&&e.hasOwnProperty("default")?e.default:e;var o=r(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,l=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116;function m(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case p:case l:case i:case c:case a:case h:return t;default:switch(t=t&&t.$$typeof){case u:case f:case s:return t;default:return e}}case d:case y:case o:return e}}}function v(t){return m(t)===l}e.typeOf=m,e.AsyncMode=p,e.ConcurrentMode=l,e.ContextConsumer=u,e.ContextProvider=s,e.Element=r,e.ForwardRef=f,e.Fragment=i,e.Lazy=d,e.Memo=y,e.Portal=o,e.Profiler=c,e.StrictMode=a,e.Suspense=h,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===c||t===a||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===y||t.$$typeof===s||t.$$typeof===u||t.$$typeof===f)},e.isAsyncMode=function(t){return v(t)||m(t)===p},e.isConcurrentMode=v,e.isContextConsumer=function(t){return m(t)===u},e.isContextProvider=function(t){return m(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return m(t)===f},e.isFragment=function(t){return m(t)===i},e.isLazy=function(t){return m(t)===d},e.isMemo=function(t){return m(t)===y},e.isPortal=function(t){return m(t)===o},e.isProfiler=function(t){return m(t)===c},e.isStrictMode=function(t){return m(t)===a},e.isSuspense=function(t){return m(t)===h}});n(o);o.typeOf,o.AsyncMode,o.ConcurrentMode,o.ContextConsumer,o.ContextProvider,o.Element,o.ForwardRef,o.Fragment,o.Lazy,o.Memo,o.Portal,o.Profiler,o.StrictMode,o.Suspense,o.isValidElementType,o.isAsyncMode,o.isConcurrentMode,o.isContextConsumer,o.isContextProvider,o.isElement,o.isForwardRef,o.isFragment,o.isLazy,o.isMemo,o.isPortal,o.isProfiler,o.isStrictMode,o.isSuspense;var i=r(function(t,e){});n(i);i.typeOf,i.AsyncMode,i.ConcurrentMode,i.ContextConsumer,i.ContextProvider,i.Element,i.ForwardRef,i.Fragment,i.Lazy,i.Memo,i.Portal,i.Profiler,i.StrictMode,i.Suspense,i.isValidElementType,i.isAsyncMode,i.isConcurrentMode,i.isContextConsumer,i.isContextProvider,i.isElement,i.isForwardRef,i.isFragment,i.isLazy,i.isMemo,i.isPortal,i.isProfiler,i.isStrictMode,i.isSuspense,r(function(t){t.exports=o});var a=Object.getOwnPropertySymbols,c=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 u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Function.call.bind(Object.prototype.hasOwnProperty);function p(){}function l(){}l.resetWarningCache=p;var f=r(function(t){t.exports=function(){function t(t,e,n,r,o,i){if(i!==u){var a=new Error("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");throw a.name="Invariant Violation",a}}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,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:l,resetWarningCache:p};return n.PropTypes=n,n}()});function h(){return(h=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}).apply(this,arguments)}function y(t){return"/"===t.charAt(0)}function d(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 m="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};function v(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}function b(t,e,n,r){var o;"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=h({},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&&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 s=r[r.length-1];c="."===s||".."===s||""===s}else c=!1;for(var u=0,p=r.length;p>=0;p--){var l=r[p];"."===l?d(r,p):".."===l?(d(r,p),u++):u&&(d(r,p),u--)}if(!a)for(;u--;u)r.unshift("..");!a||""===r[0]||r[0]&&y(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}function g(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":m(e);if(r!==(void 0===n?"undefined":m(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 x(t,e,n){return Math.min(Math.max(t,e),n)}function w(t){void 0===t&&(t={});var e,n,r=t,o=r.getUserConfirmation,i=r.initialEntries,a=void 0===i?["/"]:i,c=r.initialIndex,s=void 0===c?0:c,u=r.keyLength,p=void 0===u?6:u,l=(e=null,n=[],{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var e=!0;function r(){e&&t.apply(void 0,arguments)}return n.push(r),function(){e=!1,n=n.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];n.forEach(function(t){return t.apply(void 0,e)})}});function f(t){h(P,t),P.length=P.entries.length,l.notifyListeners(P.location,P.action)}function y(){return Math.random().toString(36).substr(2,p)}var d=x(s,0,a.length-1),m=a.map(function(t){return b(t,void 0,"string"==typeof t?y():t.key||y())}),g=v;function w(t){var e=x(P.index+t,0,P.entries.length-1),n=P.entries[e];l.confirmTransitionTo(n,"POP",o,function(t){t?f({action:"POP",location:n,index:e}):f()})}var P={length:m.length,action:"POP",location:m[d],index:d,entries:m,createHref:g,push:function(t,e){var n=b(t,e,y(),P.location);l.confirmTransitionTo(n,"PUSH",o,function(t){if(t){var e=P.index+1,r=P.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){var n=b(t,e,y(),P.location);l.confirmTransitionTo(n,"REPLACE",o,function(t){t&&(P.entries[P.index]=n,f({action:"REPLACE",location:n}))})},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},canGo:function(t){var e=P.index+t;return e>=0&&e<P.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return P}var P=function(t,e,n,r,o,i,a,c){if(!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 u=[n,r,o,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},O=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<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)},E=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},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},j=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.state={match:r.computeMatch(r.props.history.location.pathname)},S(r,e)}return R(n,t),n.prototype.getChildContext=function(){return{router:C({},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)&&P(!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);j.contextTypes={router:f.object},j.childContextTypes={router:f.object.isRequired};var M=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.history=w(r.props),S(r,e)}return R(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(j,{history:this.history,children:this.props.children})},n}(e.Component),T=function(t){function e(){return O(this,e),S(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||P(!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);T.defaultProps={when:!0},T.contextTypes={router:f.shape({history:f.shape({block:f.func.isRequired}).isRequired}).isRequired};var A=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},k=B,$=U,_=function(t,e){return I(U(t,e))},F=I,q=V,L=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function U(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=L.exec(t));){var s=n[0],u=n[1],p=n.index;if(a+=t.slice(i,p),i=p+s.length,u)a+=u[1];else{var l=t[i],f=n[2],h=n[3],y=n[4],d=n[5],m=n[6],v=n[7];a&&(r.push(a),a="");var b=null!=f&&null!=l&&l!==f,g="+"===m||"*"===m,x="?"===m||"*"===m,w=n[2]||c,P=y||d;r.push({name:h||o++,prefix:f||"",delimiter:w,optional:x,repeat:g,partial:b,asterisk:!!v,pattern:P?H(P):v?".*":"[^"+N(w)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function W(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?W:encodeURIComponent,c=0;c<t.length;c++){var s=t[c];if("string"!=typeof s){var u,p=i[s.name];if(null==p){if(s.optional){s.partial&&(o+=s.prefix);continue}throw new TypeError('Expected "'+s.name+'" to be defined')}if(A(p)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(u=a(p[l]),!e[c].test(u))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received `'+JSON.stringify(u)+"`");o+=(0===l?s.prefix:s.delimiter)+u}}else{if(u=s.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(u))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+u+'"');o+=s.prefix+u}}else o+=s}return o}}function N(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function H(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function z(t,e){return t.keys=e,t}function D(t){return t.sensitive?"":"i"}function V(t,e,n){A(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+=N(c);else{var s=N(c.prefix),u="(?:"+c.pattern+")";e.push(c),c.repeat&&(u+="(?:"+s+u+")*"),i+=u=c.optional?c.partial?s+"("+u+")?":"(?:"+s+"("+u+"))?":s+"("+u+")"}}var p=N(n.delimiter||"/"),l=i.slice(-p.length)===p;return r||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&l?"":"(?="+p+"|$)",z(new RegExp("^"+i,D(n)),e)}function B(t,e,n){return A(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 z(t,e)}(t,e):A(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(B(t[o],e,n).source);return z(new RegExp("(?:"+r.join("|")+")",D(n)),e)}(t,e,n):function(t,e,n){return V(U(t,n),e,n)}(t,e,n)}k.parse=$,k.compile=_,k.tokensToFunction=F,k.tokensToRegExp=q;var J={},G=0,Y=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=J[e]||(J[e]={});if(n[t])return n[t];var r=k.compile(t);return G<1e4&&(n[t]=r,G++),r}(t)(e,{pretty:!0})},K=function(t){function e(){return O(this,e),S(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||P(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){g(b(t.to),b(this.props.to))||this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?Y(n,e.params):C({},n,{pathname:Y(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);K.defaultProps={push:!1},K.contextTypes={router:f.shape({history:f.shape({push:f.func.isRequired,replace:f.func.isRequired}).isRequired,staticContext:f.object}).isRequired};var Q={},X=0,Z=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,s=void 0!==c&&c,u=r.sensitive,p=void 0!==u&&u;if(null==o)return n;var l=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=Q[n]||(Q[n]={});if(r[t])return r[t];var o=[],i={re:k(t,o,e),keys:o};return X<1e4&&(r[t]=i,X++),i}(o,{end:a,strict:s,sensitive:p}),f=l.re,h=l.keys,y=f.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:h.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},tt=function(t){return e.createElement("div",{id:t.match.params.uuid})};Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var et=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.state={match:r.computeMatch(r.props,r.context.router)},S(r,e)}return R(n,t),n.prototype.getChildContext=function(){return{router:C({},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||P(!1);var s=e.route,u=(r||s.location).pathname;return Z(u,{path:o,strict:i,exact:a,sensitive:c},s.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.children,r=this.props,o=r.component,i=r.render,a=this.context.router,c=a.history,s=a.route,u=a.staticContext,p={match:t,location:this.props.location||s.location,history:c,staticContext:u};window.rewriteMobileRoute&&"function"==typeof window.rewriteMobileRoute&&(o=window.rewriteMobileRoute(o,this.props,this.state,this.context,i));var l=["/","/req"];window.generateRoutePathArray&&Array.isArray(l)&&(l=window.generateRoutePathArray);var f=this.props.path;return o?l.indexOf(f)>=0?t?nt(p,o,f):null:t?e.createElement(o,p):null:(window.rewriteMobileRouteRender&&"function"==typeof window.rewriteMobileRouteRender&&(i=window.rewriteMobileRouteRender(o,this.props,this.state,this.context,i)),i?l.indexOf(f)>=0?t?rt(p,i):null:t?i(p):null:"function"==typeof n?n(p):n&&!function(t){return 0===e.Children.count(t)}(n)?e.Children.only(n):null)},n}(e.Component);et.contextTypes={router:f.shape({history:f.object.isRequired,route:f.object.isRequired,staticContext:f.object})},et.childContextTypes={router:f.object.isRequired};var nt=function(t,n,r){return[e.createElement(et,{key:1,path:r+"/cs/app/:uuid",component:tt}),e.createElement(e.Fragment,{key:2},e.createElement(n,t))]},rt=function(t,n){return[e.createElement(et,{key:1,path:"/cs/app/:uuid",component:tt}),e.createElement(e.Fragment,{key:2},n(t))]},ot=function(t){return"/"===t.charAt(0)?t:"/"+t},it=function(t,e){return t?C({},e,{pathname:ot(t)+e.pathname}):e},at=function(t){return"string"==typeof t?t:v(t)},ct=function(t){return function(){P(!1)}},st=function(){},ut=function(t){function n(){var e,r;O(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=S(this,t.call.apply(t,[this].concat(i))),r.createHref=function(t){return ot(r.props.basename+at(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=it(n,b(t)),o.url=at(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=it(n,b(t)),o.url=at(o.location)},r.handleListen=function(){return st},r.handleBlock=function(){return st},S(r,e)}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=E(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=ot(t);return 0!==e.pathname.indexOf(n)?e:C({},e,{pathname:e.pathname.substr(n.length)})}(n,b(r)),push:this.handlePush,replace:this.handleReplace,go:ct(),goBack:ct(),goForward:ct(),listen:this.handleListen,block:this.handleBlock};return e.createElement(j,C({},o,{history:i}))},n}(e.Component);ut.defaultProps={basename:"",location:"/"},ut.childContextTypes={router:f.object.isRequired};var pt=function(t){function n(){return O(this,n),S(this,t.apply(this,arguments))}return R(n,t),n.prototype.componentWillMount=function(){this.context.router||P(!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,s=a.exact,u=a.strict,p=a.sensitive,l=a.from,f=c||l;i=n,o=Z(r.pathname,{path:f,exact:s,strict:u,sensitive:p},t.match)}}),o?e.cloneElement(i,{location:r,computedMatch:o}):null},n}(e.Component);pt.contextTypes={router:f.shape({route:f.object.isRequired}).isRequired};var lt={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ft={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ht=Object.defineProperty,yt=Object.getOwnPropertyNames,dt=Object.getOwnPropertySymbols,mt=Object.getOwnPropertyDescriptor,vt=Object.getPrototypeOf,bt=vt&&vt(Object);var gt=function t(e,n,r){if("string"!=typeof n){if(bt){var o=vt(n);o&&o!==bt&&t(e,o,r)}var i=yt(n);dt&&(i=i.concat(dt(n)));for(var a=0;a<i.length;++a){var c=i[a];if(!(lt[c]||ft[c]||r&&r[c])){var s=mt(n,c);try{ht(e,c,s)}catch(t){}}}return e}return e};t.MemoryRouter=M,t.Prompt=T,t.Redirect=K,t.Route=et,t.Router=j,t.StaticRouter=ut,t.Switch=pt,t.generatePath=Y,t.matchPath=Z,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=E(n,["wrappedComponentRef"]);if(/iP.*OS\s1(4|5|6|7)/.test(window.navigator.userAgent)&&n.history){var i=n.history.push;/setTimeout/.test(i.toString())||(n.history.push=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=setTimeout(function(){i.apply(void 0,e),window.clearTimeout(r)},100)})}return e.createElement(et,{children:function(n){return e.createElement(t,C({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,gt(n,t)},Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -30,2 +30,3 @@ "use strict"; | ||
*/ | ||
var withRouter = function withRouter(Component) { | ||
@@ -36,5 +37,5 @@ var C = function C(props) { | ||
if (/iP.*OS\s14/.test(window.navigator.userAgent) && props.history) { | ||
var pushOV = props.history.push; | ||
if (!/setTimeout/.test(pushOV.toString())) { | ||
if (/iP.*OS\s1(4|5|6|7)/.test(window.navigator.userAgent) && props.history) { | ||
var push = props.history.push; | ||
if (!/setTimeout/.test(push.toString())) { | ||
props.history.push = function () { | ||
@@ -45,4 +46,5 @@ for (var _len = arguments.length, arg = Array(_len), _key = 0; _key < _len; _key++) { | ||
setTimeout(function () { | ||
pushOV.apply(undefined, arg); | ||
var ios14fixedTimer = setTimeout(function () { | ||
push.apply(undefined, arg); | ||
window.clearTimeout(ios14fixedTimer); | ||
}, 100); | ||
@@ -49,0 +51,0 @@ }; |
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
204519
4198
1