'use strict';(function(d,m){"object"===typeof exports&&"undefined"!==typeof module?m(exports,require("react"),require("history"),require("react-router")):"function"===typeof define&&define.amd?define(["exports","react","history","react-router"],m):(d=d||self,m(d.ReactRouterDOM={},d.React,d.HistoryLibrary,d.ReactRouter))})(this,function(d,m,x,k){function y(){y=Object.assign||function(a){for(var b=1;ba.length)b=a.length;for(var c=0,l=Array(b);c=a.length?{done:!0}:{done:!1,value:a[b++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}b=a[Symbol.iterator]();return b.next.bind(b)}function E(a,b){return b={exports:{}},a(b, b.exports),b.exports}function F(a,b,c,l,e){for(var g in a)if(U(a,g)){try{if("function"!==typeof a[g]){var d=Error((l||"React class")+": "+c+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[g]+"`.");d.name="Invariant Violation";throw d;}var q=a[g](b,g,l,c,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){q=v}!q||q instanceof Error||G((l||"React class")+": type specification of "+c+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+ typeof q+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).");if(q instanceof Error&&!(q.message in H)){H[q.message]=!0;var k=e?e():"";G("Failed "+c+" type: "+q.message+(null!=k?k:""))}}}function z(){return null}function V(a,b){if(!a){"undefined"!==typeof console&&console.warn(b);try{throw Error(b);}catch(c){}}}function I(a){var b=a.children;a=a.window;var c=m.useRef();null==c.current&&(c.current= x.createBrowserHistory({window:a}));var l=c.current;a=m.useReducer(function(a,b){return b},{action:l.action,location:l.location});c=a[0];var e=a[1];m.useLayoutEffect(function(){return l.listen(e)},[l]);return m.createElement(k.Router,{children:b,action:c.action,location:c.location,navigator:l})}function J(a){var b=a.children;a=a.window;var c=m.useRef();null==c.current&&(c.current=x.createHashHistory({window:a}));var l=c.current;a=m.useReducer(function(a,b){return b},{action:l.action,location:l.location}); c=a[0];var e=a[1];m.useLayoutEffect(function(){return l.listen(e)},[l]);return m.createElement(k.Router,{children:b,action:c.action,location:c.location,navigator:l})}function K(a){O(a.message,a.when);return null}function O(a,b){void 0===b&&(b=!0);var c=m.useCallback(function(b){window.confirm(a)&&b.retry()},[a]);k.useBlocker(c,b)}function A(a){void 0===a&&(a="");return new URLSearchParams("string"===typeof a||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce(function(b,c){var l= a[c];return b.concat(Array.isArray(l)?l.map(function(a){return[c,a]}):[[c,l]])},[]))}var aa=E(function(a,b){(function(){function a(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case g:switch(a=a.type,a){case f:case u:case k:case m:case h:case B:return a;default:switch(a=a&&a.$$typeof,a){case n:case r:case C:case D:case p:return a;default:return b}}case d:return b}}}function l(f){return a(f)===u}var e="function"===typeof Symbol&&Symbol.for,g=e?Symbol.for("react.element"):60103,d= e?Symbol.for("react.portal"):60106,k=e?Symbol.for("react.fragment"):60107,h=e?Symbol.for("react.strict_mode"):60108,m=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,n=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,r=e?Symbol.for("react.forward_ref"):60112,B=e?Symbol.for("react.suspense"):60113,W=e?Symbol.for("react.suspense_list"):60120,D=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"): 60116,X=e?Symbol.for("react.block"):60121,Y=e?Symbol.for("react.fundamental"):60117,t=e?Symbol.for("react.responder"):60118,Z=e?Symbol.for("react.scope"):60119,P=!1;b.AsyncMode=f;b.ConcurrentMode=u;b.ContextConsumer=n;b.ContextProvider=p;b.Element=g;b.ForwardRef=r;b.Fragment=k;b.Lazy=C;b.Memo=D;b.Portal=d;b.Profiler=m;b.StrictMode=h;b.Suspense=B;b.isAsyncMode=function(b){P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")); return l(b)||a(b)===f};b.isConcurrentMode=l;b.isContextConsumer=function(f){return a(f)===n};b.isContextProvider=function(f){return a(f)===p};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===g};b.isForwardRef=function(f){return a(f)===r};b.isFragment=function(f){return a(f)===k};b.isLazy=function(f){return a(f)===C};b.isMemo=function(f){return a(f)===D};b.isPortal=function(f){return a(f)===d};b.isProfiler=function(f){return a(f)===m};b.isStrictMode=function(f){return a(f)=== h};b.isSuspense=function(f){return a(f)===B};b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===k||a===u||a===m||a===h||a===B||a===W||"object"===typeof a&&null!==a&&(a.$$typeof===C||a.$$typeof===D||a.$$typeof===p||a.$$typeof===n||a.$$typeof===r||a.$$typeof===Y||a.$$typeof===t||a.$$typeof===Z||a.$$typeof===X)};b.typeOf=a})()}),Q=E(function(a){a.exports=aa}),R=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable, da=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(l){return!1}}()?Object.assign:function(a,b){if(null===a||void 0=== a)throw new TypeError("Object.assign cannot be called with null or undefined");var c=Object(a);for(var l,e=1;e>";g=g||e;if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==h){if(b)throw f=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"), f.name="Invariant Violation",f;"undefined"!==typeof console&&(h=r+":"+e,!c[h]&&3>k&&(t("You are manually calling a React.PropTypes validation function for the `"+g+"` prop on `"+r+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),c[h]=!0,k++))}return null==u[e]?f?null===u[e]?new l("The "+d+" `"+g+"` is marked as required in `"+(r+"`, but its value is `null`.")): new l("The "+d+" `"+g+"` is marked as required in `"+(r+"`, but its value is `undefined`.")):null:a(u,e,r,d,g)}var c={},k=0,e=f.bind(null,!1);e.isRequired=f.bind(null,!0);return e}function g(a){return e(function(f,b,c,e,d,g){f=f[b];return k(f)!==a?(f=h(f),new l("Invalid "+e+" `"+d+"` of type `"+(f+"` supplied to `"+c+"`, expected `")+(a+"`."))):null})}function d(f){switch(typeof f){case "number":case "string":case "undefined":return!0;case "boolean":return!f;case "object":if(Array.isArray(f))return f.every(d); if(null===f||a(f))return!0;var b=f&&(p&&f[p]||f["@@iterator"]);var c="function"===typeof b?b:void 0;if(c)if(b=c.call(f),c!==f.entries)for(;!(f=b.next()).done;){if(!d(f.value))return!1}else for(;!(f=b.next()).done;){if((f=f.value)&&!d(f[1]))return!1}else return!1;return!0;default:return!1}}function k(a){var f=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":"symbol"===f||a&&("Symbol"===a["@@toStringTag"]||"function"===typeof Symbol&&a instanceof Symbol)?"symbol":f}function h(a){if("undefined"=== typeof a||null===a)return""+a;var b=k(a);if("object"===b){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return b}function m(a){a=h(a);switch(a){case "array":case "object":return"an "+a;case "boolean":case "date":case "regexp":return"a "+a;default:return a}}var p="function"===typeof Symbol&&Symbol.iterator,n={array:g("array"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:e(z),arrayOf:function(a){return e(function(b, f,c,e,d){if("function"!==typeof a)return new l("Property `"+d+"` of component `"+c+"` has invalid PropType notation inside arrayOf.");b=b[f];if(!Array.isArray(b))return b=k(b),new l("Invalid "+e+" `"+d+"` of type `"+(b+"` supplied to `"+c+"`, expected an array."));for(f=0;f>";b=b[f];b=b.constructor&&b.constructor.name?b.constructor.name:"<>";return new l("Invalid "+ e+" `"+d+"` of type `"+(b+"` supplied to `"+c+"`, expected instance of `")+(g+"`."))}return null})},node:function(){return e(function(a,b,c,e,g){return d(a[b])?null:new l("Invalid "+e+" `"+g+"` supplied to `"+(c+"`, expected a ReactNode."))})}(),objectOf:function(a){return e(function(b,c,f,e,d){if("function"!==typeof a)return new l("Property `"+d+"` of component `"+f+"` has invalid PropType notation inside objectOf.");b=b[c];c=k(b);if("object"!==c)return new l("Invalid "+e+" `"+d+"` of type `"+(c+ "` supplied to `"+f+"`, expected an object."));for(var g in b)if(ea(b,g)&&(c=a(b,g,f,e,d+"."+g,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"),c instanceof Error))return c;return null})},oneOf:function(a){return Array.isArray(a)?e(function(b,f,e,d,g){b=b[f];for(f=0;f