diff --git a/dist/client/index.html b/dist/client/index.html index eee16a42..7b0634fd 100644 --- a/dist/client/index.html +++ b/dist/client/index.html @@ -18,5 +18,5 @@
- + diff --git a/dist/client/main-b9c4ef83bece6e60c164.js b/dist/client/main-e7b081c34806c044fbe6.js similarity index 98% rename from dist/client/main-b9c4ef83bece6e60c164.js rename to dist/client/main-e7b081c34806c044fbe6.js index f18ccbc0..aaa75ccd 100644 --- a/dist/client/main-b9c4ef83bece6e60c164.js +++ b/dist/client/main-e7b081c34806c044fbe6.js @@ -333,5 +333,5 @@ var r=/input|select|textarea|button|object/;function a(e){var t=e.offsetWidth<=0 Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. -*/!function(){"use strict";var a=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:a,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:a&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:a&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},a={};t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:a,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)}));var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:a,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)}));var n,i}},function(e,t,n){"use strict";var r,a=n(242),i=(r=a)&&r.__esModule?r:{default:r};var o=void 0,s=void 0,l=[];function u(){0!==l.length&&l[l.length-1].focusContent()}i.default.subscribe((function(e,t){o&&s||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",u),(s=o.cloneNode()).addEventListener("focus",u)),(l=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(o.parentElement&&o.parentElement.removeChild(o),s.parentElement&&s.parentElement.removeChild(s))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function a(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=a),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return o})),r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".TweetsModal---Tweet---3o1Jz, .TweetsModal---Retweet---3iHRc {\n margin-left: 10px;\n margin-right: 10px;\n}\n\n.TweetsModal---Retweet---3iHRc {\n padding: 5px;\n margin-bottom: 10px;\n background-color: #efefef;\n}\n\n.TweetsModal---Conversation---1G3S6 {\n margin-top: 45px;\n}\n\n.TweetsModal---UserProfile---1HB8X {\n display: flex;\n flex-direction: row;\n font-family: Helvetica, Roboto;\n}\n\n.TweetsModal---UserProfile---1HB8X img {\n height: 36px;\n width: 36px;\n margin-right: 15px;\n border-radius: 50%;\n}\n\n.TweetsModal---UserProfile---1HB8X i {\n font-size: 36px;\n margin-right: 15px;\n}\n\n.TweetsModal---UserProfile---1HB8X a {\n font-weight: 700;\n color: rgb(28, 32, 34);\n text-decoration: none;\n}\n\n.TweetsModal---UserProfile---1HB8X a:hover {\n color: rgb(59, 148, 217);\n}\n\n.TweetsModal---ScreenName---1Hp9S {\n color: rgb(105, 120, 130)\n}\n\n\n.TweetsModal---CloseModal---3-2Se {\n background-color: #efefef;\n margin-bottom: 10px;\n text-align: right;\n padding: 5px;\n position: fixed;\n width: 390px;\n z-index: 1;\n}\n\n.TweetsModal---CloseModal---3-2Se i {\n font-size: 1.5em;\n}\n",""]),t.locals={Tweet:"TweetsModal---Tweet---3o1Jz",Retweet:"TweetsModal---Retweet---3iHRc",Conversation:"TweetsModal---Conversation---1G3S6",UserProfile:"TweetsModal---UserProfile---1HB8X",ScreenName:"TweetsModal---ScreenName---1Hp9S",CloseModal:"TweetsModal---CloseModal---3-2Se"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Tweets---Holder---Fe1lG {\n margin: 45px auto;\n max-width: 90%;\n background-color: #002984;\n line-height: 0;\n column-width: 300px;\n column-count: auto;\n column-gap: 5px;\n padding: 5px 5px 5px 5px;\n}\n\n.Tweets---Controls---17VRR {\n margin: 45px auto;\n max-width: 50%;\n}\n\n.Tweets---Tile---2dFbn {\n height: 325px !important;\n}\n\n.Tweets---Refresh---186Bu button {\n font-size: 1.5em;\n margin-right: 1em;\n}\n",""]),t.locals={Holder:"Tweets---Holder---Fe1lG",Controls:"Tweets---Controls---17VRR",Tile:"Tweets---Tile---2dFbn",Refresh:"Tweets---Refresh---186Bu"}},function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){function e(e,t){return function(n,r,a,i){n[e]?n[e](r,a,i):n[t]&&n[t]("on"+r,a)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,n,t,e):r)||(e.exports=a)},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=a.test(e);return s||i.test(e)?o(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,i,o,s,l,u=0,c=!1,y=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,i=a;return r=a=void 0,u=t,o=e.apply(i,n)}function g(e){return u=e,s=setTimeout(w,t),c?v(e):o}function b(e){var n=e-l;return void 0===l||n>=t||n<0||y&&e-u>=i}function w(){var e=p();if(b(e))return M(e);s=setTimeout(w,function(e){var n=t-(e-l);return y?f(n,i-(e-u)):n}(e))}function M(e){return s=void 0,_&&r?v(e):(r=a=void 0,o)}function k(){var e=p(),n=b(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return g(l);if(y)return s=setTimeout(w,t),v(l)}return void 0===s&&(s=setTimeout(w,t)),o}return t=h(t)||0,m(n)&&(c=!!n.leading,i=(y="maxWait"in n)?d(h(n.maxWait)||0,t):i,_="trailing"in n?!!n.trailing:_),k.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?o:M(p())},k}}).call(this,n(57))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e,t,n){var r,a,i,o,s,l,u=0,c=!1,m=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,i=a;return r=a=void 0,u=t,o=e.apply(i,n)}function g(e){return u=e,s=setTimeout(w,t),c?v(e):o}function b(e){var n=e-l;return void 0===l||n>=t||n<0||m&&e-u>=i}function w(){var e=p();if(b(e))return M(e);s=setTimeout(w,function(e){var n=t-(e-l);return m?f(n,i-(e-u)):n}(e))}function M(e){return s=void 0,_&&r?v(e):(r=a=void 0,o)}function k(){var e=p(),n=b(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return g(l);if(m)return s=setTimeout(w,t),v(l)}return void 0===s&&(s=setTimeout(w,t)),o}return t=y(t)||0,h(n)&&(c=!!n.leading,i=(m="maxWait"in n)?d(y(n.maxWait)||0,t):i,_="trailing"in n?!!n.trailing:_),k.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?o:M(p())},k}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=a.test(e);return s||i.test(e)?o(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return h(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),m(e,t,{leading:r,maxWait:t,trailing:a})}}).call(this,n(57))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},a=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(a(t)))return t;t=t.parentNode}return window}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(function(e){return null===e.offsetParent}(e))return!1;var r=void 0,a=void 0,o=void 0,s=void 0;if(void 0===t||t===window)r=window.pageYOffset,o=window.pageXOffset,a=r+window.innerHeight,s=o+window.innerWidth;else{var l=(0,i.default)(t);r=l.top,o=l.left,a=r+t.offsetHeight,s=o+t.offsetWidth}var u=(0,i.default)(e);return r<=u.top+e.offsetHeight+n.top&&a>=u.top-n.bottom&&o<=u.left+e.offsetWidth+n.left&&s>=u.left-n.right};var r,a=n(344),i=(r=a)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Wayback---Wayback---3Gx9C img {\n height: 24px;\n width: 24px;\n}\n\n.Wayback---WaybackFound---2BXyZ {\n background-color: lightgreen !important;\n}\n\n.Wayback---WaybackError---2fIWn img {\n animation: Wayback---Shake---3YS2E 0.82s cubic-bezier(.36,.07,.19,.97) both;\n transform: translate3d(0, 0, 0);\n backface-visibility: hidden;\n perspective: 1000px;\n}\n\n@keyframes Wayback---Shake---3YS2E {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n",""]),t.locals={Wayback:"Wayback---Wayback---3Gx9C",WaybackFound:"Wayback---WaybackFound---2BXyZ",WaybackError:"Wayback---WaybackError---2fIWn",Shake:"Wayback---Shake---3YS2E"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Webpage---Webpage---3BReo {\n height: 445px;\n max-height: 445px;\n}\n\n.Webpage---UrlButton---1ufbo {\n width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n text-align: center;\n}\n\n.Webpage---Unselected---2IQdW {\n}\n\n.Webpage---Selected---1qsqz {\n box-shadow: 1px 4px 8px 1px lightgreen;\n}\n\n.Webpage---Selected---1qsqz:hover {\n box-shadow: 0 8px 16px 0 lightgreen;\n}\n\n.Webpage---Deselected---3FjCd {\n box-shadow: 1px 4px 8px 1px pink;\n}\n\n.Webpage---Deselected---3FjCd:hover {\n box-shadow: 0 8px 16px 0 pink;\n}\n\ndiv.Webpage---Controls---1-aTM {\n left: 180px;\n top: 10px;\n position: absolute;\n}\n\ndiv.Webpage---Controls---1-aTM i {\n padding: 10px;\n margin-right: 10px;\n color: black;\n background-color: #eee;\n border: thin solid black;\n border-radius: 50%;\n cursor: pointer;\n font-size: 20pt;\n}\n\n.Webpage---Selected---1qsqz i.Webpage---Add---Ekbcu {\n background-color: lightgreen;\n}\n\ni.Webpage---Add---Ekbcu:hover {\n background-color: lightgreen;\n}\n\n.Webpage---Deselected---3FjCd i.Webpage---Remove---3bqSU {\n background-color: pink;\n}\n\ni.Webpage---Remove---3bqSU:hover {\n background-color: pink;\n}\n\n.Webpage---Image---10BFc {\n text-align: center;\n position: relative;\n min-height: 200px;\n}\n\n.Webpage---Image---10BFc img {\n max-width: 350px;\n max-height: 200px;\n margin-left: auto;\n margin-right: auto;\n}\n\n.Webpage---Title---R3NOz {\n font-style: italic;\n font-weight: bold;\n text-align: left;\n}\n\n.Webpage---Unselected---2IQdW .Webpage---Title---R3NOz {\n background-color: white;\n}\n\n.Webpage---Description---nGUSx {\n text-align: left;\n overflow: auto;\n}\n\n.Webpage---Unselected---2IQdW .Webpage---Description---nGUSx {\n background-color: white;\n}\n\n.Webpage---Title---R3NOz a {\n color: black;\n text-decoration: none;\n}\n\n.Webpage---Stats---3rTPt {\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n padding: 2px;\n cursor: pointer;\n}\n\n.Webpage---Count---2fNkn {\n}\n\n.Webpage---WebsiteName---2KifT {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.Webpage---WebsiteName---2KifT a {\n text-decoration: none;\n color: blue;\n}\n\n.Webpage---ArchiveError---2hwQN {\n animation: Webpage---shake---1Nq9l 0.82s cubic-bezier(.36,.07,.19,.97) both;\n transform: translate3d(0, 0, 0);\n backface-visibility: hidden;\n perspective: 1000px;\n}\n\n@keyframes Webpage---shake---1Nq9l {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n",""]),t.locals={Webpage:"Webpage---Webpage---3BReo",UrlButton:"Webpage---UrlButton---1ufbo",Unselected:"Webpage---Unselected---2IQdW",Selected:"Webpage---Selected---1qsqz",Deselected:"Webpage---Deselected---3FjCd",Controls:"Webpage---Controls---1-aTM",Add:"Webpage---Add---Ekbcu",Remove:"Webpage---Remove---3bqSU",Image:"Webpage---Image---10BFc",Title:"Webpage---Title---R3NOz",Description:"Webpage---Description---nGUSx",Stats:"Webpage---Stats---3rTPt",Count:"Webpage---Count---2fNkn",WebsiteName:"Webpage---WebsiteName---2KifT",ArchiveError:"Webpage---ArchiveError---2hwQN",shake:"Webpage---shake---1Nq9l"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Checkbox---Checkbox---6cT-A {\n position: absolute !important;\n top: 5px;\n right: 5px;\n background-color: #ededed !important;\n}",""]),t.locals={Checkbox:"Checkbox---Checkbox---6cT-A"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Webpages---Queue---2FwpL {\n margin-top: 10px;\n text-align: right;\n margin-right: 70px;\n}\n",""]),t.locals={Queue:"Webpages---Queue---2FwpL"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".UserList---UserList---3VMvP {\n}\n\n.UserList---UserList---3VMvP .UserList---TweetQuota---3F-UN {\n width: 5em;\n}\n\n@media screen and (max-width: 660px) {\n\n .UserList---UserList---3VMvP .UserList---Avatar---2TgCW, .UserList---UserList---3VMvP .UserList---Name---2KI8G, .UserList---UserList---3VMvP .UserList---Collections---2IrZv, .UserList---UserList---3VMvP .UserList---Tweets---SYxC8 {\n display: none;\n }\n\n .UserList---UserList---3VMvP td {\n padding: 5px;\n }\n\n}",""]),t.locals={UserList:"UserList---UserList---3VMvP",TweetQuota:"UserList---TweetQuota---3F-UN",Avatar:"UserList---Avatar---2TgCW",Name:"UserList---Name---2KI8G",Collections:"UserList---Collections---2IrZv",Tweets:"UserList---Tweets---SYxC8"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".CollectionList---Header---OuZDx {\n padding: 1em;\n}\n\n.CollectionList---FindMeBtn---1Gwsa {\n padding-left: 5em !important;\n padding-right: 5em !important;\n}\n\n.CollectionList---Title---Z3aq7 {\n text-align: center;\n}",""]),t.locals={Header:"CollectionList---Header---OuZDx",FindMeBtn:"CollectionList---FindMeBtn---1Gwsa",Title:"CollectionList---Title---Z3aq7"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".App---App---_Jbzg {\n font-family: 'Roboto', sans-serif;\n margin: 0;\n padding: 0;\n}\n\n.App---App---_Jbzg h2 {\n position: relative;\n color: #000;\n font-size: 14pt;\n font-stretch: expanded;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.App---App---_Jbzg h2 a {\n color: #0f1282;\n text-decoration: none;\n}\n\n.App---App---_Jbzg h1 {\n text-transform: uppercase;\n}\n\n.App---App---_Jbzg ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.App---App---_Jbzg li {\n display: inline;\n}\n\n.App---App---_Jbzg h1 a:hover {\n color: #0f1282\n}\n\n.App---AppUnder780px---3eGwK li {\n display: block;\n margin: 10;\n}\n\n.App---AppUnder780px---3eGwK main {\n margin: 0px;\n}\n",""]),t.locals={App:"App---App---_Jbzg",AppUnder780px:"App---AppUnder780px---3eGwK"}},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),i=n(17),o=n.n(i),s=n(1),l=n.n(s),u=a.a.createContext(null);var c=function(e){e()},d={notify:function(){}};function f(){var e=c,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,a=n={callback:e,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){r&&null!==t&&(r=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var p=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=d,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=f())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=d)},e}();var m=function(e){var t=e.store,n=e.context,i=e.children,o=Object(r.useMemo)((function(){var e=new p(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),s=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(r.useEffect)((function(){var e=o.subscription;return e.trySubscribe(),s!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,s]);var l=n||u;return a.a.createElement(l.Provider,{value:o},i)},h=n(2),y=n(22),_=n(41),v=n.n(_),g=n(243),b="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,w=[],M=[null,null];function k(e,t){var n=e[1];return[t.payload,n+1]}function L(e,t,n){b((function(){return e.apply(void 0,t)}),n)}function T(e,t,n,r,a,i,o){e.current=r,t.current=a,n.current=!1,i.current&&(i.current=null,o())}function x(e,t,n,r,a,i,o,s,l,u){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,a.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?o.current||l():(i.current=e,s.current=e,o.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var S=function(){return[null,0]};function Y(e,t){void 0===t&&(t={});var n=t,i=n.getDisplayName,o=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,s=n.methodName,l=void 0===s?"connectAdvanced":s,c=n.renderCountProp,d=void 0===c?void 0:c,f=n.shouldHandleStateChanges,m=void 0===f||f,_=n.storeKey,b=void 0===_?"store":_,Y=(n.withRef,n.forwardRef),E=void 0!==Y&&Y,D=n.context,O=void 0===D?u:D,j=Object(y.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),C=O;return function(t){var n=t.displayName||t.name||"Component",i=o(n),s=Object(h.a)({},j,{getDisplayName:o,methodName:l,renderCountProp:d,shouldHandleStateChanges:m,storeKey:b,displayName:i,wrappedComponentName:n,WrappedComponent:t}),u=j.pure;var c=u?r.useMemo:function(e){return e()};function f(n){var i=Object(r.useMemo)((function(){var e=n.forwardedRef,t=Object(y.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=i[0],l=i[1],u=i[2],d=Object(r.useMemo)((function(){return o&&o.Consumer&&Object(g.isContextConsumer)(a.a.createElement(o.Consumer,null))?o:C}),[o,C]),f=Object(r.useContext)(d),_=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(f)&&Boolean(f.store);var v=_?n.store:f.store,b=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,s)}(v)}),[v]),Y=Object(r.useMemo)((function(){if(!m)return M;var e=new p(v,_?null:f.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[v,_,f]),E=Y[0],D=Y[1],O=Object(r.useMemo)((function(){return _?f:Object(h.a)({},f,{subscription:E})}),[_,f,E]),j=Object(r.useReducer)(k,w,S),P=j[0][0],A=j[1];if(P&&P.error)throw P.error;var H=Object(r.useRef)(),R=Object(r.useRef)(u),N=Object(r.useRef)(),I=Object(r.useRef)(!1),W=c((function(){return N.current&&u===R.current?N.current:b(v.getState(),u)}),[v,P,u]);L(T,[R,H,I,u,W,N,D]),L(x,[m,v,E,b,R,H,I,N,D,A],[v,E,b]);var F=Object(r.useMemo)((function(){return a.a.createElement(t,Object(h.a)({},W,{ref:l}))}),[l,t,W]);return Object(r.useMemo)((function(){return m?a.a.createElement(d.Provider,{value:O},F):F}),[d,F,O])}var _=u?a.a.memo(f):f;if(_.WrappedComponent=t,_.displayName=i,E){var Y=a.a.forwardRef((function(e,t){return a.a.createElement(_,Object(h.a)({},e,{forwardedRef:t}))}));return Y.displayName=i,Y.WrappedComponent=t,v()(Y,t)}return v()(_,t)}}function E(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function D(e,t){if(E(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ee(e,t){return e===t}function te(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Y:n,a=t.mapStateToPropsFactories,i=void 0===a?J:a,o=t.mapDispatchToPropsFactories,s=void 0===o?q:o,l=t.mergePropsFactories,u=void 0===l?G:l,c=t.selectorFactory,d=void 0===c?Z:c;return function(e,t,n,a){void 0===a&&(a={});var o=a,l=o.pure,c=void 0===l||l,f=o.areStatesEqual,p=void 0===f?ee:f,m=o.areOwnPropsEqual,_=void 0===m?D:m,v=o.areStatePropsEqual,g=void 0===v?D:v,b=o.areMergedPropsEqual,w=void 0===b?D:b,M=Object(y.a)(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=X(e,i,"mapStateToProps"),L=X(t,s,"mapDispatchToProps"),T=X(n,u,"mergeProps");return r(d,Object(h.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:L,initMergeProps:T,pure:c,areStatesEqual:p,areOwnPropsEqual:_,areStatePropsEqual:g,areMergedPropsEqual:w},M))}}var ne=te();var re;re=i.unstable_batchedUpdates,c=re;var ae=n(24);function ie(e){return"/"===e.charAt(0)}function oe(e,t){for(var n=t,r=n+1,a=e.length;r=0;c--){var d=a[c];"."===d?oe(a,c):".."===d?(oe(a,c),u++):u&&(oe(a,c),u--)}if(!s)for(;u--;u)a.unshift("..");!s||""===a[0]||a[0]&&ie(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};function le(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var ue=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=le(t),a=le(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var ce=function(e,t){if(!e)throw new Error("Invariant failed")};function de(e){return"/"===e.charAt(0)?e:"/"+e}function fe(e){return"/"===e.charAt(0)?e.substr(1):e}function pe(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function me(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function he(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function ye(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=Object(h.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=se(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function _e(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):a(!0):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),c({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=ye(e,t,d(),_.location);u.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(_.entries[_.index]=r,c({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return _}var Ee=n(86),De=n(87),Oe=n.n(De),je=(n(50),function(e){var t=Object(Ee.a)();return t.displayName=e,t}("Router-History")),Ce=function(e){var t=Object(Ee.a)();return t.displayName=e,t}("Router"),Pe=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(ae.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return a.a.createElement(Ce.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.a.createElement(je.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.a.Component);a.a.Component;var Ae=function(e){function t(){return e.apply(this,arguments)||this}Object(ae.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(a.a.Component);var He={},Re=0;function Ne(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(He[e])return He[e];var t=Oe.a.compile(e);return Re<1e4&&(He[e]=t,Re++),t}(e)(t,{pretty:!0})}function Ie(e){var t=e.computedMatch,n=e.to,r=e.push,i=void 0!==r&&r;return a.a.createElement(Ce.Consumer,null,(function(e){e||ce(!1);var r=e.history,o=e.staticContext,s=i?r.push:r.replace,l=ye(t?"string"==typeof n?Ne(n,t.params):Object(h.a)({},n,{pathname:Ne(n.pathname,t.params)}):n);return o?(s(l),null):a.a.createElement(Ae,{onMount:function(){s(l)},onUpdate:function(e,t){var n,r,a=ye(t.to);n=a,r=Object(h.a)({},l,{key:a.key}),n.pathname===r.pathname&&n.search===r.search&&n.hash===r.hash&&n.key===r.key&&ue(n.state,r.state)||s(l)},to:n})}))}var We={},Fe=0;function Ue(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,i=void 0!==a&&a,o=n.strict,s=void 0!==o&&o,l=n.sensitive,u=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=We[n]||(We[n]={});if(r[e])return r[e];var a=[],i={regexp:Oe()(e,a,t),keys:a};return Fe<1e4&&(r[e]=i,Fe++),i}(n,{end:i,strict:s,sensitive:u}),a=r.regexp,o=r.keys,l=a.exec(e);if(!l)return null;var c=l[0],d=l.slice(1),f=e===c;return i&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:o.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var ze=function(e){function t(){return e.apply(this,arguments)||this}return Object(ae.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(Ce.Consumer,null,(function(t){t||ce(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?Ue(n.pathname,e.props):t.match,i=Object(h.a)({},t,{location:n,match:r}),o=e.props,s=o.children,l=o.component,u=o.render;return Array.isArray(s)&&0===s.length&&(s=null),a.a.createElement(Ce.Provider,{value:i},i.match?s?"function"==typeof s?s(i):s:l?a.a.createElement(l,i):u?u(i):null:"function"==typeof s?s(i):null)}))},t}(a.a.Component);function Be(e){return"/"===e.charAt(0)?e:"/"+e}function Ve(e,t){if(!e)return t;var n=Be(e);return 0!==t.pathname.indexOf(n)?t:Object(h.a)({},t,{pathname:t.pathname.substr(n.length)})}function qe(e){return"string"==typeof e?e:he(e)}function Je(e){return function(){ce(!1)}}function $e(){}a.a.Component;var Ge=function(e){function t(){return e.apply(this,arguments)||this}return Object(ae.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(Ce.Consumer,null,(function(t){t||ce(!1);var n,r,i=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?Ue(i.pathname,Object(h.a)({},e.props,{path:o})):t.match}})),r?a.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(a.a.Component);a.a.useContext;var Qe="@@router/LOCATION_CHANGE",Ke=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.type,o=a.payload;if(i===Qe){var s=o.location,l=o.action,u=o.isFirstRendering;return u?e:n(e,{location:t(dt(s)),action:l})}return e}}};function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ht={fromJS:function(e){return e},getIn:function(e,t){if(!e)return e;var n=t.length;if(n){for(var r=e,a=0;a2&&void 0!==arguments[2]&&arguments[2];r.inTimeTravelling?r.inTimeTravelling=!1:o(e,t,n)};return r.unlisten=i.listen(s),e.noInitialPop||s(i.location,i.action,!0),r}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ot(e,t)}(n,e),r=n,(i=[{key:"componentWillUnmount",value:function(){this.unlisten(),this.unsubscribe()}},{key:"render",value:function(){var e=this.props,t=e.history,n=e.children;return a.a.createElement(Pe,{history:t},n)}}])&&rt(r.prototype,i),o&&rt(r,o),n}(r.PureComponent);n.propTypes={store:l.a.shape({getState:l.a.func.isRequired,subscribe:l.a.func.isRequired}).isRequired,history:l.a.shape({action:l.a.string.isRequired,listen:l.a.func.isRequired,location:l.a.object.isRequired,push:l.a.func.isRequired}).isRequired,basename:l.a.string,children:l.a.oneOfType([l.a.func,l.a.node]),onLocationChanged:l.a.func.isRequired,noInitialPop:l.a.bool};var i=function(e){var t=e.context||u;if(null==t)throw"Please upgrade to react-redux v6";return a.a.createElement(t.Consumer,null,(function(t){var r=t.store;return a.a.createElement(n,nt({store:r},e))}))};return i.propTypes={context:l.a.object},ne(null,(function(e){return{onLocationChanged:function(t,n,r){return e(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:Qe,payload:{location:e,action:t,isFirstRendering:n}}}(t,n,r))}}}))(i)}(ht),_t=ft(ht),vt=et(ht);vt.getLocation,vt.getAction,vt.getHash,vt.getSearch,vt.createMatchSelector;function gt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:jt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SETTINGS":return Ot(Ot({},e),{},{logoUrl:t.logoUrl,logoFile:t.logoFile,instanceTitle:t.instanceTitle,appKey:t.appKey,appSecret:t.appSecret,defaultQuota:t.defaultQuota,instanceDescription:t.instanceDescription,instanceInfoLink:t.instanceInfoLink,instanceTweetText:t.instanceTweetText});case"UPDATE_SETTINGS":var n=Ot(Ot({},e),{},{updated:!0});return n[t.name]=t.value,n;case"SAVE_SETTINGS":return Ot(Ot({},e),{},{logoFile:null,updated:!t.saved});default:return e}}function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Ft,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_USER":return Wt(Wt({},e),t.user);case"UPDATE_USER_SETTINGS":var n=Wt(Wt({},e),{},{updated:!0});return n[t.name]=t.value,n;case"SAVE_USER_SETTINGS":return Wt(Wt({},e),{},{updated:!t.saved});case void 0:return Wt(Wt({},e),{},{searchInfo:t.searchInfo});case void 0:return Wt(Wt({},e),{},{tweets:t.tweets});case"ACTIVATE_USER":return t.user.id===e.id?Wt(Wt({},e),{},{active:!0}):e;case"DEACTIVATE_USER":return t.user.id===e.id?Wt(Wt({},e),{},{active:!1}):e;default:return e}}var zt=function(){return function(e){fetch("/api/v1/trends",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){e({type:"SET_TRENDS",trends:t})}))}},Bt=function(e){return{type:"NEW_TREND",id:e}},Vt=function(e){return function(t,n){var r=n().trends.places.map((function(e){return e.id}));e&&r.push(e);var a={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"same-origin"};fetch("/api/v1/trends",a).then((function(){t(Bt("")),t(zt()),t(Rt())}))}};function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:$t,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TRENDS":return Jt(Jt({},e),{},{places:t.trends});case"NEW_TREND":return Jt(Jt({},e),{},{newPlace:t.id});case"REMOVE_TREND":var n=e.places.filter((function(e){return e.id!==t.id}));return Jt(Jt({},e),{},{places:n});case"SET_WORLD":return Jt(Jt({},e),{},{world:t.world});default:return e}}var Qt=n(21),Kt=n.n(Qt);function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return function(r){fetch("/api/v1/search/".concat(e,"/tweets?offset=").concat(n,"&includeRetweets=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){r(rn(e))}))}},dn=function(e){return function(t){fetch("/api/v1/search/"+e+"/users",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_USERS",users:e})}))}},fn=function(e){return function(t){fetch("/api/v1/search/"+e+"/hashtags",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_HASHTAGS",hashtags:e})}))}},pn=function(e){return function(t){fetch("/api/v1/search/"+e+"/images",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_IMAGES",images:e})}))}},mn=function(e){return function(t){fetch("/api/v1/search/"+e+"/videos",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_VIDEOS",videos:e})}))}},hn=function(e){return function(t){fetch("/api/v1/search/"+e,{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t(nn(e))}))}},yn=function(e){return function(t){var n={id:e.id,archiveStarted:!0};t(ln(n))}};function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:gn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TWITTER_SEARCH":return e.queryUpdated&&(t.search.queryUpdated=!0,t.search.query=e.query),vn(vn({},e),t.search);case"RESET_TWITTER_SEARCH":return gn;case"SET_TWITTER_SEARCH_TWEETS":return vn(vn({},e),{},{tweets:t.tweets});case"SET_TWITTER_SEARCH_USERS":return vn(vn({},e),{},{users:t.users});case"SET_TWITTER_SEARCH_HASHTAGS":return vn(vn({},e),{},{hashtags:t.hashtags});case"SET_TWITTER_SEARCH_URLS":return vn(vn({},e),{},{urls:t.urls});case"SET_TWITTER_SEARCH_IMAGES":return vn(vn({},e),{},{images:t.images});case"SET_TWITTER_SEARCH_VIDEOS":return vn(vn({},e),{},{videos:t.videos});case"ACTIVATE_SEARCH":return vn(vn({},e),{},{active:!0});case"UPDATE_SEARCH_TERM":var n=[];return e.query.forEach((function(e,r){t.term.pos===r?n.push({type:t.term.type,value:t.term.value}):n.push(vn({},e))})),vn(vn({},e),{},{queryUpdated:!0,query:n});case"REMOVE_SEARCH_TERM":var r=[];return e.query.forEach((function(e,n){if(t.term.pos!==n){var a=n===t.term.pos-1?{atStart:!1}:null;r.push({type:e.type,value:e.value,focused:a,pos:n})}})),vn(vn({},e),{},{queryUpdated:!0,query:r});case"ADD_SEARCH_TERM":var a=e.query.filter((function(e){return!e.value.match(/^\s+$/)}));return vn(vn({},e),{},{queryUpdated:!0,query:[].concat(Kt()(a),[t.term])});case"FOCUS_SEARCH_TERM":if(t.pos>=0&&t.pos=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:Sn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SEARCHES":var n=new Map;e.map((function(e){return n.set(e.id,e.updated)}));var r,a=!1,i=Tn(t.searches);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.updated0&&void 0!==arguments[0]?arguments[0]:En,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_USERS":return t.users;case"ACTIVATE_USER":var n=Kt()(e),r=n.find((function(e){return e.id==t.user.id}));return r&&(r.active=!0),n;case"DEACTIVATE_USER":var a=Kt()(e),i=a.find((function(e){return e.id==t.user.id}));return i&&(i.active=!1),a;case"ACTIVATE_ADMIN":var o=Kt()(e),s=o.find((function(e){return e.id==t.user.id}));return s&&(s.isSuperUser=!0),o;case"DEACTIVATE_ADMIN":var l=Kt()(e),u=l.find((function(e){return e.id==t.user.id}));return u&&(u.isSuperUser=!1),l;case"UPDATE_QUOTA":var c=Kt()(e),d=c.find((function(e){return e.id==t.user.id}));return d&&(d.tweetQuota=t.quota),c;default:return e}}var On=n(51),jn=n.n(On),Cn=n(66),Pn=n.n(Cn),An=function(e){return function(t){fetch("/api/v1/search/".concat(e,"/webpages"),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_WEBPAGES",webpages:e})}))}};function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Nn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_WEBPAGES":return t.webpages;case"RESET_WEBPAGES":return Nn;case"SELECT_WEBPAGE":var n=e.findIndex((function(e){return e.url===t.url}));if(n>=0){var r=e[n];return[].concat(Kt()(e.slice(0,n)),[Rn(Rn({},r),{},{deselected:!1,selected:!0})],Kt()(e.slice(n+1)))}return e;case"DESELECT_WEBPAGE":var a=e.findIndex((function(e){return e.url===t.url}));if(a>=0){var i=e[a];return[].concat(Kt()(e.slice(0,a)),[Rn(Rn({},i),{},{selected:!1,deselected:!0})],Kt()(e.slice(a+1)))}return e;case"SET_WEBPAGE_ARCHIVE":var o=e.findIndex((function(e){return e.url===t.url}));if(o>=0){var s=e[o];return[].concat(Kt()(e.slice(0,o)),[Rn(Rn({},s),{},{archive:{url:t.archiveUrl,time:t.archiveTime}})],Kt()(e.slice(o+1)))}return e;case"ARCHIVE_ERROR":var l=e.findIndex((function(e){return e.url===t.url}));if(l>=0){var u=e[l];return[].concat(Kt()(e.slice(0,l)),[Rn(Rn({},u),{},{archive:{error:!0}})],Kt()(e.slice(l+1)))}return e;default:return e}}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Un,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_QUEUE":return Fn(Fn({},e),{},{remaining:t.queue.remaining,total:t.queue.total});default:return e}}var Bn=function(e){return{type:"SET_TWEETS",tweets:e}},Vn=function(){return{type:"RESET_TWEETS"}},qn=[];function Jn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TWEETS":return t.tweets;case"RESET_TWEETS":return qn;default:return e}}var $n=function(e){return{type:"SET_SYSTEM_STATS",stats:e}};function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Kn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SYSTEM_STATS":return Qn(Qn({},e),t.stats);default:return e}}var Xn=we(),er=[bt(Xn),kt],tr=U.apply(void 0,[function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(t=a.a.createElement("span",{className:jr.a.Notifications},this.props.notifications)),e=a.a.createElement(xr,{to:"/settings/"},a.a.createElement("ion-icon",{name:"settings"})," Settings ",t)}return a.a.createElement("nav",{className:jr.a.AppBar},a.a.createElement("a",{href:"/auth/logout"},a.a.createElement("ion-icon",{name:"log-out"})," Logout"),a.a.createElement(xr,{to:"/profile/"},a.a.createElement("ion-icon",{name:"contact"})," Profile"),e)}}]),n}(r.Component);Pr.propTypes={isSuperUser:l.a.bool,notifications:l.a.number};var Ar,Hr=n(5),Rr=n(19),Nr=n(6);function Ir(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,a=new Array(r),i=0;i0?Ar="default":(e.scrollLeft=1,0===e.scrollLeft&&(Ar="negative")),document.body.removeChild(e),Ar}function zr(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;switch(Ur()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Br(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var Vr={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function qr(e){var t=e.onChange,n=Object(Hr.a)(e,["onChange"]),a=r.useRef(),i=r.useRef(null),o=function(){a.current=i.current.offsetHeight-i.current.clientHeight};return r.useEffect((function(){var e=Ir((function(){var e=a.current;o(),e!==a.current&&t(a.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),r.useEffect((function(){o(),t(a.current)}),[t]),r.createElement("div",Object(h.a)({style:Vr,ref:i},n))}var Jr=n(7),$r=n(13),Gr=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.color,o=e.orientation,s=Object(Hr.a)(e,["classes","className","color","orientation"]);return r.createElement("span",Object(h.a)({className:Object(Nr.a)(n.root,n["color".concat(Object($r.a)(i))],a,"vertical"===o&&n.vertical),ref:t},s))})),Qr=Object(Jr.a)((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(Gr),Kr=n(105);function Zr(e,t){var n=function(t,n){return a.a.createElement(Kr.a,Object(h.a)({ref:n},t),e)};return n.muiName=Kr.a.muiName,a.a.memo(a.a.forwardRef(n))}var Xr=Zr(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),ea=Zr(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function ta(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function na(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){ta(e,n),ta(t,n)}}),[e,t])}var ra="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function aa(e){var t=r.useRef(e);return ra((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var ia=!0,oa=!1,sa=null,la={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function ua(e){e.metaKey||e.altKey||e.ctrlKey||(ia=!0)}function ca(){ia=!1}function da(){"hidden"===this.visibilityState&&oa&&(ia=!0)}function fa(e){var t,n,r,a=e.target;try{return a.matches(":focus-visible")}catch(e){}return ia||(n=(t=a).type,!("INPUT"!==(r=t.tagName)||!la[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function pa(){oa=!0,window.clearTimeout(sa),sa=window.setTimeout((function(){oa=!1}),100)}function ma(){return{isFocusVisible:fa,onBlurVisible:pa,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",ua,!0),t.addEventListener("mousedown",ca,!0),t.addEventListener("pointerdown",ca,!0),t.addEventListener("touchstart",ca,!0),t.addEventListener("visibilitychange",da,!0))}),[])}}var ha=n(31),ya=n(58),_a=a.a.createContext(null);function va(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(r.isValidElement)(e)?t(e):e}(e)})),n}function ga(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ba(e,t,n){var a=va(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,a=Object.create(null),i=[];for(var o in e)o in t?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var l in t){if(a[l])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var c,d,f,h=u?null:_.current,g=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(g.width/2),d=Math.round(g.height/2);else{var b=e.touches?e.touches[0]:e,w=b.clientX,M=b.clientY;c=Math.round(w-g.left),d=Math.round(M-g.top)}if(s)(f=Math.sqrt((2*Math.pow(g.width,2)+Math.pow(g.height,2))/3))%2==0&&(f+=1);else{var k=2*Math.max(Math.abs((h?h.clientWidth:0)-c),c)+2,L=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(L,2))}e.touches?null===y.current&&(y.current=function(){v({pulsate:i,rippleX:c,rippleY:d,rippleSize:f,cb:n})},m.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):v({pulsate:i,rippleX:c,rippleY:d,rippleSize:f,cb:n})}}),[a,v]),b=r.useCallback((function(){g({},{pulsate:!0})}),[g]),w=r.useCallback((function(e,t){if(clearTimeout(m.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(m.current=setTimeout((function(){w(e,t)})));y.current=null,c((function(e){return e.length>0?e.slice(1):e})),f.current=t}),[]);return r.useImperativeHandle(t,(function(){return{pulsate:b,start:g,stop:w}}),[b,g,w]),r.createElement("span",Object(h.a)({className:Object(Nr.a)(i.root,o),ref:_},s),r.createElement(ka,{component:null,exit:!0},u))})),Sa=Object(Jr.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(r.memo(xa)),Ya=r.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,o=e.centerRipple,s=void 0!==o&&o,l=e.children,u=e.classes,c=e.className,d=e.component,f=void 0===d?"button":d,p=e.disabled,m=void 0!==p&&p,y=e.disableRipple,_=void 0!==y&&y,v=e.disableTouchRipple,g=void 0!==v&&v,b=e.focusRipple,w=void 0!==b&&b,M=e.focusVisibleClassName,k=e.onBlur,L=e.onClick,T=e.onFocus,x=e.onFocusVisible,S=e.onKeyDown,Y=e.onKeyUp,E=e.onMouseDown,D=e.onMouseLeave,O=e.onMouseUp,j=e.onTouchEnd,C=e.onTouchMove,P=e.onTouchStart,A=e.onDragLeave,H=e.tabIndex,R=void 0===H?0:H,N=e.TouchRippleProps,I=e.type,W=void 0===I?"button":I,F=Object(Hr.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),U=r.useRef(null);var z=r.useRef(null),B=r.useState(!1),V=B[0],q=B[1];m&&V&&q(!1);var J=ma(),$=J.isFocusVisible,G=J.onBlurVisible,Q=J.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return aa((function(r){return t&&t(r),!n&&z.current&&z.current[e](r),!0}))}r.useImperativeHandle(n,(function(){return{focusVisible:function(){q(!0),U.current.focus()}}}),[]),r.useEffect((function(){V&&w&&!_&&z.current.pulsate()}),[_,w,V]);var Z=K("start",E),X=K("stop",A),ee=K("stop",O),te=K("stop",(function(e){V&&e.preventDefault(),D&&D(e)})),ne=K("start",P),re=K("stop",j),ae=K("stop",C),ie=K("stop",(function(e){V&&(G(e),q(!1)),k&&k(e)}),!1),oe=aa((function(e){U.current||(U.current=e.currentTarget),$(e)&&(q(!0),x&&x(e)),T&&T(e)})),se=function(){var e=i.findDOMNode(U.current);return f&&"button"!==f&&!("A"===e.tagName&&e.href)},le=r.useRef(!1),ue=aa((function(e){w&&!le.current&&V&&z.current&&" "===e.key&&(le.current=!0,e.persist(),z.current.stop(e,(function(){z.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),S&&S(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!m&&(e.preventDefault(),L&&L(e))})),ce=aa((function(e){w&&" "===e.key&&z.current&&V&&!e.defaultPrevented&&(le.current=!1,e.persist(),z.current.stop(e,(function(){z.current.pulsate(e)}))),Y&&Y(e),L&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&L(e)})),de=f;"button"===de&&F.href&&(de="a");var fe={};"button"===de?(fe.type=W,fe.disabled=m):("a"===de&&F.href||(fe.role="button"),fe["aria-disabled"]=m);var pe=na(a,t),me=na(Q,U),he=na(pe,me),ye=r.useState(!1),_e=ye[0],ve=ye[1];r.useEffect((function(){ve(!0)}),[]);var ge=_e&&!_&&!m;return r.createElement(de,Object(h.a)({className:Object(Nr.a)(u.root,c,V&&[u.focusVisible,M],m&&u.disabled),onBlur:ie,onClick:L,onFocus:oe,onKeyDown:ue,onKeyUp:ce,onMouseDown:Z,onMouseLeave:te,onMouseUp:ee,onDragLeave:X,onTouchEnd:re,onTouchMove:ae,onTouchStart:ne,ref:he,tabIndex:m?-1:R},fe,F),l,ge?r.createElement(Sa,Object(h.a)({ref:z,center:s},N)):null)})),Ea=Object(Jr.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Ya),Da=r.createElement(Xr,{fontSize:"small"}),Oa=r.createElement(ea,{fontSize:"small"}),ja=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.direction,o=e.orientation,s=e.disabled,l=Object(Hr.a)(e,["classes","className","direction","orientation","disabled"]);return r.createElement(Ea,Object(h.a)({component:"div",className:Object(Nr.a)(n.root,a,s&&n.disabled,"vertical"===o&&n.vertical),ref:t,role:null,tabIndex:null},l),"left"===i?Da:Oa)})),Ca=Object(Jr.a)({root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},{name:"MuiTabScrollButton"})(ja),Pa=n(395),Aa=n(71);function Ha(){return Object(Pa.a)()||Aa.a}var Ra=r.forwardRef((function(e,t){var n=e["aria-label"],a=e["aria-labelledby"],i=e.action,o=e.centered,s=void 0!==o&&o,l=e.children,u=e.classes,c=e.className,d=e.component,f=void 0===d?"div":d,p=e.indicatorColor,m=void 0===p?"secondary":p,y=e.onChange,_=e.orientation,v=void 0===_?"horizontal":_,g=e.ScrollButtonComponent,b=void 0===g?Ca:g,w=e.scrollButtons,M=void 0===w?"auto":w,k=e.selectionFollowsFocus,L=e.TabIndicatorProps,T=void 0===L?{}:L,x=e.TabScrollButtonProps,S=e.textColor,Y=void 0===S?"inherit":S,E=e.value,D=e.variant,O=void 0===D?"standard":D,j=Object(Hr.a)(e,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),C=Ha(),P="scrollable"===O,A="rtl"===C.direction,H="vertical"===v,R=H?"scrollTop":"scrollLeft",N=H?"top":"left",I=H?"bottom":"right",W=H?"clientHeight":"clientWidth",F=H?"height":"width";var U=r.useState(!1),z=U[0],B=U[1],V=r.useState({}),q=V[0],J=V[1],$=r.useState({start:!1,end:!1}),G=$[0],Q=$[1],K=r.useState({overflow:"hidden",marginBottom:null}),Z=K[0],X=K[1],ee=new Map,te=r.useRef(null),ne=r.useRef(null),re=function(){var e,t,n=te.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:zr(n,C.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==E){var a=ne.current.children;if(a.length>0){var i=a[ee.get(E)];0,t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},ae=aa((function(){var e,t=re(),n=t.tabsMeta,r=t.tabMeta,a=0;if(r&&n)if(H)a=r.top-n.top+n.scrollTop;else{var i=A?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;a=r.left-n.left+i}var o=(e={},Object(Rr.a)(e,N,a),Object(Rr.a)(e,F,r?r[F]:0),e);if(isNaN(q[N])||isNaN(q[F]))J(o);else{var s=Math.abs(q[N]-o[N]),l=Math.abs(q[F]-o[F]);(s>=1||l>=1)&&J(o)}})),ie=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=r.ease,o=void 0===i?Br:i,s=r.duration,l=void 0===s?300:s,u=null,c=t[e],d=!1,f=function(){d=!0},p=function r(i){if(d)a(new Error("Animation cancelled"));else{null===u&&(u=i);var s=Math.min(1,(i-u)/l);t[e]=o(s)*(n-c)+c,s>=1?requestAnimationFrame((function(){a(null)})):requestAnimationFrame(r)}};c===n?a(new Error("Element already at target position")):requestAnimationFrame(p)}(R,te.current,e)},oe=function(e){var t=te.current[R];H?t+=e:(t+=e*(A?-1:1),t*=A&&"reverse"===Ur()?-1:1),ie(t)},se=function(){oe(-te.current[W])},le=function(){oe(te.current[W])},ue=r.useCallback((function(e){X({overflow:null,marginBottom:-e})}),[]),ce=aa((function(){var e=re(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[N]t[I]){var a=t[R]+(n[I]-t[I]);ie(a)}})),de=aa((function(){if(P&&"off"!==M){var e,t,n=te.current,r=n.scrollTop,a=n.scrollHeight,i=n.clientHeight,o=n.scrollWidth,s=n.clientWidth;if(H)e=r>1,t=r1,t=A?l>1:l *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(Ia),Fa=n(52),Ua=n.n(Fa);function za(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Ba=function(e){lr()(n,e);var t=za(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).links=[{dest:"/",label:"Trending",icon:"analytics"},{dest:"/explore/",label:"Explore",icon:"search"},{dest:"/searches/",label:"Saved Searches",icon:"filing"}],e.isSuperUser&&r.links.push({dest:"/users/",label:"Users",icon:"person"}),r}return or()(n,[{key:"componentDidMount",value:function(){this.setMediaQuery("(max-width: 480px)","",Ua.a.NoLabel)}},{key:"render",value:function(){var e=this,t=null;switch(this.props.location){case"/":t=0;break;case"/explore/":t=1;break;case"/searches/":t=2;break;case"/users/":t=3;break;default:this.props.location.match("/search/")&&(t=2)}return a.a.createElement(Na,{className:Ua.a.TabBar,variant:"fullWidth",value:t,indicatorColor:"primary",textColor:"primary","aria-label":"nav tabs example"},this.links.map((function(n,r){var i=r!==t?Ua.a.NonActiveTab:"";return a.a.createElement(Wa,{key:"l-".concat(r),component:"a",onClick:function(t){t.preventDefault(),e.props.navigateTo(e.links[r].dest)},className:"".concat(Ua.a.Tab," ").concat(i),icon:a.a.createElement("ion-icon",{name:n.icon,style:{fontSize:"180%"}}),label:a.a.createElement("span",{className:"".concat(Ua.a.Label," ").concat(e.state.mediaStyle)},n.label),id:"nav-tab-".concat(r)})})))}}]),n}(mr);Ba.propTypes={location:l.a.string,isSuperUser:l.a.bool,navigateTo:l.a.func};var Va=n(60),qa=n.n(Va);function Ja(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var $a=function(e){lr()(n,e);var t=Ja(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){this.setMediaQuery("(max-width: 480px)",qa.a.Header,qa.a.HeaderUnder480px)}},{key:"render",value:function(){var e=null,t=null,n=null;return n=this.props.logoUrl?a.a.createElement("a",{href:this.props.instanceInfoLink},a.a.createElement("img",{title:this.props.instanceDescription,src:this.props.logoUrl})):"",this.props.twitterScreenName&&this.props.twitterAvatarUrl&&(e=a.a.createElement(Pr,{notifications:this.props.notifications,isSuperUser:this.props.isSuperUser}),t=a.a.createElement(Ba,{isSuperUser:this.props.isSuperUser,location:this.props.location,navigateTo:this.props.navigateTo})),a.a.createElement("div",null,e,a.a.createElement("header",{className:this.state.mediaStyle},a.a.createElement("div",{className:qa.a.AppIcon},a.a.createElement(xr,{to:"/"},a.a.createElement("img",{src:Dr.a}))),a.a.createElement("div",{className:qa.a.Logo},a.a.createElement("center",null,n))),t)}}]),n}(mr);$a.propTypes={twitterScreenName:l.a.string,twitterAvatarUrl:l.a.string,getUser:l.a.func,location:l.a.string,logoUrl:l.a.string,isSuperUser:l.a.bool,notifications:l.a.number,navigateTo:l.a.func};var Ga=ne((function(e){return{twitterScreenName:e.user.twitterScreenName,twitterAvatarUrl:e.user.twitterAvatarUrl,isSuperUser:e.user.isSuperUser,location:e.router.location.pathname,logoUrl:e.settings.logoUrl,instanceInfoLink:e.settings.instanceInfoLink,instanceDescription:e.settings.instanceDescription,notifications:0}}),(function(e){return{getUser:Rt,navigateTo:function(t){e(Ze(t))}}}))($a);function Qa(e){var t=!1;return function(){t||(console.warn(e),t=!0)}}Qa("\n>> Error, via react-flip-move <<\n\nYou provided a stateless functional component as a child to . Unfortunately, SFCs aren't supported, because Flip Move needs access to the backing instances via refs, and SFCs don't have a public instance that holds that info.\n\nPlease wrap your components in a native element (eg.
), or a non-functional component.\n"),Qa("\n>> Error, via react-flip-move <<\n\nYou provided a primitive (text or number) node as a child to . Flip Move needs containers with unique keys to move children around.\n\nPlease wrap your value in a native element (eg. ), or a component.\n");var Ka=Qa("\n>> Warning, via react-flip-move <<\n\nWhen using \"wrapperless\" mode (by supplying 'typeName' of 'null'), strange things happen when the direct parent has the default \"static\" position.\n\nFlipMove has added 'position: relative' to this node, to ensure Flip Move animates correctly.\n\nTo avoid seeing this warning, simply apply a non-static position to that parent node.\n"),Za=Qa("\n>> Warning, via react-flip-move <<\n\nOne or more of Flip Move's child elements have the html attribute 'disabled' set to true.\n\nPlease note that this will cause animations to break in Internet Explorer 11 and below. Either remove the disabled attribute or set 'animation' to false.\n"),Xa={elevator:{from:{transform:"scale(0)",opacity:"0"},to:{transform:"",opacity:""}},fade:{from:{opacity:"0"},to:{opacity:""}},accordionVertical:{from:{transform:"scaleY(0)",transformOrigin:"center top"},to:{transform:"",transformOrigin:"center top"}},accordionHorizontal:{from:{transform:"scaleX(0)",transformOrigin:"left center"},to:{transform:"",transformOrigin:"left center"}},none:null},ei={elevator:{from:{transform:"scale(1)",opacity:"1"},to:{transform:"scale(0)",opacity:"0"}},fade:{from:{opacity:"1"},to:{opacity:"0"}},accordionVertical:{from:{transform:"scaleY(1)",transformOrigin:"center top"},to:{transform:"scaleY(0)",transformOrigin:"center top"}},accordionHorizontal:{from:{transform:"scaleX(1)",transformOrigin:"left center"},to:{transform:"scaleX(0)",transformOrigin:"left center"}},none:null},ti=Xa,ni=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[],n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(this.props,n);return r.style=si({position:"relative"},r.style),t.delegated=r,t},n.prototype.convertTimingProp=function(e){var t=this.props[e],r="number"==typeof t?t:parseInt(t,10);return isNaN(r)?n.defaultProps[e]:r},n.prototype.convertAnimationProp=function(e,t){switch(void 0===e?"undefined":ii(e)){case"boolean":return t[e?"elevator":"none"];case"string":return-1===Object.keys(t).indexOf(e)?t.elevator:t[e];default:return e}},n.prototype.render=function(){return a.a.createElement(e,this.convertProps(this.props))},n}(r.Component),t.defaultProps={easing:"ease-in-out",duration:350,delay:0,staggerDurationBy:0,staggerDelayBy:0,typeName:"div",enterAnimation:"elevator",leaveAnimation:"elevator",disableAllAnimations:!1,getPosition:function(e){return e.getBoundingClientRect()},maintainContainerHeight:!1,verticalAlignment:"top"},n}function di(e){var t=e.domNode,n=e.styles;Object.keys(n).forEach((function(e){t.style.setProperty(ai(e),n[e])}))}var fi=function(e){var t=e.childDomNode,n={top:0,left:0,right:0,bottom:0,height:0,width:0},r=e.childBoundingBox||n,a=e.parentBoundingBox||n,i=(0,e.getPosition)(t),o=i.top-a.top,s=i.left-a.left;return[r.left-s,r.top-o]},pi=function(e,t){var n=t.delay,r=t.duration,a=t.staggerDurationBy,i=t.staggerDelayBy,o=t.easing;n+=e*i,r+=e*a;return["transform","opacity"].map((function(e){return e+" "+r+"ms "+o+" "+n+"ms"})).join(", ")},mi=function(){var e={transition:"transitionend","-o-transition":"oTransitionEnd","-moz-transition":"transitionend","-webkit-transition":"webkitTransitionEnd"};if("undefined"==typeof document)return"";var t=document.createElement("fakeelement"),n=ni((function(e){return void 0!==t.style.getPropertyValue(e)}),Object.keys(e));return n?e[n]:""}(),hi=!mi;function yi(e){return e.key||""}function _i(e){return r.Children.toArray(e)}var vi=ci(function(e){function t(){var n,r;oi(this,t);for(var a=arguments.length,i=Array(a),s=0;s0?o+"px":"0"}})}}({domNode:this.heightPlaceholderData.domNode,parentData:this.parentData,getPosition:a}));this.state.children.forEach((function(t){var n=e.getChildData(yi(t)).domNode;n&&(t.entering||t.leaving||di({domNode:n,styles:{transition:""}}))}))},t.prototype.UNSAFE_componentWillReceiveProps=function(e){this.updateBoundingBoxCaches();var t=_i(e.children);this.setState({children:this.isAnimationDisabled(e)?t.map((function(e){return si({},e,{element:e})})):this.calculateNextSetOfChildren(t)})},t.prototype.animateChild=function(e,t,n){var r=this,a=this.getChildData(yi(e)).domNode;a&&(di({domNode:a,styles:n}),this.props.onStart&&this.props.onStart(e,a),requestAnimationFrame((function(){requestAnimationFrame((function(){var n={transition:pi(t,r.props),transform:"",opacity:""};e.appearing&&r.props.appearAnimation?n=si({},n,r.props.appearAnimation.to):e.entering&&r.props.enterAnimation?n=si({},n,r.props.enterAnimation.to):e.leaving&&r.props.leaveAnimation&&(n=si({},n,r.props.leaveAnimation.to)),di({domNode:a,styles:n})}))})),this.bindTransitionEndHandler(e))},t.prototype.bindTransitionEndHandler=function(e){var t=this,n=this.getChildData(yi(e)).domNode;if(n){n.addEventListener(mi,(function r(a){a.target===n&&(n.style.transition="",t.triggerFinishHooks(e,n),n.removeEventListener(mi,r),e.leaving&&t.removeChildData(yi(e)))}))}},t.prototype.triggerFinishHooks=function(e,t){var n=this;if(this.props.onFinish&&this.props.onFinish(e,t),this.remainingAnimations-=1,0===this.remainingAnimations){var r=this.state.children.filter((function(e){return!e.leaving})).map((function(e){return si({},e,{element:e.element,appearing:!1,entering:!1})}));this.setState({children:r},(function(){"function"==typeof n.props.onFinishAll&&n.callChildrenHook(n.props.onFinishAll),n.childrenToAnimate=[]})),this.heightPlaceholderData.domNode&&(this.heightPlaceholderData.domNode.style.height="0")}},t.prototype.callChildrenHook=function(e){var t=this,n=[],r=[];this.childrenToAnimate.forEach((function(e){var a=t.findChildByKey(e);a&&(n.push(a),t.hasChildData(e)&&r.push(t.getChildData(e).domNode))})),e(n,r)},t.prototype.updateBoundingBoxCaches=function(){var e=this,t=this.parentData.domNode;if(t){this.parentData.boundingBox=this.props.getPosition(t);var n=[];this.state.children.forEach((function(r){var a=yi(r);if(a)if(e.hasChildData(a)){var i=e.getChildData(a);i.domNode&&r?n.push(function(e){var t=e.childDomNode,n=e.parentDomNode,r=e.getPosition,a=r(n),i=r(t),o=i.top,s=i.left,l=i.right,u=i.bottom,c=i.width,d=i.height;return{top:o-a.top,left:s-a.left,right:a.right-l,bottom:a.bottom-u,width:c,height:d}}({childDomNode:i.domNode,parentDomNode:t,getPosition:e.props.getPosition})):n.push(null)}else n.push(null);else n.push(null)})),this.state.children.forEach((function(t,r){var a=yi(t),i=n[r];a&&e.setChildData(a,{boundingBox:i})}))}},t.prototype.computeInitialStyles=function(e){if(e.appearing)return this.props.appearAnimation?this.props.appearAnimation.from:{};if(e.entering)return this.props.enterAnimation?si({position:"",top:"",left:"",right:"",bottom:""},this.props.enterAnimation.from):{};if(e.leaving)return this.props.leaveAnimation?this.props.leaveAnimation.from:{};var t=this.getChildData(yi(e)),n=t.domNode,r=t.boundingBox,a=this.parentData.boundingBox;if(!n)return{};var i=fi({childDomNode:n,childBoundingBox:r,parentBoundingBox:a,getPosition:this.props.getPosition});return{transform:"translate("+i[0]+"px, "+i[1]+"px)"}},t.prototype.isAnimationDisabled=function(e){return hi||e.disableAllAnimations||0===e.duration&&0===e.delay&&0===e.staggerDurationBy&&0===e.staggerDelayBy},t.prototype.findChildByKey=function(e){return ni((function(t){return yi(t)===e}),this.state.children)},t.prototype.hasChildData=function(e){return Object.prototype.hasOwnProperty.call(this.childrenData,e)},t.prototype.getChildData=function(e){return this.hasChildData(e)?this.childrenData[e]:{}},t.prototype.setChildData=function(e,t){this.childrenData[e]=si({},this.getChildData(e),t)},t.prototype.removeChildData=function(e){delete this.childrenData[e],this.setState((function(t){return si({},t,{children:t.children.filter((function(t){return t.element.key!==e}))})}))},t.prototype.createHeightPlaceholder=function(){var e=this,t=this.props.typeName,n="ul"===t||"ol"===t?"li":"div";return Object(r.createElement)(n,{key:"height-placeholder",ref:function(t){e.heightPlaceholderData.domNode=t},style:{visibility:"hidden",height:0}})},t.prototype.childrenWithRefs=function(){var e=this;return this.state.children.map((function(t){return Object(r.cloneElement)(t.element,{ref:function(n){if(n){var r=function(e){if("undefined"==typeof HTMLElement)return null;if(e instanceof HTMLElement)return e;var t=Object(i.findDOMNode)(e);return t&&t.nodeType===Node.TEXT_NODE?null:t}(n);e.setChildData(yi(t),{domNode:r})}}})}))},t.prototype.render=function(){var e=this,t=this.props,n=t.typeName,a=t.delegated,i=t.leaveAnimation,o=t.maintainContainerHeight,s=this.childrenWithRefs();if(i&&o&&s.push(this.createHeightPlaceholder()),!n)return s;var l=si({},a,{children:s,ref:function(t){e.parentData.domNode=t}});return Object(r.createElement)(n,l)},t}(r.Component)),gi=n(25),bi=n.n(gi);function wi(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}var Mi=r.createContext();var ki=Mi;function Li(e,t){return parseInt(e[t],10)||0}var Ti="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,xi={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},Si=r.forwardRef((function(e,t){var n=e.onChange,a=e.rows,i=e.rowsMax,o=e.rowsMin,s=void 0===o?1:o,l=e.style,u=e.value,c=Object(Hr.a)(e,["onChange","rows","rowsMax","rowsMin","style","value"]),d=a||s,f=r.useRef(null!=u).current,p=r.useRef(null),m=na(t,p),y=r.useRef(null),_=r.useRef(0),v=r.useState({}),g=v[0],b=v[1],w=r.useCallback((function(){var t=p.current,n=window.getComputedStyle(t),r=y.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var a=n["box-sizing"],o=Li(n,"padding-bottom")+Li(n,"padding-top"),s=Li(n,"border-bottom-width")+Li(n,"border-top-width"),l=r.scrollHeight-o;r.value="x";var u=r.scrollHeight-o,c=l;d&&(c=Math.max(Number(d)*u,c)),i&&(c=Math.min(Number(i)*u,c));var f=(c=Math.max(c,u))+("border-box"===a?o+s:0),m=Math.abs(c-l)<=1;b((function(e){return _.current<20&&(f>0&&Math.abs((e.outerHeightStyle||0)-f)>1||e.overflow!==m)?(_.current+=1,{overflow:m,outerHeightStyle:f}):e}))}),[i,d,e.placeholder]);r.useEffect((function(){var e=Ir((function(){_.current=0,w()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[w]),Ti((function(){w()})),r.useEffect((function(){_.current=0}),[u]);return r.createElement(r.Fragment,null,r.createElement("textarea",Object(h.a)({value:u,onChange:function(e){_.current=0,f||w(),n&&n(e)},ref:m,rows:d,style:Object(h.a)({height:g.outerHeightStyle,overflow:g.overflow?"hidden":null},l)},c)),r.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:y,tabIndex:-1,style:Object(h.a)(Object(h.a)({},xi),l)}))}));function Yi(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Ei(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Yi(e.value)&&""!==e.value||t&&Yi(e.defaultValue)&&""!==e.defaultValue)}var Di="undefined"==typeof window?r.useEffect:r.useLayoutEffect,Oi=r.forwardRef((function(e,t){var n=e["aria-describedby"],a=e.autoComplete,i=e.autoFocus,o=e.classes,s=e.className,l=(e.color,e.defaultValue),u=e.disabled,c=e.endAdornment,d=(e.error,e.fullWidth),f=void 0!==d&&d,p=e.id,m=e.inputComponent,y=void 0===m?"input":m,_=e.inputProps,v=void 0===_?{}:_,g=e.inputRef,b=(e.margin,e.multiline),w=void 0!==b&&b,M=e.name,k=e.onBlur,L=e.onChange,T=e.onClick,x=e.onFocus,S=e.onKeyDown,Y=e.onKeyUp,E=e.placeholder,D=e.readOnly,O=e.renderSuffix,j=e.rows,C=e.rowsMax,P=e.rowsMin,A=e.startAdornment,H=e.type,R=void 0===H?"text":H,N=e.value,I=Object(Hr.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),W=null!=v.value?v.value:N,F=r.useRef(null!=W).current,U=r.useRef(),z=r.useCallback((function(e){0}),[]),B=na(v.ref,z),V=na(g,B),q=na(U,V),J=r.useState(!1),$=J[0],G=J[1],Q=r.useContext(Mi);var K=wi({props:e,muiFormControl:Q,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});K.focused=Q?Q.focused:$,r.useEffect((function(){!Q&&u&&$&&(G(!1),k&&k())}),[Q,u,$,k]);var Z=Q&&Q.onFilled,X=Q&&Q.onEmpty,ee=r.useCallback((function(e){Ei(e)?Z&&Z():X&&X()}),[Z,X]);Di((function(){F&&ee({value:W})}),[W,ee,F]);r.useEffect((function(){ee(U.current)}),[]);var te=y,ne=Object(h.a)(Object(h.a)({},v),{},{ref:q});"string"!=typeof te?ne=Object(h.a)(Object(h.a)({inputRef:q,type:R},ne),{},{ref:null}):w?!j||C||P?(ne=Object(h.a)({rows:j,rowsMax:C},ne),te=Si):te="textarea":ne=Object(h.a)({type:R},ne);return r.useEffect((function(){Q&&Q.setAdornedStart(Boolean(A))}),[Q,A]),r.createElement("div",Object(h.a)({className:Object(Nr.a)(o.root,o["color".concat(Object($r.a)(K.color||"primary"))],s,K.disabled&&o.disabled,K.error&&o.error,f&&o.fullWidth,K.focused&&o.focused,Q&&o.formControl,w&&o.multiline,A&&o.adornedStart,c&&o.adornedEnd,"dense"===K.margin&&o.marginDense),onClick:function(e){U.current&&e.currentTarget===e.target&&U.current.focus(),T&&T(e)},ref:t},I),A,r.createElement(ki.Provider,{value:null},r.createElement(te,Object(h.a)({"aria-invalid":K.error,"aria-describedby":n,autoComplete:a,autoFocus:i,defaultValue:l,disabled:K.disabled,id:p,onAnimationStart:function(e){ee("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:M,placeholder:E,readOnly:D,required:K.required,rows:j,value:W,onKeyDown:S,onKeyUp:Y},ne,{className:Object(Nr.a)(o.input,v.className,K.disabled&&o.disabled,w&&o.inputMultiline,K.hiddenLabel&&o.inputHiddenLabel,A&&o.inputAdornedStart,c&&o.inputAdornedEnd,"search"===R&&o.inputTypeSearch,"dense"===K.margin&&o.inputMarginDense),onBlur:function(e){k&&k(e),v.onBlur&&v.onBlur(e),Q&&Q.onBlur?Q.onBlur(e):G(!1)},onChange:function(e){if(!F){var t=e.target||U.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");ee({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a0?.75*o+8:.01;return r.createElement("fieldset",Object(h.a)({"aria-hidden":!0,style:Object(h.a)(Object(Rr.a)({},"padding".concat(Object($r.a)(c)),8),l),className:Object(Nr.a)(n.root,a),ref:t},u),r.createElement("legend",{className:n.legend,style:{width:s?d:.01}},r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))})),Ni=Object(Jr.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(Ri),Ii=r.forwardRef((function(e,t){var n=e.classes,a=e.fullWidth,i=void 0!==a&&a,o=e.inputComponent,s=void 0===o?"input":o,l=e.label,u=e.labelWidth,c=void 0===u?0:u,d=e.multiline,f=void 0!==d&&d,p=e.notched,m=e.type,y=void 0===m?"text":m,_=Object(Hr.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return r.createElement(ji,Object(h.a)({renderSuffix:function(e){return r.createElement(Ni,{className:n.notchedOutline,label:l,labelWidth:c,notched:void 0!==p?p:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(h.a)(Object(h.a)({},n),{},{root:Object(Nr.a)(n.root,n.underline),notchedOutline:null}),fullWidth:i,inputComponent:s,multiline:f,ref:t,type:y},_))}));Ii.muiName="Input";var Wi=Object(Jr.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(Ii);function Fi(){return r.useContext(ki)}var Ui=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=(e.color,e.component),s=void 0===o?"label":o,l=(e.disabled,e.error,e.filled,e.focused,e.required,Object(Hr.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),u=wi({props:e,muiFormControl:Fi(),states:["color","required","focused","disabled","error","filled"]});return r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,a["color".concat(Object($r.a)(u.color||"primary"))],i,u.disabled&&a.disabled,u.error&&a.error,u.filled&&a.filled,u.focused&&a.focused,u.required&&a.required),ref:t},l),n,u.required&&r.createElement("span",{"aria-hidden":!0,className:Object(Nr.a)(a.asterisk,u.error&&a.error)}," ","*"))})),zi=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({color:e.palette.text.secondary},e.typography.body1),{},{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(Ui),Bi=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.disableAnimation,o=void 0!==i&&i,s=(e.margin,e.shrink),l=(e.variant,Object(Hr.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),u=Fi(),c=s;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);var d=wi({props:e,muiFormControl:u,states:["margin","variant"]});return r.createElement(zi,Object(h.a)({"data-shrink":c,className:Object(Nr.a)(n.root,a,u&&n.formControl,!o&&n.animated,c&&n.shrink,"dense"===d.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[d.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},l))})),Vi=Object(Jr.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(Bi);function qi(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var Ji=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.color,s=void 0===o?"primary":o,l=e.component,u=void 0===l?"div":l,c=e.disabled,d=void 0!==c&&c,f=e.error,p=void 0!==f&&f,m=e.fullWidth,y=void 0!==m&&m,_=e.focused,v=e.hiddenLabel,g=void 0!==v&&v,b=e.margin,w=void 0===b?"none":b,M=e.required,k=void 0!==M&&M,L=e.size,T=e.variant,x=void 0===T?"standard":T,S=Object(Hr.a)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),Y=r.useState((function(){var e=!1;return n&&r.Children.forEach(n,(function(t){if(qi(t,["Input","Select"])){var n=qi(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}})),e})),E=Y[0],D=Y[1],O=r.useState((function(){var e=!1;return n&&r.Children.forEach(n,(function(t){qi(t,["Input","Select"])&&Ei(t.props,!0)&&(e=!0)})),e})),j=O[0],C=O[1],P=r.useState(!1),A=P[0],H=P[1],R=void 0!==_?_:A;d&&R&&H(!1);var N=r.useCallback((function(){C(!0)}),[]),I={adornedStart:E,setAdornedStart:D,color:s,disabled:d,error:p,filled:j,focused:R,fullWidth:y,hiddenLabel:g,margin:("small"===L?"dense":void 0)||w,onBlur:function(){H(!1)},onEmpty:r.useCallback((function(){C(!1)}),[]),onFilled:N,onFocus:function(){H(!0)},registerEffect:void 0,required:k,variant:x};return r.createElement(ki.Provider,{value:I},r.createElement(u,Object(h.a)({className:Object(Nr.a)(a.root,i,"none"!==w&&a["margin".concat(Object($r.a)(w))],y&&a.fullWidth),ref:t},S),n))})),$i=Object(Jr.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(Ji),Gi=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.component,s=void 0===o?"p":o,l=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,Object(Hr.a)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),u=wi({props:e,muiFormControl:Fi(),states:["variant","margin","disabled","error","filled","focused","required"]});return r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,("filled"===u.variant||"outlined"===u.variant)&&a.contained,i,u.disabled&&a.disabled,u.error&&a.error,u.filled&&a.filled,u.focused&&a.focused,u.required&&a.required,"dense"===u.margin&&a.marginDense),ref:t},l)," "===n?r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):n)})),Qi=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({color:e.palette.text.secondary},e.typography.caption),{},{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(Gi),Ki=n(391),Zi=n(30),Xi=n(40);function eo(){for(var e=arguments.length,t=new Array(e),n=0;n3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Object(ha.a)(r)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&lo(e,a)}))}function fo(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function po(e,t){var n,r=[],a=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Wr(e);return t.body===e?Fr(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var o=so();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(uo(i)+o,"px"),n=Wr(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){a.push(e.style.paddingRight),e.style.paddingRight="".concat(uo(e)+o,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){a[t]?e.style.paddingRight=a[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var mo=function(){function e(){io(this,e),this.modals=[],this.containers=[]}return Object(oo.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&lo(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);co(t,e.mountNode,e.modalRef,r,!0);var a=fo(this.containers,(function(e){return e.container===t}));return-1!==a?(this.containers[a].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=fo(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=po(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=fo(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&lo(e.modalRef,!0),co(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var a=r.modals[r.modals.length-1];a.modalRef&&lo(a.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var ho=function(e){var t=e.children,n=e.disableAutoFocus,a=void 0!==n&&n,o=e.disableEnforceFocus,s=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,c=e.getDoc,d=e.isEnabled,f=e.open,p=r.useRef(),m=r.useRef(null),h=r.useRef(null),y=r.useRef(),_=r.useRef(null),v=r.useCallback((function(e){_.current=i.findDOMNode(e)}),[]),g=na(t.ref,v),b=r.useRef();return r.useEffect((function(){b.current=f}),[f]),!b.current&&f&&"undefined"!=typeof window&&(y.current=c().activeElement),r.useEffect((function(){if(f){var e=Wr(_.current);a||!_.current||_.current.contains(e.activeElement)||(_.current.hasAttribute("tabIndex")||_.current.setAttribute("tabIndex",-1),_.current.focus());var t=function(){e.hasFocus()&&!s&&d()&&!p.current?_.current&&!_.current.contains(e.activeElement)&&_.current.focus():p.current=!1},n=function(t){!s&&d()&&9===t.keyCode&&e.activeElement===_.current&&(p.current=!0,t.shiftKey?h.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var r=setInterval((function(){t()}),50);return function(){clearInterval(r),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(y.current&&y.current.focus&&y.current.focus(),y.current=null)}}}),[a,s,u,d,f]),r.createElement(r.Fragment,null,r.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),r.cloneElement(t,{ref:g}),r.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))},yo={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},_o=r.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,i=e.open,o=Object(Hr.a)(e,["invisible","open"]);return i?r.createElement("div",Object(h.a)({"aria-hidden":!0,ref:t},o,{style:Object(h.a)(Object(h.a)(Object(h.a)({},yo.root),a?yo.invisible:{}),o.style)})):null}));var vo=new mo,go=r.forwardRef((function(e,t){var n=Object(Pa.a)(),a=Object(to.a)({name:"MuiModal",props:Object(h.a)({},e),theme:n}),o=a.BackdropComponent,s=void 0===o?_o:o,l=a.BackdropProps,u=a.children,c=a.closeAfterTransition,d=void 0!==c&&c,f=a.container,p=a.disableAutoFocus,m=void 0!==p&&p,y=a.disableBackdropClick,_=void 0!==y&&y,v=a.disableEnforceFocus,g=void 0!==v&&v,b=a.disableEscapeKeyDown,w=void 0!==b&&b,M=a.disablePortal,k=void 0!==M&&M,L=a.disableRestoreFocus,T=void 0!==L&&L,x=a.disableScrollLock,S=void 0!==x&&x,Y=a.hideBackdrop,E=void 0!==Y&&Y,D=a.keepMounted,O=void 0!==D&&D,j=a.manager,C=void 0===j?vo:j,P=a.onBackdropClick,A=a.onClose,H=a.onEscapeKeyDown,R=a.onRendered,N=a.open,I=Object(Hr.a)(a,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),W=r.useState(!0),F=W[0],U=W[1],z=r.useRef({}),B=r.useRef(null),V=r.useRef(null),q=na(V,t),J=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(a),$=function(){return Wr(B.current)},G=function(){return z.current.modalRef=V.current,z.current.mountNode=B.current,z.current},Q=function(){C.mount(G(),{disableScrollLock:S}),V.current.scrollTop=0},K=aa((function(){var e=function(e){return e="function"==typeof e?e():e,i.findDOMNode(e)}(f)||$().body;C.add(G(),e),V.current&&Q()})),Z=r.useCallback((function(){return C.isTopModal(G())}),[C]),X=aa((function(e){B.current=e,e&&(R&&R(),N&&Z()?Q():lo(V.current,!0))})),ee=r.useCallback((function(){C.remove(G())}),[C]);if(r.useEffect((function(){return function(){ee()}}),[ee]),r.useEffect((function(){N?K():J&&d||ee()}),[N,ee,J,d,K]),!O&&!N&&(!J||F))return null;var te=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:ao.a}),ne={};return void 0===u.props.tabIndex&&(ne.tabIndex=u.props.tabIndex||"-1"),J&&(ne.onEnter=eo((function(){U(!1)}),u.props.onEnter),ne.onExited=eo((function(){U(!0),d&&ee()}),u.props.onExited)),r.createElement(ro,{ref:X,container:f,disablePortal:k},r.createElement("div",Object(h.a)({ref:q,onKeyDown:function(e){"Escape"===e.key&&Z()&&(H&&H(e),w||(e.stopPropagation(),A&&A(e,"escapeKeyDown")))},role:"presentation"},I,{style:Object(h.a)(Object(h.a)(Object(h.a)({},te.root),!N&&F?te.hidden:{}),I.style)}),E?null:r.createElement(s,Object(h.a)({open:N,onClick:function(e){e.target===e.currentTarget&&(P&&P(e),!_&&A&&A(e,"backdropClick"))}},l)),r.createElement(ho,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:T,getDoc:$,isEnabled:Z,open:N},r.cloneElement(u,ne))))})),bo=!1,wo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var a,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(a="exited",r.appearStatus="entering"):a="entered":a=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:a},r.nextCallback=null,r}Object(ae.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[o.a.findDOMNode(this),r],i=a[0],s=a[1],l=this.getTimeouts(),u=r?l.appear:l.enter;!e&&!n||bo?this.safeSetState({status:"entered"},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,s),this.safeSetState({status:"entering"},(function(){t.props.onEntering(i,s),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(i,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.a.findDOMNode(this);t&&!bo?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=a[0],s=a[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(y.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(_a.Provider,{value:null},"function"==typeof n?n(e,r):a.a.cloneElement(a.a.Children.only(n),r))},t}(a.a.Component);function Mo(){}wo.contextType=_a,wo.propTypes={},wo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Mo,onEntering:Mo,onEntered:Mo,onExit:Mo,onExiting:Mo,onExited:Mo},wo.UNMOUNTED="unmounted",wo.EXITED="exited",wo.ENTERING="entering",wo.ENTERED="entered",wo.EXITING="exiting";var ko=wo,Lo=function(e){return e.scrollTop};function To(e,t){var n=e.timeout,r=e.style,a=void 0===r?{}:r;return{duration:a.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:a.transitionDelay}}function xo(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var So={entering:{opacity:1,transform:xo(1)},entered:{opacity:1,transform:"none"}},Yo=r.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,i=void 0!==a&&a,o=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,c=e.onExit,d=e.onExited,f=e.onExiting,p=e.style,m=e.timeout,y=void 0===m?"auto":m,_=e.TransitionComponent,v=void 0===_?ko:_,g=Object(Hr.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),b=r.useRef(),w=r.useRef(),M=Ha(),k=M.unstable_strictMode&&!i,L=r.useRef(null),T=na(n.ref,t),x=na(k?L:void 0,T),S=function(e){return function(t,n){if(e){var r=k?[L.current,t]:[t,n],a=Object(Zi.a)(r,2),i=a[0],o=a[1];void 0===o?e(i):e(i,o)}}},Y=S(u),E=S((function(e,t){Lo(e);var n,r=To({style:p,timeout:y},{mode:"enter"}),a=r.duration,i=r.delay;"auto"===y?(n=M.transitions.getAutoHeightDuration(e.clientHeight),w.current=n):n=a,e.style.transition=[M.transitions.create("opacity",{duration:n,delay:i}),M.transitions.create("transform",{duration:.666*n,delay:i})].join(","),s&&s(e,t)})),D=S(l),O=S(f),j=S((function(e){var t,n=To({style:p,timeout:y},{mode:"exit"}),r=n.duration,a=n.delay;"auto"===y?(t=M.transitions.getAutoHeightDuration(e.clientHeight),w.current=t):t=r,e.style.transition=[M.transitions.create("opacity",{duration:t,delay:a}),M.transitions.create("transform",{duration:.666*t,delay:a||.333*t})].join(","),e.style.opacity="0",e.style.transform=xo(.75),c&&c(e)})),C=S(d);return r.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),r.createElement(v,Object(h.a)({appear:!0,in:o,nodeRef:k?L:void 0,onEnter:E,onEntered:D,onEntering:Y,onExit:j,onExited:C,onExiting:O,addEndListener:function(e,t){var n=k?e:t;"auto"===y&&(b.current=setTimeout(n,w.current||0))},timeout:"auto"===y?null:y},g),(function(e,t){return r.cloneElement(n,Object(h.a)({style:Object(h.a)(Object(h.a)(Object(h.a)({opacity:0,transform:xo(.75),visibility:"exited"!==e||o?void 0:"hidden"},So[e]),p),n.props.style),ref:x},t))}))}));Yo.muiSupportAuto=!0;var Eo=Yo,Do=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"div":i,s=e.square,l=void 0!==s&&s,u=e.elevation,c=void 0===u?1:u,d=e.variant,f=void 0===d?"elevation":d,p=Object(Hr.a)(e,["classes","className","component","square","elevation","variant"]);return r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a,"outlined"===f?n.outlined:n["elevation".concat(c)],!l&&n.rounded),ref:t},p))})),Oo=Object(Jr.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(h.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Do);function jo(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Co(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Po(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Ao(e){return"function"==typeof e?e():e}var Ho=r.forwardRef((function(e,t){var n=e.action,a=e.anchorEl,o=e.anchorOrigin,s=void 0===o?{vertical:"top",horizontal:"left"}:o,l=e.anchorPosition,u=e.anchorReference,c=void 0===u?"anchorEl":u,d=e.children,f=e.classes,p=e.className,m=e.container,y=e.elevation,_=void 0===y?8:y,v=e.getContentAnchorEl,g=e.marginThreshold,b=void 0===g?16:g,w=e.onEnter,M=e.onEntered,k=e.onEntering,L=e.onExit,T=e.onExited,x=e.onExiting,S=e.open,Y=e.PaperProps,E=void 0===Y?{}:Y,D=e.transformOrigin,O=void 0===D?{vertical:"top",horizontal:"left"}:D,j=e.TransitionComponent,C=void 0===j?Eo:j,P=e.transitionDuration,A=void 0===P?"auto":P,H=e.TransitionProps,R=void 0===H?{}:H,N=Object(Hr.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),I=r.useRef(),W=r.useCallback((function(e){if("anchorPosition"===c)return l;var t=Ao(a),n=(t&&1===t.nodeType?t:Wr(I.current).body).getBoundingClientRect(),r=0===e?s.vertical:"center";return{top:n.top+jo(n,r),left:n.left+Co(n,s.horizontal)}}),[a,s.horizontal,s.vertical,l,c]),F=r.useCallback((function(e){var t=0;if(v&&"anchorEl"===c){var n=v(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[s.vertical,c,v]),U=r.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:jo(e,O.vertical)+t,horizontal:Co(e,O.horizontal)}}),[O.horizontal,O.vertical]),z=r.useCallback((function(e){var t=F(e),n={width:e.offsetWidth,height:e.offsetHeight},r=U(n,t);if("none"===c)return{top:null,left:null,transformOrigin:Po(r)};var i=W(t),o=i.top-r.vertical,s=i.left-r.horizontal,l=o+n.height,u=s+n.width,d=Fr(Ao(a)),f=d.innerHeight-b,p=d.innerWidth-b;if(of){var h=l-f;o-=h,r.vertical+=h}if(sp){var _=u-p;s-=_,r.horizontal+=_}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Po(r)}}),[a,c,W,F,U,b]),B=r.useCallback((function(){var e=I.current;if(e){var t=z(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[z]),V=r.useCallback((function(e){I.current=i.findDOMNode(e)}),[]);r.useEffect((function(){S&&B()})),r.useImperativeHandle(n,(function(){return S?{updatePosition:function(){B()}}:null}),[S,B]),r.useEffect((function(){if(S){var e=Ir((function(){B()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[S,B]);var q=A;"auto"!==A||C.muiSupportAuto||(q=void 0);var J=m||(a?Wr(Ao(a)).body:void 0);return r.createElement(go,Object(h.a)({container:J,open:S,ref:t,BackdropProps:{invisible:!0},className:Object(Nr.a)(f.root,p)},N),r.createElement(C,Object(h.a)({appear:!0,in:S,onEnter:w,onEntered:M,onExit:L,onExited:T,onExiting:x,timeout:q},R,{onEntering:eo((function(e,t){k&&k(e,t),B()}),R.onEntering)}),r.createElement(Oo,Object(h.a)({elevation:_,ref:V},E,{className:Object(Nr.a)(f.paper,E.className)}),d)))})),Ro=Object(Jr.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Ho);var No=r.createContext({}),Io=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.component,s=void 0===o?"ul":o,l=e.dense,u=void 0!==l&&l,c=e.disablePadding,d=void 0!==c&&c,f=e.subheader,p=Object(Hr.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),m=r.useMemo((function(){return{dense:u}}),[u]);return r.createElement(No.Provider,{value:m},r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,i,u&&a.dense,!d&&a.padding,f&&a.subheader),ref:t},p),f,n))})),Wo=Object(Jr.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Io);function Fo(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Uo(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function zo(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Bo(e,t,n,r,a,i){for(var o=!1,s=a(e,t,!!t&&n);s;){if(s===e.firstChild){if(o)return;o=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&zo(s,i)&&!l)return void s.focus();s=a(e,s,n)}}var Vo="undefined"==typeof window?r.useEffect:r.useLayoutEffect,qo=r.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,o=void 0!==a&&a,s=e.autoFocusItem,l=void 0!==s&&s,u=e.children,c=e.className,d=e.disabledItemsFocusable,f=void 0!==d&&d,p=e.disableListWrap,m=void 0!==p&&p,y=e.onKeyDown,_=e.variant,v=void 0===_?"selectedMenu":_,g=Object(Hr.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),b=r.useRef(null),w=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Vo((function(){o&&b.current.focus()}),[o]),r.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!b.current.style.width;if(e.clientHeight0&&(o-a.lastTime>500?(a.keys=[],a.repeating=!0,a.previousKeyMatched=!0):a.repeating&&i!==a.keys[0]&&(a.repeating=!1)),a.lastTime=o,a.keys.push(i);var s=r&&!a.repeating&&zo(r,a);a.previousKeyMatched&&(s||Bo(t,r,!1,f,Fo,a))?e.preventDefault():a.previousKeyMatched=!1}y&&y(e)},tabIndex:o?0:-1},g),L)})),Jo={vertical:"top",horizontal:"right"},$o={vertical:"top",horizontal:"left"},Go=r.forwardRef((function(e,t){var n=e.autoFocus,a=void 0===n||n,o=e.children,s=e.classes,l=e.disableAutoFocusItem,u=void 0!==l&&l,c=e.MenuListProps,d=void 0===c?{}:c,f=e.onClose,p=e.onEntering,m=e.open,y=e.PaperProps,_=void 0===y?{}:y,v=e.PopoverClasses,g=e.transitionDuration,b=void 0===g?"auto":g,w=e.variant,M=void 0===w?"selectedMenu":w,k=Object(Hr.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),L=Ha(),T=a&&!u&&m,x=r.useRef(null),S=r.useRef(null),Y=-1;r.Children.map(o,(function(e,t){r.isValidElement(e)&&(e.props.disabled||("menu"!==M&&e.props.selected||-1===Y)&&(Y=t))}));var E=r.Children.map(o,(function(e,t){return t===Y?r.cloneElement(e,{ref:function(t){S.current=i.findDOMNode(t),ta(e.ref,t)}}):e}));return r.createElement(Ro,Object(h.a)({getContentAnchorEl:function(){return S.current},classes:v,onClose:f,onEntering:function(e,t){x.current&&x.current.adjustStyleForScrollbar(e,L),p&&p(e,t)},anchorOrigin:"rtl"===L.direction?Jo:$o,transformOrigin:"rtl"===L.direction?Jo:$o,PaperProps:Object(h.a)(Object(h.a)({},_),{},{classes:Object(h.a)(Object(h.a)({},_.classes),{},{root:s.paper})}),open:m,ref:t,transitionDuration:b},k),r.createElement(qo,Object(h.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),f&&f(e,"tabKeyDown"))},actions:x,autoFocus:a&&(-1===Y||u),autoFocusItem:T,variant:M},d,{className:Object(Nr.a)(s.list,d.className)}),E))})),Qo=Object(Jr.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(Go);function Ko(e){var t=e.controlled,n=e.default,a=(e.name,e.state,r.useRef(void 0!==t).current),i=r.useState(n),o=i[0],s=i[1];return[a?t:o,r.useCallback((function(e){a||s(e)}),[])]}function Zo(e,t){return"object"===Object(Xi.a)(t)&&null!==t?e===t:String(e)===String(t)}var Xo=r.forwardRef((function(e,t){var n=e["aria-label"],a=e.autoFocus,i=e.autoWidth,o=e.children,s=e.classes,l=e.className,u=e.defaultValue,c=e.disabled,d=e.displayEmpty,f=e.IconComponent,p=e.inputRef,m=e.labelId,y=e.MenuProps,_=void 0===y?{}:y,v=e.multiple,g=e.name,b=e.onBlur,w=e.onChange,M=e.onClose,k=e.onFocus,L=e.onOpen,T=e.open,x=e.readOnly,S=e.renderValue,Y=(e.required,e.SelectDisplayProps),E=void 0===Y?{}:Y,D=e.tabIndex,O=(e.type,e.value),j=e.variant,C=void 0===j?"standard":j,P=Object(Hr.a)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),A=Ko({controlled:O,default:u,name:"Select"}),H=Object(Zi.a)(A,2),R=H[0],N=H[1],I=r.useRef(null),W=r.useState(null),F=W[0],U=W[1],z=r.useRef(null!=T).current,B=r.useState(),V=B[0],q=B[1],J=r.useState(!1),$=J[0],G=J[1],Q=na(t,p);r.useImperativeHandle(Q,(function(){return{focus:function(){F.focus()},node:I.current,value:R}}),[F,R]),r.useEffect((function(){a&&F&&F.focus()}),[a,F]),r.useEffect((function(){if(F){var e=Wr(F).getElementById(m);if(e){var t=function(){getSelection().isCollapsed&&F.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[m,F]);var K,Z,X=function(e,t){e?L&&L(t):M&&M(t),z||(q(i?null:F.clientWidth),G(e))},ee=function(e){return function(t){var n;if(v||X(!1,t),v){n=Array.isArray(R)?R.slice():[];var r=R.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),R!==n&&(N(n),w&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),w(t,e)))}},te=null!==F&&(z?T:$);delete P["aria-invalid"];var ne=[],re=!1;(Ei({value:R})||d)&&(S?K=S(R):re=!0);var ae=r.Children.map(o,(function(e){if(!r.isValidElement(e))return null;var t;if(v){if(!Array.isArray(R))throw new Error("Material-UI: The `value` prop must be an array when using the `Select` component with `multiple`.");(t=R.some((function(t){return Zo(t,e.props.value)})))&&re&&ne.push(e.props.children)}else(t=Zo(R,e.props.value))&&re&&(Z=e.props.children);return t&&!0,r.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ee(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));re&&(K=v?ne.join(", "):Z);var ie,oe=V;!i&&z&&F&&(oe=F.clientWidth),ie=void 0!==D?D:c?null:0;var se=E.id||(g?"mui-component-select-".concat(g):void 0);return r.createElement(r.Fragment,null,r.createElement("div",Object(h.a)({className:Object(Nr.a)(s.root,s.select,s.selectMenu,s[C],l,c&&s.disabled),ref:U,tabIndex:ie,role:"button","aria-disabled":c?"true":void 0,"aria-expanded":te?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[m,se].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!x){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),X(!0,e))}},onMouseDown:c||x?null:function(e){0===e.button&&(e.preventDefault(),F.focus(),X(!0,e))},onBlur:function(e){!te&&b&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:g}}),b(e))},onFocus:k},E,{id:se}),function(e){return null==e||"string"==typeof e&&!e.trim()}(K)?r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):K),r.createElement("input",Object(h.a)({value:Array.isArray(R)?R.join(","):R,name:g,ref:I,type:"hidden",autoFocus:a},P)),r.createElement(f,{className:Object(Nr.a)(s.icon,s["icon".concat(Object($r.a)(C))],te&&s.iconOpen,c&&s.disabled)}),r.createElement(Qo,Object(h.a)({id:"menu-".concat(g||""),anchorEl:F,open:te,onClose:function(e){X(!1,e)}},_,{MenuListProps:Object(h.a)({"aria-labelledby":m,role:"listbox",disableListWrap:!0},_.MenuListProps),PaperProps:Object(h.a)(Object(h.a)({},_.PaperProps),{},{style:Object(h.a)({minWidth:oe},null!=_.PaperProps?_.PaperProps.style:null)})}),ae))})),es=Zr(r.createElement("path",{d:"M7 10l5 5 5-5z"})),ts=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.disabled,o=e.IconComponent,s=e.inputRef,l=e.variant,u=void 0===l?"standard":l,c=Object(Hr.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return r.createElement(r.Fragment,null,r.createElement("select",Object(h.a)({className:Object(Nr.a)(n.root,n.select,n[u],a,i&&n.disabled),disabled:i,ref:s||t},c)),e.multiple?null:r.createElement(o,{className:Object(Nr.a)(n.icon,n["icon".concat(Object($r.a)(u))],i&&n.disabled)}))})),ns=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},rs=r.createElement(Pi,null),as=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.IconComponent,o=void 0===i?es:i,s=e.input,l=void 0===s?rs:s,u=e.inputProps,c=(e.variant,Object(Hr.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),d=wi({props:e,muiFormControl:Fi(),states:["variant"]});return r.cloneElement(l,Object(h.a)({inputComponent:ts,inputProps:Object(h.a)(Object(h.a)({children:n,classes:a,IconComponent:o,variant:d.variant,type:void 0},u),l?l.props.inputProps:{}),ref:t},c))}));as.muiName="Select";Object(Jr.a)(ns,{name:"MuiNativeSelect"})(as);var is=ns,os=r.createElement(Pi,null),ss=r.createElement(Hi,null),ls=r.forwardRef((function e(t,n){var a=t.autoWidth,i=void 0!==a&&a,o=t.children,s=t.classes,l=t.displayEmpty,u=void 0!==l&&l,c=t.IconComponent,d=void 0===c?es:c,f=t.id,p=t.input,m=t.inputProps,y=t.label,_=t.labelId,v=t.labelWidth,g=void 0===v?0:v,b=t.MenuProps,w=t.multiple,M=void 0!==w&&w,k=t.native,L=void 0!==k&&k,T=t.onClose,x=t.onOpen,S=t.open,Y=t.renderValue,E=t.SelectDisplayProps,D=t.variant,O=void 0===D?"standard":D,j=Object(Hr.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),C=L?ts:Xo,P=wi({props:t,muiFormControl:Fi(),states:["variant"]}).variant||O,A=p||{standard:os,outlined:r.createElement(Wi,{label:y,labelWidth:g}),filled:ss}[P];return r.cloneElement(A,Object(h.a)({inputComponent:C,inputProps:Object(h.a)(Object(h.a)(Object(h.a)({children:o,IconComponent:d,variant:P,type:void 0,multiple:M},L?{id:f}:{autoWidth:i,displayEmpty:u,labelId:_,MenuProps:b,onClose:T,onOpen:x,open:S,renderValue:Y,SelectDisplayProps:Object(h.a)({id:f},E)}),m),{},{classes:m?Object(Ki.a)({baseClasses:s,newClasses:m.classes,Component:e}):s},p?p.props.inputProps:{}),ref:n},j))}));ls.muiName="Select";var us=Object(Jr.a)(is,{name:"MuiSelect"})(ls),cs={standard:Pi,filled:Hi,outlined:Wi},ds=r.forwardRef((function(e,t){var n=e.autoComplete,a=e.autoFocus,i=void 0!==a&&a,o=e.children,s=e.classes,l=e.className,u=e.color,c=void 0===u?"primary":u,d=e.defaultValue,f=e.disabled,p=void 0!==f&&f,m=e.error,y=void 0!==m&&m,_=e.FormHelperTextProps,v=e.fullWidth,g=void 0!==v&&v,b=e.helperText,w=e.hiddenLabel,M=e.id,k=e.InputLabelProps,L=e.inputProps,T=e.InputProps,x=e.inputRef,S=e.label,Y=e.multiline,E=void 0!==Y&&Y,D=e.name,O=e.onBlur,j=e.onChange,C=e.onFocus,P=e.placeholder,A=e.required,H=void 0!==A&&A,R=e.rows,N=e.rowsMax,I=e.select,W=void 0!==I&&I,F=e.SelectProps,U=e.type,z=e.value,B=e.variant,V=void 0===B?"standard":B,q=Object(Hr.a)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]);var J={};if("outlined"===V&&(k&&void 0!==k.shrink&&(J.notched=k.shrink),S)){var $,G=null!==($=null==k?void 0:k.required)&&void 0!==$?$:H;J.label=r.createElement(r.Fragment,null,S,G&&" *")}W&&(F&&F.native||(J.id=void 0),J["aria-describedby"]=void 0);var Q=b&&M?"".concat(M,"-helper-text"):void 0,K=S&&M?"".concat(M,"-label"):void 0,Z=cs[V],X=r.createElement(Z,Object(h.a)({"aria-describedby":Q,autoComplete:n,autoFocus:i,defaultValue:d,fullWidth:g,multiline:E,name:D,rows:R,rowsMax:N,type:U,value:z,id:M,inputRef:x,onBlur:O,onChange:j,onFocus:C,placeholder:P,inputProps:L},J,T));return r.createElement($i,Object(h.a)({className:Object(Nr.a)(s.root,l),disabled:p,error:y,fullWidth:g,hiddenLabel:w,ref:t,required:H,color:c,variant:V},q),S&&r.createElement(Vi,Object(h.a)({htmlFor:M,id:K},k),S),W?r.createElement(us,Object(h.a)({"aria-describedby":Q,id:M,labelId:K,value:z,input:X},F),o):X,b&&r.createElement(Qi,Object(h.a)({id:Q},_),b))})),fs=Object(Jr.a)({root:{}},{name:"MuiTextField"})(ds);function ps(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var ms=function(e){lr()(n,e);var t=ps(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).chip=a.a.createRef(),r}return or()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.chip.current.querySelector("input");t&&(t.focus(),t.onkeydown=function(t){e.keyDown(t)})}},{key:"componentDidUpdate",value:function(){this.props.focused&&this.chip.current.querySelector("input").focus()}},{key:"keyDown",value:function(e){switch(e.which||e.keyCode){case 13:if(0===this.props.pos&&""===this.props.value)break;this.props.createSearch(this.props.query);break;case 37:0===e.target.selectionStart&&this.props.focusSearchTerm(this.props.pos-1,!1);break;case 39:e.target.selectionStart===e.target.value.length&&this.props.focusSearchTerm(this.props.pos+1,!0)}e.stopPropagation()}},{key:"update",value:function(e){this.props.onInput({type:this.props.type,value:e.target.value,pos:this.props.pos})}},{key:"click",value:function(e){this.props.onClick&&this.props.onClick(e.target)}},{key:"guessType",value:function(){return this.props.value.match(/ /g)?"phrase":this.props.value.startsWith("#")?"hashtag":this.props.value.startsWith("@")?"user":"keyword"}},{key:"cssClass",value:function(e){switch(e){case"keyword":return bi.a.Keyword;case"hashtag":return bi.a.Hashtag;case"phrase":return bi.a.Phrase;case"user":return bi.a.User;default:return""}}},{key:"render",value:function(){var e=this,t=this.guessType(),n=this.cssClass(t),r=this.props.className?this.props.className:"",i=a.a.createElement("span",{className:"".concat(bi.a.SearchTerm," ").concat(r),ref:this.chip,onClick:function(t){return e.click(t)},"data-type":t},this.props.value);return this.props.onInput&&(i=a.a.createElement(fs,{ref:this.chip,value:this.props.value,onChange:function(t){e.update(t)}})),a.a.createElement("span",{className:"".concat(n," ").concat(bi.a.SearchTerm," ").concat(r)},i)}}]),n}(r.Component);ms.propTypes={className:l.a.string,pos:l.a.number,focused:l.a.object,type:l.a.string,value:l.a.string,onInput:l.a.func,onClick:l.a.func,createSearch:l.a.func,query:l.a.array,focusSearchTerm:l.a.func};var hs=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.raised,o=void 0!==i&&i,s=Object(Hr.a)(e,["classes","className","raised"]);return r.createElement(Oo,Object(h.a)({className:Object(Nr.a)(n.root,a),elevation:o?8:1,ref:t},s))})),ys=Object(Jr.a)({root:{overflow:"hidden"}},{name:"MuiCard"})(hs),_s=r.forwardRef((function(e,t){var n=e.disableSpacing,a=void 0!==n&&n,i=e.classes,o=e.className,s=Object(Hr.a)(e,["disableSpacing","classes","className"]);return r.createElement("div",Object(h.a)({className:Object(Nr.a)(i.root,o,!a&&i.spacing),ref:t},s))})),vs=Object(Jr.a)({root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiCardActions"})(_s),gs=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"div":i,s=Object(Hr.a)(e,["classes","className","component"]);return r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a),ref:t},s))})),bs=Object(Jr.a)({root:{padding:16,"&:last-child":{paddingBottom:24}}},{name:"MuiCardContent"})(gs),ws=n(14),Ms=r.forwardRef((function(e,t){var n=e.edge,a=void 0!==n&&n,i=e.children,o=e.classes,s=e.className,l=e.color,u=void 0===l?"default":l,c=e.disabled,d=void 0!==c&&c,f=e.disableFocusRipple,p=void 0!==f&&f,m=e.size,y=void 0===m?"medium":m,_=Object(Hr.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return r.createElement(Ea,Object(h.a)({className:Object(Nr.a)(o.root,s,"default"!==u&&o["color".concat(Object($r.a)(u))],d&&o.disabled,"small"===y&&o["size".concat(Object($r.a)(y))],{start:o.edgeStart,end:o.edgeEnd}[a]),centerRipple:!0,focusRipple:!p,disabled:d,ref:t},_),r.createElement("span",{className:o.label},i))})),ks=Object(Jr.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(ws.c)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(Ms),Ls=n(12),Ts=n.n(Ls),xs=n(53),Ss=n.n(xs);function Ys(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Es=function(e){lr()(n,e);var t=Ys(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"createSearch",value:function(e){this.props.createSearch([{type:e.parentNode.getAttribute("data-type"),value:e.innerText}])}},{key:"render",value:function(){var e=this,t=null,n=null;return this.props.username?(n=a.a.createElement(ks,{style:{marginLeft:"auto"},onClick:function(){e.props.deleteTrend(e.props.id)}},a.a.createElement("ion-icon",{name:"remove"})),t=this.props.trends.map((function(t,n){return a.a.createElement("div",{key:"t-".concat(n),className:Ss.a.Trend},a.a.createElement("div",{className:Ss.a.TrendTerm},a.a.createElement(ms,{className:bi.a.InCard,onClick:function(t){e.createSearch(t)},value:t.name})),a.a.createElement("div",{className:Ss.a.TrendCount},a.a.createElement("bdo",{title:t.name+" tweets in the last 24 hours"},parseInt(t.count,10).toLocaleString())))}))):t=this.props.trends.map((function(e,t){return a.a.createElement("div",{key:"t-".concat(t),className:Ss.a.Trend},a.a.createElement("div",{className:Ss.a.TrendTerm},e.name),a.a.createElement("div",{className:bi.a.InCard},a.a.createElement("bdo",null,parseInt(e.count,10).toLocaleString())))})),a.a.createElement(ys,{className:Ts.a.Card},a.a.createElement(bs,{className:Ts.a.Scroll},a.a.createElement(vi,{duration:2e3,enterAnimation:"elevator",leaveAnimation:"fade"},t)),a.a.createElement(vs,null,a.a.createElement("h2",{className:Ts.a.PlaceHeader},this.props.name," "),n))}}]),n}(r.Component);Es.propTypes={trends:l.a.array,world:l.a.object,name:l.a.string,id:l.a.number,username:l.a.string,deleteTrend:l.a.func,createSearch:l.a.func};var Ds=n(35),Os=n.n(Ds),js=n(246),Cs=n.n(js),Ps=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.color,s=void 0===o?"default":o,l=e.component,u=void 0===l?"button":l,c=e.disabled,d=void 0!==c&&c,f=e.disableFocusRipple,p=void 0!==f&&f,m=e.focusVisibleClassName,y=e.size,_=void 0===y?"large":y,v=e.variant,g=void 0===v?"round":v,b=Object(Hr.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return r.createElement(Ea,Object(h.a)({className:Object(Nr.a)(a.root,i,"round"!==g&&a.extended,"large"!==_&&a["size".concat(Object($r.a)(_))],d&&a.disabled,{primary:a.primary,secondary:a.secondary,inherit:a.colorInherit}[s]),component:u,disabled:d,focusRipple:!p,focusVisibleClassName:Object(Nr.a)(a.focusVisible,m),ref:t},b),r.createElement("span",{className:a.label},n))})),As=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.button),{},{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(Ps),Hs=n(247),Rs=n.n(Hs);function Ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Is=function(e){lr()(n,e);var t=Ns(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).checkPlace=r.checkPlace.bind(Os()(r)),r.addPlaceInputRef=a.a.createRef(),r}return or()(n,[{key:"matchInputToTerm",value:function(e,t){return-1!==e.toLowerCase().indexOf(t.toLowerCase())||-1!==e.toLowerCase().indexOf(t.toLowerCase())}},{key:"sortPlaces",value:function(e,t,n){var r=e.toLowerCase(),a=t.toLowerCase(),i=n.toLowerCase(),o=r.indexOf(i),s=a.indexOf(i);return o!==s?o-s:r=this.props.limit&&(t.disabled=!0,n=!0),a.a.createElement("div",{className:Rs.a.AddPlace},a.a.createElement(Cs.a,{getItemValue:function(e){return e},sortItems:this.sortPlaces,items:Object.keys(this.props.world),shouldItemRender:this.matchInputToTerm,menuStyle:{boxShadow:"rgba(0, 0, 0, 0.1) 0px 2px 12px",background:"rgba(255, 255, 255, 0.9) none repeat scroll 0% 0%",padding:"2px",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"140px"},renderItem:function(e,t){return a.a.createElement("div",{style:{background:t?"lightgray":"white"}},e)},value:this.props.newPlace,onChange:function(t,n){return e.props.updateNewTrend(n)},onSelect:function(t){return e.props.updateNewTrend(t)},inputProps:t}),a.a.createElement(As,{size:"medium",tabIndex:"0",color:"primary",onClick:this.checkPlace,disabled:n},a.a.createElement("ion-icon",{name:"add"})))}}]),n}(r.Component);Is.propTypes={limit:l.a.number,places:l.a.array,world:l.a.object,updateNewTrend:l.a.func,newPlace:l.a.string,placeLabelToId:l.a.func,deleteTrend:l.a.func,saveTrends:l.a.func};var Ws=n(72),Fs=n.n(Ws),Us=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.color,s=void 0===o?"default":o,l=e.component,u=void 0===l?"button":l,c=e.disabled,d=void 0!==c&&c,f=e.disableElevation,p=void 0!==f&&f,m=e.disableFocusRipple,y=void 0!==m&&m,_=e.endIcon,v=e.focusVisibleClassName,g=e.fullWidth,b=void 0!==g&&g,w=e.size,M=void 0===w?"medium":w,k=e.startIcon,L=e.type,T=void 0===L?"button":L,x=e.variant,S=void 0===x?"text":x,Y=Object(Hr.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),E=k&&r.createElement("span",{className:Object(Nr.a)(a.startIcon,a["iconSize".concat(Object($r.a)(M))])},k),D=_&&r.createElement("span",{className:Object(Nr.a)(a.endIcon,a["iconSize".concat(Object($r.a)(M))])},_);return r.createElement(Ea,Object(h.a)({className:Object(Nr.a)(a.root,a[S],i,"inherit"===s?a.colorInherit:"default"!==s&&a["".concat(S).concat(Object($r.a)(s))],"medium"!==M&&[a["".concat(S,"Size").concat(Object($r.a)(M))],a["size".concat(Object($r.a)(M))]],p&&a.disableElevation,d&&a.disabled,b&&a.fullWidth),component:u,disabled:d,focusRipple:!y,focusVisibleClassName:Object(Nr.a)(a.focusVisible,v),ref:t,type:T},Y),r.createElement("span",{className:a.label},E,n,D))})),zs=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.button),{},{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(ws.c)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(ws.c)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(ws.c)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(Us);function Bs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Vs=function(e){lr()(n,e);var t=Bs(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){this.props.getTrends();var e=setInterval(this.props.getTrends,3e3);this.setState((function(t){return Object.assign(t,{intervalId:e})})),this.setMediaQuery("(max-width: 780px)",Fs.a.Trends,Fs.a.Mobile)}},{key:"componentWillUnmount",value:function(){this.state.intervalId&&clearInterval(this.state.intervalId),this.setState({intervalId:null})}},{key:"render",value:function(){var e=this,t=null,n=null;return!!this.props.username?n=a.a.createElement(Is,{limit:6,places:this.props.trends,world:this.props.world,newPlace:this.props.newPlace,updateNewTrend:this.props.updateNewTrend,placeLabelToId:this.props.placeLabelToId,deleteTrend:this.props.deleteTrend,saveTrends:this.props.saveTrends}):t=a.a.createElement("div",{className:Fs.a.Intro},a.a.createElement("p",null,"Welcome to DocNow, a social media appraisal tool."),a.a.createElement(zs,{variant:"contained",color:"primary",onClick:function(){return window.location="/auth/twitter",!1}},a.a.createElement("ion-icon",{name:"logo-twitter"}),"   Login with Twitter")),a.a.createElement("div",null,a.a.createElement("div",{className:this.state.mediaStyle},t,a.a.createElement("div",{className:Ts.a.CardHolder},this.props.trends.map((function(t){return a.a.createElement(Es,{key:t.name,trends:t.trends,id:t.id,name:t.name,world:e.props.world,deleteTrend:e.props.deleteTrend,username:e.props.username,createSearch:e.props.createSearch})})),n)))}}]),n}(mr);Vs.propTypes={username:l.a.string,trends:l.a.array,getTrends:l.a.func,world:l.a.object,updateNewTrend:l.a.func,newPlace:l.a.string,placeLabelToId:l.a.func,deleteTrend:l.a.func,createSearch:l.a.func};var qs={getTrends:zt,updateNewTrend:Bt,saveTrends:Vt,deleteTrend:function(e){return function(t){t(function(e){return{type:"REMOVE_TREND",id:e}}(e)),t(Vt())}},createSearch:sn},Js=ne((function(e){return{username:e.user.twitterScreenName,trends:e.trends.places,world:e.trends.world,newPlace:e.trends.newPlace,placeIdToLabel:function(t){for(var n=0,r=Object.values(e.trends.world);nt?1:e>=t?0:NaN}var ql="http://www.w3.org/1999/xhtml",Jl={svg:"http://www.w3.org/2000/svg",xhtml:ql,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},$l=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Jl.hasOwnProperty(t)?{space:Jl[t],local:e}:e};function Gl(e){return function(){this.removeAttribute(e)}}function Ql(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kl(e,t){return function(){this.setAttribute(e,t)}}function Zl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xl(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function eu(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var tu=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function nu(e){return function(){this.style.removeProperty(e)}}function ru(e,t,n){return function(){this.style.setProperty(e,t,n)}}function au(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function iu(e,t){return e.style.getPropertyValue(t)||tu(e).getComputedStyle(e,null).getPropertyValue(t)}function ou(e){return function(){delete this[e]}}function su(e,t){return function(){this[e]=t}}function lu(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function uu(e){return e.trim().split(/^|\s+/)}function cu(e){return e.classList||new du(e)}function du(e){this._node=e,this._names=uu(e.getAttribute("class")||"")}function fu(e,t){for(var n=cu(e),r=-1,a=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function _u(){this.textContent=""}function vu(e){return function(){this.textContent=e}}function gu(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function bu(){this.innerHTML=""}function wu(e){return function(){this.innerHTML=e}}function Mu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function ku(){this.nextSibling&&this.parentNode.appendChild(this)}function Lu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tu(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ql&&t.documentElement.namespaceURI===ql?t.createElement(e):t.createElementNS(n,e)}}function xu(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var Su=function(e){var t=$l(e);return(t.local?xu:Tu)(t)};function Yu(){return null}function Eu(){var e=this.parentNode;e&&e.removeChild(this)}function Du(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ou(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}var ju={},Cu=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ju={mouseenter:"mouseover",mouseleave:"mouseout"}));function Pu(e,t,n){return e=Au(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function Au(e,t,n){return function(r){var a=Cu;Cu=r;try{e.call(this,this.__data__,t,n)}finally{Cu=a}}}function Hu(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Ru(e){return function(){var t=this.__on;if(t){for(var n,r=0,a=-1,i=t.length;r=w&&(w=b+1);!(g=_[w])&&++w=0;)(r=a[i])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Vl);for(var n=this._groups,r=n.length,a=new Array(r),i=0;i1?this.each((null==t?nu:"function"==typeof t?au:ru)(e,t,null==n?"":n)):iu(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ou:"function"==typeof t?lu:su)(e,t)):this.node()[e]},classed:function(e,t){var n=uu(e+"");if(arguments.length<2){for(var r=cu(this.node()),a=-1,i=n.length;++a=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function Qu(e,t){for(var n,r=0,a=e.length;r0)for(var n,r,a=new Array(n),i=0;i=0&&t._call.call(null,e),t=t._next;--tc}()}finally{tc=0,function(){var e,t,n=Zu,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Zu=t);Xu=e,hc(r)}(),ic=0}}function mc(){var e=sc.now(),t=e-ac;t>1e3&&(oc-=t,ac=e)}function hc(e){tc||(nc&&(nc=clearTimeout(nc)),e-ic>24?(e<1/0&&(nc=setTimeout(pc,e-sc.now()-oc)),rc&&(rc=clearInterval(rc))):(rc||(ac=sc.now(),rc=setInterval(mc,1e3)),tc=1,lc(pc)))}dc.prototype=fc.prototype={constructor:dc,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?uc():+n)+(null==t?0:+t),this._next||Xu===this||(Xu?Xu._next=this:Zu=this,Xu=this),this._call=e,this._time=n,hc()},stop:function(){this._call&&(this._call=null,this._time=1/0,hc())}};var yc=function(e,t,n){var r=new dc;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r},_c=ec("start","end","cancel","interrupt"),vc=[],gc=function(e,t,n,r,a,i){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,a=e.__transition;function i(l){var u,c,d,f;if(1!==n.state)return s();for(u in a)if((f=a[u]).name===n.name){if(3===f.state)return yc(i);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete a[u]):+u0)throw new Error("too late; already scheduled");return n}function wc(e,t){var n=Mc(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Mc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var kc,Lc,Tc,xc,Sc=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}},Yc=180/Math.PI,Ec={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Dc=function(e,t,n,r,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:Sc(e,t)})):t&&n.push(a(n)+"rotate("+t+r)}(i.rotate,o.rotate,s,l),function(e,t,n,i){e!==t?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:Sc(e,t)}):t&&n.push(a(n)+"skewX("+t+r)}(i.skewX,o.skewX,s,l),function(e,t,n,r,i,o){if(e!==n||t!==r){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:Sc(e,n)},{i:s-2,x:Sc(t,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(e){for(var t,n=-1,r=l.length;++n>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?td(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?td(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Bc.exec(e))?new ad(t[1],t[2],t[3],1):(t=Vc.exec(e))?new ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=qc.exec(e))?td(t[1],t[2],t[3],t[4]):(t=Jc.exec(e))?td(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=$c.exec(e))?ld(t[1],t[2]/100,t[3]/100,1):(t=Gc.exec(e))?ld(t[1],t[2]/100,t[3]/100,t[4]):Qc.hasOwnProperty(e)?ed(Qc[e]):"transparent"===e?new ad(NaN,NaN,NaN,0):null}function ed(e){return new ad(e>>16&255,e>>8&255,255&e,1)}function td(e,t,n,r){return r<=0&&(e=t=n=NaN),new ad(e,t,n,r)}function nd(e){return e instanceof Ic||(e=Xc(e)),e?new ad((e=e.rgb()).r,e.g,e.b,e.opacity):new ad}function rd(e,t,n,r){return 1===arguments.length?nd(e):new ad(e,t,n,null==r?1:r)}function ad(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function id(){return"#"+sd(this.r)+sd(this.g)+sd(this.b)}function od(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function sd(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ld(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new cd(e,t,n,r)}function ud(e){if(e instanceof cd)return new cd(e.h,e.s,e.l,e.opacity);if(e instanceof Ic||(e=Xc(e)),!e)return new cd;if(e instanceof cd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=t===i?(n-r)/s+6*(n0&&l<1?0:o,new cd(o,s,l,e.opacity)}function cd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function dd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function fd(e,t,n,r,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*n+(1+3*e+3*i-3*o)*r+o*a)/6}Rc(Ic,Xc,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Kc,formatHex:Kc,formatHsl:function(){return ud(this).formatHsl()},formatRgb:Zc,toString:Zc}),Rc(ad,rd,Nc(Ic,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ad(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ad(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:id,formatHex:id,formatRgb:od,toString:od})),Rc(cd,(function(e,t,n,r){return 1===arguments.length?ud(e):new cd(e,t,n,null==r?1:r)}),Nc(Ic,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new cd(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new cd(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ad(dd(e>=240?e-240:e+120,a,r),dd(e,a,r),dd(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var pd=function(e){return function(){return e}};function md(e,t){return function(n){return e+n*t}}function hd(e){return 1==(e=+e)?yd:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):pd(isNaN(t)?n:t)}}function yd(e,t){var n=t-e;return n?md(e,n):pd(isNaN(e)?t:e)}var _d=function e(t){var n=hd(t);function r(e,t){var r=n((e=rd(e)).r,(t=rd(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),o=yd(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=i(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function vd(e){return function(t){var n,r,a=t.length,i=new Array(a),o=new Array(a),s=new Array(a);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],o=r>0?e[r-1]:2*a-i,s=ri&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Sc(n,r)})),i=bd.lastIndex;return i=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?bc:wc;return function(){var o=i(this,e),s=o.on;s!==r&&(a=(r=s).copy()).on(t,n),o.on=a}}var Id=Vu.prototype.constructor;function Wd(e){return function(){this.style.removeProperty(e)}}function Fd(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ud(e,t,n){var r,a;function i(){var i=t.apply(this,arguments);return i!==a&&(r=(a=i)&&Fd(e,i,n)),r}return i._value=t,i}function zd(e){return function(t){this.textContent=e.call(this,t)}}function Bd(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&zd(r)),t}return r._value=e,r}var Vd=0;function qd(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Jd(){return++Vd}var $d=Vu.prototype;qd.prototype=function(e){return Vu().transition(e)}.prototype={constructor:qd,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Rl(e));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[a]):o=!1;o&&delete e.__transition}}(this,e)}))},Vu.prototype.transition=function(e){var t,n;e instanceof qd?(t=e._id,e=e._name):(t=Jd(),(n=Gd).time=uc(),e=null==e?null:e+"");for(var r=this._groups,a=r.length,i=0;it?1:e>=t?0:NaN},Zd=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Kd(t(e),n)}),{left:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)>0?a=i:r=i+1}return r}}};var Xd=Zd(Kd),ef=Xd.right,tf=(Xd.left,ef);var nf=Array.prototype,rf=(nf.slice,nf.map,Math.sqrt(50)),af=Math.sqrt(10),of=Math.sqrt(2),sf=function(e,t,n){var r,a,i,o,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),i=new Array(a=Math.ceil(t-e+1));++s=0?(i>=rf?10:i>=af?5:i>=of?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=rf?10:i>=af?5:i>=of?2:1)}function uf(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=rf?a*=10:i>=af?a*=5:i>=of&&(a*=2),tr&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function jf(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a2?Cf:jf,a=i=null,d}function d(t){return isNaN(t=+t)?n:(a||(a=r(o.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=r(s,o.map(e),Sc)))(n)))},d.domain=function(e){return arguments.length?(o=vf.call(e,Sf),u===Ef||(u=Of(o)),c()):o.slice()},d.range=function(e){return arguments.length?(s=gf.call(e),c()):s.slice()},d.rangeRound=function(e){return s=gf.call(e),l=xf,c()},d.clamp=function(e){return arguments.length?(u=e?Of(o):Ef,d):u!==Ef},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}var Hf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rf(e){if(!(t=Hf.exec(e)))throw new Error("invalid format: "+e);var t;return new Nf({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Nf(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}Rf.prototype=Nf.prototype,Nf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var If,Wf,Ff,Uf,zf=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]},Bf=function(e){return(e=zf(Math.abs(e)))?e[1]:NaN},Vf=function(e,t){var n=zf(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")},qf={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Vf(100*e,t)},r:Vf,s:function(e,t){var n=zf(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(If=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+zf(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},Jf=function(e){return e},$f=Array.prototype.map,Gf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Wf=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Jf:(t=$f.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],o=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(a-=s,a+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Jf:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}($f.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=Rf(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,y=e.precision,_=e.trim,v=e.type;"n"===v?(h=!0,v="g"):qf[v]||(void 0===y&&(y=12),_=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var g="$"===f?a:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?i:/[%p]/.test(v)?l:"",w=qf[v],M=/[defgprs%]/.test(v);function k(e){var a,i,l,f=g,k=b;if("c"===v)k=w(e)+k,e="";else{var L=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:w(Math.abs(e),y),_&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),L&&0==+e&&"+"!==d&&(L=!1),f=(L?"("===d?d:u:"-"===d||"("===d?"":d)+f,k=("s"===v?Gf[8+If/3]:"")+k+(L&&"("===d?")":""),M)for(a=-1,i=e.length;++a(l=e.charCodeAt(a))||l>57){k=(46===l?o+e.slice(a+1):e.slice(a))+k,e=e.slice(0,a);break}}h&&!p&&(e=r(e,1/0));var T=f.length+e.length+k.length,x=T>1)+f+e+k+x.slice(T);break;default:e=x+f+e+k}return s(e)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=Rf(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Bf(t)/3))),a=Math.pow(10,-r),i=Gf[8+r/3];return function(e){return n(a*e)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ff=Wf.format,Uf=Wf.formatPrefix;var Qf=function(e,t,n,r){var a,i=uf(e,t,n);switch((r=Rf(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Bf(t)/3)))-Bf(Math.abs(e)))}(i,o))||(r.precision=a),Uf(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bf(t)-Bf(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Bf(Math.abs(e)))}(i))||(r.precision=a-2*("%"===r.type))}return Ff(r)};function Kf(e){var t=e.domain;return e.ticks=function(e){var n=t();return sf(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Qf(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a=t(),i=0,o=a.length-1,s=a[i],l=a[o];return l0?r=lf(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=lf(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(a[i]=Math.floor(s/r)*r,a[o]=Math.ceil(l/r)*r,t(a)):r<0&&(a[i]=Math.ceil(s*r)/r,a[o]=Math.floor(l*r)/r,t(a)),e},e}function Zf(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Xf(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ep(e){return e<0?-e*e:e*e}function tp(e){var t=e(Ef,Ef),n=1;function r(){return 1===n?e(Ef,Ef):.5===n?e(Xf,ep):e(Zf(n),Zf(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Kf(t)}function np(){var e=tp(Af());return e.copy=function(){return Pf(e,np()).exponent(e.exponent())},cf.apply(e,arguments),e}var rp=new Date,ap=new Date;function ip(e,t,n,r){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=function(t){return e(t=new Date(+t)),t},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t0))return s;do{s.push(o=new Date(+n)),t(n,i),e(n)}while(o=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(a.count=function(t,r){return rp.setTime(+t),ap.setTime(+r),e(rp),e(ap),Math.floor(n(rp,ap))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?function(t){return r(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var op=ip((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));op.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ip((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var sp=op,lp=(op.range,ip((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})));lp.range;function up(e){return ip((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var cp=up(0),dp=up(1),fp=up(2),pp=up(3),mp=up(4),hp=up(5),yp=up(6),_p=(cp.range,dp.range,fp.range,pp.range,mp.range,hp.range,yp.range,ip((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}))),vp=_p,gp=(_p.range,ip((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}))),bp=(gp.range,ip((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()}))),wp=(bp.range,ip((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}))),Mp=(wp.range,ip((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e})));Mp.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ip((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Mp:null};Mp.range;function kp(e){return ip((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Lp=kp(0),Tp=kp(1),xp=kp(2),Sp=kp(3),Yp=kp(4),Ep=kp(5),Dp=kp(6),Op=(Lp.range,Tp.range,xp.range,Sp.range,Yp.range,Ep.range,Dp.range,ip((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}))),jp=Op,Cp=(Op.range,ip((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));Cp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ip((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Pp=Cp;Cp.range;function Ap(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Hp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Rp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Np,Ip={"-":"",_:" ",0:"0"},Wp=/^\s*\d+/,Fp=/^%/,Up=/[\\^$*+?|[\]().{}]/g;function zp(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i68?1900:2e3),n+r[0].length):-1}function em(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tm(e,t,n){var r=Wp.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function nm(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rm(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function am(e,t,n){var r=Wp.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function im(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function om(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sm(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function lm(e,t,n){var r=Wp.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function um(e,t,n){var r=Wp.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cm(e,t,n){var r=Fp.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dm(e,t,n){var r=Wp.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fm(e,t,n){var r=Wp.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pm(e,t){return zp(e.getDate(),t,2)}function mm(e,t){return zp(e.getHours(),t,2)}function hm(e,t){return zp(e.getHours()%12||12,t,2)}function ym(e,t){return zp(1+vp.count(sp(e),e),t,3)}function _m(e,t){return zp(e.getMilliseconds(),t,3)}function vm(e,t){return _m(e,t)+"000"}function gm(e,t){return zp(e.getMonth()+1,t,2)}function bm(e,t){return zp(e.getMinutes(),t,2)}function wm(e,t){return zp(e.getSeconds(),t,2)}function Mm(e){var t=e.getDay();return 0===t?7:t}function km(e,t){return zp(cp.count(sp(e)-1,e),t,2)}function Lm(e,t){var n=e.getDay();return e=n>=4||0===n?mp(e):mp.ceil(e),zp(mp.count(sp(e),e)+(4===sp(e).getDay()),t,2)}function Tm(e){return e.getDay()}function xm(e,t){return zp(dp.count(sp(e)-1,e),t,2)}function Sm(e,t){return zp(e.getFullYear()%100,t,2)}function Ym(e,t){return zp(e.getFullYear()%1e4,t,4)}function Em(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zp(t/60|0,"0",2)+zp(t%60,"0",2)}function Dm(e,t){return zp(e.getUTCDate(),t,2)}function Om(e,t){return zp(e.getUTCHours(),t,2)}function jm(e,t){return zp(e.getUTCHours()%12||12,t,2)}function Cm(e,t){return zp(1+jp.count(Pp(e),e),t,3)}function Pm(e,t){return zp(e.getUTCMilliseconds(),t,3)}function Am(e,t){return Pm(e,t)+"000"}function Hm(e,t){return zp(e.getUTCMonth()+1,t,2)}function Rm(e,t){return zp(e.getUTCMinutes(),t,2)}function Nm(e,t){return zp(e.getUTCSeconds(),t,2)}function Im(e){var t=e.getUTCDay();return 0===t?7:t}function Wm(e,t){return zp(Lp.count(Pp(e)-1,e),t,2)}function Fm(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Yp(e):Yp.ceil(e),zp(Yp.count(Pp(e),e)+(4===Pp(e).getUTCDay()),t,2)}function Um(e){return e.getUTCDay()}function zm(e,t){return zp(Tp.count(Pp(e)-1,e),t,2)}function Bm(e,t){return zp(e.getUTCFullYear()%100,t,2)}function Vm(e,t){return zp(e.getUTCFullYear()%1e4,t,4)}function qm(){return"+0000"}function Jm(){return"%"}function $m(e){return+e}function Gm(e){return Math.floor(+e/1e3)}!function(e){Np=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Vp(a),c=qp(a),d=Vp(i),f=qp(i),p=Vp(o),m=qp(o),h=Vp(s),y=qp(s),_=Vp(l),v=qp(l),g={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:pm,e:pm,f:vm,H:mm,I:hm,j:ym,L:_m,m:gm,M:bm,p:function(e){return a[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:$m,s:Gm,S:wm,u:Mm,U:km,V:Lm,w:Tm,W:xm,x:null,X:null,y:Sm,Y:Ym,Z:Em,"%":Jm},b={a:function(e){return o[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Dm,e:Dm,f:Am,H:Om,I:jm,j:Cm,L:Pm,m:Hm,M:Rm,p:function(e){return a[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:$m,s:Gm,S:Nm,u:Im,U:Wm,V:Fm,w:Um,W:zm,x:null,X:null,y:Bm,Y:Vm,Z:qm,"%":Jm},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return L(e,t,n,r)},d:rm,e:rm,f:um,H:im,I:im,j:am,L:lm,m:nm,M:om,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:tm,Q:dm,s:fm,S:sm,u:$p,U:Gp,V:Qp,w:Jp,W:Kp,x:function(e,t,r){return L(e,n,t,r)},X:function(e,t,n){return L(e,r,t,n)},y:Xp,Y:Zp,Z:em,"%":cm};function M(e,t){return function(n){var r,a,i,o=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in i||(i.w=1),"Z"in i?(a=(r=Hp(Rp(i.y,0,1))).getUTCDay(),r=a>4||0===a?Tp.ceil(r):Tp(r),r=jp.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(a=(r=Ap(Rp(i.y,0,1))).getDay(),r=a>4||0===a?dp.ceil(r):dp(r),r=vp.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),a="Z"in i?Hp(Rp(i.y,0,1)).getUTCDay():Ap(Rp(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Hp(i)):Ap(i)}}function L(e,t,n,r){for(var a,i,o=0,s=t.length,l=n.length;o=l)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=w[a in Ip?t.charAt(o++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return g.x=M(n,g),g.X=M(r,g),g.c=M(t,g),b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),{format:function(e){var t=M(e+="",g);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}(e),Np.format,Np.parse,Np.utcFormat,Np.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Qm=ip((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),Km=(Qm.range,ip((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}))),Zm=(Km.range,ip((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})));Zm.range;function Xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var eh=function(e){lr()(n,e);var t=Xm(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).barStyle=r.props.readOnly?Al.a.Bar:"".concat(Al.a.Bar," ").concat(Al.a.CanAdd),r}return or()(n,[{key:"componentDidMount",value:function(){this.createBarChart()}},{key:"componentDidUpdate",value:function(){this.createBarChart()}},{key:"createBarChart",value:function(){var e=this.node,t=this,n=this.props.query.filter((function(e){return"hashtag"===e.type}));n=n.map((function(e){return e.value.toLowerCase().replace("#","")}));var r,a=this.props.hashtags.filter((function(e){return!n.includes(e.hashtag.toLowerCase())})),i=function(e,t){var n,r,a=e.length,i=-1;if(null==t){for(;++i=n)for(r=n;++ir&&(r=n)}else for(;++i=n)for(r=n;++ir&&(r=n);return r}(a.map((function(e){return e.count}))),o=np().exponent(.5).domain([0,i]).range([0,275]),s=(r=e,"string"==typeof r?new zu([[document.querySelector(r)]],[document.documentElement]):new zu([[r]],Uu)).selectAll("g").attr("class",this.barStyle).data(a,(function(e){return"hashtag-".concat(e.hashtag)}));s.append("svg:title").text((function(e){return"Add #".concat(e.hashtag," to your query")})),s.select("rect").transition().duration(2e3).attr("width",(function(e){return o(e.count)})),s.select("text").transition().duration(2e3).text((function(e){return e.count+" #"+e.hashtag})),s.exit().remove();var l=s.enter().append("g").attr("class",this.barStyle).attr("transform",(function(e,t){return"translate(0,"+25*t+")"})).on("click",(function(e){t.props.addSearchTerm({type:"hashtag",value:"#"+e.hashtag})}));l.append("rect").attr("dx",0).attr("dy",0).attr("width",(function(e){return o(e.count)})).attr("height",20),l.append("text").text((function(e){return"#"+e.hashtag+" ("+e.count+")"})).attr("dx",5).attr("dy",15),l.merge(s).transition().duration(2e3).attr("transform",(function(e,t){return"translate(0,"+25*t+")"}))}},{key:"render",value:function(){var e=this,t=null;return 0===this.props.hashtags.length&&(t=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:"".concat(Al.a.HashtagsCard," ").concat(kl.a.InnerCard)},t,a.a.createElement("svg",{className:Al.a.HashtagChart,ref:function(t){e.node=t}}))}}]),n}(r.Component);eh.propTypes={readOnly:l.a.bool,hashtags:l.a.array,addSearchTerm:l.a.func,query:l.a.array};var th=n(89),nh=n.n(th);function rh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var ah=function(e){lr()(n,e);var t=rh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){return a.a.createElement("div",{className:nh.a.Url},a.a.createElement("span",{className:nh.a.Number},a.a.createElement("strong",null,this.props.count)),a.a.createElement("a",{target:"_new",href:this.props.url},this.props.url))}}]),n}(r.Component);ah.propTypes={url:l.a.string,count:l.a.number};var ih=n(250),oh=n.n(ih);function sh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var lh=function(e){lr()(n,e);var t=sh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=null;return 0===this.props.urls.length&&(e=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:"".concat(oh.a.UrlList," ").concat(kl.a.InnerCard)},e,a.a.createElement("ul",null,this.props.urls.map((function(e){return a.a.createElement("li",{key:e.url},a.a.createElement(ah,{url:e.url,count:e.count}))}))))}}]),n}(r.Component);lh.propTypes={urls:l.a.array};var uh=n(251),ch=n.n(uh);function dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var fh=function(e){lr()(n,e);var t=dh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=null;return 0===this.props.images.length&&(e=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:kl.a.InnerCard},e,this.props.images.map((function(e){return a.a.createElement("figure",{key:e.url,className:ch.a.Image},a.a.createElement("img",{src:e.url}),a.a.createElement("figcaption",null,a.a.createElement("ion-icon",{name:"repeat"})," ",e.count," "))})))}}]),n}(r.Component);fh.propTypes={images:l.a.array};var ph=n(252),mh=n.n(ph);function hh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var yh=function(e){lr()(n,e);var t=hh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=null;return 0===this.props.videos.length&&(e=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:kl.a.InnerCard},e,this.props.videos.map((function(e){return a.a.createElement("div",{key:e.url,className:mh.a.Video},a.a.createElement("video",{controls:!0,src:e.url}),a.a.createElement("figcaption",null,a.a.createElement("ion-icon",{name:"repeat"})," ",e.count))})))}}]),n}(r.Component);yh.propTypes={videos:l.a.array};var _h=n(74),vh=n.n(_h);function gh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var bh=function(e){lr()(n,e);var t=gh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){if(this.props.tweetCount){var e=_l()(this.props.minDate).local().format("MMM D h:mm A"),t=_l()(this.props.maxDate).local().format("MMM D h:mm A");return a.a.createElement("div",{className:vh.a.Summary},"Loaded ",a.a.createElement("span",{className:vh.a.Count},this.props.tweetCount)," tweets from ",a.a.createElement("time",null,e)," to ",a.a.createElement("time",null,t)," from the Twitter Search API.")}return this.props.id?a.a.createElement(Oo,{elevation:4,className:vh.a.Summary},"Loading up to 1,000 recent tweets from Twitter matching your query"):a.a.createElement("div",null)}}]),n}(r.Component);bh.propTypes={id:l.a.number,maxDate:l.a.string,minDate:l.a.string,tweetCount:l.a.number,hashtagCount:l.a.number,active:l.a.bool};var wh=n(253),Mh=n.n(wh);function kh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Lh=function(e){lr()(n,e);var t=kh(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).box=a.a.createRef(),r}return or()(n,[{key:"onClick",value:function(e){"INPUT"!==e.target.tagName&&this.props.addSearchTerm({value:"",type:"input"})}},{key:"render",value:function(){var e=this,t="";return 0!==this.props.query.length||this.props.active||(t=a.a.createElement("div",null,"enter a ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.Keyword}," keyword "),"  ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.Phrase}," a phrase "),"  ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.Hashtag}," #hashtag "),"  ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.User}," @user "))),a.a.createElement(Oo,{id:"box",elevation:4,onClick:function(t){e.onClick(t)},className:Mh.a.SearchQuery},t,a.a.createElement("form",{noValidate:!0,autoComplete:"off",style:{display:"flex",justifyContent:"left"}},this.props.query.map((function(t,n){return a.a.createElement(ms,{id:"t".concat(n),key:"t".concat(n),pos:n,focused:t.focused,type:t.type,onInput:e.props.updateSearchTerm,value:t.value,createSearch:e.props.createSearch,query:e.props.query,focusSearchTerm:e.props.focusSearchTerm})}))))}}]),n}(r.Component);Lh.propTypes={query:l.a.array,updateSearchTerm:l.a.func,addSearchTerm:l.a.func,focusSearchTerm:l.a.func,active:l.a.bool,createSearch:l.a.func};var Th=n(43),xh=n.n(Th);function Sh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Yh=function(e){lr()(n,e);var t=Sh(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){this.props.resetTwitterSearch(),clearInterval(this.timerId)}},{key:"search",value:function(){this.props.createSearch(this.props.query)}},{key:"update",value:function(){!1===this.props.active&&(this.props.refreshSearch({id:this.props.searchId,active:!0}),this.tick())}},{key:"save",value:function(){var e=this.props.query.map((function(e){return e.value})).join(" ");this.props.activateSearch(),this.props.saveSearch({id:this.props.searchId,title:e})}},{key:"tick",value:function(){this.props.searchId&&this.props.active&&(this.props.getSearch(this.props.searchId),this.props.getTweets(this.props.searchId),this.props.getHashtags(this.props.searchId),this.props.getUsers(this.props.searchId),this.props.getUrls(this.props.searchId),this.props.getImages(this.props.searchId),this.props.getVideos(this.props.searchId))}},{key:"render",value:function(){var e=this,t=this.props.active?Tl.a.Spin:"",n=0===this.props.tweets.length?{display:"none"}:{},r=0===this.props.query.length,i=a.a.createElement("div",{className:xh.a.Controls},a.a.createElement(As,{size:"medium",title:"Search",disabled:r,tabIndex:"0",onClick:function(){e.search()}},a.a.createElement("ion-icon",{name:"search"})),a.a.createElement(As,{size:"medium",title:"Update Search",disabled:r,tabIndex:"0",onClick:function(){e.update()}},a.a.createElement("span",{className:"".concat(t," ").concat(xh.a.SpinAdj)},a.a.createElement("ion-icon",{name:"sync"}))),a.a.createElement(As,{size:"medium",title:"Save Search",disabled:r,tabIndex:"0",onClick:function(){e.save()}},a.a.createElement("ion-icon",{name:"filing"})));return this.props.searchId||(i=a.a.createElement("div",{className:xh.a.Controls},a.a.createElement(As,{size:"medium",title:"Search",disabled:r,color:"primary",tabIndex:"0",onClick:function(){e.search()}},a.a.createElement("ion-icon",{name:"search"})))),a.a.createElement("div",null,a.a.createElement("div",{className:xh.a.SearchBar},a.a.createElement(Lh,{updateSearchTerm:this.props.updateSearchTerm,addSearchTerm:this.props.addSearchTerm,focusSearchTerm:this.props.focusSearchTerm,query:this.props.query,active:this.props.active,createSearch:this.props.createSearch}),i,a.a.createElement(bh,{id:this.props.searchId,maxDate:this.props.maxDate,minDate:this.props.minDate,tweetCount:this.props.tweetCount,hashtagCount:this.props.hashtags.length,active:this.props.active})),a.a.createElement("div",{className:Ts.a.CardHolder,style:n},a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(Sl,{tweets:this.props.tweets})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Tweets"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(Cl,{addSearchTerm:this.props.addSearchTerm,users:this.props.users})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Users"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(eh,{addSearchTerm:this.props.addSearchTerm,hashtags:this.props.hashtags,query:this.props.query})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Hashtags"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(lh,{urls:this.props.urls})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"URLs"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(fh,{images:this.props.images})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Images"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(yh,{videos:this.props.videos})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Video")))))}}]),n}(r.Component);Yh.propTypes={searchId:l.a.number,query:l.a.array,queries:l.a.array,maxDate:l.a.string,minDate:l.a.string,tweetCount:l.a.number,tweets:l.a.array,users:l.a.array,hashtags:l.a.array,urls:l.a.array,images:l.a.array,videos:l.a.array,active:l.a.bool,searches:l.a.array,getSearch:l.a.func,resetTwitterSearch:l.a.func,getTweets:l.a.func,getHashtags:l.a.func,getUsers:l.a.func,getUrls:l.a.func,getImages:l.a.func,getVideos:l.a.func,createSearch:l.a.func,activateSearch:l.a.func,refreshSearch:l.a.func,updateSearch:l.a.func,updateSearchTerm:l.a.func,addSearchTerm:l.a.func,focusSearchTerm:l.a.func,saveSearch:l.a.func};var Eh={createSearch:sn,getSearch:hn,getTweets:cn,getUsers:dn,getHashtags:fn,getUrls:function(e){return function(t){fetch("/api/v1/search/"+e+"/urls",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_URLS",urls:e})}))}},getImages:pn,getVideos:mn,refreshSearch:function(e){return function(t){t({type:"ACTIVATE_SEARCH"});var n={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),credentials:"same-origin"},r="/api/v1/search/".concat(e.id,"?refreshTweets=true");return fetch(r,n).then((function(e){return e.json()})).then((function(e){t(nn(e))}))}},updateSearch:ln,activateSearch:on,updateSearchTerm:function(e){return e.value.match(/^\s*$/)&&e.pos>0?{type:"REMOVE_SEARCH_TERM",term:e}:{type:"UPDATE_SEARCH_TERM",term:e}},addSearchTerm:function(e){return{type:"ADD_SEARCH_TERM",term:e}},focusSearchTerm:function(e,t){return{type:"FOCUS_SEARCH_TERM",pos:e,atStart:t}},resetTwitterSearch:an,saveSearch:function(e){return function(t){var n={method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Xt(Xt({},e),{},{saved:!0}))},r="/api/v1/search/".concat(e.id);return fetch(r,n).then((function(e){return e.json()})).then((function(e){t(function(e){return{type:"ADD_SEARCH",search:e}}(e)),t(Ze("/searches/"))}))}}},Dh=ne((function(e){return{searchId:e.search.id,query:e.search.query,tweets:e.search.tweets,hashtags:e.search.hashtags,users:e.search.users,urls:e.search.urls,images:e.search.images,videos:e.search.videos,maxDate:e.search.maxDate,minDate:e.search.minDate,active:e.search.active,tweetCount:e.search.tweetCount}}),(function(e){return N(Eh,e)}))(Yh),Oh=n(90),jh=n.n(Oh);function Ch(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Ph=function(e){lr()(n,e);var t=Ch(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"createArchive",value:function(){this.props.createArchive({id:this.props.searchId})}},{key:"render",value:function(){var e=this,t="Create Archive",n=function(){e.createArchive()},r=!1,i="";return this.props.active?(r=!0,i=a.a.createElement("span",{className:jh.a.DownloadInfo},"Stop collecting to download.")):this.props.archiveStarted?(t="Creating Archive",n=null):this.props.archived&&(t="Download Archive",n=function(){var t="/userData/archives/".concat(e.props.searchId,".zip");window.location=t}),a.a.createElement("div",{className:jh.a.DownloadOptions},a.a.createElement(zs,{variant:"contained",onClick:n,disabled:r},a.a.createElement("ion-icon",{name:"download"})," ",t),i)}}]),n}(r.Component);Ph.propTypes={searchId:l.a.number,active:l.a.bool,archived:l.a.bool,archiveStarted:l.a.bool,createArchive:l.a.func};var Ah={createArchive:yn},Hh=ne((function(e,t){var n={searchId:e.search.id,active:e.search.active,archived:e.search.archived,archiveStarted:e.search.archiveStarted};return t&&(n.searchId=t.id,n.active=t.active,n.archived=t.archived,n.archiveStarted=t.archiveStarted),n}),(function(e){return N(Ah,e)}))(Ph),Rh=n(69),Nh=n.n(Rh),Ih=n(38);function Wh(e){return e.substring(2).toLowerCase()}var Fh=function(e){var t=e.children,n=e.disableReactTree,a=void 0!==n&&n,o=e.mouseEvent,s=void 0===o?"onClick":o,l=e.onClickAway,u=e.touchEvent,c=void 0===u?"onTouchEnd":u,d=r.useRef(!1),f=r.useRef(null),p=r.useRef(!1),m=r.useRef(!1);r.useEffect((function(){return p.current=!0,function(){p.current=!1}}),[]);var h=r.useCallback((function(e){f.current=i.findDOMNode(e)}),[]),y=na(t.ref,h),_=aa((function(e){var t=m.current;if(m.current=!1,p.current&&f.current&&!function(e){return document.documentElement.clientWidth-1;else n=!Wr(f.current).documentElement.contains(e.target)||f.current.contains(e.target);n||!a&&t||l(e)}})),v=function(e){return function(n){m.current=!0;var r=t.props[e];r&&r(n)}},g={ref:y};return!1!==c&&(g[c]=v(c)),r.useEffect((function(){if(!1!==c){var e=Wh(c),t=Wr(f.current),n=function(){d.current=!0};return t.addEventListener(e,_),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,_),t.removeEventListener("touchmove",n)}}}),[_,c]),!1!==s&&(g[s]=v(s)),r.useEffect((function(){if(!1!==s){var e=Wh(s),t=Wr(f.current);return t.addEventListener(e,_),function(){t.removeEventListener(e,_)}}}),[_,s]),r.createElement(r.Fragment,null,r.cloneElement(t,g))},Uh=r.forwardRef((function(e,t){var n=e.action,a=e.classes,i=e.className,o=e.message,s=e.role,l=void 0===s?"alert":s,u=Object(Hr.a)(e,["action","classes","className","message","role"]);return r.createElement(Oo,Object(h.a)({role:l,square:!0,elevation:6,className:Object(Nr.a)(a.root,i),ref:t},u),r.createElement("div",{className:a.message},o),n?r.createElement("div",{className:a.action},n):null)})),zh=Object(Jr.a)((function(e){var t="light"===e.palette.type?.8:.98,n=Object(ws.b)(e.palette.background.default,t);return{root:Object(h.a)(Object(h.a)({},e.typography.body2),{},Object(Rr.a)({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(Uh),Bh=r.forwardRef((function(e,t){var n=e.action,a=e.anchorOrigin,i=(a=void 0===a?{vertical:"bottom",horizontal:"center"}:a).vertical,o=a.horizontal,s=e.autoHideDuration,l=void 0===s?null:s,u=e.children,c=e.classes,d=e.className,f=e.ClickAwayListenerProps,p=e.ContentProps,m=e.disableWindowBlurListener,y=void 0!==m&&m,_=e.message,v=e.onClose,g=e.onEnter,b=e.onEntered,w=e.onEntering,M=e.onExit,k=e.onExited,L=e.onExiting,T=e.onMouseEnter,x=e.onMouseLeave,S=e.open,Y=e.resumeHideDuration,E=e.TransitionComponent,D=void 0===E?Eo:E,O=e.transitionDuration,j=void 0===O?{enter:Ih.b.enteringScreen,exit:Ih.b.leavingScreen}:O,C=e.TransitionProps,P=Object(Hr.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),A=r.useRef(),H=r.useState(!0),R=H[0],N=H[1],I=aa((function(){v&&v.apply(void 0,arguments)})),W=aa((function(e){v&&null!=e&&(clearTimeout(A.current),A.current=setTimeout((function(){I(null,"timeout")}),e))}));r.useEffect((function(){return S&&W(l),function(){clearTimeout(A.current)}}),[S,l,W]);var F=function(){clearTimeout(A.current)},U=r.useCallback((function(){null!=l&&W(null!=Y?Y:.5*l)}),[l,Y,W]);return r.useEffect((function(){if(!y&&S)return window.addEventListener("focus",U),window.addEventListener("blur",F),function(){window.removeEventListener("focus",U),window.removeEventListener("blur",F)}}),[y,U,S]),!S&&R?null:r.createElement(Fh,Object(h.a)({onClickAway:function(e){v&&v(e,"clickaway")}},f),r.createElement("div",Object(h.a)({className:Object(Nr.a)(c.root,c["anchorOrigin".concat(Object($r.a)(i)).concat(Object($r.a)(o))],d),onMouseEnter:function(e){T&&T(e),F()},onMouseLeave:function(e){x&&x(e),U()},ref:t},P),r.createElement(D,Object(h.a)({appear:!0,in:S,onEnter:eo((function(){N(!1)}),g),onEntered:b,onEntering:w,onExit:M,onExited:eo((function(){N(!0)}),k),onExiting:L,timeout:j,direction:"top"===i?"down":"up"},C),u||r.createElement(zh,Object(h.a)({message:_,action:n},p)))))})),Vh=Object(Jr.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},i={top:24},o={bottom:24},s={right:24},l={left:24},u={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(h.a)(Object(h.a)({},t),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({},i),u))),anchorOriginBottomCenter:Object(h.a)(Object(h.a)({},n),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({},o),u))),anchorOriginTopRight:Object(h.a)(Object(h.a)(Object(h.a)({},t),r),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({left:"auto"},i),s))),anchorOriginBottomRight:Object(h.a)(Object(h.a)(Object(h.a)({},n),r),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({left:"auto"},o),s))),anchorOriginTopLeft:Object(h.a)(Object(h.a)(Object(h.a)({},t),a),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({right:"auto"},i),l))),anchorOriginBottomLeft:Object(h.a)(Object(h.a)(Object(h.a)({},n),a),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({right:"auto"},o),l)))}}),{flip:!1,name:"MuiSnackbar"})(Bh),qh=n(254),Jh=n.n(qh);function $h(e){var t=e.text,n=e.type,r=e.onClose,i=a.a.useState(!0),o=Nh()(i,2),s=o[0],l=o[1];function u(){r&&r(),l(!1)}return a.a.createElement(Vh,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:s,autoHideDuration:6e3,onClose:u,ContentProps:{"aria-describedby":"message-id"},message:a.a.createElement("span",{id:"message-id"},t),variant:n,action:[a.a.createElement(ks,{key:"close","aria-label":"close",color:"inherit",onClick:u},a.a.createElement(Jh.a,null))]})}$h.propTypes={type:l.a.string,text:l.a.string,onClose:l.a.func};var Gh=r.forwardRef((function(e,t){var n=e.autoFocus,a=e.checked,i=e.checkedIcon,o=e.classes,s=e.className,l=e.defaultChecked,u=e.disabled,c=e.icon,d=e.id,f=e.inputProps,p=e.inputRef,m=e.name,y=e.onBlur,_=e.onChange,v=e.onFocus,g=e.readOnly,b=e.required,w=e.tabIndex,M=e.type,k=e.value,L=Object(Hr.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),T=Ko({controlled:a,default:Boolean(l),name:"SwitchBase",state:"checked"}),x=Object(Zi.a)(T,2),S=x[0],Y=x[1],E=Fi(),D=u;E&&void 0===D&&(D=E.disabled);var O="checkbox"===M||"radio"===M;return r.createElement(ks,Object(h.a)({component:"span",className:Object(Nr.a)(o.root,s,S&&o.checked,D&&o.disabled),disabled:D,tabIndex:null,role:void 0,onFocus:function(e){v&&v(e),E&&E.onFocus&&E.onFocus(e)},onBlur:function(e){y&&y(e),E&&E.onBlur&&E.onBlur(e)},ref:t},L),r.createElement("input",Object(h.a)({autoFocus:n,checked:a,defaultChecked:l,className:o.input,disabled:D,id:O&&d,name:m,onChange:function(e){var t=e.target.checked;Y(t),_&&_(e,t)},readOnly:g,ref:p,required:b,tabIndex:w,type:M,value:k},f)),S?i:c)})),Qh=Object(Jr.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(Gh),Kh=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.color,o=void 0===i?"secondary":i,s=e.edge,l=void 0!==s&&s,u=e.size,c=void 0===u?"medium":u,d=Object(Hr.a)(e,["classes","className","color","edge","size"]),f=r.createElement("span",{className:n.thumb});return r.createElement("span",{className:Object(Nr.a)(n.root,a,{start:n.edgeStart,end:n.edgeEnd}[l],"small"===c&&n["size".concat(Object($r.a)(c))])},r.createElement(Qh,Object(h.a)({type:"checkbox",icon:f,checkedIcon:f,classes:{root:Object(Nr.a)(n.switchBase,n["color".concat(Object($r.a)(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},d)),r.createElement("span",{className:n.track}))})),Zh=Object(Jr.a)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(Kh),Xh=n(26),ey=n(394),ty=n(396),ny=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};io(this,e),this.options=t}return Object(oo.a)(e,[{key:"collect",value:function(e){var t=new Map;this.sheetsRegistry=new Xh.b;var n=Object(ty.a)();return a.a.createElement(ey.b,Object(h.a)({sheetsManager:t,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),e)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(e){return a.a.createElement("style",Object(h.a)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},e))}}]),e}();function ry(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var ay=function(e){lr()(n,e);var t=ry(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).resetError=r.resetError.bind(Os()(r)),r.state={error:null},r}return or()(n,[{key:"toggle",value:function(e){var t=this.props.searches.reduce((function(e,t){return e+t.tweetCount}),0);this.props.user.active?t>this.props.user.tweetQuota?this.setState({error:"You are over your quota of ".concat(this.props.user.tweetQuota," tweets.\n Delete one or more collections to start collecting again.")}):this.props.active||2!==this.props.searches.filter((function(e){return e.active})).length?this.props.updateSearch({id:this.props.id,active:e.target.checked,archived:!1}):this.setState({error:"You cannot have more than 2 active searches."}):this.setState({error:"Your account is not active, please email the admin."})}},{key:"resetError",value:function(){this.setState({error:null})}},{key:"render",value:function(){var e=this,t=this.props.active?"Stop Data Collection":"Start Data Collection",n=this.props.active?"primary":"secondary",r=this.state.error?a.a.createElement($h,{type:"error",text:this.state.error,onClose:this.resetError}):"";return a.a.createElement(a.a.Fragment,null,a.a.createElement(Zh,{className:ny.Admin,checked:this.props.active,color:n,title:t,onChange:function(t){e.toggle(t)}}),r)}}]),n}(r.Component);function iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}ay.propTypes={id:l.a.number,updateSearch:l.a.func,active:l.a.bool,user:l.a.object,searches:l.a.array};var oy=function(e){lr()(n,e);var t=iy(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"toggle",value:function(e){this.props.updateSearch({id:this.props.id,public:e.target.checked?new Date:null})}},{key:"render",value:function(){var e=this,t=this.props.public?"Make Private":"Make Public",n=this.props.public?"primary":"secondary";return a.a.createElement(Zh,{className:ny.Admin,checked:null!==this.props.public,color:n,title:t,onChange:function(t){e.toggle(t)}})}}]),n}(r.Component);oy.propTypes={id:l.a.number,updateSearch:l.a.func,public:l.a.instanceOf(Date),user:l.a.object,searches:l.a.array};var sy=n(75),ly=n.n(sy),uy={entering:{opacity:1},entered:{opacity:1}},cy={enter:Ih.b.enteringScreen,exit:Ih.b.leavingScreen},dy=r.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,i=void 0!==a&&a,o=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,c=e.onExit,d=e.onExited,f=e.onExiting,p=e.style,m=e.TransitionComponent,y=void 0===m?ko:m,_=e.timeout,v=void 0===_?cy:_,g=Object(Hr.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),b=Ha(),w=b.unstable_strictMode&&!i,M=r.useRef(null),k=na(n.ref,t),L=na(w?M:void 0,k),T=function(e){return function(t,n){if(e){var r=w?[M.current,t]:[t,n],a=Object(Zi.a)(r,2),i=a[0],o=a[1];void 0===o?e(i):e(i,o)}}},x=T(u),S=T((function(e,t){Lo(e);var n=To({style:p,timeout:v},{mode:"enter"});e.style.webkitTransition=b.transitions.create("opacity",n),e.style.transition=b.transitions.create("opacity",n),s&&s(e,t)})),Y=T(l),E=T(f),D=T((function(e){var t=To({style:p,timeout:v},{mode:"exit"});e.style.webkitTransition=b.transitions.create("opacity",t),e.style.transition=b.transitions.create("opacity",t),c&&c(e)})),O=T(d);return r.createElement(y,Object(h.a)({appear:!0,in:o,nodeRef:w?M:void 0,onEnter:S,onEntered:Y,onEntering:x,onExit:D,onExited:O,onExiting:E,timeout:v},g),(function(e,t){return r.cloneElement(n,Object(h.a)({style:Object(h.a)(Object(h.a)(Object(h.a)({opacity:0,visibility:"exited"!==e||o?void 0:"hidden"},uy[e]),p),n.props.style),ref:L},t))}))})),fy=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.invisible,s=void 0!==o&&o,l=e.open,u=e.transitionDuration,c=e.TransitionComponent,d=void 0===c?dy:c,f=Object(Hr.a)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return r.createElement(d,Object(h.a)({in:l,timeout:u},f),r.createElement("div",{className:Object(Nr.a)(a.root,i,s&&a.invisible),"aria-hidden":!0,ref:t},n))})),py=Object(Jr.a)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(fy),my=function(e){var t=e.id,n=e.deleteSearch,r=a.a.useState(!1),i=Nh()(r,2),o=i[0],s=i[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{className:ly.a.Trash,onClick:function(){s(!0)}},a.a.createElement("ion-icon",{title:"Delete Search!",name:"trash"})),a.a.createElement(go,{"aria-labelledby":"transition-modal-title","aria-describedby":"transition-modal-description",className:ly.a.Modal,open:o,onClose:function(){s(!1)},closeAfterTransition:!0,BackdropComponent:py,BackdropProps:{timeout:500}},a.a.createElement(dy,{in:o},a.a.createElement("div",{className:ly.a.Paper},a.a.createElement("h2",{id:"transition-modal-title"},"Delete Search?"),a.a.createElement("p",{id:"transition-modal-description"},"This action cannot be undone."),a.a.createElement(zs,{variant:"contained",onClick:function(){return n({id:t})}},"Delete Search")))))};my.propTypes={id:l.a.number,deleteSearch:l.a.func};var hy=my;function yy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var _y=function(e){lr()(n,e);var t=yy(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).editing=!1,r}return or()(n,[{key:"onClick",value:function(){this.editing=!0,this.forceUpdate()}},{key:"onChange",value:function(e){this.props.update(e.target.value)}},{key:"onBlur",value:function(e){this.editing=!1,e.stopPropagation(),this.forceUpdate()}},{key:"keyDown",value:function(e){"Enter"===e.key&&(this.editing=!1,e.stopPropagation(),this.forceUpdate())}},{key:"render",value:function(){var e=this;if(this.editing){var t=(this.props.text||"").length||10;return a.a.createElement(fs,{id:"input-with-icon-grid",value:this.props.text,size:t,autoFocus:"autofocus",onChange:function(t){return e.onChange(t)},onBlur:function(t){return e.onBlur(t)},onKeyDown:function(t){e.keyDown(t)}})}var n=this.props.text||this.props.placeholder;return a.a.createElement("span",null,n," ",a.a.createElement("ion-icon",{name:"create",onClick:function(t){e.onClick(t)}}))}}]),n}(r.Component);_y.propTypes={hideIcon:l.a.bool,text:l.a.string,update:l.a.func,placeholder:l.a.string};var vy=r.createContext(),gy=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"table":i,s=e.padding,l=void 0===s?"default":s,u=e.size,c=void 0===u?"medium":u,d=e.stickyHeader,f=void 0!==d&&d,p=Object(Hr.a)(e,["classes","className","component","padding","size","stickyHeader"]),m=r.useMemo((function(){return{padding:l,size:c,stickyHeader:f}}),[l,c,f]);return r.createElement(vy.Provider,{value:m},r.createElement(o,Object(h.a)({role:"table"===o?null:"table",ref:t,className:Object(Nr.a)(n.root,a,f&&n.stickyHeader)},p)))})),by=Object(Jr.a)((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Object(h.a)(Object(h.a)({},e.typography.body2),{},{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(gy);var wy=r.createContext(),My={variant:"head"},ky=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"thead":i,s=Object(Hr.a)(e,["classes","className","component"]);return r.createElement(wy.Provider,{value:My},r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a),ref:t,role:"thead"===o?null:"rowgroup"},s)))})),Ly=Object(Jr.a)({root:{display:"table-header-group"}},{name:"MuiTableHead"})(ky),Ty=r.forwardRef((function(e,t){var n,a,i=e.align,o=void 0===i?"inherit":i,s=e.classes,l=e.className,u=e.component,c=e.padding,d=e.scope,f=e.size,p=e.sortDirection,m=e.variant,y=Object(Hr.a)(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),_=r.useContext(vy),v=r.useContext(wy),g=v&&"head"===v.variant;u?(a=u,n=g?"columnheader":"cell"):a=g?"th":"td";var b=d;!b&&g&&(b="col");var w=c||(_&&_.padding?_.padding:"default"),M=f||(_&&_.size?_.size:"medium"),k=m||v&&v.variant,L=null;return p&&(L="asc"===p?"ascending":"descending"),r.createElement(a,Object(h.a)({ref:t,className:Object(Nr.a)(s.root,s[k],l,"inherit"!==o&&s["align".concat(Object($r.a)(o))],"default"!==w&&s["padding".concat(Object($r.a)(w))],"medium"!==M&&s["size".concat(Object($r.a)(M))],"head"===k&&_&&_.stickyHeader&&s.stickyHeader),"aria-sort":L,role:n,scope:b},y))})),xy=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.body2),{},{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Object(ws.e)(Object(ws.c)(e.palette.divider,1),.88):Object(ws.a)(Object(ws.c)(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(Ty),Sy=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"tr":i,s=e.hover,l=void 0!==s&&s,u=e.selected,c=void 0!==u&&u,d=Object(Hr.a)(e,["classes","className","component","hover","selected"]),f=r.useContext(wy);return r.createElement(o,Object(h.a)({ref:t,className:Object(Nr.a)(n.root,a,f&&{head:n.head,footer:n.footer}[f.variant],l&&n.hover,c&&n.selected),role:"tr"===o?null:"row"},d))})),Yy=Object(Jr.a)((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(Sy);function Ey(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Dy=function(e){lr()(n,e);var t=Ey(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).editing=!1,r.state={goHome:!1},r}return or()(n,[{key:"shouldComponentUpdate",value:function(e){return e.title!==this.title}},{key:"setEditing",value:function(e){this.editing=e}},{key:"updateTitle",value:function(e){var t=""===e?"untitled":e;this.props.updateSearch({id:this.props.search.id,title:t})}},{key:"updateDescription",value:function(e){this.props.updateSearch({id:this.props.search.id,description:e})}},{key:"delete",value:function(e){this.props.deleteSearch(e),this.setState({goHome:!0})}},{key:"render",value:function(){var e=this;if(this.state.goHome)return a.a.createElement(Ie,{to:"/searches",push:!0});var t=_l()(this.props.search.created).local().format("MMM D h:mm A"),n=_l()(this.props.search.modified).local().format("MMM D h:mm A");return a.a.createElement(by,null,a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,null,"Title"),a.a.createElement(xy,null,"Tweet Count"),a.a.createElement(xy,null,"Created"),a.a.createElement(xy,null,"Last Update"),a.a.createElement(xy,null,"Active"),a.a.createElement(xy,null,"Public"),a.a.createElement(xy,null,"Archive"),a.a.createElement(xy,null,"Delete"))),a.a.createElement(Yy,null,a.a.createElement(xy,null,a.a.createElement(_y,{text:this.props.title,update:function(t){e.updateTitle(t)}})),a.a.createElement(xy,null,a.a.createElement("ion-icon",{name:"logo-twitter"})," ",this.props.search.tweetCount.toLocaleString()),a.a.createElement(xy,null,t),a.a.createElement(xy,null,n),a.a.createElement(xy,null,a.a.createElement(ay,{active:this.props.search.active,id:this.props.search.id,searches:this.props.searches,user:this.props.user,updateSearch:this.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(oy,{public:this.props.search.public,id:this.props.search.id,searches:this.props.searches,user:this.props.user,updateSearch:this.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(Hh,{id:this.props.search.id,active:this.props.search.active,archived:this.props.search.archived,archiveStarted:this.props.search.archiveStarted})),a.a.createElement(xy,null,a.a.createElement(hy,{id:this.props.search.id,deleteSearch:function(t){e.delete(t)}}))))}}]),n}(r.Component);function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jy(e,t){return e(t={exports:{}},t.exports),t.exports}Dy.propTypes={search:l.a.object,searches:l.a.array,user:l.a.object,title:l.a.string,description:l.a.string,updateSearch:l.a.func,deleteSearch:l.a.func,createArchive:l.a.func};var Cy=jy((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case o:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case l:return e;default:return t}}case h:case m:case a:return t}}}function _(e){return y(e)===d}t.typeOf=y,t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=h,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=o,t.Suspense=p,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===o||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return _(e)||y(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return y(e)===f},t.isFragment=function(e){return y(e)===i},t.isLazy=function(e){return y(e)===h},t.isMemo=function(e){return y(e)===m},t.isPortal=function(e){return y(e)===a},t.isProfiler=function(e){return y(e)===s},t.isStrictMode=function(e){return y(e)===o},t.isSuspense=function(e){return y(e)===p}}));Oy(Cy),Oy(jy((function(e,t){})));jy((function(e){e.exports=Cy}));var Py=Object.getOwnPropertySymbols,Ay=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}})()&&Object.assign;function Ry(e,t,n,r,a){}Ry.resetWarningCache=function(){};Function.call.bind(Object.prototype.hasOwnProperty);function Ny(){}function Iy(){}Iy.resetWarningCache=Ny;var Wy=jy((function(e){e.exports=function(){function e(e,t,n,r,a,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var o=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 o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Iy,resetWarningCache:Ny};return n.PropTypes=n,n}()})),Fy=[],Uy=function(e){function t(){e.apply(this,arguments),this.state={isLoading:!0}}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.loadTweetForProps=function(e){var t=this,n=function(){window.twttr.ready().then((function(n){var r=n.widgets;t._div&&(t._div.innerHTML="");var a=e.onTweetLoadSuccess,i=e.onTweetLoadError;r.createTweetEmbed(t.props.id,t._div,e.options).then((function(e){t.setState({isLoading:!1}),a&&a(e)})).catch(i)}))},r=window.twttr;r&&r.ready?n():function(e,t){if(0===Fy.length){Fy.push(t);var n=document.createElement("script");n.setAttribute("src",e),n.onload=function(){return Fy.forEach((function(e){return e()}))},document.body.appendChild(n)}else Fy.push(t)}((window.location.protocol.indexOf("file")>=0?this.props.protocol:"")+"//platform.twitter.com/widgets.js",n)},t.prototype.componentDidMount=function(){this.loadTweetForProps(this.props)},t.prototype.shouldComponentUpdate=function(e,t){return this.props.id!==e.id||this.props.className!==e.className},t.prototype.componentWillUpdate=function(e,t){this.props.id!==e.id&&this.loadTweetForProps(e)},t.prototype.render=function(){var e=this;return a.a.createElement("div",{className:this.props.className,ref:function(t){e._div=t}},this.state.isLoading&&this.props.placeholder)},t}(a.a.Component);Uy.propTypes={id:Wy.string,options:Wy.object,protocol:Wy.string,onTweetLoadSuccess:Wy.func,onTweetLoadError:Wy.func,className:Wy.string},Uy.defaultProps={protocol:"https:",options:{},className:null};var zy=Uy,By=n(32),Vy=n.n(By),qy=n(70),Jy=n.n(qy);function $y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Gy=function(e){lr()(n,e);var t=$y(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"makeEmptyCardFor",value:function(e){return a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:Ts.a.NoPadding},a.a.createElement("span",{className:kl.a.Loader},a.a.createElement("ion-icon",{name:"cloud-outline"}))),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},"This search has no ",e,".")))}},{key:"getHostName",value:function(e){var t=new URL(e).host;return t=t.replace(/^www\./,"")}},{key:"render",value:function(){var e=this,t=this.props.search.urlCount<=0?this.makeEmptyCardFor("webpages"):a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},this.props.webpages.slice(0,50).map((function(t,n){if(t.image)return a.a.createElement("div",{key:"wp".concat(n),className:Vy.a.WebPreview},a.a.createElement("a",{key:t.url,rel:"noopener noreferrer",target:"_blank",href:t.url},a.a.createElement("span",null,a.a.createElement("img",{src:t.image,width:"250",onError:function(e){e.target.src=Jy.a}})),e.getHostName(t.url)))}))),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/webpages/")},"View ",parseInt(this.props.search.urlCount,10).toLocaleString()," Webpages →")))),n=this.props.search.imageCount<=0?this.makeEmptyCardFor("images"):a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(fh,{images:this.props.search.images.slice(0,50)})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/images/")},"View ",parseInt(this.props.search.imageCount,10).toLocaleString()," Images →")))),r=this.props.search.videoCount<=0?this.makeEmptyCardFor("videos"):a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(yh,{videos:this.props.search.videos.slice(0,50)})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/videos/")},"View ",parseInt(this.props.search.videoCount,10).toLocaleString()," Videos →"))));return a.a.createElement("div",{className:Ts.a.CardHolder,style:xh.a},a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},this.props.search.tweets.slice(0,10).map((function(e,t){return a.a.createElement(zy,{key:"t".concat(t),id:e.id})}))),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/tweets/")},"View ",parseInt(this.props.search.tweetCount,10).toLocaleString()," Tweets →")))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(Cl,{addSearchTerm:function(){return null},users:this.props.search.users.slice(0,50)})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/users/")},"View ",parseInt(this.props.search.userCount,10).toLocaleString()," Users →")))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(eh,{readOnly:!0,addSearchTerm:function(){return null},hashtags:this.props.search.hashtags,query:this.props.search.query})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Hashtags"))),t,n,r)}}]),n}(r.Component);function Qy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Gy.propTypes={searchId:l.a.string,search:l.a.object,webpages:l.a.array};var Ky=function(e){lr()(n,e);var t=Qy(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.props.resetTwitterSearch(),this.tick(),this.props.getUsers(this.props.searchId),this.props.getTweets(this.props.searchId),this.props.getImages(this.props.searchId),this.props.getVideos(this.props.searchId),this.props.getWebpages(this.props.searchId),this.props.getHashtags(this.props.searchId),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId),this.props.resetTwitterSearch()}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId)}},{key:"render",value:function(){return this.props.search.title?a.a.createElement("div",{className:Vy.a.Insights},a.a.createElement(Dy,{title:this.props.search.title,search:this.props.search,searches:this.props.searches,user:this.props.user,updateSearch:this.props.updateSearch,deleteSearch:this.props.deleteSearch,createArchive:this.props.createArchive}),a.a.createElement(Gy,{searchId:this.props.searchId,search:this.props.search,webpages:this.props.webpages})):a.a.createElement("div",null)}}]),n}(r.Component);Ky.propTypes={searchId:l.a.string,search:l.a.object,searches:l.a.array,user:l.a.object,webpages:l.a.array,getSearch:l.a.func,getTweets:l.a.func,getUsers:l.a.func,getVideos:l.a.func,getImages:l.a.func,getWebpages:l.a.func,resetTwitterSearch:l.a.func,updateSearch:l.a.func,deleteSearch:l.a.func,createArchive:l.a.func,getHashtags:l.a.func};var Zy={getSearch:hn,getTweets:cn,getUsers:dn,getImages:pn,getVideos:mn,getWebpages:An,resetTwitterSearch:an,updateSearch:ln,deleteSearch:un,createArchive:yn,getHashtags:fn},Xy=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,searches:e.searches,user:e.user,webpages:e.webpages,archived:e.search.archived}}),(function(e){return N(Zy,e)}))(Ky),e_=Zr(r.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));var t_=r.forwardRef((function(e,t){var n=e.alt,a=e.children,i=e.classes,o=e.className,s=e.component,l=void 0===s?"div":s,u=e.imgProps,c=e.sizes,d=e.src,f=e.srcSet,p=e.variant,m=void 0===p?"circle":p,y=Object(Hr.a)(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),_=null,v=function(e){var t=e.src,n=e.srcSet,a=r.useState(!1),i=a[0],o=a[1];return r.useEffect((function(){if(t||n){o(!1);var e=!0,r=new Image;return r.src=t,r.srcSet=n,r.onload=function(){e&&o("loaded")},r.onerror=function(){e&&o("error")},function(){e=!1}}}),[t,n]),i}({src:d,srcSet:f}),g=d||f,b=g&&"error"!==v;return _=b?r.createElement("img",Object(h.a)({alt:n,src:d,srcSet:f,sizes:c,className:i.img},u)):null!=a?a:g&&n?n[0]:r.createElement(e_,{className:i.fallback}),r.createElement(l,Object(h.a)({className:Object(Nr.a)(i.root,i.system,i[m],o,!b&&i.colorDefault),ref:t},y),_)})),n_=Object(Jr.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}}),{name:"MuiAvatar"})(t_),r_=r.forwardRef((function(e,t){var n=e.action,a=e.avatar,i=e.classes,o=e.className,s=e.component,l=void 0===s?"div":s,u=e.disableTypography,c=void 0!==u&&u,d=e.subheader,f=e.subheaderTypographyProps,p=e.title,m=e.titleTypographyProps,y=Object(Hr.a)(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),_=p;null==_||_.type===ll||c||(_=r.createElement(ll,Object(h.a)({variant:a?"body2":"h5",className:i.title,component:"span",display:"block"},m),_));var v=d;return null==v||v.type===ll||c||(v=r.createElement(ll,Object(h.a)({variant:a?"body2":"body1",className:i.subheader,color:"textSecondary",component:"span",display:"block"},f),v)),r.createElement(l,Object(h.a)({className:Object(Nr.a)(i.root,o),ref:t},y),a&&r.createElement("div",{className:i.avatar},a),r.createElement("div",{className:i.content},_,v),n&&r.createElement("div",{className:i.action},n))})),a_=Object(Jr.a)({root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}},{name:"MuiCardHeader"})(r_);function i_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var o_=function(e){lr()(n,e);var t=i_(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForUser(this.props.searchId,this.props.screenName)}},{key:"render",value:function(){var e=this,t=null,n=null;this.props.location&&(t=a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},a.a.createElement("a",{href:this.props.location},this.props.location))),this.props.url&&(n=a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.url));var r=new Date(this.props.created);return a.a.createElement(ys,{className:"".concat(Ts.a.Card),style:{height:"365px"}},a.a.createElement(a_,{avatar:a.a.createElement(n_,{"aria-label":"recipe"},a.a.createElement("img",{src:this.props.avatarUrl})),title:this.props.name,subheader:a.a.createElement("a",{href:"https://twitter.com/".concat(this.props.screenName)},"@",this.props.screenName)}),a.a.createElement(bs,null,a.a.createElement(ll,{variant:"body1",component:"p"},this.props.desc),t," ",n,a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},"Joined ",["January","February","March","April","May","June","July","August","September","October","November","December"][r.getMonth()]," ",r.getFullYear()),a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.friends," Following"),a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.followers," Followers")),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count))}}]),n}(r.Component);o_.propTypes={name:l.a.string,screenName:l.a.string,avatarUrl:l.a.string,location:l.a.string,url:l.a.string,created:l.a.string,friends:l.a.number,followers:l.a.number,desc:l.a.string,count:l.a.number,searchId:l.a.string,getTweetsForUser:l.a.func};var s_=n(255),l_=n.n(s_),u_=n(44),c_=n.n(u_);function d_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var f_=function(e){lr()(n,e);var t=d_(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=this,t=document.getElementById("App");return a.a.createElement(l_.a,{isOpen:this.props.isOpen,style:{content:{padding:"0px",marginLeft:"auto",marginRight:"auto",maxWidth:"400px"}},appElement:t},a.a.createElement("div",{className:c_.a.CloseModal},a.a.createElement("ion-icon",{name:"close-circle",onClick:function(){e.props.close()}})),a.a.createElement("div",{className:c_.a.Conversation},this.props.tweets.map((function(e){var t=c_.a.Tweet,n=null;return e.retweet&&(t=c_.a.Retweet,n=a.a.createElement("div",{className:c_.a.UserProfile},a.a.createElement("ion-icon",{name:"repeat"}),a.a.createElement("img",{src:e.user.avatarUrl}),a.a.createElement("div",null,a.a.createElement("a",{target:"_new",href:"https://twitter.com/".concat(e.user.screenName)},e.user.name),a.a.createElement("br",null),a.a.createElement("span",{className:c_.a.ScreenName},"@",e.user.screenName)))),a.a.createElement("div",{key:e.id,className:t},n,a.a.createElement(zy,{id:e.id,options:{cards:"hidden"}}))}))))}}]),n}(r.Component);function p_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}f_.propTypes={tweets:l.a.array,isOpen:l.a.bool,close:l.a.func};var m_=function(e){lr()(n,e);var t=p_(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.search.users.map((function(t){return a.a.createElement(o_,{key:t.id,name:t.name,screenName:t.screenName,avatarUrl:t.avatarUrl,url:t.url,created:t.created,desc:t.description,count:t.tweetsInSearch,friends:t.friendsCount,followers:t.followersCount,searchId:e.props.searchId,getTweetsForUser:e.props.getTweetsForUser})}))))}}]),n}(r.Component);function h_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}m_.propTypes={searchId:l.a.string,search:l.a.object,getTweetsForUser:l.a.func,resetTweets:l.a.func,tweets:l.a.array};var y_=function(e){lr()(n,e);var t=h_(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=this;return a.a.createElement("div",{style:{margin:"0 auto",maxWidth:"80%",marginTop:"1em"}},a.a.createElement(As,{variant:"extended",size:"medium",color:"primary","aria-label":"add",onClick:function(){return e.props.navigateTo("/search/".concat(e.props.searchId))}},a.a.createElement("ion-icon",{name:"arrow-round-back"}),"Back to Search"))}}]),n}(r.Component);function __(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}y_.propTypes={searchId:l.a.string,navigateTo:l.a.func};var v_=function(e){lr()(n,e);var t=__(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.search.users.length||this.scrolledUp())&&this.props.getUsers(this.props.searchId)}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(m_,{searchId:this.props.searchId,search:this.props.search,getTweetsForUser:this.props.getTweetsForUser,resetTweets:this.props.resetTweets,tweets:this.props.tweets}))}}]),n}(r.Component);v_.propTypes={searchId:l.a.string,search:l.a.object,getUsers:l.a.func,getSearch:l.a.func,getTweetsForUser:l.a.func,resetTweets:l.a.func,updateSearch:l.a.func,tweets:l.a.array,navigateTo:l.a.func};var g_={getSearch:hn,getUsers:dn,getTweetsForUser:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?user=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,updateSearch:ln},b_=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(g_,e),{navigateTo:function(t){e(Ze(t))}})}))(v_);var w_=Object(Jr.a)((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Object(h.a)(Object(h.a)({zIndex:1},e.typography.body2),{},{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,a=e.className,i=e.open,o=e.value,s=e.valueLabelDisplay;return"off"===s?t:r.cloneElement(t,{className:Object(Nr.a)(t.props.className,(i||"on"===s)&&n.open,n.thumb)},r.createElement("span",{className:Object(Nr.a)(n.offset,a)},r.createElement("span",{className:n.circle},r.createElement("span",{className:n.label},o))))}));function M_(e,t){return e-t}function k_(e,t,n){return Math.min(Math.max(t,e),n)}function L_(e,t){return e.reduce((function(e,n,r){var a=Math.abs(t-n);return null===e||a0&&oe.some((function(e){return e.label}))&&o.marked,!1===R&&o.trackFalse,"vertical"===E&&o.vertical,"inverted"===R&&o.trackInverted),onMouseDown:Ee},V),r.createElement("span",{className:o.rail}),r.createElement("span",{className:o.track,style:je}),r.createElement("input",{value:ie.join(","),name:L,type:"hidden"}),oe.map((function(e,t){var n,a=x_(e.value,k,w),i=D_[Le].offset(a);return n=!1===R?-1!==ie.indexOf(e.value):"normal"===R&&(ae?e.value>=ie[0]&&e.value<=ie[ie.length-1]:e.value<=ie[0])||"inverted"===R&&(ae?e.value<=ie[0]||e.value>=ie[ie.length-1]:e.value>=ie[0]),r.createElement(r.Fragment,{key:e.value},r.createElement("span",{style:i,"data-index":t,className:Object(Nr.a)(o.mark,n&&o.markActive)}),null!=e.label?r.createElement("span",{"aria-hidden":!0,"data-index":t,style:i,className:Object(Nr.a)(o.markLabel,n&&o.markLabelActive)},e.label):null)})),ie.map((function(e,t){var s=x_(e,k,w),l=D_[Le].offset(s);return r.createElement(W,{key:t,valueLabelFormat:B,valueLabelDisplay:U,className:o.valueLabel,value:"function"==typeof B?B(O(e),t):B,index:t,open:Z===t||G===t||"on"===U,disabled:m},r.createElement(A,{className:Object(Nr.a)(o.thumb,o["thumbColor".concat(Object($r.a)(u))],G===t&&o.active,m&&o.disabled,fe===t&&o.focusVisible),tabIndex:m?null:0,role:"slider",style:l,"data-index":t,"aria-label":y?y(t):n,"aria-labelledby":a,"aria-orientation":E,"aria-valuemax":O(w),"aria-valuemin":O(k),"aria-valuenow":O(e),"aria-valuetext":_?_(O(e),t):i,onKeyDown:Me,onFocus:_e,onBlur:ve,onMouseOver:ge,onMouseLeave:be}))})))})),C_=Object(Jr.a)((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Object(ws.e)(e.palette.primary.main,.62):Object(ws.a)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(ws.c)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(ws.c)(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(ws.c)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(ws.c)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Object(h.a)(Object(h.a)({},e.typography.body2),{},{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(j_),P_=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.row,o=void 0!==i&&i,s=Object(Hr.a)(e,["classes","className","row"]);return r.createElement("div",Object(h.a)({className:Object(Nr.a)(n.root,a,o&&n.row),ref:t},s))})),A_=Object(Jr.a)({root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},{name:"MuiFormGroup"})(P_),H_=r.forwardRef((function(e,t){e.checked;var n=e.classes,a=e.className,i=e.control,o=e.disabled,s=(e.inputRef,e.label),l=e.labelPlacement,u=void 0===l?"end":l,c=(e.name,e.onChange,e.value,Object(Hr.a)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),d=Fi(),f=o;void 0===f&&void 0!==i.props.disabled&&(f=i.props.disabled),void 0===f&&d&&(f=d.disabled);var p={disabled:f};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===i.props[t]&&void 0!==e[t]&&(p[t]=e[t])})),r.createElement("label",Object(h.a)({className:Object(Nr.a)(n.root,a,"end"!==u&&n["labelPlacement".concat(Object($r.a)(u))],f&&n.disabled),ref:t},c),r.cloneElement(i,p),r.createElement(ll,{component:"span",className:Object(Nr.a)(n.label,f&&n.disabled)},s))})),R_=Object(Jr.a)((function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}}),{name:"MuiFormControlLabel"})(H_),N_=Zr(r.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),I_=Zr(r.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),W_=Zr(r.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"})),F_=r.createElement(I_,null),U_=r.createElement(N_,null),z_=r.createElement(W_,null),B_=r.forwardRef((function(e,t){var n=e.checkedIcon,a=void 0===n?F_:n,i=e.classes,o=e.color,s=void 0===o?"secondary":o,l=e.icon,u=void 0===l?U_:l,c=e.indeterminate,d=void 0!==c&&c,f=e.indeterminateIcon,p=void 0===f?z_:f,m=e.inputProps,y=e.size,_=void 0===y?"medium":y,v=Object(Hr.a)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]);return r.createElement(Qh,Object(h.a)({type:"checkbox",classes:{root:Object(Nr.a)(i.root,i["color".concat(Object($r.a)(s))],d&&i.indeterminate),checked:i.checked,disabled:i.disabled},color:s,inputProps:Object(h.a)({"data-indeterminate":d},m),icon:r.cloneElement(d?p:u,{fontSize:"small"===_?"small":"default"}),checkedIcon:r.cloneElement(d?p:a,{fontSize:"small"===_?"small":"default"}),ref:t},v))})),V_=Object(Jr.a)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(B_),q_="undefined"==typeof window?r.useEffect:r.useLayoutEffect,J_=r.forwardRef((function(e,t){var n=e.alignItems,a=void 0===n?"center":n,o=e.autoFocus,s=void 0!==o&&o,l=e.button,u=void 0!==l&&l,c=e.children,d=e.classes,f=e.className,p=e.component,m=e.ContainerComponent,y=void 0===m?"li":m,_=e.ContainerProps,v=(_=void 0===_?{}:_).className,g=Object(Hr.a)(_,["className"]),b=e.dense,w=void 0!==b&&b,M=e.disabled,k=void 0!==M&&M,L=e.disableGutters,T=void 0!==L&&L,x=e.divider,S=void 0!==x&&x,Y=e.focusVisibleClassName,E=e.selected,D=void 0!==E&&E,O=Object(Hr.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),j=r.useContext(No),C={dense:w||j.dense||!1,alignItems:a},P=r.useRef(null);q_((function(){s&&P.current&&P.current.focus()}),[s]);var A=r.Children.toArray(c),H=A.length&&qi(A[A.length-1],["ListItemSecondaryAction"]),R=na(r.useCallback((function(e){P.current=i.findDOMNode(e)}),[]),t),N=Object(h.a)({className:Object(Nr.a)(d.root,f,C.dense&&d.dense,!T&&d.gutters,S&&d.divider,k&&d.disabled,u&&d.button,"center"!==a&&d.alignItemsFlexStart,H&&d.secondaryAction,D&&d.selected),disabled:k},O),I=p||"li";return u&&(N.component=p||"div",N.focusVisibleClassName=Object(Nr.a)(d.focusVisible,Y),I=Ea),H?(I=N.component||p?I:"div","li"===y&&("li"===I?I="div":"li"===N.component&&(N.component="div")),r.createElement(No.Provider,{value:C},r.createElement(y,Object(h.a)({className:Object(Nr.a)(d.container,v),ref:R},g),r.createElement(I,N,A),A.pop()))):r.createElement(No.Provider,{value:C},r.createElement(I,Object(h.a)({ref:R},N),A))})),$_=Object(Jr.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(J_),G_=r.forwardRef((function(e,t){var n,a=e.classes,i=e.className,o=e.component,s=void 0===o?"li":o,l=e.disableGutters,u=void 0!==l&&l,c=e.ListItemClasses,d=e.role,f=void 0===d?"menuitem":d,p=e.selected,m=e.tabIndex,y=Object(Hr.a)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==m?m:-1),r.createElement($_,Object(h.a)({button:!0,role:f,tabIndex:n,component:s,selected:p,disableGutters:u,classes:Object(h.a)({dense:a.dense},c),className:Object(Nr.a)(a.root,i,p&&a.selected,!u&&a.gutters),ref:t},y))})),Q_=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.body1),{},Object(Rr.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(h.a)(Object(h.a)({},e.typography.body2),{},{minHeight:"auto"})}}),{name:"MuiMenuItem"})(G_),K_=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"div":i,s=e.disableGutters,l=void 0!==s&&s,u=e.variant,c=void 0===u?"regular":u,d=Object(Hr.a)(e,["classes","className","component","disableGutters","variant"]);return r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,n[c],a,!l&&n.gutters),ref:t},d))})),Z_=Object(Jr.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(Rr.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(K_),X_=r.createElement(ea,null),ev=r.createElement(Xr,null),tv=r.createElement(Xr,null),nv=r.createElement(ea,null),rv=r.forwardRef((function(e,t){var n=e.backIconButtonProps,a=e.count,i=e.nextIconButtonProps,o=e.onChangePage,s=e.page,l=e.rowsPerPage,u=Object(Hr.a)(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=Ha();return r.createElement("div",Object(h.a)({ref:t},u),r.createElement(ks,Object(h.a)({onClick:function(e){o(e,s-1)},disabled:0===s,color:"inherit"},n),"rtl"===c.direction?X_:ev),r.createElement(ks,Object(h.a)({onClick:function(e){o(e,s+1)},disabled:-1!==a&&s>=Math.ceil(a/l)-1,color:"inherit"},i),"rtl"===c.direction?tv:nv))}));function av(e){var t=r.useState(e),n=t[0],a=t[1],i=e||n;return r.useEffect((function(){null==n&&a("mui-".concat(Math.round(1e5*Math.random())))}),[n]),i}var iv=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))},ov=[10,25,50,100],sv=r.forwardRef((function(e,t){var n,a=e.ActionsComponent,i=void 0===a?rv:a,o=e.backIconButtonProps,s=e.backIconButtonText,l=void 0===s?"Previous page":s,u=e.classes,c=e.className,d=e.colSpan,f=e.component,p=void 0===f?xy:f,m=e.count,y=e.labelDisplayedRows,_=void 0===y?iv:y,v=e.labelRowsPerPage,g=void 0===v?"Rows per page:":v,b=e.nextIconButtonProps,w=e.nextIconButtonText,M=void 0===w?"Next page":w,k=e.onChangePage,L=e.onChangeRowsPerPage,T=e.page,x=e.rowsPerPage,S=e.rowsPerPageOptions,Y=void 0===S?ov:S,E=e.SelectProps,D=void 0===E?{}:E,O=Object(Hr.a)(e,["ActionsComponent","backIconButtonProps","backIconButtonText","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","nextIconButtonText","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);p!==xy&&"td"!==p||(n=d||1e3);var j=av(),C=av(),P=D.native?"option":Q_;return r.createElement(p,Object(h.a)({className:Object(Nr.a)(u.root,c),colSpan:n,ref:t},O),r.createElement(Z_,{className:u.toolbar},r.createElement("div",{className:u.spacer}),Y.length>1&&r.createElement(ll,{color:"inherit",variant:"body2",className:u.caption,id:C},g),Y.length>1&&r.createElement(us,Object(h.a)({classes:{select:u.select,icon:u.selectIcon},input:r.createElement(ji,{className:Object(Nr.a)(u.input,u.selectRoot)}),value:x,onChange:L,id:j,labelId:C},D),Y.map((function(e){return r.createElement(P,{className:u.menuItem,key:e.value?e.value:e,value:e.value?e.value:e},e.label?e.label:e)}))),r.createElement(ll,{color:"inherit",variant:"body2",className:u.caption},_({from:0===m?0:T*x+1,to:-1!==m?Math.min(m,(T+1)*x):(T+1)*x,count:-1===m?-1:m,page:T})),r.createElement(i,{className:u.actions,backIconButtonProps:Object(h.a)({title:l,"aria-label":l},o),count:m,nextIconButtonProps:Object(h.a)({title:M,"aria-label":M},b),onChangePage:k,page:T,rowsPerPage:x})))})),lv=Object(Jr.a)((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),overflow:"auto","&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(sv),uv=n(91),cv=n.n(uv);function dv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var fv=function(e){lr()(n,e);var t=dv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r.state={postsToShow:r.props.chunkSize,rangeValue:[1,100],displayRetweets:r.props.displayRetweets},r.tweets=r.props.tweets,r.page=0,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("scroll",(function(){return e.handleScroll()}))}},{key:"componentDidUpdate",value:function(){this.tweets.length>0&&this.props.tweets.length>0&&this.tweets[0].id!==this.props.tweets[0].id&&(this.tweets=this.props.tweets)}},{key:"handlePageChange",value:function(e,t){var n=100*t;n<=this.props.tweetCount&&(this.props.getTweets(this.props.searchId,!0,n,t),this.page=t)}},{key:"update",value:function(){document.documentElement.offsetHeight-(window.scrollY+window.innerHeight)<150&&this.setState({postsToShow:this.state.postsToShow+this.props.chunkSize}),this.ticking=!1}},{key:"handleScroll",value:function(){var e=this;this.ticking||(this.ticking=!0,requestAnimationFrame((function(){return e.update()})))}},{key:"handleSlide",value:function(e,t){this.setState({rangeValue:t,postsToShow:this.props.chunkSize})}},{key:"displayRetweets",value:function(e){this.setState({displayRetweets:e})}},{key:"render",value:function(){var e=this,t=this.tweets;return t=t.filter((function(t,n){return n>e.state.rangeValue[0]&&n<=e.state.rangeValue[1]+1})),a.a.createElement("div",null,a.a.createElement("div",{className:cv.a.Controls},a.a.createElement($i,{component:"fieldset"},a.a.createElement(A_,null,a.a.createElement(R_,{control:a.a.createElement(V_,{checked:this.state.displayRetweets,onChange:function(t){e.displayRetweets(t.target.checked)},value:"disretw"}),label:"Display Retweets"}))),a.a.createElement("div",null,a.a.createElement("div",{style:{paddingTop:"40px"}},a.a.createElement(C_,{value:this.state.rangeValue,valueLabelFormat:function(t){var n=t+100*e.page;return n>e.props.tweetCount?e.props.tweetCount:n},onChange:function(t,n){e.handleSlide(t,n)},valueLabelDisplay:"on",step:10,marks:!0,min:1,max:100})),a.a.createElement(lv,{component:"div",count:this.props.tweetCount?this.props.tweetCount:0,rowsPerPage:100,rowsPerPageOptions:[100],labelRowsPerPage:"Tweets per page:",page:this.props.page?this.props.page:this.page,onChangePage:function(t,n){e.handlePageChange(t,n)}}))),a.a.createElement("div",{className:cv.a.Holder},t.filter((function(t){return e.state.displayRetweets||!t.retweet})).slice(0,this.state.postsToShow).map((function(e,t){return a.a.createElement(zy,{key:"t".concat(t),id:e.id})}))))}}]),n}(r.Component);fv.defaultProps={displayRetweets:!0,chunkSize:20},fv.propTypes={searchId:l.a.string,displayRetweets:l.a.bool,chunkSize:l.a.number,tweets:l.a.array,tweetCount:l.a.number,getTweets:l.a.func,page:l.a.number};var pv=fv;function mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var hv=function(e){lr()(n,e);var t=mv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),0===this.props.search.tweets.length&&this.props.getTweets(this.props.searchId)}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(pv,{displayRetweets:this.props.displayRetweets,chunkSize:this.props.chunkSize,tweets:this.props.search.tweets,tweetCount:this.props.search.tweetCount,searchId:this.props.searchId,getTweets:this.props.getTweets}))}}]),n}(r.Component);hv.propTypes={displayRetweets:l.a.bool,chunkSize:l.a.number,searchId:l.a.string,search:l.a.object,getTweets:l.a.func,getSearch:l.a.func,updateSearch:l.a.func,navigateTo:l.a.func};var yv=hv,_v={getSearch:hn,getTweets:cn,updateSearch:ln},vv=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(_v,e),{navigateTo:function(t){e(Ze(t))}})}))(yv),gv=n(256),bv=n.n(gv),wv=n(76),Mv=n.n(wv),kv=n(55),Lv=n.n(kv);function Tv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var xv=function(e){lr()(n,e);var t=Tv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){this.props.checkArchive(this.props.url)}},{key:"saveArchive",value:function(){this.props.saveArchive(this.props.url)}},{key:"render",value:function(){var e=this;if(this.props.archive&&this.props.archive.url){var t=_l()(this.props.archive.time).fromNow(),n="Last archived ".concat(t);return a.a.createElement(ks,{"aria-label":"view on Internet Archive",className:"".concat(Lv.a.Wayback," ").concat(Lv.a.WaybackFound),href:this.props.archive.url,target:"_new"},a.a.createElement("img",{title:n,alt:n,src:Mv.a}))}if(this.props.archive&&this.props.archive.error){var r="Internet Archive cannot archive!";return a.a.createElement(ks,{"aria-label":"archive at Internet Archive",className:"".concat(Lv.a.Wayback," ").concat(Lv.a.WaybackError),onClick:function(){e.saveArchive()}},a.a.createElement("img",{title:r,alt:r,src:Mv.a}))}var i="Click to archive at Internet Archive";return a.a.createElement(ks,{"aria-label":"archive at Internet Archive",className:Lv.a.Wayback,onClick:function(){e.saveArchive()}},a.a.createElement("img",{title:i,alt:i,src:Mv.a}))}}]),n}(r.Component);xv.propTypes={url:l.a.string,archive:l.a.object,checkArchive:l.a.func,saveArchive:l.a.func};var Sv=n(92),Yv=n.n(Sv),Ev=n(257),Dv=n.n(Ev),Ov=["video","audio","picture","iframe","img"],jv=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.component,s=void 0===o?"div":o,l=e.image,u=e.src,c=e.style,d=Object(Hr.a)(e,["children","classes","className","component","image","src","style"]),f=-1!==Ov.indexOf(s),p=!f&&l?Object(h.a)({backgroundImage:'url("'.concat(l,'")')},c):c;return r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,i,f&&a.media,-1!=="picture img".indexOf(s)&&a.img),ref:t,style:p,src:f?l||u:void 0},d),n)})),Cv=Object(Jr.a)({root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}},{name:"MuiCardMedia"})(jv);function Pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Av=function(e){lr()(n,e);var t=Pv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).state={selected:r.props.selected},r}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForUrl(this.props.searchId,this.props.url)}},{key:"toggleSelect",value:function(){return this.state.selected?this.deselect():this.select()}},{key:"select",value:function(){this.setState({selected:!0}),this.props.selectWebpage(this.props.searchId,this.props.url)}},{key:"deselect",value:function(){this.setState({selected:!1}),this.props.deselectWebpage(this.props.searchId,this.props.url)}},{key:"archive",value:function(){this.props.archive(this.props.url)}},{key:"render",value:function(){var e=this,t=new URL(this.props.url).host;t=t.replace(/^www\./,"");var n=this.props.image||Jy.a;return a.a.createElement(ys,{className:"".concat(Ts.a.Card," ").concat(Ts.a.Scroll," ").concat(Yv.a.Webpage)},a.a.createElement(Cv,{style:{paddingTop:"160px",position:"relative"},image:n},a.a.createElement(V_,{className:Dv.a.Checkbox,checked:this.state.selected,onChange:function(){return e.toggleSelect()},inputProps:{"aria-label":"primary checkbox"}})),a.a.createElement(bs,{style:{overflowY:"scroll",height:"190px"}},a.a.createElement(ll,{variant:"h2",component:"h2"},this.props.title),a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.description)),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count,a.a.createElement(zs,{size:"small",color:"primary",href:this.props.url,target:"_new",className:Yv.a.UrlButton},t),a.a.createElement(bv.a,{offsetVertical:800},a.a.createElement(xv,{url:this.props.url,archive:this.props.archive,checkArchive:this.props.checkArchive,saveArchive:this.props.saveArchive}))))}}]),n}(r.Component);function Hv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Av.propTypes={url:l.a.string,title:l.a.string,image:l.a.string,description:l.a.string,keywords:l.a.array,count:l.a.number,selected:l.a.bool,deselected:l.a.bool,searchId:l.a.string,archive:l.a.object,getTweetsForUrl:l.a.func,selectWebpage:l.a.func,deselectWebpage:l.a.func,checkArchive:l.a.func,saveArchive:l.a.func};var Rv=function(e){lr()(n,e);var t=Hv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.webpages.map((function(t){return a.a.createElement(Av,{key:t.url,url:t.url,title:t.title,image:t.image,count:t.count,description:t.description,keywords:t.keywords,selected:t.selected,deselected:t.deselected,archive:t.archive,checkArchive:e.props.checkArchive,saveArchive:e.props.saveArchive,searchId:e.props.searchId,getTweetsForUrl:e.props.getTweetsForUrl,selectWebpage:e.props.selectWebpage,deselectWebpage:e.props.deselectWebpage})}))))}}]),n}(r.Component);Rv.propTypes={searchId:l.a.string,search:l.a.object,webpages:l.a.array,getTweetsForUrl:l.a.func,resetTweets:l.a.func,tweets:l.a.array,selectWebpage:l.a.func,deselectWebpage:l.a.func,checkArchive:l.a.func,saveArchive:l.a.func};var Nv=n(258),Iv=n.n(Nv);function Wv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Fv=function(e){lr()(n,e);var t=Wv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.webpages.length||this.scrolledUp())&&(this.props.getQueueStats(this.props.searchId),this.props.getWebpages(this.props.searchId))}},{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement("div",{className:Iv.a.Queue},"URLs Checked: ",this.props.total-this.props.remaining,"/",this.props.total),a.a.createElement(Rv,{searchId:this.props.searchId,search:this.props.search,webpages:this.props.webpages,getTweetsForUrl:this.props.getTweetsForUrl,resetTweets:this.props.resetTweets,tweets:this.props.tweets,selectWebpage:this.props.selectWebpage,deselectWebpage:this.props.deselectWebpage,checkArchive:this.props.checkArchive,saveArchive:this.props.saveArchive}))}}]),n}(r.Component);Fv.propTypes={searchId:l.a.string,search:l.a.object,webpages:l.a.array,getWebpages:l.a.func,resetWebpages:l.a.func,getQueueStats:l.a.func,getTweetsForUrl:l.a.func,resetTweets:l.a.func,total:l.a.number,remaining:l.a.number,tweets:l.a.array,selectWebpage:l.a.func,deselectWebpage:l.a.func,checkArchive:l.a.func,saveArchive:l.a.func,getSearch:l.a.func,updateSearch:l.a.func,navigateTo:l.a.func};var Uv={getSearch:hn,getWebpages:An,resetWebpages:function(){return{type:"RESET_WEBPAGES"}},getQueueStats:function(e){return function(t){fetch("/api/v1/search/".concat(e,"/queue"),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t(function(e){return{type:"SET_QUEUE",queue:e}}(e))}))}},getTweetsForUrl:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?url=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,selectWebpage:function(e,t){return function(n){n({type:"SELECT_WEBPAGE",searchId:e,url:t});var r={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,selected:!0}),credentials:"same-origin"};fetch("/api/v1/search/".concat(e,"/webpages"),r)}},deselectWebpage:function(e,t){return function(n){n({type:"DESELECT_WEBPAGE",searchId:e,url:t});var r={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,deselected:!0}),credentials:"same-origin"};fetch("/api/v1/search/".concat(e,"/webpages"),r)}},checkArchive:function(e){return function(t){var n="/api/v1/wayback/"+encodeURIComponent(e);fetch(n,{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(n){null!==n&&t({type:"SET_WEBPAGE_ARCHIVE",url:e,archiveUrl:n.url,archiveTime:n.time})}))}},saveArchive:function(e){return function(){var t=Pn()(jn.a.mark((function t(n){var r,a,i;return jn.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="/api/v1/wayback/"+encodeURIComponent(e),t.next=3,fetch(r,{credentials:"same-origin",method:"PUT"});case 3:return a=t.sent,t.next=6,a.json();case 6:i=t.sent,n(i?{type:"SET_WEBPAGE_ARCHIVE",url:e,archiveUrl:i.url,archiveTime:i.time}:{type:"ARCHIVE_ERROR",url:e});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},updateSearch:ln},zv=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,webpages:e.webpages,total:e.queue.total,remaining:e.queue.remaining,tweets:e.tweets}}),(function(e){return Object.assign(N(Uv,e),{navigateTo:function(t){e(Ze(t))}})}))(Fv);function Bv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Vv=function(e){lr()(n,e);var t=Bv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForImage(this.props.searchId,this.props.url)}},{key:"render",value:function(){var e=this;return a.a.createElement(ys,{className:"".concat(Ts.a.Card)},a.a.createElement(Cv,{style:{paddingTop:"240px",position:"relative"},image:this.props.url}),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count))}}]),n}(r.Component);function qv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Vv.propTypes={url:l.a.string,count:l.a.number,searchId:l.a.string,getTweetsForImage:l.a.func};var Jv=function(e){lr()(n,e);var t=qv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.search.images.map((function(t){return a.a.createElement(Vv,{key:t.url,url:t.url,count:t.count,searchId:e.props.searchId,getTweetsForImage:e.props.getTweetsForImage})}))))}}]),n}(r.Component);function $v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Jv.propTypes={searchId:l.a.string,search:l.a.object,getTweetsForImage:l.a.func,resetTweets:l.a.func,tweets:l.a.array};var Gv=function(e){lr()(n,e);var t=$v(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.search.images.length||this.scrolledUp())&&this.props.getImages(this.props.searchId)}},{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(Jv,{searchId:this.props.searchId,search:this.props.search,getTweetsForImage:this.props.getTweetsForImage,resetTweets:this.props.resetTweets,tweets:this.props.tweets}))}}]),n}(r.Component);Gv.propTypes={searchId:l.a.string,search:l.a.object,getImages:l.a.func,getSearch:l.a.func,getTweetsForImage:l.a.func,resetTweets:l.a.func,updateSearch:l.a.func,tweets:l.a.array,navigateTo:l.a.func};var Qv={getSearch:hn,getImages:pn,getTweetsForImage:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?image=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,updateSearch:ln},Kv=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(Qv,e),{navigateTo:function(t){e(Ze(t))}})}))(Gv);function Zv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Xv=function(e){lr()(n,e);var t=Zv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForVideo(this.props.searchId,this.props.url)}},{key:"render",value:function(){var e=this;return a.a.createElement(ys,{className:"".concat(Ts.a.Card),style:{height:"365px"}},a.a.createElement(Cv,null,a.a.createElement("video",{style:{width:"300px",height:"300px"},controls:!0,src:this.props.url})),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count))}}]),n}(r.Component);function eg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Xv.propTypes={url:l.a.string,count:l.a.number,searchId:l.a.string,getTweetsForVideo:l.a.func};var tg=function(e){lr()(n,e);var t=eg(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.search.videos.map((function(t){return a.a.createElement(Xv,{key:t.url,url:t.url,count:t.count,searchId:e.props.searchId,getTweetsForVideo:e.props.getTweetsForVideo})}))))}}]),n}(r.Component);function ng(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}tg.propTypes={searchId:l.a.string,search:l.a.object,getTweetsForVideo:l.a.func,resetTweets:l.a.func,tweets:l.a.array};var rg=function(e){lr()(n,e);var t=ng(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.search.videos.length||this.scrolledUp())&&this.props.getVideos(this.props.searchId)}},{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(tg,{searchId:this.props.searchId,search:this.props.search,getTweetsForVideo:this.props.getTweetsForVideo,resetTweets:this.props.resetTweets,tweets:this.props.tweets}))}}]),n}(r.Component);rg.propTypes={searchId:l.a.string,search:l.a.object,getVideos:l.a.func,getSearch:l.a.func,getTweetsForVideo:l.a.func,resetTweets:l.a.func,updateSearch:l.a.func,tweets:l.a.array,navigateTo:l.a.func};var ag={getSearch:hn,getVideos:mn,getTweetsForVideo:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?video=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,updateSearch:ln},ig=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(ag,e),{navigateTo:function(t){e(Ze(t))}})}))(rg),og={variant:"body"},sg=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"tbody":i,s=Object(Hr.a)(e,["classes","className","component"]);return r.createElement(wy.Provider,{value:og},r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a),ref:t,role:"tbody"===o?null:"rowgroup"},s)))})),lg=Object(Jr.a)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(sg);function ug(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var cg=function(e){lr()(n,e);var t=ug(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){var e=this.props.forUserId||this.props.user.id;this.props.getSearches(e)}},{key:"render",value:function(){var e=this;return a.a.createElement(by,null,a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,null,"Title"),a.a.createElement(xy,null,"Tweet Count"),a.a.createElement(xy,null,"Created"),a.a.createElement(xy,null,"Last Update"),a.a.createElement(xy,null,"Active"),a.a.createElement(xy,null,"Public"),a.a.createElement(xy,null,"Archive"),a.a.createElement(xy,null,"Delete"))),a.a.createElement(lg,null,this.props.searches.map((function(t){var n=_l()(t.created).local().format("MMM D h:mm A"),r=_l()(t.updated).local().format("MMM D h:mm A");return a.a.createElement(Yy,{key:t.id},a.a.createElement(xy,null,a.a.createElement(xr,{to:"/search/".concat(t.id,"/")},t.title)),a.a.createElement(xy,null,a.a.createElement("ion-icon",{name:"logo-twitter"})," ",t.tweetCount.toLocaleString()),a.a.createElement(xy,null,n),a.a.createElement(xy,null,r),a.a.createElement(xy,null,a.a.createElement(ay,{id:t.id,active:t.active,user:e.props.user,searches:e.props.searches,updateSearch:e.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(oy,{id:t.id,public:t.public,user:e.props.user,searches:e.props.searches,updateSearch:e.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(Hh,{id:t.id,active:t.active,archived:t.archived,archiveStarted:t.archiveStarted})),a.a.createElement(xy,null,a.a.createElement(hy,{id:t.id,deleteSearch:e.props.deleteSearch})))}))))}}]),n}(r.Component);cg.propTypes={searches:l.a.array,updateSearch:l.a.func,deleteSearch:l.a.func,getSearches:l.a.func,user:l.a.object,forUserId:l.a.number};var dg={getSearches:Mn,updateSearch:ln,deleteSearch:un},fg=ne((function(e,t){return{searches:e.searches,user:e.user,forUserId:t.match.params.userId}}),(function(e){return N(dg,e)}))(cg),pg=n(27),mg=n.n(pg);function hg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var yg=function(e){lr()(n,e);var t=hg(n);function n(){var e;return ar()(this,n),(e=t.call(this)).toggleActive=e.toggleActive.bind(Os()(e)),e.toggleAdmin=e.toggleAdmin.bind(Os()(e)),e.udpateQuota=e.updateQuota.bind(Os()(e)),e}return or()(n,[{key:"componentDidMount",value:function(){var e=this;0===this.props.users.length&&this.tick(),this.timerId=setInterval((function(){e.tick()}),1e4)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){this.props.getUsers()}},{key:"toggleActive",value:function(e){e.active?this.props.deactivateUser(e):this.props.activateUser(e)}},{key:"toggleAdmin",value:function(e){e.isSuperUser?this.props.deactivateAdmin(e):this.props.activateAdmin(e)}},{key:"updateQuota",value:function(e,t){this.props.updateQuota(e,t)}},{key:"render",value:function(){var e=this;return a.a.createElement(by,{className:mg.a.UserList},a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,{className:mg.a.Avatar},"Avatar"),a.a.createElement(xy,{className:mg.a.Username},"Username"),a.a.createElement(xy,{className:mg.a.Name},"Name"),a.a.createElement(xy,{className:mg.a.Collections},"Collections"),a.a.createElement(xy,{className:mg.a.Tweets},"Tweets"),a.a.createElement(xy,{className:mg.a.Active},"Active"),a.a.createElement(xy,{className:mg.a.Admin},"Admin"),a.a.createElement(xy,{className:mg.a.Quota},"Quota"))),a.a.createElement(lg,null,this.props.users.map((function(t){var n=t.searches.map((function(e){return e.tweetCount})).reduce((function(e,t){return e+t}),0);return a.a.createElement(Yy,{key:t.twitterScreenName},a.a.createElement(xy,{className:mg.a.Avatar},a.a.createElement("a",{href:"https://twitter.com/".concat(t.twitterScreenName)},a.a.createElement("img",{src:t.twitterAvatarUrl}))),a.a.createElement(xy,{className:mg.a.Username},a.a.createElement(xr,{to:"/searches/".concat(t.id)},t.twitterScreenName)),a.a.createElement(xy,{className:mg.a.Name},t.name),a.a.createElement(xy,{className:mg.a.Collections},t.searches.length),a.a.createElement(xy,{className:mg.a.Tweets},n),a.a.createElement(xy,{className:mg.a.Active},a.a.createElement(Zh,{checked:t.active,onChange:function(){e.toggleActive(t)},color:"primary"})),a.a.createElement(xy,{className:ny.Admin},a.a.createElement(Zh,{checked:t.isSuperUser,onChange:function(){e.toggleAdmin(t)},color:"primary"})),a.a.createElement(xy,{className:mg.a.Quota},a.a.createElement(fs,{className:mg.a.TweetQuota,defaultValue:t.tweetQuota,onChange:function(n){e.updateQuota(t,n.target.value)}})))}))))}}]),n}(r.Component);yg.propTypes={users:l.a.array,getUsers:l.a.func,activateUser:l.a.func,deactivateUser:l.a.func,activateAdmin:l.a.func,deactivateAdmin:l.a.func,updateQuota:l.a.func};var _g={getUsers:function(){return function(e){fetch("/api/v1/users",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){e({type:"SET_USERS",users:t})}))}},activateUser:function(e){return function(t){t({type:"ACTIVATE_USER",user:e}),t(Nt(At(At({},e),{},{active:!0})))}},deactivateUser:function(e){return function(t){t({type:"DEACTIVATE_USER",user:e}),t(Nt(At(At({},e),{},{active:!1})))}},activateAdmin:function(e){return function(t){t({type:"ACTIVATE_ADMIN",user:e}),t(Nt(At(At({},e),{},{isSuperUser:!0})))}},deactivateAdmin:function(e){return function(t){t({type:"DEACTIVATE_ADMIN",user:e}),t(Nt(At(At({},e),{},{isSuperUser:!1})))}},updateQuota:function(e,t){return function(n){n({type:"UPDATE_QUOTA",user:e,quota:t}),n(Nt(At(At({},e),{},{tweetQuota:t})))}}},vg=ne((function(e){return{users:e.users}}),(function(e){return N(_g,e)}))(yg),gg=[0,1,2,3,4,5,6,7,8,9,10],bg=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function wg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var Mg=r.forwardRef((function(e,t){var n=e.alignContent,a=void 0===n?"stretch":n,i=e.alignItems,o=void 0===i?"stretch":i,s=e.classes,l=e.className,u=e.component,c=void 0===u?"div":u,d=e.container,f=void 0!==d&&d,p=e.direction,m=void 0===p?"row":p,y=e.item,_=void 0!==y&&y,v=e.justify,g=void 0===v?"flex-start":v,b=e.lg,w=void 0!==b&&b,M=e.md,k=void 0!==M&&M,L=e.sm,T=void 0!==L&&L,x=e.spacing,S=void 0===x?0:x,Y=e.wrap,E=void 0===Y?"wrap":Y,D=e.xl,O=void 0!==D&&D,j=e.xs,C=void 0!==j&&j,P=e.zeroMinWidth,A=void 0!==P&&P,H=Object(Hr.a)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),R=Object(Nr.a)(s.root,l,f&&[s.container,0!==S&&s["spacing-xs-".concat(String(S))]],_&&s.item,A&&s.zeroMinWidth,"row"!==m&&s["direction-xs-".concat(String(m))],"wrap"!==E&&s["wrap-xs-".concat(String(E))],"stretch"!==o&&s["align-items-xs-".concat(String(o))],"stretch"!==a&&s["align-content-xs-".concat(String(a))],"flex-start"!==g&&s["justify-xs-".concat(String(g))],!1!==C&&s["grid-xs-".concat(String(C))],!1!==T&&s["grid-sm-".concat(String(T))],!1!==k&&s["grid-md-".concat(String(k))],!1!==w&&s["grid-lg-".concat(String(w))],!1!==O&&s["grid-xl-".concat(String(O))]);return r.createElement(c,Object(h.a)({className:R,ref:t},H))})),kg=Object(Jr.a)((function(e){return Object(h.a)(Object(h.a)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return gg.forEach((function(r){var a=e.spacing(r);0!==a&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(wg(a,2)),width:"calc(100% + ".concat(wg(a),")"),"& > $item":{padding:wg(a,2)}})})),n}(e,"xs")),e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};bg.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var a="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:a,flexGrow:0,maxWidth:a}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?Object(h.a)(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(Mg),Lg=n(77),Tg=n.n(Lg);function xg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Sg=function(e){lr()(n,e);var t=xg(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){var e=this.props.forUserId;e?this.props.getPublicSearches(e):this.props.getPublicSearches()}},{key:"render",value:function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement(kg,{container:!0,spacing:3,className:Tg.a.Header},a.a.createElement(kg,{item:!0,xs:9},a.a.createElement(ll,{variant:"body1"},"MITH is using DocNow to collect tweets for humanities research.")),a.a.createElement(kg,{item:!0,xs:3},a.a.createElement(zs,{variant:"contained",color:"primary",className:Tg.a.FindMeBtn},"Find me")),a.a.createElement(kg,{item:!0,xs:12,className:Tg.a.Title},a.a.createElement(ll,{variant:"h2"},"Active Collections"))),a.a.createElement(by,null,a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,null,"Title"),a.a.createElement(xy,null,"Tweet Count"),a.a.createElement(xy,null,"Users"),a.a.createElement(xy,null,"Created"),a.a.createElement(xy,null,"Last Update"),a.a.createElement(xy,null,"Collector"),a.a.createElement(xy,null,"Contact"))),a.a.createElement(lg,null,this.props.searches.map((function(e){var t=_l()(e.created).local().format("MMM D h:mm A"),n=_l()(e.updated).local().format("MMM D h:mm A"),r=e.creator.email?e.creator.email:"No email provided.";return a.a.createElement(Yy,{key:e.id},a.a.createElement(xy,null,a.a.createElement(xr,{to:"/collection/".concat(e.id,"/")},e.title)),a.a.createElement(xy,null,a.a.createElement("ion-icon",{name:"logo-twitter"})," ",e.tweetCount.toLocaleString()),a.a.createElement(xy,null,e.userCount),a.a.createElement(xy,null,t),a.a.createElement(xy,null,n),a.a.createElement(xy,null,a.a.createElement("a",{href:"https://twitter.com/".concat(e.creator.twitterScreenName)},e.creator.twitterScreenName)),a.a.createElement(xy,null,r))})))))}}]),n}(r.Component);Sg.propTypes={searches:l.a.array.isRequired,settings:l.a.object,forUserId:l.a.number,getPublicSearches:l.a.func.isRequired};var Yg={getPublicSearches:function(){return function(e){fetch("/api/v1/searches?public=true",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){e(wn(t))}))}}},Eg=ne((function(e,t){return{settings:e.settings,searches:e.searches,forUserId:t.match.params.userId}}),(function(e){return N(Yg,e)}))(Sg),Dg=n(78),Og=n.n(Dg);function jg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Cg=function(e){lr()(n,e);var t=jg(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).state={headerStyle:Og.a.Header},r}return or()(n,[{key:"componentWillMount",value:function(){nr.dispatch(Yt()),nr.dispatch(Rt()),nr.dispatch((function(e){fetch("/api/v1/world",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){var n=Object.values(t).reduce((function(e,t){return e[t.name]?e[t.name].push(t):e[t.name]=[t],e}),{});Object.keys(n).map((function(e){n[e].length>1&&(n[e].forEach((function(e){var t=e.name+", "+e.countryCode;n[t]=[e]})),delete n[e])}),{}),e(function(e){return{type:"SET_WORLD",world:e}}(n))}))})),nr.dispatch(Mn()),fetch("/api/v1/setup",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){e||nr.dispatch(Ze("/settings/"))}))}},{key:"componentDidMount",value:function(){this.setMediaQuery("(max-width: 780px)",Og.a.App,Og.a.AppUnder780px)}},{key:"render",value:function(){return a.a.createElement("div",{id:"App",className:this.state.mediaStyle},a.a.createElement(Ga,null),a.a.createElement("main",null,a.a.createElement(br,null,a.a.createElement(Ge,null,a.a.createElement(ze,{exact:!0,name:"trends",path:"/",component:Js}),a.a.createElement(ze,{exact:!0,name:"settings",path:"/settings/",component:il}),a.a.createElement(ze,{exact:!0,name:"profile",path:"/profile/",component:hl}),a.a.createElement(ze,{exact:!0,name:"explore",path:"/explore/",component:Dh}),a.a.createElement(ze,{exact:!0,name:"searches",path:"/searches/:userId?",component:fg}),a.a.createElement(ze,{exact:!0,name:"users",path:"/users/",component:vg}),a.a.createElement(ze,{exact:!0,name:"insights",path:"/search/:searchId/",component:Xy}),a.a.createElement(ze,{exact:!0,name:"insightsUsers",path:"/search/:searchId/users/",component:b_}),a.a.createElement(ze,{exact:!0,name:"tweets",path:"/search/:searchId/tweets/",component:vv}),a.a.createElement(ze,{exact:!0,name:"webpages",path:"/search/:searchId/webpages/",component:zv}),a.a.createElement(ze,{exact:!0,name:"images",path:"/search/:searchId/images/",component:Kv}),a.a.createElement(ze,{exact:!0,name:"videos",path:"/search/:searchId/videos/",component:ig}),a.a.createElement(ze,{exact:!0,name:"collections",path:"/collections/:userId?",component:Eg})))))}}]),n}(mr);Object(i.render)(a.a.createElement(m,{store:nr},a.a.createElement(yt,{history:Xn},a.a.createElement(Cg,null))),document.querySelector("#app"))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var a=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(a[e]="".concat(t[e]," ").concat(n[e]))})),a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),a=n(40);function i(e){return e&&"object"===Object(a.a)(e)&&e.constructor===Object}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},a=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?a[r]=o(e[r],t[r],n):a[r]=t[r])})),a}},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var a,i=t.props[n];for(a in i)void 0===r[a]&&(r[a]=i[a]);return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return Fe})),n.d(t,"b",(function(){return Ue}));var r=n(2),a=n(5),i=n(0),o=n.n(i),s=(n(1),n(396)),l=n(26),u=Date.now(),c="fnValues"+u,d="fnStyle"+ ++u;var f=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Object(l.d)(e,{},n);return r[d]=t,r},onProcessStyle:function(e,t){if(c in t||d in t)return e;var n={};for(var r in e){var a=e[r];"function"==typeof a&&(delete e[r],n[r]=a)}return t[c]=n,e},onUpdate:function(e,t,n,r){var a=t,i=a[d];i&&(a.style=i(e)||{});var o=a[c];if(o)for(var s in o)a.prop(s,o[s](e),r)}}},p="@global",m=function(){function e(e,t,n){for(var a in this.type="global",this.at=p,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new l.a(Object(r.a)({},n,{parent:this})),t)this.rules.add(a,t[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),h=function(){function e(e,t,n){this.type="global",this.at=p,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var a=e.substr("@global ".length);this.rule=n.jss.createRule(a,t,Object(r.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),y=/\s*,\s*/g;function _(e,t){for(var n=e.split(y),r="",a=0;a-1){var a=ge[e];if(!Array.isArray(a))return J+re(a)in t&&$+a;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},a=Object.keys(t).sort(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,o=void 0===i?"jss":i,s=e.seed,l=void 0===s?"":s,u=""===l?"":"".concat(l,"-"),c=0,d=function(){return c+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==a.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(u).concat(i,"-").concat(e.key);return t.options.theme[r]&&""===l?"".concat(s,"-").concat(d()):s}return"".concat(u).concat(o).concat(d())}}}]); -//# sourceMappingURL=main-b9c4ef83bece6e60c164.js.map \ No newline at end of file +*/!function(){"use strict";var a=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:a,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:a&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:a&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},a={};t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:a,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)}));var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:a,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)}));var n,i}},function(e,t,n){"use strict";var r,a=n(242),i=(r=a)&&r.__esModule?r:{default:r};var o=void 0,s=void 0,l=[];function u(){0!==l.length&&l[l.length-1].focusContent()}i.default.subscribe((function(e,t){o&&s||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",u),(s=o.cloneNode()).addEventListener("focus",u)),(l=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(o.parentElement&&o.parentElement.removeChild(o),s.parentElement&&s.parentElement.removeChild(s))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function a(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=a),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return o})),r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".TweetsModal---Tweet---3o1Jz, .TweetsModal---Retweet---3iHRc {\n margin-left: 10px;\n margin-right: 10px;\n}\n\n.TweetsModal---Retweet---3iHRc {\n padding: 5px;\n margin-bottom: 10px;\n background-color: #efefef;\n}\n\n.TweetsModal---Conversation---1G3S6 {\n margin-top: 45px;\n}\n\n.TweetsModal---UserProfile---1HB8X {\n display: flex;\n flex-direction: row;\n font-family: Helvetica, Roboto;\n}\n\n.TweetsModal---UserProfile---1HB8X img {\n height: 36px;\n width: 36px;\n margin-right: 15px;\n border-radius: 50%;\n}\n\n.TweetsModal---UserProfile---1HB8X i {\n font-size: 36px;\n margin-right: 15px;\n}\n\n.TweetsModal---UserProfile---1HB8X a {\n font-weight: 700;\n color: rgb(28, 32, 34);\n text-decoration: none;\n}\n\n.TweetsModal---UserProfile---1HB8X a:hover {\n color: rgb(59, 148, 217);\n}\n\n.TweetsModal---ScreenName---1Hp9S {\n color: rgb(105, 120, 130)\n}\n\n\n.TweetsModal---CloseModal---3-2Se {\n background-color: #efefef;\n margin-bottom: 10px;\n text-align: right;\n padding: 5px;\n position: fixed;\n width: 390px;\n z-index: 1;\n}\n\n.TweetsModal---CloseModal---3-2Se i {\n font-size: 1.5em;\n}\n",""]),t.locals={Tweet:"TweetsModal---Tweet---3o1Jz",Retweet:"TweetsModal---Retweet---3iHRc",Conversation:"TweetsModal---Conversation---1G3S6",UserProfile:"TweetsModal---UserProfile---1HB8X",ScreenName:"TweetsModal---ScreenName---1Hp9S",CloseModal:"TweetsModal---CloseModal---3-2Se"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Tweets---Holder---Fe1lG {\n margin: 45px auto;\n max-width: 90%;\n background-color: #002984;\n line-height: 0;\n column-width: 300px;\n column-count: auto;\n column-gap: 5px;\n padding: 5px 5px 5px 5px;\n}\n\n.Tweets---Controls---17VRR {\n margin: 45px auto;\n max-width: 50%;\n}\n\n.Tweets---Tile---2dFbn {\n height: 325px !important;\n}\n\n.Tweets---Refresh---186Bu button {\n font-size: 1.5em;\n margin-right: 1em;\n}\n",""]),t.locals={Holder:"Tweets---Holder---Fe1lG",Controls:"Tweets---Controls---17VRR",Tile:"Tweets---Tile---2dFbn",Refresh:"Tweets---Refresh---186Bu"}},function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){function e(e,t){return function(n,r,a,i){n[e]?n[e](r,a,i):n[t]&&n[t]("on"+r,a)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,n,t,e):r)||(e.exports=a)},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=a.test(e);return s||i.test(e)?o(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,i,o,s,l,u=0,c=!1,y=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,i=a;return r=a=void 0,u=t,o=e.apply(i,n)}function g(e){return u=e,s=setTimeout(w,t),c?v(e):o}function b(e){var n=e-l;return void 0===l||n>=t||n<0||y&&e-u>=i}function w(){var e=p();if(b(e))return M(e);s=setTimeout(w,function(e){var n=t-(e-l);return y?f(n,i-(e-u)):n}(e))}function M(e){return s=void 0,_&&r?v(e):(r=a=void 0,o)}function k(){var e=p(),n=b(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return g(l);if(y)return s=setTimeout(w,t),v(l)}return void 0===s&&(s=setTimeout(w,t)),o}return t=h(t)||0,m(n)&&(c=!!n.leading,i=(y="maxWait"in n)?d(h(n.maxWait)||0,t):i,_="trailing"in n?!!n.trailing:_),k.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?o:M(p())},k}}).call(this,n(57))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e,t,n){var r,a,i,o,s,l,u=0,c=!1,m=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,i=a;return r=a=void 0,u=t,o=e.apply(i,n)}function g(e){return u=e,s=setTimeout(w,t),c?v(e):o}function b(e){var n=e-l;return void 0===l||n>=t||n<0||m&&e-u>=i}function w(){var e=p();if(b(e))return M(e);s=setTimeout(w,function(e){var n=t-(e-l);return m?f(n,i-(e-u)):n}(e))}function M(e){return s=void 0,_&&r?v(e):(r=a=void 0,o)}function k(){var e=p(),n=b(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return g(l);if(m)return s=setTimeout(w,t),v(l)}return void 0===s&&(s=setTimeout(w,t)),o}return t=y(t)||0,h(n)&&(c=!!n.leading,i=(m="maxWait"in n)?d(y(n.maxWait)||0,t):i,_="trailing"in n?!!n.trailing:_),k.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?o:M(p())},k}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=a.test(e);return s||i.test(e)?o(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return h(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),m(e,t,{leading:r,maxWait:t,trailing:a})}}).call(this,n(57))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},a=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(a(t)))return t;t=t.parentNode}return window}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(function(e){return null===e.offsetParent}(e))return!1;var r=void 0,a=void 0,o=void 0,s=void 0;if(void 0===t||t===window)r=window.pageYOffset,o=window.pageXOffset,a=r+window.innerHeight,s=o+window.innerWidth;else{var l=(0,i.default)(t);r=l.top,o=l.left,a=r+t.offsetHeight,s=o+t.offsetWidth}var u=(0,i.default)(e);return r<=u.top+e.offsetHeight+n.top&&a>=u.top-n.bottom&&o<=u.left+e.offsetWidth+n.left&&s>=u.left-n.right};var r,a=n(344),i=(r=a)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Wayback---Wayback---3Gx9C img {\n height: 24px;\n width: 24px;\n}\n\n.Wayback---WaybackFound---2BXyZ {\n background-color: lightgreen !important;\n}\n\n.Wayback---WaybackError---2fIWn img {\n animation: Wayback---Shake---3YS2E 0.82s cubic-bezier(.36,.07,.19,.97) both;\n transform: translate3d(0, 0, 0);\n backface-visibility: hidden;\n perspective: 1000px;\n}\n\n@keyframes Wayback---Shake---3YS2E {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n",""]),t.locals={Wayback:"Wayback---Wayback---3Gx9C",WaybackFound:"Wayback---WaybackFound---2BXyZ",WaybackError:"Wayback---WaybackError---2fIWn",Shake:"Wayback---Shake---3YS2E"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Webpage---Webpage---3BReo {\n height: 445px;\n max-height: 445px;\n}\n\n.Webpage---UrlButton---1ufbo {\n width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n text-align: center;\n}\n\n.Webpage---Unselected---2IQdW {\n}\n\n.Webpage---Selected---1qsqz {\n box-shadow: 1px 4px 8px 1px lightgreen;\n}\n\n.Webpage---Selected---1qsqz:hover {\n box-shadow: 0 8px 16px 0 lightgreen;\n}\n\n.Webpage---Deselected---3FjCd {\n box-shadow: 1px 4px 8px 1px pink;\n}\n\n.Webpage---Deselected---3FjCd:hover {\n box-shadow: 0 8px 16px 0 pink;\n}\n\ndiv.Webpage---Controls---1-aTM {\n left: 180px;\n top: 10px;\n position: absolute;\n}\n\ndiv.Webpage---Controls---1-aTM i {\n padding: 10px;\n margin-right: 10px;\n color: black;\n background-color: #eee;\n border: thin solid black;\n border-radius: 50%;\n cursor: pointer;\n font-size: 20pt;\n}\n\n.Webpage---Selected---1qsqz i.Webpage---Add---Ekbcu {\n background-color: lightgreen;\n}\n\ni.Webpage---Add---Ekbcu:hover {\n background-color: lightgreen;\n}\n\n.Webpage---Deselected---3FjCd i.Webpage---Remove---3bqSU {\n background-color: pink;\n}\n\ni.Webpage---Remove---3bqSU:hover {\n background-color: pink;\n}\n\n.Webpage---Image---10BFc {\n text-align: center;\n position: relative;\n min-height: 200px;\n}\n\n.Webpage---Image---10BFc img {\n max-width: 350px;\n max-height: 200px;\n margin-left: auto;\n margin-right: auto;\n}\n\n.Webpage---Title---R3NOz {\n font-style: italic;\n font-weight: bold;\n text-align: left;\n}\n\n.Webpage---Unselected---2IQdW .Webpage---Title---R3NOz {\n background-color: white;\n}\n\n.Webpage---Description---nGUSx {\n text-align: left;\n overflow: auto;\n}\n\n.Webpage---Unselected---2IQdW .Webpage---Description---nGUSx {\n background-color: white;\n}\n\n.Webpage---Title---R3NOz a {\n color: black;\n text-decoration: none;\n}\n\n.Webpage---Stats---3rTPt {\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n padding: 2px;\n cursor: pointer;\n}\n\n.Webpage---Count---2fNkn {\n}\n\n.Webpage---WebsiteName---2KifT {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.Webpage---WebsiteName---2KifT a {\n text-decoration: none;\n color: blue;\n}\n\n.Webpage---ArchiveError---2hwQN {\n animation: Webpage---shake---1Nq9l 0.82s cubic-bezier(.36,.07,.19,.97) both;\n transform: translate3d(0, 0, 0);\n backface-visibility: hidden;\n perspective: 1000px;\n}\n\n@keyframes Webpage---shake---1Nq9l {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n",""]),t.locals={Webpage:"Webpage---Webpage---3BReo",UrlButton:"Webpage---UrlButton---1ufbo",Unselected:"Webpage---Unselected---2IQdW",Selected:"Webpage---Selected---1qsqz",Deselected:"Webpage---Deselected---3FjCd",Controls:"Webpage---Controls---1-aTM",Add:"Webpage---Add---Ekbcu",Remove:"Webpage---Remove---3bqSU",Image:"Webpage---Image---10BFc",Title:"Webpage---Title---R3NOz",Description:"Webpage---Description---nGUSx",Stats:"Webpage---Stats---3rTPt",Count:"Webpage---Count---2fNkn",WebsiteName:"Webpage---WebsiteName---2KifT",ArchiveError:"Webpage---ArchiveError---2hwQN",shake:"Webpage---shake---1Nq9l"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Checkbox---Checkbox---6cT-A {\n position: absolute !important;\n top: 5px;\n right: 5px;\n background-color: #ededed !important;\n}",""]),t.locals={Checkbox:"Checkbox---Checkbox---6cT-A"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".Webpages---Queue---2FwpL {\n margin-top: 10px;\n text-align: right;\n margin-right: 70px;\n}\n",""]),t.locals={Queue:"Webpages---Queue---2FwpL"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".UserList---UserList---3VMvP {\n}\n\n.UserList---UserList---3VMvP .UserList---TweetQuota---3F-UN {\n width: 5em;\n}\n\n@media screen and (max-width: 660px) {\n\n .UserList---UserList---3VMvP .UserList---Avatar---2TgCW, .UserList---UserList---3VMvP .UserList---Name---2KI8G, .UserList---UserList---3VMvP .UserList---Collections---2IrZv, .UserList---UserList---3VMvP .UserList---Tweets---SYxC8 {\n display: none;\n }\n\n .UserList---UserList---3VMvP td {\n padding: 5px;\n }\n\n}",""]),t.locals={UserList:"UserList---UserList---3VMvP",TweetQuota:"UserList---TweetQuota---3F-UN",Avatar:"UserList---Avatar---2TgCW",Name:"UserList---Name---2KI8G",Collections:"UserList---Collections---2IrZv",Tweets:"UserList---Tweets---SYxC8"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".CollectionList---Header---OuZDx {\n padding: 1em;\n}\n\n.CollectionList---FindMeBtn---1Gwsa {\n padding-left: 5em !important;\n padding-right: 5em !important;\n}\n\n.CollectionList---Title---Z3aq7 {\n text-align: center;\n}",""]),t.locals={Header:"CollectionList---Header---OuZDx",FindMeBtn:"CollectionList---FindMeBtn---1Gwsa",Title:"CollectionList---Title---Z3aq7"}},function(e,t,n){(t=e.exports=n(15)(!1)).push([e.i,".App---App---_Jbzg {\n font-family: 'Roboto', sans-serif;\n margin: 0;\n padding: 0;\n}\n\n.App---App---_Jbzg h2 {\n position: relative;\n color: #000;\n font-size: 14pt;\n font-stretch: expanded;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.App---App---_Jbzg h2 a {\n color: #0f1282;\n text-decoration: none;\n}\n\n.App---App---_Jbzg h1 {\n text-transform: uppercase;\n}\n\n.App---App---_Jbzg ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.App---App---_Jbzg li {\n display: inline;\n}\n\n.App---App---_Jbzg h1 a:hover {\n color: #0f1282\n}\n\n.App---AppUnder780px---3eGwK li {\n display: block;\n margin: 10;\n}\n\n.App---AppUnder780px---3eGwK main {\n margin: 0px;\n}\n",""]),t.locals={App:"App---App---_Jbzg",AppUnder780px:"App---AppUnder780px---3eGwK"}},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),i=n(17),o=n.n(i),s=n(1),l=n.n(s),u=a.a.createContext(null);var c=function(e){e()},d={notify:function(){}};function f(){var e=c,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,a=n={callback:e,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){r&&null!==t&&(r=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var p=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=d,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=f())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=d)},e}();var m=function(e){var t=e.store,n=e.context,i=e.children,o=Object(r.useMemo)((function(){var e=new p(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),s=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(r.useEffect)((function(){var e=o.subscription;return e.trySubscribe(),s!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,s]);var l=n||u;return a.a.createElement(l.Provider,{value:o},i)},h=n(2),y=n(22),_=n(41),v=n.n(_),g=n(243),b="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,w=[],M=[null,null];function k(e,t){var n=e[1];return[t.payload,n+1]}function L(e,t,n){b((function(){return e.apply(void 0,t)}),n)}function T(e,t,n,r,a,i,o){e.current=r,t.current=a,n.current=!1,i.current&&(i.current=null,o())}function x(e,t,n,r,a,i,o,s,l,u){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,a.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?o.current||l():(i.current=e,s.current=e,o.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var S=function(){return[null,0]};function Y(e,t){void 0===t&&(t={});var n=t,i=n.getDisplayName,o=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,s=n.methodName,l=void 0===s?"connectAdvanced":s,c=n.renderCountProp,d=void 0===c?void 0:c,f=n.shouldHandleStateChanges,m=void 0===f||f,_=n.storeKey,b=void 0===_?"store":_,Y=(n.withRef,n.forwardRef),E=void 0!==Y&&Y,D=n.context,O=void 0===D?u:D,j=Object(y.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),C=O;return function(t){var n=t.displayName||t.name||"Component",i=o(n),s=Object(h.a)({},j,{getDisplayName:o,methodName:l,renderCountProp:d,shouldHandleStateChanges:m,storeKey:b,displayName:i,wrappedComponentName:n,WrappedComponent:t}),u=j.pure;var c=u?r.useMemo:function(e){return e()};function f(n){var i=Object(r.useMemo)((function(){var e=n.forwardedRef,t=Object(y.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=i[0],l=i[1],u=i[2],d=Object(r.useMemo)((function(){return o&&o.Consumer&&Object(g.isContextConsumer)(a.a.createElement(o.Consumer,null))?o:C}),[o,C]),f=Object(r.useContext)(d),_=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(f)&&Boolean(f.store);var v=_?n.store:f.store,b=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,s)}(v)}),[v]),Y=Object(r.useMemo)((function(){if(!m)return M;var e=new p(v,_?null:f.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[v,_,f]),E=Y[0],D=Y[1],O=Object(r.useMemo)((function(){return _?f:Object(h.a)({},f,{subscription:E})}),[_,f,E]),j=Object(r.useReducer)(k,w,S),P=j[0][0],A=j[1];if(P&&P.error)throw P.error;var H=Object(r.useRef)(),R=Object(r.useRef)(u),N=Object(r.useRef)(),I=Object(r.useRef)(!1),W=c((function(){return N.current&&u===R.current?N.current:b(v.getState(),u)}),[v,P,u]);L(T,[R,H,I,u,W,N,D]),L(x,[m,v,E,b,R,H,I,N,D,A],[v,E,b]);var F=Object(r.useMemo)((function(){return a.a.createElement(t,Object(h.a)({},W,{ref:l}))}),[l,t,W]);return Object(r.useMemo)((function(){return m?a.a.createElement(d.Provider,{value:O},F):F}),[d,F,O])}var _=u?a.a.memo(f):f;if(_.WrappedComponent=t,_.displayName=i,E){var Y=a.a.forwardRef((function(e,t){return a.a.createElement(_,Object(h.a)({},e,{forwardedRef:t}))}));return Y.displayName=i,Y.WrappedComponent=t,v()(Y,t)}return v()(_,t)}}function E(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function D(e,t){if(E(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ee(e,t){return e===t}function te(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Y:n,a=t.mapStateToPropsFactories,i=void 0===a?J:a,o=t.mapDispatchToPropsFactories,s=void 0===o?q:o,l=t.mergePropsFactories,u=void 0===l?G:l,c=t.selectorFactory,d=void 0===c?Z:c;return function(e,t,n,a){void 0===a&&(a={});var o=a,l=o.pure,c=void 0===l||l,f=o.areStatesEqual,p=void 0===f?ee:f,m=o.areOwnPropsEqual,_=void 0===m?D:m,v=o.areStatePropsEqual,g=void 0===v?D:v,b=o.areMergedPropsEqual,w=void 0===b?D:b,M=Object(y.a)(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=X(e,i,"mapStateToProps"),L=X(t,s,"mapDispatchToProps"),T=X(n,u,"mergeProps");return r(d,Object(h.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:L,initMergeProps:T,pure:c,areStatesEqual:p,areOwnPropsEqual:_,areStatePropsEqual:g,areMergedPropsEqual:w},M))}}var ne=te();var re;re=i.unstable_batchedUpdates,c=re;var ae=n(24);function ie(e){return"/"===e.charAt(0)}function oe(e,t){for(var n=t,r=n+1,a=e.length;r=0;c--){var d=a[c];"."===d?oe(a,c):".."===d?(oe(a,c),u++):u&&(oe(a,c),u--)}if(!s)for(;u--;u)a.unshift("..");!s||""===a[0]||a[0]&&ie(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};function le(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var ue=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=le(t),a=le(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var ce=function(e,t){if(!e)throw new Error("Invariant failed")};function de(e){return"/"===e.charAt(0)?e:"/"+e}function fe(e){return"/"===e.charAt(0)?e.substr(1):e}function pe(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function me(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function he(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function ye(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=Object(h.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=se(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function _e(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):a(!0):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),c({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=ye(e,t,d(),_.location);u.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(_.entries[_.index]=r,c({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return _}var Ee=n(86),De=n(87),Oe=n.n(De),je=(n(50),function(e){var t=Object(Ee.a)();return t.displayName=e,t}("Router-History")),Ce=function(e){var t=Object(Ee.a)();return t.displayName=e,t}("Router"),Pe=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(ae.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return a.a.createElement(Ce.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.a.createElement(je.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.a.Component);a.a.Component;var Ae=function(e){function t(){return e.apply(this,arguments)||this}Object(ae.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(a.a.Component);var He={},Re=0;function Ne(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(He[e])return He[e];var t=Oe.a.compile(e);return Re<1e4&&(He[e]=t,Re++),t}(e)(t,{pretty:!0})}function Ie(e){var t=e.computedMatch,n=e.to,r=e.push,i=void 0!==r&&r;return a.a.createElement(Ce.Consumer,null,(function(e){e||ce(!1);var r=e.history,o=e.staticContext,s=i?r.push:r.replace,l=ye(t?"string"==typeof n?Ne(n,t.params):Object(h.a)({},n,{pathname:Ne(n.pathname,t.params)}):n);return o?(s(l),null):a.a.createElement(Ae,{onMount:function(){s(l)},onUpdate:function(e,t){var n,r,a=ye(t.to);n=a,r=Object(h.a)({},l,{key:a.key}),n.pathname===r.pathname&&n.search===r.search&&n.hash===r.hash&&n.key===r.key&&ue(n.state,r.state)||s(l)},to:n})}))}var We={},Fe=0;function Ue(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,i=void 0!==a&&a,o=n.strict,s=void 0!==o&&o,l=n.sensitive,u=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=We[n]||(We[n]={});if(r[e])return r[e];var a=[],i={regexp:Oe()(e,a,t),keys:a};return Fe<1e4&&(r[e]=i,Fe++),i}(n,{end:i,strict:s,sensitive:u}),a=r.regexp,o=r.keys,l=a.exec(e);if(!l)return null;var c=l[0],d=l.slice(1),f=e===c;return i&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:o.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var ze=function(e){function t(){return e.apply(this,arguments)||this}return Object(ae.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(Ce.Consumer,null,(function(t){t||ce(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?Ue(n.pathname,e.props):t.match,i=Object(h.a)({},t,{location:n,match:r}),o=e.props,s=o.children,l=o.component,u=o.render;return Array.isArray(s)&&0===s.length&&(s=null),a.a.createElement(Ce.Provider,{value:i},i.match?s?"function"==typeof s?s(i):s:l?a.a.createElement(l,i):u?u(i):null:"function"==typeof s?s(i):null)}))},t}(a.a.Component);function Be(e){return"/"===e.charAt(0)?e:"/"+e}function Ve(e,t){if(!e)return t;var n=Be(e);return 0!==t.pathname.indexOf(n)?t:Object(h.a)({},t,{pathname:t.pathname.substr(n.length)})}function qe(e){return"string"==typeof e?e:he(e)}function Je(e){return function(){ce(!1)}}function $e(){}a.a.Component;var Ge=function(e){function t(){return e.apply(this,arguments)||this}return Object(ae.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(Ce.Consumer,null,(function(t){t||ce(!1);var n,r,i=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?Ue(i.pathname,Object(h.a)({},e.props,{path:o})):t.match}})),r?a.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(a.a.Component);a.a.useContext;var Qe="@@router/LOCATION_CHANGE",Ke=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.type,o=a.payload;if(i===Qe){var s=o.location,l=o.action,u=o.isFirstRendering;return u?e:n(e,{location:t(dt(s)),action:l})}return e}}};function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ht={fromJS:function(e){return e},getIn:function(e,t){if(!e)return e;var n=t.length;if(n){for(var r=e,a=0;a2&&void 0!==arguments[2]&&arguments[2];r.inTimeTravelling?r.inTimeTravelling=!1:o(e,t,n)};return r.unlisten=i.listen(s),e.noInitialPop||s(i.location,i.action,!0),r}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ot(e,t)}(n,e),r=n,(i=[{key:"componentWillUnmount",value:function(){this.unlisten(),this.unsubscribe()}},{key:"render",value:function(){var e=this.props,t=e.history,n=e.children;return a.a.createElement(Pe,{history:t},n)}}])&&rt(r.prototype,i),o&&rt(r,o),n}(r.PureComponent);n.propTypes={store:l.a.shape({getState:l.a.func.isRequired,subscribe:l.a.func.isRequired}).isRequired,history:l.a.shape({action:l.a.string.isRequired,listen:l.a.func.isRequired,location:l.a.object.isRequired,push:l.a.func.isRequired}).isRequired,basename:l.a.string,children:l.a.oneOfType([l.a.func,l.a.node]),onLocationChanged:l.a.func.isRequired,noInitialPop:l.a.bool};var i=function(e){var t=e.context||u;if(null==t)throw"Please upgrade to react-redux v6";return a.a.createElement(t.Consumer,null,(function(t){var r=t.store;return a.a.createElement(n,nt({store:r},e))}))};return i.propTypes={context:l.a.object},ne(null,(function(e){return{onLocationChanged:function(t,n,r){return e(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:Qe,payload:{location:e,action:t,isFirstRendering:n}}}(t,n,r))}}}))(i)}(ht),_t=ft(ht),vt=et(ht);vt.getLocation,vt.getAction,vt.getHash,vt.getSearch,vt.createMatchSelector;function gt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:jt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SETTINGS":return Ot(Ot({},e),{},{logoUrl:t.logoUrl,logoFile:t.logoFile,instanceTitle:t.instanceTitle,appKey:t.appKey,appSecret:t.appSecret,defaultQuota:t.defaultQuota,instanceDescription:t.instanceDescription,instanceInfoLink:t.instanceInfoLink,instanceTweetText:t.instanceTweetText});case"UPDATE_SETTINGS":var n=Ot(Ot({},e),{},{updated:!0});return n[t.name]=t.value,n;case"SAVE_SETTINGS":return Ot(Ot({},e),{},{logoFile:null,updated:!t.saved});default:return e}}function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Ft,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_USER":return Wt(Wt({},e),t.user);case"UPDATE_USER_SETTINGS":var n=Wt(Wt({},e),{},{updated:!0});return n[t.name]=t.value,n;case"SAVE_USER_SETTINGS":return Wt(Wt({},e),{},{updated:!t.saved});case void 0:return Wt(Wt({},e),{},{searchInfo:t.searchInfo});case void 0:return Wt(Wt({},e),{},{tweets:t.tweets});case"ACTIVATE_USER":return t.user.id===e.id?Wt(Wt({},e),{},{active:!0}):e;case"DEACTIVATE_USER":return t.user.id===e.id?Wt(Wt({},e),{},{active:!1}):e;default:return e}}var zt=function(){return function(e){fetch("/api/v1/trends",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){e({type:"SET_TRENDS",trends:t})}))}},Bt=function(e){return{type:"NEW_TREND",id:e}},Vt=function(e){return function(t,n){var r=n().trends.places.map((function(e){return e.id}));e&&r.push(e);var a={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"same-origin"};fetch("/api/v1/trends",a).then((function(){t(Bt("")),t(zt()),t(Rt())}))}};function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:$t,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TRENDS":return Jt(Jt({},e),{},{places:t.trends});case"NEW_TREND":return Jt(Jt({},e),{},{newPlace:t.id});case"REMOVE_TREND":var n=e.places.filter((function(e){return e.id!==t.id}));return Jt(Jt({},e),{},{places:n});case"SET_WORLD":return Jt(Jt({},e),{},{world:t.world});default:return e}}var Qt=n(21),Kt=n.n(Qt);function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return function(r){fetch("/api/v1/search/".concat(e,"/tweets?offset=").concat(n,"&includeRetweets=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){r(rn(e))}))}},dn=function(e){return function(t){fetch("/api/v1/search/"+e+"/users",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_USERS",users:e})}))}},fn=function(e){return function(t){fetch("/api/v1/search/"+e+"/hashtags",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_HASHTAGS",hashtags:e})}))}},pn=function(e){return function(t){fetch("/api/v1/search/"+e+"/images",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_IMAGES",images:e})}))}},mn=function(e){return function(t){fetch("/api/v1/search/"+e+"/videos",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_VIDEOS",videos:e})}))}},hn=function(e){return function(t){fetch("/api/v1/search/"+e,{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t(nn(e))}))}},yn=function(e){return function(t){var n={id:e.id,archiveStarted:!0};t(ln(n))}};function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:gn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TWITTER_SEARCH":return e.queryUpdated&&(t.search.queryUpdated=!0,t.search.query=e.query),vn(vn({},e),t.search);case"RESET_TWITTER_SEARCH":return gn;case"SET_TWITTER_SEARCH_TWEETS":return vn(vn({},e),{},{tweets:t.tweets});case"SET_TWITTER_SEARCH_USERS":return vn(vn({},e),{},{users:t.users});case"SET_TWITTER_SEARCH_HASHTAGS":return vn(vn({},e),{},{hashtags:t.hashtags});case"SET_TWITTER_SEARCH_URLS":return vn(vn({},e),{},{urls:t.urls});case"SET_TWITTER_SEARCH_IMAGES":return vn(vn({},e),{},{images:t.images});case"SET_TWITTER_SEARCH_VIDEOS":return vn(vn({},e),{},{videos:t.videos});case"ACTIVATE_SEARCH":return vn(vn({},e),{},{active:!0});case"UPDATE_SEARCH_TERM":var n=[];return e.query.forEach((function(e,r){t.term.pos===r?n.push({type:t.term.type,value:t.term.value}):n.push(vn({},e))})),vn(vn({},e),{},{queryUpdated:!0,query:n});case"REMOVE_SEARCH_TERM":var r=[];return e.query.forEach((function(e,n){if(t.term.pos!==n){var a=n===t.term.pos-1?{atStart:!1}:null;r.push({type:e.type,value:e.value,focused:a,pos:n})}})),vn(vn({},e),{},{queryUpdated:!0,query:r});case"ADD_SEARCH_TERM":var a=e.query.filter((function(e){return!e.value.match(/^\s+$/)}));return vn(vn({},e),{},{queryUpdated:!0,query:[].concat(Kt()(a),[t.term])});case"FOCUS_SEARCH_TERM":if(t.pos>=0&&t.pos=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:Sn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SEARCHES":var n=new Map;e.map((function(e){return n.set(e.id,e.updated)}));var r,a=!1,i=Tn(t.searches);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.updated0&&void 0!==arguments[0]?arguments[0]:En,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_USERS":return t.users;case"ACTIVATE_USER":var n=Kt()(e),r=n.find((function(e){return e.id==t.user.id}));return r&&(r.active=!0),n;case"DEACTIVATE_USER":var a=Kt()(e),i=a.find((function(e){return e.id==t.user.id}));return i&&(i.active=!1),a;case"ACTIVATE_ADMIN":var o=Kt()(e),s=o.find((function(e){return e.id==t.user.id}));return s&&(s.isSuperUser=!0),o;case"DEACTIVATE_ADMIN":var l=Kt()(e),u=l.find((function(e){return e.id==t.user.id}));return u&&(u.isSuperUser=!1),l;case"UPDATE_QUOTA":var c=Kt()(e),d=c.find((function(e){return e.id==t.user.id}));return d&&(d.tweetQuota=t.quota),c;default:return e}}var On=n(51),jn=n.n(On),Cn=n(66),Pn=n.n(Cn),An=function(e){return function(t){fetch("/api/v1/search/".concat(e,"/webpages"),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_WEBPAGES",webpages:e})}))}};function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Nn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_WEBPAGES":return t.webpages;case"RESET_WEBPAGES":return Nn;case"SELECT_WEBPAGE":var n=e.findIndex((function(e){return e.url===t.url}));if(n>=0){var r=e[n];return[].concat(Kt()(e.slice(0,n)),[Rn(Rn({},r),{},{deselected:!1,selected:!0})],Kt()(e.slice(n+1)))}return e;case"DESELECT_WEBPAGE":var a=e.findIndex((function(e){return e.url===t.url}));if(a>=0){var i=e[a];return[].concat(Kt()(e.slice(0,a)),[Rn(Rn({},i),{},{selected:!1,deselected:!0})],Kt()(e.slice(a+1)))}return e;case"SET_WEBPAGE_ARCHIVE":var o=e.findIndex((function(e){return e.url===t.url}));if(o>=0){var s=e[o];return[].concat(Kt()(e.slice(0,o)),[Rn(Rn({},s),{},{archive:{url:t.archiveUrl,time:t.archiveTime}})],Kt()(e.slice(o+1)))}return e;case"ARCHIVE_ERROR":var l=e.findIndex((function(e){return e.url===t.url}));if(l>=0){var u=e[l];return[].concat(Kt()(e.slice(0,l)),[Rn(Rn({},u),{},{archive:{error:!0}})],Kt()(e.slice(l+1)))}return e;default:return e}}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Un,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_QUEUE":return Fn(Fn({},e),{},{remaining:t.queue.remaining,total:t.queue.total});default:return e}}var Bn=function(e){return{type:"SET_TWEETS",tweets:e}},Vn=function(){return{type:"RESET_TWEETS"}},qn=[];function Jn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TWEETS":return t.tweets;case"RESET_TWEETS":return qn;default:return e}}var $n=function(e){return{type:"SET_SYSTEM_STATS",stats:e}};function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Kn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SYSTEM_STATS":return Qn(Qn({},e),t.stats);default:return e}}var Xn=we(),er=[bt(Xn),kt],tr=U.apply(void 0,[function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(t=a.a.createElement("span",{className:jr.a.Notifications},this.props.notifications)),e=a.a.createElement(xr,{to:"/settings/"},a.a.createElement("ion-icon",{name:"settings"})," Settings ",t)}return a.a.createElement("nav",{className:jr.a.AppBar},a.a.createElement("a",{href:"/auth/logout"},a.a.createElement("ion-icon",{name:"log-out"})," Logout"),a.a.createElement(xr,{to:"/profile/"},a.a.createElement("ion-icon",{name:"contact"})," Profile"),e)}}]),n}(r.Component);Pr.propTypes={isSuperUser:l.a.bool,notifications:l.a.number};var Ar,Hr=n(5),Rr=n(19),Nr=n(6);function Ir(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,a=new Array(r),i=0;i0?Ar="default":(e.scrollLeft=1,0===e.scrollLeft&&(Ar="negative")),document.body.removeChild(e),Ar}function zr(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;switch(Ur()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Br(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var Vr={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function qr(e){var t=e.onChange,n=Object(Hr.a)(e,["onChange"]),a=r.useRef(),i=r.useRef(null),o=function(){a.current=i.current.offsetHeight-i.current.clientHeight};return r.useEffect((function(){var e=Ir((function(){var e=a.current;o(),e!==a.current&&t(a.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),r.useEffect((function(){o(),t(a.current)}),[t]),r.createElement("div",Object(h.a)({style:Vr,ref:i},n))}var Jr=n(7),$r=n(13),Gr=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.color,o=e.orientation,s=Object(Hr.a)(e,["classes","className","color","orientation"]);return r.createElement("span",Object(h.a)({className:Object(Nr.a)(n.root,n["color".concat(Object($r.a)(i))],a,"vertical"===o&&n.vertical),ref:t},s))})),Qr=Object(Jr.a)((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(Gr),Kr=n(105);function Zr(e,t){var n=function(t,n){return a.a.createElement(Kr.a,Object(h.a)({ref:n},t),e)};return n.muiName=Kr.a.muiName,a.a.memo(a.a.forwardRef(n))}var Xr=Zr(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),ea=Zr(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function ta(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function na(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){ta(e,n),ta(t,n)}}),[e,t])}var ra="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function aa(e){var t=r.useRef(e);return ra((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var ia=!0,oa=!1,sa=null,la={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function ua(e){e.metaKey||e.altKey||e.ctrlKey||(ia=!0)}function ca(){ia=!1}function da(){"hidden"===this.visibilityState&&oa&&(ia=!0)}function fa(e){var t,n,r,a=e.target;try{return a.matches(":focus-visible")}catch(e){}return ia||(n=(t=a).type,!("INPUT"!==(r=t.tagName)||!la[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function pa(){oa=!0,window.clearTimeout(sa),sa=window.setTimeout((function(){oa=!1}),100)}function ma(){return{isFocusVisible:fa,onBlurVisible:pa,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",ua,!0),t.addEventListener("mousedown",ca,!0),t.addEventListener("pointerdown",ca,!0),t.addEventListener("touchstart",ca,!0),t.addEventListener("visibilitychange",da,!0))}),[])}}var ha=n(31),ya=n(58),_a=a.a.createContext(null);function va(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(r.isValidElement)(e)?t(e):e}(e)})),n}function ga(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ba(e,t,n){var a=va(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,a=Object.create(null),i=[];for(var o in e)o in t?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var l in t){if(a[l])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var c,d,f,h=u?null:_.current,g=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(g.width/2),d=Math.round(g.height/2);else{var b=e.touches?e.touches[0]:e,w=b.clientX,M=b.clientY;c=Math.round(w-g.left),d=Math.round(M-g.top)}if(s)(f=Math.sqrt((2*Math.pow(g.width,2)+Math.pow(g.height,2))/3))%2==0&&(f+=1);else{var k=2*Math.max(Math.abs((h?h.clientWidth:0)-c),c)+2,L=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(L,2))}e.touches?null===y.current&&(y.current=function(){v({pulsate:i,rippleX:c,rippleY:d,rippleSize:f,cb:n})},m.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):v({pulsate:i,rippleX:c,rippleY:d,rippleSize:f,cb:n})}}),[a,v]),b=r.useCallback((function(){g({},{pulsate:!0})}),[g]),w=r.useCallback((function(e,t){if(clearTimeout(m.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(m.current=setTimeout((function(){w(e,t)})));y.current=null,c((function(e){return e.length>0?e.slice(1):e})),f.current=t}),[]);return r.useImperativeHandle(t,(function(){return{pulsate:b,start:g,stop:w}}),[b,g,w]),r.createElement("span",Object(h.a)({className:Object(Nr.a)(i.root,o),ref:_},s),r.createElement(ka,{component:null,exit:!0},u))})),Sa=Object(Jr.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(r.memo(xa)),Ya=r.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,o=e.centerRipple,s=void 0!==o&&o,l=e.children,u=e.classes,c=e.className,d=e.component,f=void 0===d?"button":d,p=e.disabled,m=void 0!==p&&p,y=e.disableRipple,_=void 0!==y&&y,v=e.disableTouchRipple,g=void 0!==v&&v,b=e.focusRipple,w=void 0!==b&&b,M=e.focusVisibleClassName,k=e.onBlur,L=e.onClick,T=e.onFocus,x=e.onFocusVisible,S=e.onKeyDown,Y=e.onKeyUp,E=e.onMouseDown,D=e.onMouseLeave,O=e.onMouseUp,j=e.onTouchEnd,C=e.onTouchMove,P=e.onTouchStart,A=e.onDragLeave,H=e.tabIndex,R=void 0===H?0:H,N=e.TouchRippleProps,I=e.type,W=void 0===I?"button":I,F=Object(Hr.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),U=r.useRef(null);var z=r.useRef(null),B=r.useState(!1),V=B[0],q=B[1];m&&V&&q(!1);var J=ma(),$=J.isFocusVisible,G=J.onBlurVisible,Q=J.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return aa((function(r){return t&&t(r),!n&&z.current&&z.current[e](r),!0}))}r.useImperativeHandle(n,(function(){return{focusVisible:function(){q(!0),U.current.focus()}}}),[]),r.useEffect((function(){V&&w&&!_&&z.current.pulsate()}),[_,w,V]);var Z=K("start",E),X=K("stop",A),ee=K("stop",O),te=K("stop",(function(e){V&&e.preventDefault(),D&&D(e)})),ne=K("start",P),re=K("stop",j),ae=K("stop",C),ie=K("stop",(function(e){V&&(G(e),q(!1)),k&&k(e)}),!1),oe=aa((function(e){U.current||(U.current=e.currentTarget),$(e)&&(q(!0),x&&x(e)),T&&T(e)})),se=function(){var e=i.findDOMNode(U.current);return f&&"button"!==f&&!("A"===e.tagName&&e.href)},le=r.useRef(!1),ue=aa((function(e){w&&!le.current&&V&&z.current&&" "===e.key&&(le.current=!0,e.persist(),z.current.stop(e,(function(){z.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),S&&S(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!m&&(e.preventDefault(),L&&L(e))})),ce=aa((function(e){w&&" "===e.key&&z.current&&V&&!e.defaultPrevented&&(le.current=!1,e.persist(),z.current.stop(e,(function(){z.current.pulsate(e)}))),Y&&Y(e),L&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&L(e)})),de=f;"button"===de&&F.href&&(de="a");var fe={};"button"===de?(fe.type=W,fe.disabled=m):("a"===de&&F.href||(fe.role="button"),fe["aria-disabled"]=m);var pe=na(a,t),me=na(Q,U),he=na(pe,me),ye=r.useState(!1),_e=ye[0],ve=ye[1];r.useEffect((function(){ve(!0)}),[]);var ge=_e&&!_&&!m;return r.createElement(de,Object(h.a)({className:Object(Nr.a)(u.root,c,V&&[u.focusVisible,M],m&&u.disabled),onBlur:ie,onClick:L,onFocus:oe,onKeyDown:ue,onKeyUp:ce,onMouseDown:Z,onMouseLeave:te,onMouseUp:ee,onDragLeave:X,onTouchEnd:re,onTouchMove:ae,onTouchStart:ne,ref:he,tabIndex:m?-1:R},fe,F),l,ge?r.createElement(Sa,Object(h.a)({ref:z,center:s},N)):null)})),Ea=Object(Jr.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Ya),Da=r.createElement(Xr,{fontSize:"small"}),Oa=r.createElement(ea,{fontSize:"small"}),ja=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.direction,o=e.orientation,s=e.disabled,l=Object(Hr.a)(e,["classes","className","direction","orientation","disabled"]);return r.createElement(Ea,Object(h.a)({component:"div",className:Object(Nr.a)(n.root,a,s&&n.disabled,"vertical"===o&&n.vertical),ref:t,role:null,tabIndex:null},l),"left"===i?Da:Oa)})),Ca=Object(Jr.a)({root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},{name:"MuiTabScrollButton"})(ja),Pa=n(395),Aa=n(71);function Ha(){return Object(Pa.a)()||Aa.a}var Ra=r.forwardRef((function(e,t){var n=e["aria-label"],a=e["aria-labelledby"],i=e.action,o=e.centered,s=void 0!==o&&o,l=e.children,u=e.classes,c=e.className,d=e.component,f=void 0===d?"div":d,p=e.indicatorColor,m=void 0===p?"secondary":p,y=e.onChange,_=e.orientation,v=void 0===_?"horizontal":_,g=e.ScrollButtonComponent,b=void 0===g?Ca:g,w=e.scrollButtons,M=void 0===w?"auto":w,k=e.selectionFollowsFocus,L=e.TabIndicatorProps,T=void 0===L?{}:L,x=e.TabScrollButtonProps,S=e.textColor,Y=void 0===S?"inherit":S,E=e.value,D=e.variant,O=void 0===D?"standard":D,j=Object(Hr.a)(e,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),C=Ha(),P="scrollable"===O,A="rtl"===C.direction,H="vertical"===v,R=H?"scrollTop":"scrollLeft",N=H?"top":"left",I=H?"bottom":"right",W=H?"clientHeight":"clientWidth",F=H?"height":"width";var U=r.useState(!1),z=U[0],B=U[1],V=r.useState({}),q=V[0],J=V[1],$=r.useState({start:!1,end:!1}),G=$[0],Q=$[1],K=r.useState({overflow:"hidden",marginBottom:null}),Z=K[0],X=K[1],ee=new Map,te=r.useRef(null),ne=r.useRef(null),re=function(){var e,t,n=te.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:zr(n,C.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==E){var a=ne.current.children;if(a.length>0){var i=a[ee.get(E)];0,t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},ae=aa((function(){var e,t=re(),n=t.tabsMeta,r=t.tabMeta,a=0;if(r&&n)if(H)a=r.top-n.top+n.scrollTop;else{var i=A?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;a=r.left-n.left+i}var o=(e={},Object(Rr.a)(e,N,a),Object(Rr.a)(e,F,r?r[F]:0),e);if(isNaN(q[N])||isNaN(q[F]))J(o);else{var s=Math.abs(q[N]-o[N]),l=Math.abs(q[F]-o[F]);(s>=1||l>=1)&&J(o)}})),ie=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=r.ease,o=void 0===i?Br:i,s=r.duration,l=void 0===s?300:s,u=null,c=t[e],d=!1,f=function(){d=!0},p=function r(i){if(d)a(new Error("Animation cancelled"));else{null===u&&(u=i);var s=Math.min(1,(i-u)/l);t[e]=o(s)*(n-c)+c,s>=1?requestAnimationFrame((function(){a(null)})):requestAnimationFrame(r)}};c===n?a(new Error("Element already at target position")):requestAnimationFrame(p)}(R,te.current,e)},oe=function(e){var t=te.current[R];H?t+=e:(t+=e*(A?-1:1),t*=A&&"reverse"===Ur()?-1:1),ie(t)},se=function(){oe(-te.current[W])},le=function(){oe(te.current[W])},ue=r.useCallback((function(e){X({overflow:null,marginBottom:-e})}),[]),ce=aa((function(){var e=re(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[N]t[I]){var a=t[R]+(n[I]-t[I]);ie(a)}})),de=aa((function(){if(P&&"off"!==M){var e,t,n=te.current,r=n.scrollTop,a=n.scrollHeight,i=n.clientHeight,o=n.scrollWidth,s=n.clientWidth;if(H)e=r>1,t=r1,t=A?l>1:l *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(Ia),Fa=n(52),Ua=n.n(Fa);function za(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Ba=function(e){lr()(n,e);var t=za(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).links=[{dest:"/",label:"Trending",icon:"analytics"},{dest:"/explore/",label:"Explore",icon:"search"},{dest:"/searches/",label:"Saved Searches",icon:"filing"}],e.isSuperUser&&r.links.push({dest:"/users/",label:"Users",icon:"person"}),r}return or()(n,[{key:"componentDidMount",value:function(){this.setMediaQuery("(max-width: 480px)","",Ua.a.NoLabel)}},{key:"render",value:function(){var e=this,t=null;switch(this.props.location){case"/":t=0;break;case"/explore/":t=1;break;case"/searches/":t=2;break;case"/users/":t=3;break;default:this.props.location.match("/search/")&&(t=2)}return a.a.createElement(Na,{className:Ua.a.TabBar,variant:"fullWidth",value:t,indicatorColor:"primary",textColor:"primary","aria-label":"nav tabs example"},this.links.map((function(n,r){var i=r!==t?Ua.a.NonActiveTab:"";return a.a.createElement(Wa,{key:"l-".concat(r),component:"a",onClick:function(t){t.preventDefault(),e.props.navigateTo(e.links[r].dest)},className:"".concat(Ua.a.Tab," ").concat(i),icon:a.a.createElement("ion-icon",{name:n.icon,style:{fontSize:"180%"}}),label:a.a.createElement("span",{className:"".concat(Ua.a.Label," ").concat(e.state.mediaStyle)},n.label),id:"nav-tab-".concat(r)})})))}}]),n}(mr);Ba.propTypes={location:l.a.string,isSuperUser:l.a.bool,navigateTo:l.a.func};var Va=n(60),qa=n.n(Va);function Ja(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var $a=function(e){lr()(n,e);var t=Ja(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){this.setMediaQuery("(max-width: 480px)",qa.a.Header,qa.a.HeaderUnder480px)}},{key:"render",value:function(){var e=null,t=null,n=null;return n=this.props.logoUrl?a.a.createElement("a",{href:this.props.instanceInfoLink},a.a.createElement("img",{title:this.props.instanceDescription,src:this.props.logoUrl})):"",this.props.twitterScreenName&&this.props.twitterAvatarUrl&&(e=a.a.createElement(Pr,{notifications:this.props.notifications,isSuperUser:this.props.isSuperUser}),t=a.a.createElement(Ba,{isSuperUser:this.props.isSuperUser,location:this.props.location,navigateTo:this.props.navigateTo})),a.a.createElement("div",null,e,a.a.createElement("header",{className:this.state.mediaStyle},a.a.createElement("div",{className:qa.a.AppIcon},a.a.createElement(xr,{to:"/"},a.a.createElement("img",{src:Dr.a}))),a.a.createElement("div",{className:qa.a.Logo},a.a.createElement("center",null,n))),t)}}]),n}(mr);$a.propTypes={twitterScreenName:l.a.string,twitterAvatarUrl:l.a.string,getUser:l.a.func,location:l.a.string,logoUrl:l.a.string,isSuperUser:l.a.bool,notifications:l.a.number,navigateTo:l.a.func};var Ga=ne((function(e){return{twitterScreenName:e.user.twitterScreenName,twitterAvatarUrl:e.user.twitterAvatarUrl,isSuperUser:e.user.isSuperUser,location:e.router.location.pathname,logoUrl:e.settings.logoUrl,instanceInfoLink:e.settings.instanceInfoLink,instanceDescription:e.settings.instanceDescription,notifications:0}}),(function(e){return{getUser:Rt,navigateTo:function(t){e(Ze(t))}}}))($a);function Qa(e){var t=!1;return function(){t||(console.warn(e),t=!0)}}Qa("\n>> Error, via react-flip-move <<\n\nYou provided a stateless functional component as a child to . Unfortunately, SFCs aren't supported, because Flip Move needs access to the backing instances via refs, and SFCs don't have a public instance that holds that info.\n\nPlease wrap your components in a native element (eg.
), or a non-functional component.\n"),Qa("\n>> Error, via react-flip-move <<\n\nYou provided a primitive (text or number) node as a child to . Flip Move needs containers with unique keys to move children around.\n\nPlease wrap your value in a native element (eg. ), or a component.\n");var Ka=Qa("\n>> Warning, via react-flip-move <<\n\nWhen using \"wrapperless\" mode (by supplying 'typeName' of 'null'), strange things happen when the direct parent has the default \"static\" position.\n\nFlipMove has added 'position: relative' to this node, to ensure Flip Move animates correctly.\n\nTo avoid seeing this warning, simply apply a non-static position to that parent node.\n"),Za=Qa("\n>> Warning, via react-flip-move <<\n\nOne or more of Flip Move's child elements have the html attribute 'disabled' set to true.\n\nPlease note that this will cause animations to break in Internet Explorer 11 and below. Either remove the disabled attribute or set 'animation' to false.\n"),Xa={elevator:{from:{transform:"scale(0)",opacity:"0"},to:{transform:"",opacity:""}},fade:{from:{opacity:"0"},to:{opacity:""}},accordionVertical:{from:{transform:"scaleY(0)",transformOrigin:"center top"},to:{transform:"",transformOrigin:"center top"}},accordionHorizontal:{from:{transform:"scaleX(0)",transformOrigin:"left center"},to:{transform:"",transformOrigin:"left center"}},none:null},ei={elevator:{from:{transform:"scale(1)",opacity:"1"},to:{transform:"scale(0)",opacity:"0"}},fade:{from:{opacity:"1"},to:{opacity:"0"}},accordionVertical:{from:{transform:"scaleY(1)",transformOrigin:"center top"},to:{transform:"scaleY(0)",transformOrigin:"center top"}},accordionHorizontal:{from:{transform:"scaleX(1)",transformOrigin:"left center"},to:{transform:"scaleX(0)",transformOrigin:"left center"}},none:null},ti=Xa,ni=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[],n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(this.props,n);return r.style=si({position:"relative"},r.style),t.delegated=r,t},n.prototype.convertTimingProp=function(e){var t=this.props[e],r="number"==typeof t?t:parseInt(t,10);return isNaN(r)?n.defaultProps[e]:r},n.prototype.convertAnimationProp=function(e,t){switch(void 0===e?"undefined":ii(e)){case"boolean":return t[e?"elevator":"none"];case"string":return-1===Object.keys(t).indexOf(e)?t.elevator:t[e];default:return e}},n.prototype.render=function(){return a.a.createElement(e,this.convertProps(this.props))},n}(r.Component),t.defaultProps={easing:"ease-in-out",duration:350,delay:0,staggerDurationBy:0,staggerDelayBy:0,typeName:"div",enterAnimation:"elevator",leaveAnimation:"elevator",disableAllAnimations:!1,getPosition:function(e){return e.getBoundingClientRect()},maintainContainerHeight:!1,verticalAlignment:"top"},n}function di(e){var t=e.domNode,n=e.styles;Object.keys(n).forEach((function(e){t.style.setProperty(ai(e),n[e])}))}var fi=function(e){var t=e.childDomNode,n={top:0,left:0,right:0,bottom:0,height:0,width:0},r=e.childBoundingBox||n,a=e.parentBoundingBox||n,i=(0,e.getPosition)(t),o=i.top-a.top,s=i.left-a.left;return[r.left-s,r.top-o]},pi=function(e,t){var n=t.delay,r=t.duration,a=t.staggerDurationBy,i=t.staggerDelayBy,o=t.easing;n+=e*i,r+=e*a;return["transform","opacity"].map((function(e){return e+" "+r+"ms "+o+" "+n+"ms"})).join(", ")},mi=function(){var e={transition:"transitionend","-o-transition":"oTransitionEnd","-moz-transition":"transitionend","-webkit-transition":"webkitTransitionEnd"};if("undefined"==typeof document)return"";var t=document.createElement("fakeelement"),n=ni((function(e){return void 0!==t.style.getPropertyValue(e)}),Object.keys(e));return n?e[n]:""}(),hi=!mi;function yi(e){return e.key||""}function _i(e){return r.Children.toArray(e)}var vi=ci(function(e){function t(){var n,r;oi(this,t);for(var a=arguments.length,i=Array(a),s=0;s0?o+"px":"0"}})}}({domNode:this.heightPlaceholderData.domNode,parentData:this.parentData,getPosition:a}));this.state.children.forEach((function(t){var n=e.getChildData(yi(t)).domNode;n&&(t.entering||t.leaving||di({domNode:n,styles:{transition:""}}))}))},t.prototype.UNSAFE_componentWillReceiveProps=function(e){this.updateBoundingBoxCaches();var t=_i(e.children);this.setState({children:this.isAnimationDisabled(e)?t.map((function(e){return si({},e,{element:e})})):this.calculateNextSetOfChildren(t)})},t.prototype.animateChild=function(e,t,n){var r=this,a=this.getChildData(yi(e)).domNode;a&&(di({domNode:a,styles:n}),this.props.onStart&&this.props.onStart(e,a),requestAnimationFrame((function(){requestAnimationFrame((function(){var n={transition:pi(t,r.props),transform:"",opacity:""};e.appearing&&r.props.appearAnimation?n=si({},n,r.props.appearAnimation.to):e.entering&&r.props.enterAnimation?n=si({},n,r.props.enterAnimation.to):e.leaving&&r.props.leaveAnimation&&(n=si({},n,r.props.leaveAnimation.to)),di({domNode:a,styles:n})}))})),this.bindTransitionEndHandler(e))},t.prototype.bindTransitionEndHandler=function(e){var t=this,n=this.getChildData(yi(e)).domNode;if(n){n.addEventListener(mi,(function r(a){a.target===n&&(n.style.transition="",t.triggerFinishHooks(e,n),n.removeEventListener(mi,r),e.leaving&&t.removeChildData(yi(e)))}))}},t.prototype.triggerFinishHooks=function(e,t){var n=this;if(this.props.onFinish&&this.props.onFinish(e,t),this.remainingAnimations-=1,0===this.remainingAnimations){var r=this.state.children.filter((function(e){return!e.leaving})).map((function(e){return si({},e,{element:e.element,appearing:!1,entering:!1})}));this.setState({children:r},(function(){"function"==typeof n.props.onFinishAll&&n.callChildrenHook(n.props.onFinishAll),n.childrenToAnimate=[]})),this.heightPlaceholderData.domNode&&(this.heightPlaceholderData.domNode.style.height="0")}},t.prototype.callChildrenHook=function(e){var t=this,n=[],r=[];this.childrenToAnimate.forEach((function(e){var a=t.findChildByKey(e);a&&(n.push(a),t.hasChildData(e)&&r.push(t.getChildData(e).domNode))})),e(n,r)},t.prototype.updateBoundingBoxCaches=function(){var e=this,t=this.parentData.domNode;if(t){this.parentData.boundingBox=this.props.getPosition(t);var n=[];this.state.children.forEach((function(r){var a=yi(r);if(a)if(e.hasChildData(a)){var i=e.getChildData(a);i.domNode&&r?n.push(function(e){var t=e.childDomNode,n=e.parentDomNode,r=e.getPosition,a=r(n),i=r(t),o=i.top,s=i.left,l=i.right,u=i.bottom,c=i.width,d=i.height;return{top:o-a.top,left:s-a.left,right:a.right-l,bottom:a.bottom-u,width:c,height:d}}({childDomNode:i.domNode,parentDomNode:t,getPosition:e.props.getPosition})):n.push(null)}else n.push(null);else n.push(null)})),this.state.children.forEach((function(t,r){var a=yi(t),i=n[r];a&&e.setChildData(a,{boundingBox:i})}))}},t.prototype.computeInitialStyles=function(e){if(e.appearing)return this.props.appearAnimation?this.props.appearAnimation.from:{};if(e.entering)return this.props.enterAnimation?si({position:"",top:"",left:"",right:"",bottom:""},this.props.enterAnimation.from):{};if(e.leaving)return this.props.leaveAnimation?this.props.leaveAnimation.from:{};var t=this.getChildData(yi(e)),n=t.domNode,r=t.boundingBox,a=this.parentData.boundingBox;if(!n)return{};var i=fi({childDomNode:n,childBoundingBox:r,parentBoundingBox:a,getPosition:this.props.getPosition});return{transform:"translate("+i[0]+"px, "+i[1]+"px)"}},t.prototype.isAnimationDisabled=function(e){return hi||e.disableAllAnimations||0===e.duration&&0===e.delay&&0===e.staggerDurationBy&&0===e.staggerDelayBy},t.prototype.findChildByKey=function(e){return ni((function(t){return yi(t)===e}),this.state.children)},t.prototype.hasChildData=function(e){return Object.prototype.hasOwnProperty.call(this.childrenData,e)},t.prototype.getChildData=function(e){return this.hasChildData(e)?this.childrenData[e]:{}},t.prototype.setChildData=function(e,t){this.childrenData[e]=si({},this.getChildData(e),t)},t.prototype.removeChildData=function(e){delete this.childrenData[e],this.setState((function(t){return si({},t,{children:t.children.filter((function(t){return t.element.key!==e}))})}))},t.prototype.createHeightPlaceholder=function(){var e=this,t=this.props.typeName,n="ul"===t||"ol"===t?"li":"div";return Object(r.createElement)(n,{key:"height-placeholder",ref:function(t){e.heightPlaceholderData.domNode=t},style:{visibility:"hidden",height:0}})},t.prototype.childrenWithRefs=function(){var e=this;return this.state.children.map((function(t){return Object(r.cloneElement)(t.element,{ref:function(n){if(n){var r=function(e){if("undefined"==typeof HTMLElement)return null;if(e instanceof HTMLElement)return e;var t=Object(i.findDOMNode)(e);return t&&t.nodeType===Node.TEXT_NODE?null:t}(n);e.setChildData(yi(t),{domNode:r})}}})}))},t.prototype.render=function(){var e=this,t=this.props,n=t.typeName,a=t.delegated,i=t.leaveAnimation,o=t.maintainContainerHeight,s=this.childrenWithRefs();if(i&&o&&s.push(this.createHeightPlaceholder()),!n)return s;var l=si({},a,{children:s,ref:function(t){e.parentData.domNode=t}});return Object(r.createElement)(n,l)},t}(r.Component)),gi=n(25),bi=n.n(gi);function wi(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}var Mi=r.createContext();var ki=Mi;function Li(e,t){return parseInt(e[t],10)||0}var Ti="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,xi={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},Si=r.forwardRef((function(e,t){var n=e.onChange,a=e.rows,i=e.rowsMax,o=e.rowsMin,s=void 0===o?1:o,l=e.style,u=e.value,c=Object(Hr.a)(e,["onChange","rows","rowsMax","rowsMin","style","value"]),d=a||s,f=r.useRef(null!=u).current,p=r.useRef(null),m=na(t,p),y=r.useRef(null),_=r.useRef(0),v=r.useState({}),g=v[0],b=v[1],w=r.useCallback((function(){var t=p.current,n=window.getComputedStyle(t),r=y.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var a=n["box-sizing"],o=Li(n,"padding-bottom")+Li(n,"padding-top"),s=Li(n,"border-bottom-width")+Li(n,"border-top-width"),l=r.scrollHeight-o;r.value="x";var u=r.scrollHeight-o,c=l;d&&(c=Math.max(Number(d)*u,c)),i&&(c=Math.min(Number(i)*u,c));var f=(c=Math.max(c,u))+("border-box"===a?o+s:0),m=Math.abs(c-l)<=1;b((function(e){return _.current<20&&(f>0&&Math.abs((e.outerHeightStyle||0)-f)>1||e.overflow!==m)?(_.current+=1,{overflow:m,outerHeightStyle:f}):e}))}),[i,d,e.placeholder]);r.useEffect((function(){var e=Ir((function(){_.current=0,w()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[w]),Ti((function(){w()})),r.useEffect((function(){_.current=0}),[u]);return r.createElement(r.Fragment,null,r.createElement("textarea",Object(h.a)({value:u,onChange:function(e){_.current=0,f||w(),n&&n(e)},ref:m,rows:d,style:Object(h.a)({height:g.outerHeightStyle,overflow:g.overflow?"hidden":null},l)},c)),r.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:y,tabIndex:-1,style:Object(h.a)(Object(h.a)({},xi),l)}))}));function Yi(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Ei(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Yi(e.value)&&""!==e.value||t&&Yi(e.defaultValue)&&""!==e.defaultValue)}var Di="undefined"==typeof window?r.useEffect:r.useLayoutEffect,Oi=r.forwardRef((function(e,t){var n=e["aria-describedby"],a=e.autoComplete,i=e.autoFocus,o=e.classes,s=e.className,l=(e.color,e.defaultValue),u=e.disabled,c=e.endAdornment,d=(e.error,e.fullWidth),f=void 0!==d&&d,p=e.id,m=e.inputComponent,y=void 0===m?"input":m,_=e.inputProps,v=void 0===_?{}:_,g=e.inputRef,b=(e.margin,e.multiline),w=void 0!==b&&b,M=e.name,k=e.onBlur,L=e.onChange,T=e.onClick,x=e.onFocus,S=e.onKeyDown,Y=e.onKeyUp,E=e.placeholder,D=e.readOnly,O=e.renderSuffix,j=e.rows,C=e.rowsMax,P=e.rowsMin,A=e.startAdornment,H=e.type,R=void 0===H?"text":H,N=e.value,I=Object(Hr.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),W=null!=v.value?v.value:N,F=r.useRef(null!=W).current,U=r.useRef(),z=r.useCallback((function(e){0}),[]),B=na(v.ref,z),V=na(g,B),q=na(U,V),J=r.useState(!1),$=J[0],G=J[1],Q=r.useContext(Mi);var K=wi({props:e,muiFormControl:Q,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});K.focused=Q?Q.focused:$,r.useEffect((function(){!Q&&u&&$&&(G(!1),k&&k())}),[Q,u,$,k]);var Z=Q&&Q.onFilled,X=Q&&Q.onEmpty,ee=r.useCallback((function(e){Ei(e)?Z&&Z():X&&X()}),[Z,X]);Di((function(){F&&ee({value:W})}),[W,ee,F]);r.useEffect((function(){ee(U.current)}),[]);var te=y,ne=Object(h.a)(Object(h.a)({},v),{},{ref:q});"string"!=typeof te?ne=Object(h.a)(Object(h.a)({inputRef:q,type:R},ne),{},{ref:null}):w?!j||C||P?(ne=Object(h.a)({rows:j,rowsMax:C},ne),te=Si):te="textarea":ne=Object(h.a)({type:R},ne);return r.useEffect((function(){Q&&Q.setAdornedStart(Boolean(A))}),[Q,A]),r.createElement("div",Object(h.a)({className:Object(Nr.a)(o.root,o["color".concat(Object($r.a)(K.color||"primary"))],s,K.disabled&&o.disabled,K.error&&o.error,f&&o.fullWidth,K.focused&&o.focused,Q&&o.formControl,w&&o.multiline,A&&o.adornedStart,c&&o.adornedEnd,"dense"===K.margin&&o.marginDense),onClick:function(e){U.current&&e.currentTarget===e.target&&U.current.focus(),T&&T(e)},ref:t},I),A,r.createElement(ki.Provider,{value:null},r.createElement(te,Object(h.a)({"aria-invalid":K.error,"aria-describedby":n,autoComplete:a,autoFocus:i,defaultValue:l,disabled:K.disabled,id:p,onAnimationStart:function(e){ee("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:M,placeholder:E,readOnly:D,required:K.required,rows:j,value:W,onKeyDown:S,onKeyUp:Y},ne,{className:Object(Nr.a)(o.input,v.className,K.disabled&&o.disabled,w&&o.inputMultiline,K.hiddenLabel&&o.inputHiddenLabel,A&&o.inputAdornedStart,c&&o.inputAdornedEnd,"search"===R&&o.inputTypeSearch,"dense"===K.margin&&o.inputMarginDense),onBlur:function(e){k&&k(e),v.onBlur&&v.onBlur(e),Q&&Q.onBlur?Q.onBlur(e):G(!1)},onChange:function(e){if(!F){var t=e.target||U.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");ee({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a0?.75*o+8:.01;return r.createElement("fieldset",Object(h.a)({"aria-hidden":!0,style:Object(h.a)(Object(Rr.a)({},"padding".concat(Object($r.a)(c)),8),l),className:Object(Nr.a)(n.root,a),ref:t},u),r.createElement("legend",{className:n.legend,style:{width:s?d:.01}},r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))})),Ni=Object(Jr.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(Ri),Ii=r.forwardRef((function(e,t){var n=e.classes,a=e.fullWidth,i=void 0!==a&&a,o=e.inputComponent,s=void 0===o?"input":o,l=e.label,u=e.labelWidth,c=void 0===u?0:u,d=e.multiline,f=void 0!==d&&d,p=e.notched,m=e.type,y=void 0===m?"text":m,_=Object(Hr.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return r.createElement(ji,Object(h.a)({renderSuffix:function(e){return r.createElement(Ni,{className:n.notchedOutline,label:l,labelWidth:c,notched:void 0!==p?p:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(h.a)(Object(h.a)({},n),{},{root:Object(Nr.a)(n.root,n.underline),notchedOutline:null}),fullWidth:i,inputComponent:s,multiline:f,ref:t,type:y},_))}));Ii.muiName="Input";var Wi=Object(Jr.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(Ii);function Fi(){return r.useContext(ki)}var Ui=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=(e.color,e.component),s=void 0===o?"label":o,l=(e.disabled,e.error,e.filled,e.focused,e.required,Object(Hr.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),u=wi({props:e,muiFormControl:Fi(),states:["color","required","focused","disabled","error","filled"]});return r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,a["color".concat(Object($r.a)(u.color||"primary"))],i,u.disabled&&a.disabled,u.error&&a.error,u.filled&&a.filled,u.focused&&a.focused,u.required&&a.required),ref:t},l),n,u.required&&r.createElement("span",{"aria-hidden":!0,className:Object(Nr.a)(a.asterisk,u.error&&a.error)}," ","*"))})),zi=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({color:e.palette.text.secondary},e.typography.body1),{},{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(Ui),Bi=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.disableAnimation,o=void 0!==i&&i,s=(e.margin,e.shrink),l=(e.variant,Object(Hr.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),u=Fi(),c=s;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);var d=wi({props:e,muiFormControl:u,states:["margin","variant"]});return r.createElement(zi,Object(h.a)({"data-shrink":c,className:Object(Nr.a)(n.root,a,u&&n.formControl,!o&&n.animated,c&&n.shrink,"dense"===d.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[d.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},l))})),Vi=Object(Jr.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(Bi);function qi(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var Ji=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.color,s=void 0===o?"primary":o,l=e.component,u=void 0===l?"div":l,c=e.disabled,d=void 0!==c&&c,f=e.error,p=void 0!==f&&f,m=e.fullWidth,y=void 0!==m&&m,_=e.focused,v=e.hiddenLabel,g=void 0!==v&&v,b=e.margin,w=void 0===b?"none":b,M=e.required,k=void 0!==M&&M,L=e.size,T=e.variant,x=void 0===T?"standard":T,S=Object(Hr.a)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),Y=r.useState((function(){var e=!1;return n&&r.Children.forEach(n,(function(t){if(qi(t,["Input","Select"])){var n=qi(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}})),e})),E=Y[0],D=Y[1],O=r.useState((function(){var e=!1;return n&&r.Children.forEach(n,(function(t){qi(t,["Input","Select"])&&Ei(t.props,!0)&&(e=!0)})),e})),j=O[0],C=O[1],P=r.useState(!1),A=P[0],H=P[1],R=void 0!==_?_:A;d&&R&&H(!1);var N=r.useCallback((function(){C(!0)}),[]),I={adornedStart:E,setAdornedStart:D,color:s,disabled:d,error:p,filled:j,focused:R,fullWidth:y,hiddenLabel:g,margin:("small"===L?"dense":void 0)||w,onBlur:function(){H(!1)},onEmpty:r.useCallback((function(){C(!1)}),[]),onFilled:N,onFocus:function(){H(!0)},registerEffect:void 0,required:k,variant:x};return r.createElement(ki.Provider,{value:I},r.createElement(u,Object(h.a)({className:Object(Nr.a)(a.root,i,"none"!==w&&a["margin".concat(Object($r.a)(w))],y&&a.fullWidth),ref:t},S),n))})),$i=Object(Jr.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(Ji),Gi=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.component,s=void 0===o?"p":o,l=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,Object(Hr.a)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),u=wi({props:e,muiFormControl:Fi(),states:["variant","margin","disabled","error","filled","focused","required"]});return r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,("filled"===u.variant||"outlined"===u.variant)&&a.contained,i,u.disabled&&a.disabled,u.error&&a.error,u.filled&&a.filled,u.focused&&a.focused,u.required&&a.required,"dense"===u.margin&&a.marginDense),ref:t},l)," "===n?r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):n)})),Qi=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({color:e.palette.text.secondary},e.typography.caption),{},{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(Gi),Ki=n(391),Zi=n(30),Xi=n(40);function eo(){for(var e=arguments.length,t=new Array(e),n=0;n3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Object(ha.a)(r)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&lo(e,a)}))}function fo(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function po(e,t){var n,r=[],a=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Wr(e);return t.body===e?Fr(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var o=so();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(uo(i)+o,"px"),n=Wr(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){a.push(e.style.paddingRight),e.style.paddingRight="".concat(uo(e)+o,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){a[t]?e.style.paddingRight=a[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var mo=function(){function e(){io(this,e),this.modals=[],this.containers=[]}return Object(oo.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&lo(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);co(t,e.mountNode,e.modalRef,r,!0);var a=fo(this.containers,(function(e){return e.container===t}));return-1!==a?(this.containers[a].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=fo(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=po(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=fo(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&lo(e.modalRef,!0),co(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var a=r.modals[r.modals.length-1];a.modalRef&&lo(a.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var ho=function(e){var t=e.children,n=e.disableAutoFocus,a=void 0!==n&&n,o=e.disableEnforceFocus,s=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,c=e.getDoc,d=e.isEnabled,f=e.open,p=r.useRef(),m=r.useRef(null),h=r.useRef(null),y=r.useRef(),_=r.useRef(null),v=r.useCallback((function(e){_.current=i.findDOMNode(e)}),[]),g=na(t.ref,v),b=r.useRef();return r.useEffect((function(){b.current=f}),[f]),!b.current&&f&&"undefined"!=typeof window&&(y.current=c().activeElement),r.useEffect((function(){if(f){var e=Wr(_.current);a||!_.current||_.current.contains(e.activeElement)||(_.current.hasAttribute("tabIndex")||_.current.setAttribute("tabIndex",-1),_.current.focus());var t=function(){e.hasFocus()&&!s&&d()&&!p.current?_.current&&!_.current.contains(e.activeElement)&&_.current.focus():p.current=!1},n=function(t){!s&&d()&&9===t.keyCode&&e.activeElement===_.current&&(p.current=!0,t.shiftKey?h.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var r=setInterval((function(){t()}),50);return function(){clearInterval(r),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(y.current&&y.current.focus&&y.current.focus(),y.current=null)}}}),[a,s,u,d,f]),r.createElement(r.Fragment,null,r.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),r.cloneElement(t,{ref:g}),r.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))},yo={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},_o=r.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,i=e.open,o=Object(Hr.a)(e,["invisible","open"]);return i?r.createElement("div",Object(h.a)({"aria-hidden":!0,ref:t},o,{style:Object(h.a)(Object(h.a)(Object(h.a)({},yo.root),a?yo.invisible:{}),o.style)})):null}));var vo=new mo,go=r.forwardRef((function(e,t){var n=Object(Pa.a)(),a=Object(to.a)({name:"MuiModal",props:Object(h.a)({},e),theme:n}),o=a.BackdropComponent,s=void 0===o?_o:o,l=a.BackdropProps,u=a.children,c=a.closeAfterTransition,d=void 0!==c&&c,f=a.container,p=a.disableAutoFocus,m=void 0!==p&&p,y=a.disableBackdropClick,_=void 0!==y&&y,v=a.disableEnforceFocus,g=void 0!==v&&v,b=a.disableEscapeKeyDown,w=void 0!==b&&b,M=a.disablePortal,k=void 0!==M&&M,L=a.disableRestoreFocus,T=void 0!==L&&L,x=a.disableScrollLock,S=void 0!==x&&x,Y=a.hideBackdrop,E=void 0!==Y&&Y,D=a.keepMounted,O=void 0!==D&&D,j=a.manager,C=void 0===j?vo:j,P=a.onBackdropClick,A=a.onClose,H=a.onEscapeKeyDown,R=a.onRendered,N=a.open,I=Object(Hr.a)(a,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),W=r.useState(!0),F=W[0],U=W[1],z=r.useRef({}),B=r.useRef(null),V=r.useRef(null),q=na(V,t),J=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(a),$=function(){return Wr(B.current)},G=function(){return z.current.modalRef=V.current,z.current.mountNode=B.current,z.current},Q=function(){C.mount(G(),{disableScrollLock:S}),V.current.scrollTop=0},K=aa((function(){var e=function(e){return e="function"==typeof e?e():e,i.findDOMNode(e)}(f)||$().body;C.add(G(),e),V.current&&Q()})),Z=r.useCallback((function(){return C.isTopModal(G())}),[C]),X=aa((function(e){B.current=e,e&&(R&&R(),N&&Z()?Q():lo(V.current,!0))})),ee=r.useCallback((function(){C.remove(G())}),[C]);if(r.useEffect((function(){return function(){ee()}}),[ee]),r.useEffect((function(){N?K():J&&d||ee()}),[N,ee,J,d,K]),!O&&!N&&(!J||F))return null;var te=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:ao.a}),ne={};return void 0===u.props.tabIndex&&(ne.tabIndex=u.props.tabIndex||"-1"),J&&(ne.onEnter=eo((function(){U(!1)}),u.props.onEnter),ne.onExited=eo((function(){U(!0),d&&ee()}),u.props.onExited)),r.createElement(ro,{ref:X,container:f,disablePortal:k},r.createElement("div",Object(h.a)({ref:q,onKeyDown:function(e){"Escape"===e.key&&Z()&&(H&&H(e),w||(e.stopPropagation(),A&&A(e,"escapeKeyDown")))},role:"presentation"},I,{style:Object(h.a)(Object(h.a)(Object(h.a)({},te.root),!N&&F?te.hidden:{}),I.style)}),E?null:r.createElement(s,Object(h.a)({open:N,onClick:function(e){e.target===e.currentTarget&&(P&&P(e),!_&&A&&A(e,"backdropClick"))}},l)),r.createElement(ho,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:T,getDoc:$,isEnabled:Z,open:N},r.cloneElement(u,ne))))})),bo=!1,wo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var a,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(a="exited",r.appearStatus="entering"):a="entered":a=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:a},r.nextCallback=null,r}Object(ae.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[o.a.findDOMNode(this),r],i=a[0],s=a[1],l=this.getTimeouts(),u=r?l.appear:l.enter;!e&&!n||bo?this.safeSetState({status:"entered"},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,s),this.safeSetState({status:"entering"},(function(){t.props.onEntering(i,s),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(i,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.a.findDOMNode(this);t&&!bo?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=a[0],s=a[1];this.props.addEndListener(i,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(y.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(_a.Provider,{value:null},"function"==typeof n?n(e,r):a.a.cloneElement(a.a.Children.only(n),r))},t}(a.a.Component);function Mo(){}wo.contextType=_a,wo.propTypes={},wo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Mo,onEntering:Mo,onEntered:Mo,onExit:Mo,onExiting:Mo,onExited:Mo},wo.UNMOUNTED="unmounted",wo.EXITED="exited",wo.ENTERING="entering",wo.ENTERED="entered",wo.EXITING="exiting";var ko=wo,Lo=function(e){return e.scrollTop};function To(e,t){var n=e.timeout,r=e.style,a=void 0===r?{}:r;return{duration:a.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:a.transitionDelay}}function xo(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var So={entering:{opacity:1,transform:xo(1)},entered:{opacity:1,transform:"none"}},Yo=r.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,i=void 0!==a&&a,o=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,c=e.onExit,d=e.onExited,f=e.onExiting,p=e.style,m=e.timeout,y=void 0===m?"auto":m,_=e.TransitionComponent,v=void 0===_?ko:_,g=Object(Hr.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),b=r.useRef(),w=r.useRef(),M=Ha(),k=M.unstable_strictMode&&!i,L=r.useRef(null),T=na(n.ref,t),x=na(k?L:void 0,T),S=function(e){return function(t,n){if(e){var r=k?[L.current,t]:[t,n],a=Object(Zi.a)(r,2),i=a[0],o=a[1];void 0===o?e(i):e(i,o)}}},Y=S(u),E=S((function(e,t){Lo(e);var n,r=To({style:p,timeout:y},{mode:"enter"}),a=r.duration,i=r.delay;"auto"===y?(n=M.transitions.getAutoHeightDuration(e.clientHeight),w.current=n):n=a,e.style.transition=[M.transitions.create("opacity",{duration:n,delay:i}),M.transitions.create("transform",{duration:.666*n,delay:i})].join(","),s&&s(e,t)})),D=S(l),O=S(f),j=S((function(e){var t,n=To({style:p,timeout:y},{mode:"exit"}),r=n.duration,a=n.delay;"auto"===y?(t=M.transitions.getAutoHeightDuration(e.clientHeight),w.current=t):t=r,e.style.transition=[M.transitions.create("opacity",{duration:t,delay:a}),M.transitions.create("transform",{duration:.666*t,delay:a||.333*t})].join(","),e.style.opacity="0",e.style.transform=xo(.75),c&&c(e)})),C=S(d);return r.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),r.createElement(v,Object(h.a)({appear:!0,in:o,nodeRef:k?L:void 0,onEnter:E,onEntered:D,onEntering:Y,onExit:j,onExited:C,onExiting:O,addEndListener:function(e,t){var n=k?e:t;"auto"===y&&(b.current=setTimeout(n,w.current||0))},timeout:"auto"===y?null:y},g),(function(e,t){return r.cloneElement(n,Object(h.a)({style:Object(h.a)(Object(h.a)(Object(h.a)({opacity:0,transform:xo(.75),visibility:"exited"!==e||o?void 0:"hidden"},So[e]),p),n.props.style),ref:x},t))}))}));Yo.muiSupportAuto=!0;var Eo=Yo,Do=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"div":i,s=e.square,l=void 0!==s&&s,u=e.elevation,c=void 0===u?1:u,d=e.variant,f=void 0===d?"elevation":d,p=Object(Hr.a)(e,["classes","className","component","square","elevation","variant"]);return r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a,"outlined"===f?n.outlined:n["elevation".concat(c)],!l&&n.rounded),ref:t},p))})),Oo=Object(Jr.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(h.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Do);function jo(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Co(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Po(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Ao(e){return"function"==typeof e?e():e}var Ho=r.forwardRef((function(e,t){var n=e.action,a=e.anchorEl,o=e.anchorOrigin,s=void 0===o?{vertical:"top",horizontal:"left"}:o,l=e.anchorPosition,u=e.anchorReference,c=void 0===u?"anchorEl":u,d=e.children,f=e.classes,p=e.className,m=e.container,y=e.elevation,_=void 0===y?8:y,v=e.getContentAnchorEl,g=e.marginThreshold,b=void 0===g?16:g,w=e.onEnter,M=e.onEntered,k=e.onEntering,L=e.onExit,T=e.onExited,x=e.onExiting,S=e.open,Y=e.PaperProps,E=void 0===Y?{}:Y,D=e.transformOrigin,O=void 0===D?{vertical:"top",horizontal:"left"}:D,j=e.TransitionComponent,C=void 0===j?Eo:j,P=e.transitionDuration,A=void 0===P?"auto":P,H=e.TransitionProps,R=void 0===H?{}:H,N=Object(Hr.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),I=r.useRef(),W=r.useCallback((function(e){if("anchorPosition"===c)return l;var t=Ao(a),n=(t&&1===t.nodeType?t:Wr(I.current).body).getBoundingClientRect(),r=0===e?s.vertical:"center";return{top:n.top+jo(n,r),left:n.left+Co(n,s.horizontal)}}),[a,s.horizontal,s.vertical,l,c]),F=r.useCallback((function(e){var t=0;if(v&&"anchorEl"===c){var n=v(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[s.vertical,c,v]),U=r.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:jo(e,O.vertical)+t,horizontal:Co(e,O.horizontal)}}),[O.horizontal,O.vertical]),z=r.useCallback((function(e){var t=F(e),n={width:e.offsetWidth,height:e.offsetHeight},r=U(n,t);if("none"===c)return{top:null,left:null,transformOrigin:Po(r)};var i=W(t),o=i.top-r.vertical,s=i.left-r.horizontal,l=o+n.height,u=s+n.width,d=Fr(Ao(a)),f=d.innerHeight-b,p=d.innerWidth-b;if(of){var h=l-f;o-=h,r.vertical+=h}if(sp){var _=u-p;s-=_,r.horizontal+=_}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Po(r)}}),[a,c,W,F,U,b]),B=r.useCallback((function(){var e=I.current;if(e){var t=z(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[z]),V=r.useCallback((function(e){I.current=i.findDOMNode(e)}),[]);r.useEffect((function(){S&&B()})),r.useImperativeHandle(n,(function(){return S?{updatePosition:function(){B()}}:null}),[S,B]),r.useEffect((function(){if(S){var e=Ir((function(){B()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[S,B]);var q=A;"auto"!==A||C.muiSupportAuto||(q=void 0);var J=m||(a?Wr(Ao(a)).body:void 0);return r.createElement(go,Object(h.a)({container:J,open:S,ref:t,BackdropProps:{invisible:!0},className:Object(Nr.a)(f.root,p)},N),r.createElement(C,Object(h.a)({appear:!0,in:S,onEnter:w,onEntered:M,onExit:L,onExited:T,onExiting:x,timeout:q},R,{onEntering:eo((function(e,t){k&&k(e,t),B()}),R.onEntering)}),r.createElement(Oo,Object(h.a)({elevation:_,ref:V},E,{className:Object(Nr.a)(f.paper,E.className)}),d)))})),Ro=Object(Jr.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Ho);var No=r.createContext({}),Io=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.component,s=void 0===o?"ul":o,l=e.dense,u=void 0!==l&&l,c=e.disablePadding,d=void 0!==c&&c,f=e.subheader,p=Object(Hr.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),m=r.useMemo((function(){return{dense:u}}),[u]);return r.createElement(No.Provider,{value:m},r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,i,u&&a.dense,!d&&a.padding,f&&a.subheader),ref:t},p),f,n))})),Wo=Object(Jr.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Io);function Fo(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Uo(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function zo(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Bo(e,t,n,r,a,i){for(var o=!1,s=a(e,t,!!t&&n);s;){if(s===e.firstChild){if(o)return;o=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&zo(s,i)&&!l)return void s.focus();s=a(e,s,n)}}var Vo="undefined"==typeof window?r.useEffect:r.useLayoutEffect,qo=r.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,o=void 0!==a&&a,s=e.autoFocusItem,l=void 0!==s&&s,u=e.children,c=e.className,d=e.disabledItemsFocusable,f=void 0!==d&&d,p=e.disableListWrap,m=void 0!==p&&p,y=e.onKeyDown,_=e.variant,v=void 0===_?"selectedMenu":_,g=Object(Hr.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),b=r.useRef(null),w=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Vo((function(){o&&b.current.focus()}),[o]),r.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!b.current.style.width;if(e.clientHeight0&&(o-a.lastTime>500?(a.keys=[],a.repeating=!0,a.previousKeyMatched=!0):a.repeating&&i!==a.keys[0]&&(a.repeating=!1)),a.lastTime=o,a.keys.push(i);var s=r&&!a.repeating&&zo(r,a);a.previousKeyMatched&&(s||Bo(t,r,!1,f,Fo,a))?e.preventDefault():a.previousKeyMatched=!1}y&&y(e)},tabIndex:o?0:-1},g),L)})),Jo={vertical:"top",horizontal:"right"},$o={vertical:"top",horizontal:"left"},Go=r.forwardRef((function(e,t){var n=e.autoFocus,a=void 0===n||n,o=e.children,s=e.classes,l=e.disableAutoFocusItem,u=void 0!==l&&l,c=e.MenuListProps,d=void 0===c?{}:c,f=e.onClose,p=e.onEntering,m=e.open,y=e.PaperProps,_=void 0===y?{}:y,v=e.PopoverClasses,g=e.transitionDuration,b=void 0===g?"auto":g,w=e.variant,M=void 0===w?"selectedMenu":w,k=Object(Hr.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),L=Ha(),T=a&&!u&&m,x=r.useRef(null),S=r.useRef(null),Y=-1;r.Children.map(o,(function(e,t){r.isValidElement(e)&&(e.props.disabled||("menu"!==M&&e.props.selected||-1===Y)&&(Y=t))}));var E=r.Children.map(o,(function(e,t){return t===Y?r.cloneElement(e,{ref:function(t){S.current=i.findDOMNode(t),ta(e.ref,t)}}):e}));return r.createElement(Ro,Object(h.a)({getContentAnchorEl:function(){return S.current},classes:v,onClose:f,onEntering:function(e,t){x.current&&x.current.adjustStyleForScrollbar(e,L),p&&p(e,t)},anchorOrigin:"rtl"===L.direction?Jo:$o,transformOrigin:"rtl"===L.direction?Jo:$o,PaperProps:Object(h.a)(Object(h.a)({},_),{},{classes:Object(h.a)(Object(h.a)({},_.classes),{},{root:s.paper})}),open:m,ref:t,transitionDuration:b},k),r.createElement(qo,Object(h.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),f&&f(e,"tabKeyDown"))},actions:x,autoFocus:a&&(-1===Y||u),autoFocusItem:T,variant:M},d,{className:Object(Nr.a)(s.list,d.className)}),E))})),Qo=Object(Jr.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(Go);function Ko(e){var t=e.controlled,n=e.default,a=(e.name,e.state,r.useRef(void 0!==t).current),i=r.useState(n),o=i[0],s=i[1];return[a?t:o,r.useCallback((function(e){a||s(e)}),[])]}function Zo(e,t){return"object"===Object(Xi.a)(t)&&null!==t?e===t:String(e)===String(t)}var Xo=r.forwardRef((function(e,t){var n=e["aria-label"],a=e.autoFocus,i=e.autoWidth,o=e.children,s=e.classes,l=e.className,u=e.defaultValue,c=e.disabled,d=e.displayEmpty,f=e.IconComponent,p=e.inputRef,m=e.labelId,y=e.MenuProps,_=void 0===y?{}:y,v=e.multiple,g=e.name,b=e.onBlur,w=e.onChange,M=e.onClose,k=e.onFocus,L=e.onOpen,T=e.open,x=e.readOnly,S=e.renderValue,Y=(e.required,e.SelectDisplayProps),E=void 0===Y?{}:Y,D=e.tabIndex,O=(e.type,e.value),j=e.variant,C=void 0===j?"standard":j,P=Object(Hr.a)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),A=Ko({controlled:O,default:u,name:"Select"}),H=Object(Zi.a)(A,2),R=H[0],N=H[1],I=r.useRef(null),W=r.useState(null),F=W[0],U=W[1],z=r.useRef(null!=T).current,B=r.useState(),V=B[0],q=B[1],J=r.useState(!1),$=J[0],G=J[1],Q=na(t,p);r.useImperativeHandle(Q,(function(){return{focus:function(){F.focus()},node:I.current,value:R}}),[F,R]),r.useEffect((function(){a&&F&&F.focus()}),[a,F]),r.useEffect((function(){if(F){var e=Wr(F).getElementById(m);if(e){var t=function(){getSelection().isCollapsed&&F.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[m,F]);var K,Z,X=function(e,t){e?L&&L(t):M&&M(t),z||(q(i?null:F.clientWidth),G(e))},ee=function(e){return function(t){var n;if(v||X(!1,t),v){n=Array.isArray(R)?R.slice():[];var r=R.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),R!==n&&(N(n),w&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),w(t,e)))}},te=null!==F&&(z?T:$);delete P["aria-invalid"];var ne=[],re=!1;(Ei({value:R})||d)&&(S?K=S(R):re=!0);var ae=r.Children.map(o,(function(e){if(!r.isValidElement(e))return null;var t;if(v){if(!Array.isArray(R))throw new Error("Material-UI: The `value` prop must be an array when using the `Select` component with `multiple`.");(t=R.some((function(t){return Zo(t,e.props.value)})))&&re&&ne.push(e.props.children)}else(t=Zo(R,e.props.value))&&re&&(Z=e.props.children);return t&&!0,r.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ee(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));re&&(K=v?ne.join(", "):Z);var ie,oe=V;!i&&z&&F&&(oe=F.clientWidth),ie=void 0!==D?D:c?null:0;var se=E.id||(g?"mui-component-select-".concat(g):void 0);return r.createElement(r.Fragment,null,r.createElement("div",Object(h.a)({className:Object(Nr.a)(s.root,s.select,s.selectMenu,s[C],l,c&&s.disabled),ref:U,tabIndex:ie,role:"button","aria-disabled":c?"true":void 0,"aria-expanded":te?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[m,se].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!x){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),X(!0,e))}},onMouseDown:c||x?null:function(e){0===e.button&&(e.preventDefault(),F.focus(),X(!0,e))},onBlur:function(e){!te&&b&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:g}}),b(e))},onFocus:k},E,{id:se}),function(e){return null==e||"string"==typeof e&&!e.trim()}(K)?r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):K),r.createElement("input",Object(h.a)({value:Array.isArray(R)?R.join(","):R,name:g,ref:I,type:"hidden",autoFocus:a},P)),r.createElement(f,{className:Object(Nr.a)(s.icon,s["icon".concat(Object($r.a)(C))],te&&s.iconOpen,c&&s.disabled)}),r.createElement(Qo,Object(h.a)({id:"menu-".concat(g||""),anchorEl:F,open:te,onClose:function(e){X(!1,e)}},_,{MenuListProps:Object(h.a)({"aria-labelledby":m,role:"listbox",disableListWrap:!0},_.MenuListProps),PaperProps:Object(h.a)(Object(h.a)({},_.PaperProps),{},{style:Object(h.a)({minWidth:oe},null!=_.PaperProps?_.PaperProps.style:null)})}),ae))})),es=Zr(r.createElement("path",{d:"M7 10l5 5 5-5z"})),ts=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.disabled,o=e.IconComponent,s=e.inputRef,l=e.variant,u=void 0===l?"standard":l,c=Object(Hr.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return r.createElement(r.Fragment,null,r.createElement("select",Object(h.a)({className:Object(Nr.a)(n.root,n.select,n[u],a,i&&n.disabled),disabled:i,ref:s||t},c)),e.multiple?null:r.createElement(o,{className:Object(Nr.a)(n.icon,n["icon".concat(Object($r.a)(u))],i&&n.disabled)}))})),ns=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},rs=r.createElement(Pi,null),as=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.IconComponent,o=void 0===i?es:i,s=e.input,l=void 0===s?rs:s,u=e.inputProps,c=(e.variant,Object(Hr.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),d=wi({props:e,muiFormControl:Fi(),states:["variant"]});return r.cloneElement(l,Object(h.a)({inputComponent:ts,inputProps:Object(h.a)(Object(h.a)({children:n,classes:a,IconComponent:o,variant:d.variant,type:void 0},u),l?l.props.inputProps:{}),ref:t},c))}));as.muiName="Select";Object(Jr.a)(ns,{name:"MuiNativeSelect"})(as);var is=ns,os=r.createElement(Pi,null),ss=r.createElement(Hi,null),ls=r.forwardRef((function e(t,n){var a=t.autoWidth,i=void 0!==a&&a,o=t.children,s=t.classes,l=t.displayEmpty,u=void 0!==l&&l,c=t.IconComponent,d=void 0===c?es:c,f=t.id,p=t.input,m=t.inputProps,y=t.label,_=t.labelId,v=t.labelWidth,g=void 0===v?0:v,b=t.MenuProps,w=t.multiple,M=void 0!==w&&w,k=t.native,L=void 0!==k&&k,T=t.onClose,x=t.onOpen,S=t.open,Y=t.renderValue,E=t.SelectDisplayProps,D=t.variant,O=void 0===D?"standard":D,j=Object(Hr.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),C=L?ts:Xo,P=wi({props:t,muiFormControl:Fi(),states:["variant"]}).variant||O,A=p||{standard:os,outlined:r.createElement(Wi,{label:y,labelWidth:g}),filled:ss}[P];return r.cloneElement(A,Object(h.a)({inputComponent:C,inputProps:Object(h.a)(Object(h.a)(Object(h.a)({children:o,IconComponent:d,variant:P,type:void 0,multiple:M},L?{id:f}:{autoWidth:i,displayEmpty:u,labelId:_,MenuProps:b,onClose:T,onOpen:x,open:S,renderValue:Y,SelectDisplayProps:Object(h.a)({id:f},E)}),m),{},{classes:m?Object(Ki.a)({baseClasses:s,newClasses:m.classes,Component:e}):s},p?p.props.inputProps:{}),ref:n},j))}));ls.muiName="Select";var us=Object(Jr.a)(is,{name:"MuiSelect"})(ls),cs={standard:Pi,filled:Hi,outlined:Wi},ds=r.forwardRef((function(e,t){var n=e.autoComplete,a=e.autoFocus,i=void 0!==a&&a,o=e.children,s=e.classes,l=e.className,u=e.color,c=void 0===u?"primary":u,d=e.defaultValue,f=e.disabled,p=void 0!==f&&f,m=e.error,y=void 0!==m&&m,_=e.FormHelperTextProps,v=e.fullWidth,g=void 0!==v&&v,b=e.helperText,w=e.hiddenLabel,M=e.id,k=e.InputLabelProps,L=e.inputProps,T=e.InputProps,x=e.inputRef,S=e.label,Y=e.multiline,E=void 0!==Y&&Y,D=e.name,O=e.onBlur,j=e.onChange,C=e.onFocus,P=e.placeholder,A=e.required,H=void 0!==A&&A,R=e.rows,N=e.rowsMax,I=e.select,W=void 0!==I&&I,F=e.SelectProps,U=e.type,z=e.value,B=e.variant,V=void 0===B?"standard":B,q=Object(Hr.a)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]);var J={};if("outlined"===V&&(k&&void 0!==k.shrink&&(J.notched=k.shrink),S)){var $,G=null!==($=null==k?void 0:k.required)&&void 0!==$?$:H;J.label=r.createElement(r.Fragment,null,S,G&&" *")}W&&(F&&F.native||(J.id=void 0),J["aria-describedby"]=void 0);var Q=b&&M?"".concat(M,"-helper-text"):void 0,K=S&&M?"".concat(M,"-label"):void 0,Z=cs[V],X=r.createElement(Z,Object(h.a)({"aria-describedby":Q,autoComplete:n,autoFocus:i,defaultValue:d,fullWidth:g,multiline:E,name:D,rows:R,rowsMax:N,type:U,value:z,id:M,inputRef:x,onBlur:O,onChange:j,onFocus:C,placeholder:P,inputProps:L},J,T));return r.createElement($i,Object(h.a)({className:Object(Nr.a)(s.root,l),disabled:p,error:y,fullWidth:g,hiddenLabel:w,ref:t,required:H,color:c,variant:V},q),S&&r.createElement(Vi,Object(h.a)({htmlFor:M,id:K},k),S),W?r.createElement(us,Object(h.a)({"aria-describedby":Q,id:M,labelId:K,value:z,input:X},F),o):X,b&&r.createElement(Qi,Object(h.a)({id:Q},_),b))})),fs=Object(Jr.a)({root:{}},{name:"MuiTextField"})(ds);function ps(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var ms=function(e){lr()(n,e);var t=ps(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).chip=a.a.createRef(),r}return or()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.chip.current.querySelector("input");t&&(t.focus(),t.onkeydown=function(t){e.keyDown(t)})}},{key:"componentDidUpdate",value:function(){this.props.focused&&this.chip.current.querySelector("input").focus()}},{key:"keyDown",value:function(e){switch(e.which||e.keyCode){case 13:if(0===this.props.pos&&""===this.props.value)break;this.props.createSearch(this.props.query);break;case 37:0===e.target.selectionStart&&this.props.focusSearchTerm(this.props.pos-1,!1);break;case 39:e.target.selectionStart===e.target.value.length&&this.props.focusSearchTerm(this.props.pos+1,!0)}e.stopPropagation()}},{key:"update",value:function(e){this.props.onInput({type:this.props.type,value:e.target.value,pos:this.props.pos})}},{key:"click",value:function(e){this.props.onClick&&this.props.onClick(e.target)}},{key:"guessType",value:function(){return this.props.value.match(/ /g)?"phrase":this.props.value.startsWith("#")?"hashtag":this.props.value.startsWith("@")?"user":"keyword"}},{key:"cssClass",value:function(e){switch(e){case"keyword":return bi.a.Keyword;case"hashtag":return bi.a.Hashtag;case"phrase":return bi.a.Phrase;case"user":return bi.a.User;default:return""}}},{key:"render",value:function(){var e=this,t=this.guessType(),n=this.cssClass(t),r=this.props.className?this.props.className:"",i=a.a.createElement("span",{className:"".concat(bi.a.SearchTerm," ").concat(r),ref:this.chip,onClick:function(t){return e.click(t)},"data-type":t},this.props.value);return this.props.onInput&&(i=a.a.createElement(fs,{ref:this.chip,value:this.props.value,onChange:function(t){e.update(t)}})),a.a.createElement("span",{className:"".concat(n," ").concat(bi.a.SearchTerm," ").concat(r)},i)}}]),n}(r.Component);ms.propTypes={className:l.a.string,pos:l.a.number,focused:l.a.object,type:l.a.string,value:l.a.string,onInput:l.a.func,onClick:l.a.func,createSearch:l.a.func,query:l.a.array,focusSearchTerm:l.a.func};var hs=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.raised,o=void 0!==i&&i,s=Object(Hr.a)(e,["classes","className","raised"]);return r.createElement(Oo,Object(h.a)({className:Object(Nr.a)(n.root,a),elevation:o?8:1,ref:t},s))})),ys=Object(Jr.a)({root:{overflow:"hidden"}},{name:"MuiCard"})(hs),_s=r.forwardRef((function(e,t){var n=e.disableSpacing,a=void 0!==n&&n,i=e.classes,o=e.className,s=Object(Hr.a)(e,["disableSpacing","classes","className"]);return r.createElement("div",Object(h.a)({className:Object(Nr.a)(i.root,o,!a&&i.spacing),ref:t},s))})),vs=Object(Jr.a)({root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiCardActions"})(_s),gs=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"div":i,s=Object(Hr.a)(e,["classes","className","component"]);return r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a),ref:t},s))})),bs=Object(Jr.a)({root:{padding:16,"&:last-child":{paddingBottom:24}}},{name:"MuiCardContent"})(gs),ws=n(14),Ms=r.forwardRef((function(e,t){var n=e.edge,a=void 0!==n&&n,i=e.children,o=e.classes,s=e.className,l=e.color,u=void 0===l?"default":l,c=e.disabled,d=void 0!==c&&c,f=e.disableFocusRipple,p=void 0!==f&&f,m=e.size,y=void 0===m?"medium":m,_=Object(Hr.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return r.createElement(Ea,Object(h.a)({className:Object(Nr.a)(o.root,s,"default"!==u&&o["color".concat(Object($r.a)(u))],d&&o.disabled,"small"===y&&o["size".concat(Object($r.a)(y))],{start:o.edgeStart,end:o.edgeEnd}[a]),centerRipple:!0,focusRipple:!p,disabled:d,ref:t},_),r.createElement("span",{className:o.label},i))})),ks=Object(Jr.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(ws.c)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(Ms),Ls=n(12),Ts=n.n(Ls),xs=n(53),Ss=n.n(xs);function Ys(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Es=function(e){lr()(n,e);var t=Ys(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"createSearch",value:function(e){this.props.createSearch([{type:e.parentNode.getAttribute("data-type"),value:e.innerText}])}},{key:"render",value:function(){var e=this,t=null,n=null;return this.props.username?(n=a.a.createElement(ks,{style:{marginLeft:"auto"},onClick:function(){e.props.deleteTrend(e.props.id)}},a.a.createElement("ion-icon",{name:"remove"})),t=this.props.trends.map((function(t,n){return a.a.createElement("div",{key:"t-".concat(n),className:Ss.a.Trend},a.a.createElement("div",{className:Ss.a.TrendTerm},a.a.createElement(ms,{className:bi.a.InCard,onClick:function(t){e.createSearch(t)},value:t.name})),a.a.createElement("div",{className:Ss.a.TrendCount},a.a.createElement("bdo",{title:t.name+" tweets in the last 24 hours"},parseInt(t.count,10).toLocaleString())))}))):t=this.props.trends.map((function(e,t){return a.a.createElement("div",{key:"t-".concat(t),className:Ss.a.Trend},a.a.createElement("div",{className:Ss.a.TrendTerm},e.name),a.a.createElement("div",{className:bi.a.InCard},a.a.createElement("bdo",null,parseInt(e.count,10).toLocaleString())))})),a.a.createElement(ys,{className:Ts.a.Card},a.a.createElement(bs,{className:Ts.a.Scroll},a.a.createElement(vi,{duration:2e3,enterAnimation:"elevator",leaveAnimation:"fade"},t)),a.a.createElement(vs,null,a.a.createElement("h2",{className:Ts.a.PlaceHeader},this.props.name," "),n))}}]),n}(r.Component);Es.propTypes={trends:l.a.array,world:l.a.object,name:l.a.string,id:l.a.number,username:l.a.string,deleteTrend:l.a.func,createSearch:l.a.func};var Ds=n(35),Os=n.n(Ds),js=n(246),Cs=n.n(js),Ps=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.color,s=void 0===o?"default":o,l=e.component,u=void 0===l?"button":l,c=e.disabled,d=void 0!==c&&c,f=e.disableFocusRipple,p=void 0!==f&&f,m=e.focusVisibleClassName,y=e.size,_=void 0===y?"large":y,v=e.variant,g=void 0===v?"round":v,b=Object(Hr.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return r.createElement(Ea,Object(h.a)({className:Object(Nr.a)(a.root,i,"round"!==g&&a.extended,"large"!==_&&a["size".concat(Object($r.a)(_))],d&&a.disabled,{primary:a.primary,secondary:a.secondary,inherit:a.colorInherit}[s]),component:u,disabled:d,focusRipple:!p,focusVisibleClassName:Object(Nr.a)(a.focusVisible,m),ref:t},b),r.createElement("span",{className:a.label},n))})),As=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.button),{},{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(Ps),Hs=n(247),Rs=n.n(Hs);function Ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Is=function(e){lr()(n,e);var t=Ns(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).checkPlace=r.checkPlace.bind(Os()(r)),r.addPlaceInputRef=a.a.createRef(),r}return or()(n,[{key:"matchInputToTerm",value:function(e,t){return-1!==e.toLowerCase().indexOf(t.toLowerCase())||-1!==e.toLowerCase().indexOf(t.toLowerCase())}},{key:"sortPlaces",value:function(e,t,n){var r=e.toLowerCase(),a=t.toLowerCase(),i=n.toLowerCase(),o=r.indexOf(i),s=a.indexOf(i);return o!==s?o-s:r=this.props.limit&&(t.disabled=!0,n=!0),a.a.createElement("div",{className:Rs.a.AddPlace},a.a.createElement(Cs.a,{getItemValue:function(e){return e},sortItems:this.sortPlaces,items:Object.keys(this.props.world),shouldItemRender:this.matchInputToTerm,menuStyle:{boxShadow:"rgba(0, 0, 0, 0.1) 0px 2px 12px",background:"rgba(255, 255, 255, 0.9) none repeat scroll 0% 0%",padding:"2px",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"140px"},renderItem:function(e,t){return a.a.createElement("div",{style:{background:t?"lightgray":"white"}},e)},value:this.props.newPlace,onChange:function(t,n){return e.props.updateNewTrend(n)},onSelect:function(t){return e.props.updateNewTrend(t)},inputProps:t}),a.a.createElement(As,{size:"medium",tabIndex:"0",color:"primary",onClick:this.checkPlace,disabled:n},a.a.createElement("ion-icon",{name:"add"})))}}]),n}(r.Component);Is.propTypes={limit:l.a.number,places:l.a.array,world:l.a.object,updateNewTrend:l.a.func,newPlace:l.a.string,placeLabelToId:l.a.func,deleteTrend:l.a.func,saveTrends:l.a.func};var Ws=n(72),Fs=n.n(Ws),Us=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.color,s=void 0===o?"default":o,l=e.component,u=void 0===l?"button":l,c=e.disabled,d=void 0!==c&&c,f=e.disableElevation,p=void 0!==f&&f,m=e.disableFocusRipple,y=void 0!==m&&m,_=e.endIcon,v=e.focusVisibleClassName,g=e.fullWidth,b=void 0!==g&&g,w=e.size,M=void 0===w?"medium":w,k=e.startIcon,L=e.type,T=void 0===L?"button":L,x=e.variant,S=void 0===x?"text":x,Y=Object(Hr.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),E=k&&r.createElement("span",{className:Object(Nr.a)(a.startIcon,a["iconSize".concat(Object($r.a)(M))])},k),D=_&&r.createElement("span",{className:Object(Nr.a)(a.endIcon,a["iconSize".concat(Object($r.a)(M))])},_);return r.createElement(Ea,Object(h.a)({className:Object(Nr.a)(a.root,a[S],i,"inherit"===s?a.colorInherit:"default"!==s&&a["".concat(S).concat(Object($r.a)(s))],"medium"!==M&&[a["".concat(S,"Size").concat(Object($r.a)(M))],a["size".concat(Object($r.a)(M))]],p&&a.disableElevation,d&&a.disabled,b&&a.fullWidth),component:u,disabled:d,focusRipple:!y,focusVisibleClassName:Object(Nr.a)(a.focusVisible,v),ref:t,type:T},Y),r.createElement("span",{className:a.label},E,n,D))})),zs=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.button),{},{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(ws.c)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(ws.c)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(ws.c)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(Us);function Bs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Vs=function(e){lr()(n,e);var t=Bs(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){this.props.getTrends();var e=setInterval(this.props.getTrends,3e3);this.setState((function(t){return Object.assign(t,{intervalId:e})})),this.setMediaQuery("(max-width: 780px)",Fs.a.Trends,Fs.a.Mobile)}},{key:"componentWillUnmount",value:function(){this.state.intervalId&&clearInterval(this.state.intervalId),this.setState({intervalId:null})}},{key:"render",value:function(){var e=this,t=null,n=null;return!!this.props.username?n=a.a.createElement(Is,{limit:6,places:this.props.trends,world:this.props.world,newPlace:this.props.newPlace,updateNewTrend:this.props.updateNewTrend,placeLabelToId:this.props.placeLabelToId,deleteTrend:this.props.deleteTrend,saveTrends:this.props.saveTrends}):t=a.a.createElement("div",{className:Fs.a.Intro},a.a.createElement("p",null,"Welcome to DocNow, a social media appraisal tool."),a.a.createElement(zs,{variant:"contained",color:"primary",onClick:function(){return window.location="/auth/twitter",!1}},a.a.createElement("ion-icon",{name:"logo-twitter"}),"   Login with Twitter")),a.a.createElement("div",null,a.a.createElement("div",{className:this.state.mediaStyle},t,a.a.createElement("div",{className:Ts.a.CardHolder},this.props.trends.map((function(t){return a.a.createElement(Es,{key:t.name,trends:t.trends,id:t.id,name:t.name,world:e.props.world,deleteTrend:e.props.deleteTrend,username:e.props.username,createSearch:e.props.createSearch})})),n)))}}]),n}(mr);Vs.propTypes={username:l.a.string,trends:l.a.array,getTrends:l.a.func,world:l.a.object,updateNewTrend:l.a.func,newPlace:l.a.string,placeLabelToId:l.a.func,deleteTrend:l.a.func,createSearch:l.a.func};var qs={getTrends:zt,updateNewTrend:Bt,saveTrends:Vt,deleteTrend:function(e){return function(t){t(function(e){return{type:"REMOVE_TREND",id:e}}(e)),t(Vt())}},createSearch:sn},Js=ne((function(e){return{username:e.user.twitterScreenName,trends:e.trends.places,world:e.trends.world,newPlace:e.trends.newPlace,placeIdToLabel:function(t){for(var n=0,r=Object.values(e.trends.world);nt?1:e>=t?0:NaN}var ql="http://www.w3.org/1999/xhtml",Jl={svg:"http://www.w3.org/2000/svg",xhtml:ql,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},$l=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Jl.hasOwnProperty(t)?{space:Jl[t],local:e}:e};function Gl(e){return function(){this.removeAttribute(e)}}function Ql(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kl(e,t){return function(){this.setAttribute(e,t)}}function Zl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xl(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function eu(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var tu=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function nu(e){return function(){this.style.removeProperty(e)}}function ru(e,t,n){return function(){this.style.setProperty(e,t,n)}}function au(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function iu(e,t){return e.style.getPropertyValue(t)||tu(e).getComputedStyle(e,null).getPropertyValue(t)}function ou(e){return function(){delete this[e]}}function su(e,t){return function(){this[e]=t}}function lu(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function uu(e){return e.trim().split(/^|\s+/)}function cu(e){return e.classList||new du(e)}function du(e){this._node=e,this._names=uu(e.getAttribute("class")||"")}function fu(e,t){for(var n=cu(e),r=-1,a=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function _u(){this.textContent=""}function vu(e){return function(){this.textContent=e}}function gu(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function bu(){this.innerHTML=""}function wu(e){return function(){this.innerHTML=e}}function Mu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function ku(){this.nextSibling&&this.parentNode.appendChild(this)}function Lu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tu(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ql&&t.documentElement.namespaceURI===ql?t.createElement(e):t.createElementNS(n,e)}}function xu(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var Su=function(e){var t=$l(e);return(t.local?xu:Tu)(t)};function Yu(){return null}function Eu(){var e=this.parentNode;e&&e.removeChild(this)}function Du(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ou(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}var ju={},Cu=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ju={mouseenter:"mouseover",mouseleave:"mouseout"}));function Pu(e,t,n){return e=Au(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function Au(e,t,n){return function(r){var a=Cu;Cu=r;try{e.call(this,this.__data__,t,n)}finally{Cu=a}}}function Hu(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Ru(e){return function(){var t=this.__on;if(t){for(var n,r=0,a=-1,i=t.length;r=w&&(w=b+1);!(g=_[w])&&++w=0;)(r=a[i])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Vl);for(var n=this._groups,r=n.length,a=new Array(r),i=0;i1?this.each((null==t?nu:"function"==typeof t?au:ru)(e,t,null==n?"":n)):iu(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ou:"function"==typeof t?lu:su)(e,t)):this.node()[e]},classed:function(e,t){var n=uu(e+"");if(arguments.length<2){for(var r=cu(this.node()),a=-1,i=n.length;++a=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function Qu(e,t){for(var n,r=0,a=e.length;r0)for(var n,r,a=new Array(n),i=0;i=0&&t._call.call(null,e),t=t._next;--tc}()}finally{tc=0,function(){var e,t,n=Zu,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Zu=t);Xu=e,hc(r)}(),ic=0}}function mc(){var e=sc.now(),t=e-ac;t>1e3&&(oc-=t,ac=e)}function hc(e){tc||(nc&&(nc=clearTimeout(nc)),e-ic>24?(e<1/0&&(nc=setTimeout(pc,e-sc.now()-oc)),rc&&(rc=clearInterval(rc))):(rc||(ac=sc.now(),rc=setInterval(mc,1e3)),tc=1,lc(pc)))}dc.prototype=fc.prototype={constructor:dc,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?uc():+n)+(null==t?0:+t),this._next||Xu===this||(Xu?Xu._next=this:Zu=this,Xu=this),this._call=e,this._time=n,hc()},stop:function(){this._call&&(this._call=null,this._time=1/0,hc())}};var yc=function(e,t,n){var r=new dc;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r},_c=ec("start","end","cancel","interrupt"),vc=[],gc=function(e,t,n,r,a,i){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,a=e.__transition;function i(l){var u,c,d,f;if(1!==n.state)return s();for(u in a)if((f=a[u]).name===n.name){if(3===f.state)return yc(i);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete a[u]):+u0)throw new Error("too late; already scheduled");return n}function wc(e,t){var n=Mc(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Mc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var kc,Lc,Tc,xc,Sc=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}},Yc=180/Math.PI,Ec={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Dc=function(e,t,n,r,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:Sc(e,t)})):t&&n.push(a(n)+"rotate("+t+r)}(i.rotate,o.rotate,s,l),function(e,t,n,i){e!==t?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:Sc(e,t)}):t&&n.push(a(n)+"skewX("+t+r)}(i.skewX,o.skewX,s,l),function(e,t,n,r,i,o){if(e!==n||t!==r){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:Sc(e,n)},{i:s-2,x:Sc(t,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(e){for(var t,n=-1,r=l.length;++n>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?td(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?td(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Bc.exec(e))?new ad(t[1],t[2],t[3],1):(t=Vc.exec(e))?new ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=qc.exec(e))?td(t[1],t[2],t[3],t[4]):(t=Jc.exec(e))?td(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=$c.exec(e))?ld(t[1],t[2]/100,t[3]/100,1):(t=Gc.exec(e))?ld(t[1],t[2]/100,t[3]/100,t[4]):Qc.hasOwnProperty(e)?ed(Qc[e]):"transparent"===e?new ad(NaN,NaN,NaN,0):null}function ed(e){return new ad(e>>16&255,e>>8&255,255&e,1)}function td(e,t,n,r){return r<=0&&(e=t=n=NaN),new ad(e,t,n,r)}function nd(e){return e instanceof Ic||(e=Xc(e)),e?new ad((e=e.rgb()).r,e.g,e.b,e.opacity):new ad}function rd(e,t,n,r){return 1===arguments.length?nd(e):new ad(e,t,n,null==r?1:r)}function ad(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function id(){return"#"+sd(this.r)+sd(this.g)+sd(this.b)}function od(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function sd(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ld(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new cd(e,t,n,r)}function ud(e){if(e instanceof cd)return new cd(e.h,e.s,e.l,e.opacity);if(e instanceof Ic||(e=Xc(e)),!e)return new cd;if(e instanceof cd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=t===i?(n-r)/s+6*(n0&&l<1?0:o,new cd(o,s,l,e.opacity)}function cd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function dd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function fd(e,t,n,r,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*n+(1+3*e+3*i-3*o)*r+o*a)/6}Rc(Ic,Xc,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Kc,formatHex:Kc,formatHsl:function(){return ud(this).formatHsl()},formatRgb:Zc,toString:Zc}),Rc(ad,rd,Nc(Ic,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ad(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ad(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:id,formatHex:id,formatRgb:od,toString:od})),Rc(cd,(function(e,t,n,r){return 1===arguments.length?ud(e):new cd(e,t,n,null==r?1:r)}),Nc(Ic,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new cd(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new cd(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ad(dd(e>=240?e-240:e+120,a,r),dd(e,a,r),dd(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var pd=function(e){return function(){return e}};function md(e,t){return function(n){return e+n*t}}function hd(e){return 1==(e=+e)?yd:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):pd(isNaN(t)?n:t)}}function yd(e,t){var n=t-e;return n?md(e,n):pd(isNaN(e)?t:e)}var _d=function e(t){var n=hd(t);function r(e,t){var r=n((e=rd(e)).r,(t=rd(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),o=yd(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=i(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function vd(e){return function(t){var n,r,a=t.length,i=new Array(a),o=new Array(a),s=new Array(a);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],o=r>0?e[r-1]:2*a-i,s=ri&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Sc(n,r)})),i=bd.lastIndex;return i=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?bc:wc;return function(){var o=i(this,e),s=o.on;s!==r&&(a=(r=s).copy()).on(t,n),o.on=a}}var Id=Vu.prototype.constructor;function Wd(e){return function(){this.style.removeProperty(e)}}function Fd(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ud(e,t,n){var r,a;function i(){var i=t.apply(this,arguments);return i!==a&&(r=(a=i)&&Fd(e,i,n)),r}return i._value=t,i}function zd(e){return function(t){this.textContent=e.call(this,t)}}function Bd(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&zd(r)),t}return r._value=e,r}var Vd=0;function qd(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Jd(){return++Vd}var $d=Vu.prototype;qd.prototype=function(e){return Vu().transition(e)}.prototype={constructor:qd,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Rl(e));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[a]):o=!1;o&&delete e.__transition}}(this,e)}))},Vu.prototype.transition=function(e){var t,n;e instanceof qd?(t=e._id,e=e._name):(t=Jd(),(n=Gd).time=uc(),e=null==e?null:e+"");for(var r=this._groups,a=r.length,i=0;it?1:e>=t?0:NaN},Zd=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Kd(t(e),n)}),{left:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)>0?a=i:r=i+1}return r}}};var Xd=Zd(Kd),ef=Xd.right,tf=(Xd.left,ef);var nf=Array.prototype,rf=(nf.slice,nf.map,Math.sqrt(50)),af=Math.sqrt(10),of=Math.sqrt(2),sf=function(e,t,n){var r,a,i,o,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),i=new Array(a=Math.ceil(t-e+1));++s=0?(i>=rf?10:i>=af?5:i>=of?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=rf?10:i>=af?5:i>=of?2:1)}function uf(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=rf?a*=10:i>=af?a*=5:i>=of&&(a*=2),tr&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function jf(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a2?Cf:jf,a=i=null,d}function d(t){return isNaN(t=+t)?n:(a||(a=r(o.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=r(s,o.map(e),Sc)))(n)))},d.domain=function(e){return arguments.length?(o=vf.call(e,Sf),u===Ef||(u=Of(o)),c()):o.slice()},d.range=function(e){return arguments.length?(s=gf.call(e),c()):s.slice()},d.rangeRound=function(e){return s=gf.call(e),l=xf,c()},d.clamp=function(e){return arguments.length?(u=e?Of(o):Ef,d):u!==Ef},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}var Hf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rf(e){if(!(t=Hf.exec(e)))throw new Error("invalid format: "+e);var t;return new Nf({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Nf(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}Rf.prototype=Nf.prototype,Nf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var If,Wf,Ff,Uf,zf=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]},Bf=function(e){return(e=zf(Math.abs(e)))?e[1]:NaN},Vf=function(e,t){var n=zf(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")},qf={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Vf(100*e,t)},r:Vf,s:function(e,t){var n=zf(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(If=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+zf(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},Jf=function(e){return e},$f=Array.prototype.map,Gf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Wf=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Jf:(t=$f.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],o=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(a-=s,a+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Jf:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}($f.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=Rf(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,y=e.precision,_=e.trim,v=e.type;"n"===v?(h=!0,v="g"):qf[v]||(void 0===y&&(y=12),_=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var g="$"===f?a:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?i:/[%p]/.test(v)?l:"",w=qf[v],M=/[defgprs%]/.test(v);function k(e){var a,i,l,f=g,k=b;if("c"===v)k=w(e)+k,e="";else{var L=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:w(Math.abs(e),y),_&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),L&&0==+e&&"+"!==d&&(L=!1),f=(L?"("===d?d:u:"-"===d||"("===d?"":d)+f,k=("s"===v?Gf[8+If/3]:"")+k+(L&&"("===d?")":""),M)for(a=-1,i=e.length;++a(l=e.charCodeAt(a))||l>57){k=(46===l?o+e.slice(a+1):e.slice(a))+k,e=e.slice(0,a);break}}h&&!p&&(e=r(e,1/0));var T=f.length+e.length+k.length,x=T>1)+f+e+k+x.slice(T);break;default:e=x+f+e+k}return s(e)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=Rf(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Bf(t)/3))),a=Math.pow(10,-r),i=Gf[8+r/3];return function(e){return n(a*e)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ff=Wf.format,Uf=Wf.formatPrefix;var Qf=function(e,t,n,r){var a,i=uf(e,t,n);switch((r=Rf(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Bf(t)/3)))-Bf(Math.abs(e)))}(i,o))||(r.precision=a),Uf(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bf(t)-Bf(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Bf(Math.abs(e)))}(i))||(r.precision=a-2*("%"===r.type))}return Ff(r)};function Kf(e){var t=e.domain;return e.ticks=function(e){var n=t();return sf(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Qf(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a=t(),i=0,o=a.length-1,s=a[i],l=a[o];return l0?r=lf(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=lf(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(a[i]=Math.floor(s/r)*r,a[o]=Math.ceil(l/r)*r,t(a)):r<0&&(a[i]=Math.ceil(s*r)/r,a[o]=Math.floor(l*r)/r,t(a)),e},e}function Zf(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Xf(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ep(e){return e<0?-e*e:e*e}function tp(e){var t=e(Ef,Ef),n=1;function r(){return 1===n?e(Ef,Ef):.5===n?e(Xf,ep):e(Zf(n),Zf(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Kf(t)}function np(){var e=tp(Af());return e.copy=function(){return Pf(e,np()).exponent(e.exponent())},cf.apply(e,arguments),e}var rp=new Date,ap=new Date;function ip(e,t,n,r){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=function(t){return e(t=new Date(+t)),t},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t0))return s;do{s.push(o=new Date(+n)),t(n,i),e(n)}while(o=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(a.count=function(t,r){return rp.setTime(+t),ap.setTime(+r),e(rp),e(ap),Math.floor(n(rp,ap))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?function(t){return r(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var op=ip((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));op.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ip((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var sp=op,lp=(op.range,ip((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})));lp.range;function up(e){return ip((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var cp=up(0),dp=up(1),fp=up(2),pp=up(3),mp=up(4),hp=up(5),yp=up(6),_p=(cp.range,dp.range,fp.range,pp.range,mp.range,hp.range,yp.range,ip((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}))),vp=_p,gp=(_p.range,ip((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}))),bp=(gp.range,ip((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()}))),wp=(bp.range,ip((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}))),Mp=(wp.range,ip((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e})));Mp.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ip((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Mp:null};Mp.range;function kp(e){return ip((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Lp=kp(0),Tp=kp(1),xp=kp(2),Sp=kp(3),Yp=kp(4),Ep=kp(5),Dp=kp(6),Op=(Lp.range,Tp.range,xp.range,Sp.range,Yp.range,Ep.range,Dp.range,ip((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}))),jp=Op,Cp=(Op.range,ip((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));Cp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ip((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Pp=Cp;Cp.range;function Ap(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Hp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Rp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Np,Ip={"-":"",_:" ",0:"0"},Wp=/^\s*\d+/,Fp=/^%/,Up=/[\\^$*+?|[\]().{}]/g;function zp(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i68?1900:2e3),n+r[0].length):-1}function em(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tm(e,t,n){var r=Wp.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function nm(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rm(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function am(e,t,n){var r=Wp.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function im(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function om(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sm(e,t,n){var r=Wp.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function lm(e,t,n){var r=Wp.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function um(e,t,n){var r=Wp.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cm(e,t,n){var r=Fp.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dm(e,t,n){var r=Wp.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fm(e,t,n){var r=Wp.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pm(e,t){return zp(e.getDate(),t,2)}function mm(e,t){return zp(e.getHours(),t,2)}function hm(e,t){return zp(e.getHours()%12||12,t,2)}function ym(e,t){return zp(1+vp.count(sp(e),e),t,3)}function _m(e,t){return zp(e.getMilliseconds(),t,3)}function vm(e,t){return _m(e,t)+"000"}function gm(e,t){return zp(e.getMonth()+1,t,2)}function bm(e,t){return zp(e.getMinutes(),t,2)}function wm(e,t){return zp(e.getSeconds(),t,2)}function Mm(e){var t=e.getDay();return 0===t?7:t}function km(e,t){return zp(cp.count(sp(e)-1,e),t,2)}function Lm(e,t){var n=e.getDay();return e=n>=4||0===n?mp(e):mp.ceil(e),zp(mp.count(sp(e),e)+(4===sp(e).getDay()),t,2)}function Tm(e){return e.getDay()}function xm(e,t){return zp(dp.count(sp(e)-1,e),t,2)}function Sm(e,t){return zp(e.getFullYear()%100,t,2)}function Ym(e,t){return zp(e.getFullYear()%1e4,t,4)}function Em(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zp(t/60|0,"0",2)+zp(t%60,"0",2)}function Dm(e,t){return zp(e.getUTCDate(),t,2)}function Om(e,t){return zp(e.getUTCHours(),t,2)}function jm(e,t){return zp(e.getUTCHours()%12||12,t,2)}function Cm(e,t){return zp(1+jp.count(Pp(e),e),t,3)}function Pm(e,t){return zp(e.getUTCMilliseconds(),t,3)}function Am(e,t){return Pm(e,t)+"000"}function Hm(e,t){return zp(e.getUTCMonth()+1,t,2)}function Rm(e,t){return zp(e.getUTCMinutes(),t,2)}function Nm(e,t){return zp(e.getUTCSeconds(),t,2)}function Im(e){var t=e.getUTCDay();return 0===t?7:t}function Wm(e,t){return zp(Lp.count(Pp(e)-1,e),t,2)}function Fm(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Yp(e):Yp.ceil(e),zp(Yp.count(Pp(e),e)+(4===Pp(e).getUTCDay()),t,2)}function Um(e){return e.getUTCDay()}function zm(e,t){return zp(Tp.count(Pp(e)-1,e),t,2)}function Bm(e,t){return zp(e.getUTCFullYear()%100,t,2)}function Vm(e,t){return zp(e.getUTCFullYear()%1e4,t,4)}function qm(){return"+0000"}function Jm(){return"%"}function $m(e){return+e}function Gm(e){return Math.floor(+e/1e3)}!function(e){Np=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Vp(a),c=qp(a),d=Vp(i),f=qp(i),p=Vp(o),m=qp(o),h=Vp(s),y=qp(s),_=Vp(l),v=qp(l),g={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:pm,e:pm,f:vm,H:mm,I:hm,j:ym,L:_m,m:gm,M:bm,p:function(e){return a[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:$m,s:Gm,S:wm,u:Mm,U:km,V:Lm,w:Tm,W:xm,x:null,X:null,y:Sm,Y:Ym,Z:Em,"%":Jm},b={a:function(e){return o[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Dm,e:Dm,f:Am,H:Om,I:jm,j:Cm,L:Pm,m:Hm,M:Rm,p:function(e){return a[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:$m,s:Gm,S:Nm,u:Im,U:Wm,V:Fm,w:Um,W:zm,x:null,X:null,y:Bm,Y:Vm,Z:qm,"%":Jm},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return L(e,t,n,r)},d:rm,e:rm,f:um,H:im,I:im,j:am,L:lm,m:nm,M:om,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:tm,Q:dm,s:fm,S:sm,u:$p,U:Gp,V:Qp,w:Jp,W:Kp,x:function(e,t,r){return L(e,n,t,r)},X:function(e,t,n){return L(e,r,t,n)},y:Xp,Y:Zp,Z:em,"%":cm};function M(e,t){return function(n){var r,a,i,o=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in i||(i.w=1),"Z"in i?(a=(r=Hp(Rp(i.y,0,1))).getUTCDay(),r=a>4||0===a?Tp.ceil(r):Tp(r),r=jp.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(a=(r=Ap(Rp(i.y,0,1))).getDay(),r=a>4||0===a?dp.ceil(r):dp(r),r=vp.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),a="Z"in i?Hp(Rp(i.y,0,1)).getUTCDay():Ap(Rp(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Hp(i)):Ap(i)}}function L(e,t,n,r){for(var a,i,o=0,s=t.length,l=n.length;o=l)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=w[a in Ip?t.charAt(o++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return g.x=M(n,g),g.X=M(r,g),g.c=M(t,g),b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),{format:function(e){var t=M(e+="",g);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}(e),Np.format,Np.parse,Np.utcFormat,Np.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Qm=ip((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),Km=(Qm.range,ip((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}))),Zm=(Km.range,ip((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})));Zm.range;function Xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var eh=function(e){lr()(n,e);var t=Xm(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).barStyle=r.props.readOnly?Al.a.Bar:"".concat(Al.a.Bar," ").concat(Al.a.CanAdd),r}return or()(n,[{key:"componentDidMount",value:function(){this.createBarChart()}},{key:"componentDidUpdate",value:function(){this.createBarChart()}},{key:"createBarChart",value:function(){var e=this.node,t=this,n=this.props.query.filter((function(e){return"hashtag"===e.type}));n=n.map((function(e){return e.value.toLowerCase().replace("#","")}));var r,a=this.props.hashtags.filter((function(e){return!n.includes(e.hashtag.toLowerCase())})),i=function(e,t){var n,r,a=e.length,i=-1;if(null==t){for(;++i=n)for(r=n;++ir&&(r=n)}else for(;++i=n)for(r=n;++ir&&(r=n);return r}(a.map((function(e){return e.count}))),o=np().exponent(.5).domain([0,i]).range([0,275]),s=(r=e,"string"==typeof r?new zu([[document.querySelector(r)]],[document.documentElement]):new zu([[r]],Uu)).selectAll("g").attr("class",this.barStyle).data(a,(function(e){return"hashtag-".concat(e.hashtag)}));s.append("svg:title").text((function(e){return"Add #".concat(e.hashtag," to your query")})),s.select("rect").transition().duration(2e3).attr("width",(function(e){return o(e.count)})),s.select("text").transition().duration(2e3).text((function(e){return e.count+" #"+e.hashtag})),s.exit().remove();var l=s.enter().append("g").attr("class",this.barStyle).attr("transform",(function(e,t){return"translate(0,"+25*t+")"})).on("click",(function(e){t.props.addSearchTerm({type:"hashtag",value:"#"+e.hashtag})}));l.append("rect").attr("dx",0).attr("dy",0).attr("width",(function(e){return o(e.count)})).attr("height",20),l.append("text").text((function(e){return"#"+e.hashtag+" ("+e.count+")"})).attr("dx",5).attr("dy",15),l.merge(s).transition().duration(2e3).attr("transform",(function(e,t){return"translate(0,"+25*t+")"}))}},{key:"render",value:function(){var e=this,t=null;return 0===this.props.hashtags.length&&(t=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:"".concat(Al.a.HashtagsCard," ").concat(kl.a.InnerCard)},t,a.a.createElement("svg",{className:Al.a.HashtagChart,ref:function(t){e.node=t}}))}}]),n}(r.Component);eh.propTypes={readOnly:l.a.bool,hashtags:l.a.array,addSearchTerm:l.a.func,query:l.a.array};var th=n(89),nh=n.n(th);function rh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var ah=function(e){lr()(n,e);var t=rh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){return a.a.createElement("div",{className:nh.a.Url},a.a.createElement("span",{className:nh.a.Number},a.a.createElement("strong",null,this.props.count)),a.a.createElement("a",{target:"_new",href:this.props.url},this.props.url))}}]),n}(r.Component);ah.propTypes={url:l.a.string,count:l.a.number};var ih=n(250),oh=n.n(ih);function sh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var lh=function(e){lr()(n,e);var t=sh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=null;return 0===this.props.urls.length&&(e=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:"".concat(oh.a.UrlList," ").concat(kl.a.InnerCard)},e,a.a.createElement("ul",null,this.props.urls.map((function(e){return a.a.createElement("li",{key:e.url},a.a.createElement(ah,{url:e.url,count:e.count}))}))))}}]),n}(r.Component);lh.propTypes={urls:l.a.array};var uh=n(251),ch=n.n(uh);function dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var fh=function(e){lr()(n,e);var t=dh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=null;return 0===this.props.images.length&&(e=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:kl.a.InnerCard},e,this.props.images.map((function(e){return a.a.createElement("figure",{key:e.url,className:ch.a.Image},a.a.createElement("img",{src:e.url}),a.a.createElement("figcaption",null,a.a.createElement("ion-icon",{name:"repeat"})," ",e.count," "))})))}}]),n}(r.Component);fh.propTypes={images:l.a.array};var ph=n(252),mh=n.n(ph);function hh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var yh=function(e){lr()(n,e);var t=hh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=null;return 0===this.props.videos.length&&(e=a.a.createElement("span",{className:"".concat(Tl.a.Spin," ").concat(kl.a.Loader)},a.a.createElement("ion-icon",{name:"logo-ionic"}))),a.a.createElement("div",{className:kl.a.InnerCard},e,this.props.videos.map((function(e){return a.a.createElement("div",{key:e.url,className:mh.a.Video},a.a.createElement("video",{controls:!0,src:e.url}),a.a.createElement("figcaption",null,a.a.createElement("ion-icon",{name:"repeat"})," ",e.count))})))}}]),n}(r.Component);yh.propTypes={videos:l.a.array};var _h=n(74),vh=n.n(_h);function gh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var bh=function(e){lr()(n,e);var t=gh(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){if(this.props.tweetCount){var e=_l()(this.props.minDate).local().format("MMM D h:mm A"),t=_l()(this.props.maxDate).local().format("MMM D h:mm A");return a.a.createElement("div",{className:vh.a.Summary},"Loaded ",a.a.createElement("span",{className:vh.a.Count},this.props.tweetCount)," tweets from ",a.a.createElement("time",null,e)," to ",a.a.createElement("time",null,t)," from the Twitter Search API.")}return this.props.id?a.a.createElement(Oo,{elevation:4,className:vh.a.Summary},"Loading up to 1,000 recent tweets from Twitter matching your query"):a.a.createElement("div",null)}}]),n}(r.Component);bh.propTypes={id:l.a.number,maxDate:l.a.string,minDate:l.a.string,tweetCount:l.a.number,hashtagCount:l.a.number,active:l.a.bool};var wh=n(253),Mh=n.n(wh);function kh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Lh=function(e){lr()(n,e);var t=kh(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).box=a.a.createRef(),r}return or()(n,[{key:"onClick",value:function(e){"INPUT"!==e.target.tagName&&this.props.addSearchTerm({value:"",type:"input"})}},{key:"render",value:function(){var e=this,t="";return 0!==this.props.query.length||this.props.active||(t=a.a.createElement("div",null,"enter a ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.Keyword}," keyword "),"  ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.Phrase}," a phrase "),"  ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.Hashtag}," #hashtag "),"  ",a.a.createElement("span",{className:bi.a.SearchTerm+" "+bi.a.User}," @user "))),a.a.createElement(Oo,{id:"box",elevation:4,onClick:function(t){e.onClick(t)},className:Mh.a.SearchQuery},t,a.a.createElement("form",{noValidate:!0,autoComplete:"off",style:{display:"flex",justifyContent:"left"}},this.props.query.map((function(t,n){return a.a.createElement(ms,{id:"t".concat(n),key:"t".concat(n),pos:n,focused:t.focused,type:t.type,onInput:e.props.updateSearchTerm,value:t.value,createSearch:e.props.createSearch,query:e.props.query,focusSearchTerm:e.props.focusSearchTerm})}))))}}]),n}(r.Component);Lh.propTypes={query:l.a.array,updateSearchTerm:l.a.func,addSearchTerm:l.a.func,focusSearchTerm:l.a.func,active:l.a.bool,createSearch:l.a.func};var Th=n(43),xh=n.n(Th);function Sh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Yh=function(e){lr()(n,e);var t=Sh(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){this.props.resetTwitterSearch(),clearInterval(this.timerId)}},{key:"search",value:function(){this.props.createSearch(this.props.query)}},{key:"update",value:function(){!1===this.props.active&&(this.props.refreshSearch({id:this.props.searchId,active:!0}),this.tick())}},{key:"save",value:function(){var e=this.props.query.map((function(e){return e.value})).join(" ");this.props.activateSearch(),this.props.saveSearch({id:this.props.searchId,title:e})}},{key:"tick",value:function(){this.props.searchId&&this.props.active&&(this.props.getSearch(this.props.searchId),this.props.getTweets(this.props.searchId),this.props.getHashtags(this.props.searchId),this.props.getUsers(this.props.searchId),this.props.getUrls(this.props.searchId),this.props.getImages(this.props.searchId),this.props.getVideos(this.props.searchId))}},{key:"render",value:function(){var e=this,t=this.props.active?Tl.a.Spin:"",n=0===this.props.tweets.length?{display:"none"}:{},r=0===this.props.query.length,i=a.a.createElement("div",{className:xh.a.Controls},a.a.createElement(As,{size:"medium",title:"Search",disabled:r,tabIndex:"0",onClick:function(){e.search()}},a.a.createElement("ion-icon",{name:"search"})),a.a.createElement(As,{size:"medium",title:"Update Search",disabled:r,tabIndex:"0",onClick:function(){e.update()}},a.a.createElement("span",{className:"".concat(t," ").concat(xh.a.SpinAdj)},a.a.createElement("ion-icon",{name:"sync"}))),a.a.createElement(As,{size:"medium",title:"Save Search",disabled:r,tabIndex:"0",onClick:function(){e.save()}},a.a.createElement("ion-icon",{name:"filing"})));return this.props.searchId||(i=a.a.createElement("div",{className:xh.a.Controls},a.a.createElement(As,{size:"medium",title:"Search",disabled:r,color:"primary",tabIndex:"0",onClick:function(){e.search()}},a.a.createElement("ion-icon",{name:"search"})))),a.a.createElement("div",null,a.a.createElement("div",{className:xh.a.SearchBar},a.a.createElement(Lh,{updateSearchTerm:this.props.updateSearchTerm,addSearchTerm:this.props.addSearchTerm,focusSearchTerm:this.props.focusSearchTerm,query:this.props.query,active:this.props.active,createSearch:this.props.createSearch}),i,a.a.createElement(bh,{id:this.props.searchId,maxDate:this.props.maxDate,minDate:this.props.minDate,tweetCount:this.props.tweetCount,hashtagCount:this.props.hashtags.length,active:this.props.active})),a.a.createElement("div",{className:Ts.a.CardHolder,style:n},a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(Sl,{tweets:this.props.tweets})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Tweets"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(Cl,{addSearchTerm:this.props.addSearchTerm,users:this.props.users})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Users"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(eh,{addSearchTerm:this.props.addSearchTerm,hashtags:this.props.hashtags,query:this.props.query})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Hashtags"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(lh,{urls:this.props.urls})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"URLs"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(fh,{images:this.props.images})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Images"))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(yh,{videos:this.props.videos})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Video")))))}}]),n}(r.Component);Yh.propTypes={searchId:l.a.number,query:l.a.array,queries:l.a.array,maxDate:l.a.string,minDate:l.a.string,tweetCount:l.a.number,tweets:l.a.array,users:l.a.array,hashtags:l.a.array,urls:l.a.array,images:l.a.array,videos:l.a.array,active:l.a.bool,searches:l.a.array,getSearch:l.a.func,resetTwitterSearch:l.a.func,getTweets:l.a.func,getHashtags:l.a.func,getUsers:l.a.func,getUrls:l.a.func,getImages:l.a.func,getVideos:l.a.func,createSearch:l.a.func,activateSearch:l.a.func,refreshSearch:l.a.func,updateSearch:l.a.func,updateSearchTerm:l.a.func,addSearchTerm:l.a.func,focusSearchTerm:l.a.func,saveSearch:l.a.func};var Eh={createSearch:sn,getSearch:hn,getTweets:cn,getUsers:dn,getHashtags:fn,getUrls:function(e){return function(t){fetch("/api/v1/search/"+e+"/urls",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t({type:"SET_TWITTER_SEARCH_URLS",urls:e})}))}},getImages:pn,getVideos:mn,refreshSearch:function(e){return function(t){t({type:"ACTIVATE_SEARCH"});var n={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),credentials:"same-origin"},r="/api/v1/search/".concat(e.id,"?refreshTweets=true");return fetch(r,n).then((function(e){return e.json()})).then((function(e){t(nn(e))}))}},updateSearch:ln,activateSearch:on,updateSearchTerm:function(e){return e.value.match(/^\s*$/)&&e.pos>0?{type:"REMOVE_SEARCH_TERM",term:e}:{type:"UPDATE_SEARCH_TERM",term:e}},addSearchTerm:function(e){return{type:"ADD_SEARCH_TERM",term:e}},focusSearchTerm:function(e,t){return{type:"FOCUS_SEARCH_TERM",pos:e,atStart:t}},resetTwitterSearch:an,saveSearch:function(e){return function(t){var n={method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Xt(Xt({},e),{},{saved:!0}))},r="/api/v1/search/".concat(e.id);return fetch(r,n).then((function(e){return e.json()})).then((function(e){t(function(e){return{type:"ADD_SEARCH",search:e}}(e)),t(Ze("/searches/"))}))}}},Dh=ne((function(e){return{searchId:e.search.id,query:e.search.query,tweets:e.search.tweets,hashtags:e.search.hashtags,users:e.search.users,urls:e.search.urls,images:e.search.images,videos:e.search.videos,maxDate:e.search.maxDate,minDate:e.search.minDate,active:e.search.active,tweetCount:e.search.tweetCount}}),(function(e){return N(Eh,e)}))(Yh),Oh=n(90),jh=n.n(Oh);function Ch(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Ph=function(e){lr()(n,e);var t=Ch(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"createArchive",value:function(){this.props.createArchive({id:this.props.searchId})}},{key:"render",value:function(){var e=this,t="Create Archive",n=function(){e.createArchive()},r=!1,i="";return this.props.active?(r=!0,i=a.a.createElement("span",{className:jh.a.DownloadInfo},"Stop collecting to download.")):this.props.archiveStarted?(t="Creating Archive",n=null):this.props.archived&&(t="Download Archive",n=function(){var t="/userData/archives/".concat(e.props.searchId,".zip");window.location=t}),a.a.createElement("div",{className:jh.a.DownloadOptions},a.a.createElement(zs,{variant:"contained",onClick:n,disabled:r},a.a.createElement("ion-icon",{name:"download"})," ",t),i)}}]),n}(r.Component);Ph.propTypes={searchId:l.a.number,active:l.a.bool,archived:l.a.bool,archiveStarted:l.a.bool,createArchive:l.a.func};var Ah={createArchive:yn},Hh=ne((function(e,t){var n={searchId:e.search.id,active:e.search.active,archived:e.search.archived,archiveStarted:e.search.archiveStarted};return t&&(n.searchId=t.id,n.active=t.active,n.archived=t.archived,n.archiveStarted=t.archiveStarted),n}),(function(e){return N(Ah,e)}))(Ph),Rh=n(69),Nh=n.n(Rh),Ih=n(38);function Wh(e){return e.substring(2).toLowerCase()}var Fh=function(e){var t=e.children,n=e.disableReactTree,a=void 0!==n&&n,o=e.mouseEvent,s=void 0===o?"onClick":o,l=e.onClickAway,u=e.touchEvent,c=void 0===u?"onTouchEnd":u,d=r.useRef(!1),f=r.useRef(null),p=r.useRef(!1),m=r.useRef(!1);r.useEffect((function(){return p.current=!0,function(){p.current=!1}}),[]);var h=r.useCallback((function(e){f.current=i.findDOMNode(e)}),[]),y=na(t.ref,h),_=aa((function(e){var t=m.current;if(m.current=!1,p.current&&f.current&&!function(e){return document.documentElement.clientWidth-1;else n=!Wr(f.current).documentElement.contains(e.target)||f.current.contains(e.target);n||!a&&t||l(e)}})),v=function(e){return function(n){m.current=!0;var r=t.props[e];r&&r(n)}},g={ref:y};return!1!==c&&(g[c]=v(c)),r.useEffect((function(){if(!1!==c){var e=Wh(c),t=Wr(f.current),n=function(){d.current=!0};return t.addEventListener(e,_),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,_),t.removeEventListener("touchmove",n)}}}),[_,c]),!1!==s&&(g[s]=v(s)),r.useEffect((function(){if(!1!==s){var e=Wh(s),t=Wr(f.current);return t.addEventListener(e,_),function(){t.removeEventListener(e,_)}}}),[_,s]),r.createElement(r.Fragment,null,r.cloneElement(t,g))},Uh=r.forwardRef((function(e,t){var n=e.action,a=e.classes,i=e.className,o=e.message,s=e.role,l=void 0===s?"alert":s,u=Object(Hr.a)(e,["action","classes","className","message","role"]);return r.createElement(Oo,Object(h.a)({role:l,square:!0,elevation:6,className:Object(Nr.a)(a.root,i),ref:t},u),r.createElement("div",{className:a.message},o),n?r.createElement("div",{className:a.action},n):null)})),zh=Object(Jr.a)((function(e){var t="light"===e.palette.type?.8:.98,n=Object(ws.b)(e.palette.background.default,t);return{root:Object(h.a)(Object(h.a)({},e.typography.body2),{},Object(Rr.a)({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(Uh),Bh=r.forwardRef((function(e,t){var n=e.action,a=e.anchorOrigin,i=(a=void 0===a?{vertical:"bottom",horizontal:"center"}:a).vertical,o=a.horizontal,s=e.autoHideDuration,l=void 0===s?null:s,u=e.children,c=e.classes,d=e.className,f=e.ClickAwayListenerProps,p=e.ContentProps,m=e.disableWindowBlurListener,y=void 0!==m&&m,_=e.message,v=e.onClose,g=e.onEnter,b=e.onEntered,w=e.onEntering,M=e.onExit,k=e.onExited,L=e.onExiting,T=e.onMouseEnter,x=e.onMouseLeave,S=e.open,Y=e.resumeHideDuration,E=e.TransitionComponent,D=void 0===E?Eo:E,O=e.transitionDuration,j=void 0===O?{enter:Ih.b.enteringScreen,exit:Ih.b.leavingScreen}:O,C=e.TransitionProps,P=Object(Hr.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),A=r.useRef(),H=r.useState(!0),R=H[0],N=H[1],I=aa((function(){v&&v.apply(void 0,arguments)})),W=aa((function(e){v&&null!=e&&(clearTimeout(A.current),A.current=setTimeout((function(){I(null,"timeout")}),e))}));r.useEffect((function(){return S&&W(l),function(){clearTimeout(A.current)}}),[S,l,W]);var F=function(){clearTimeout(A.current)},U=r.useCallback((function(){null!=l&&W(null!=Y?Y:.5*l)}),[l,Y,W]);return r.useEffect((function(){if(!y&&S)return window.addEventListener("focus",U),window.addEventListener("blur",F),function(){window.removeEventListener("focus",U),window.removeEventListener("blur",F)}}),[y,U,S]),!S&&R?null:r.createElement(Fh,Object(h.a)({onClickAway:function(e){v&&v(e,"clickaway")}},f),r.createElement("div",Object(h.a)({className:Object(Nr.a)(c.root,c["anchorOrigin".concat(Object($r.a)(i)).concat(Object($r.a)(o))],d),onMouseEnter:function(e){T&&T(e),F()},onMouseLeave:function(e){x&&x(e),U()},ref:t},P),r.createElement(D,Object(h.a)({appear:!0,in:S,onEnter:eo((function(){N(!1)}),g),onEntered:b,onEntering:w,onExit:M,onExited:eo((function(){N(!0)}),k),onExiting:L,timeout:j,direction:"top"===i?"down":"up"},C),u||r.createElement(zh,Object(h.a)({message:_,action:n},p)))))})),Vh=Object(Jr.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},i={top:24},o={bottom:24},s={right:24},l={left:24},u={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(h.a)(Object(h.a)({},t),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({},i),u))),anchorOriginBottomCenter:Object(h.a)(Object(h.a)({},n),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({},o),u))),anchorOriginTopRight:Object(h.a)(Object(h.a)(Object(h.a)({},t),r),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({left:"auto"},i),s))),anchorOriginBottomRight:Object(h.a)(Object(h.a)(Object(h.a)({},n),r),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({left:"auto"},o),s))),anchorOriginTopLeft:Object(h.a)(Object(h.a)(Object(h.a)({},t),a),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({right:"auto"},i),l))),anchorOriginBottomLeft:Object(h.a)(Object(h.a)(Object(h.a)({},n),a),{},Object(Rr.a)({},e.breakpoints.up("sm"),Object(h.a)(Object(h.a)({right:"auto"},o),l)))}}),{flip:!1,name:"MuiSnackbar"})(Bh),qh=n(254),Jh=n.n(qh);function $h(e){var t=e.text,n=e.type,r=e.onClose,i=a.a.useState(!0),o=Nh()(i,2),s=o[0],l=o[1];function u(){r&&r(),l(!1)}return a.a.createElement(Vh,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:s,autoHideDuration:6e3,onClose:u,ContentProps:{"aria-describedby":"message-id"},message:a.a.createElement("span",{id:"message-id"},t),variant:n,action:[a.a.createElement(ks,{key:"close","aria-label":"close",color:"inherit",onClick:u},a.a.createElement(Jh.a,null))]})}$h.propTypes={type:l.a.string,text:l.a.string,onClose:l.a.func};var Gh=r.forwardRef((function(e,t){var n=e.autoFocus,a=e.checked,i=e.checkedIcon,o=e.classes,s=e.className,l=e.defaultChecked,u=e.disabled,c=e.icon,d=e.id,f=e.inputProps,p=e.inputRef,m=e.name,y=e.onBlur,_=e.onChange,v=e.onFocus,g=e.readOnly,b=e.required,w=e.tabIndex,M=e.type,k=e.value,L=Object(Hr.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),T=Ko({controlled:a,default:Boolean(l),name:"SwitchBase",state:"checked"}),x=Object(Zi.a)(T,2),S=x[0],Y=x[1],E=Fi(),D=u;E&&void 0===D&&(D=E.disabled);var O="checkbox"===M||"radio"===M;return r.createElement(ks,Object(h.a)({component:"span",className:Object(Nr.a)(o.root,s,S&&o.checked,D&&o.disabled),disabled:D,tabIndex:null,role:void 0,onFocus:function(e){v&&v(e),E&&E.onFocus&&E.onFocus(e)},onBlur:function(e){y&&y(e),E&&E.onBlur&&E.onBlur(e)},ref:t},L),r.createElement("input",Object(h.a)({autoFocus:n,checked:a,defaultChecked:l,className:o.input,disabled:D,id:O&&d,name:m,onChange:function(e){var t=e.target.checked;Y(t),_&&_(e,t)},readOnly:g,ref:p,required:b,tabIndex:w,type:M,value:k},f)),S?i:c)})),Qh=Object(Jr.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(Gh),Kh=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.color,o=void 0===i?"secondary":i,s=e.edge,l=void 0!==s&&s,u=e.size,c=void 0===u?"medium":u,d=Object(Hr.a)(e,["classes","className","color","edge","size"]),f=r.createElement("span",{className:n.thumb});return r.createElement("span",{className:Object(Nr.a)(n.root,a,{start:n.edgeStart,end:n.edgeEnd}[l],"small"===c&&n["size".concat(Object($r.a)(c))])},r.createElement(Qh,Object(h.a)({type:"checkbox",icon:f,checkedIcon:f,classes:{root:Object(Nr.a)(n.switchBase,n["color".concat(Object($r.a)(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},d)),r.createElement("span",{className:n.track}))})),Zh=Object(Jr.a)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(Kh),Xh=n(26),ey=n(394),ty=n(396),ny=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};io(this,e),this.options=t}return Object(oo.a)(e,[{key:"collect",value:function(e){var t=new Map;this.sheetsRegistry=new Xh.b;var n=Object(ty.a)();return a.a.createElement(ey.b,Object(h.a)({sheetsManager:t,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),e)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(e){return a.a.createElement("style",Object(h.a)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},e))}}]),e}();function ry(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var ay=function(e){lr()(n,e);var t=ry(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).resetError=r.resetError.bind(Os()(r)),r.state={error:null},r}return or()(n,[{key:"toggle",value:function(e){var t=this.props.searches.reduce((function(e,t){return e+t.tweetCount}),0);this.props.user.active?t>this.props.user.tweetQuota?this.setState({error:"You are over your quota of ".concat(this.props.user.tweetQuota," tweets.\n Delete one or more collections to start collecting again.")}):this.props.active||2!==this.props.searches.filter((function(e){return e.active})).length?this.props.updateSearch({id:this.props.id,active:e.target.checked,archived:!1}):this.setState({error:"You cannot have more than 2 active searches."}):this.setState({error:"Your account is not active, please email the admin."})}},{key:"resetError",value:function(){this.setState({error:null})}},{key:"render",value:function(){var e=this,t=this.props.active?"Stop Data Collection":"Start Data Collection",n=this.props.active?"primary":"secondary",r=this.state.error?a.a.createElement($h,{type:"error",text:this.state.error,onClose:this.resetError}):"";return a.a.createElement(a.a.Fragment,null,a.a.createElement(Zh,{className:ny.Admin,checked:this.props.active,color:n,title:t,onChange:function(t){e.toggle(t)}}),r)}}]),n}(r.Component);function iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}ay.propTypes={id:l.a.number,updateSearch:l.a.func,active:l.a.bool,user:l.a.object,searches:l.a.array};var oy=function(e){lr()(n,e);var t=iy(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"toggle",value:function(e){this.props.updateSearch({id:this.props.id,public:e.target.checked?new Date:null})}},{key:"render",value:function(){var e=this,t=this.props.public?"Make Private":"Make Public",n=this.props.public?"primary":"secondary";return a.a.createElement(Zh,{className:ny.Admin,checked:null!==this.props.public,color:n,title:t,onChange:function(t){e.toggle(t)}})}}]),n}(r.Component);oy.propTypes={id:l.a.number,updateSearch:l.a.func,public:l.a.instanceOf(Date),user:l.a.object,searches:l.a.array};var sy=n(75),ly=n.n(sy),uy={entering:{opacity:1},entered:{opacity:1}},cy={enter:Ih.b.enteringScreen,exit:Ih.b.leavingScreen},dy=r.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,i=void 0!==a&&a,o=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,c=e.onExit,d=e.onExited,f=e.onExiting,p=e.style,m=e.TransitionComponent,y=void 0===m?ko:m,_=e.timeout,v=void 0===_?cy:_,g=Object(Hr.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),b=Ha(),w=b.unstable_strictMode&&!i,M=r.useRef(null),k=na(n.ref,t),L=na(w?M:void 0,k),T=function(e){return function(t,n){if(e){var r=w?[M.current,t]:[t,n],a=Object(Zi.a)(r,2),i=a[0],o=a[1];void 0===o?e(i):e(i,o)}}},x=T(u),S=T((function(e,t){Lo(e);var n=To({style:p,timeout:v},{mode:"enter"});e.style.webkitTransition=b.transitions.create("opacity",n),e.style.transition=b.transitions.create("opacity",n),s&&s(e,t)})),Y=T(l),E=T(f),D=T((function(e){var t=To({style:p,timeout:v},{mode:"exit"});e.style.webkitTransition=b.transitions.create("opacity",t),e.style.transition=b.transitions.create("opacity",t),c&&c(e)})),O=T(d);return r.createElement(y,Object(h.a)({appear:!0,in:o,nodeRef:w?M:void 0,onEnter:S,onEntered:Y,onEntering:x,onExit:D,onExited:O,onExiting:E,timeout:v},g),(function(e,t){return r.cloneElement(n,Object(h.a)({style:Object(h.a)(Object(h.a)(Object(h.a)({opacity:0,visibility:"exited"!==e||o?void 0:"hidden"},uy[e]),p),n.props.style),ref:L},t))}))})),fy=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.invisible,s=void 0!==o&&o,l=e.open,u=e.transitionDuration,c=e.TransitionComponent,d=void 0===c?dy:c,f=Object(Hr.a)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return r.createElement(d,Object(h.a)({in:l,timeout:u},f),r.createElement("div",{className:Object(Nr.a)(a.root,i,s&&a.invisible),"aria-hidden":!0,ref:t},n))})),py=Object(Jr.a)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(fy),my=function(e){var t=e.id,n=e.deleteSearch,r=a.a.useState(!1),i=Nh()(r,2),o=i[0],s=i[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{className:ly.a.Trash,onClick:function(){s(!0)}},a.a.createElement("ion-icon",{title:"Delete Search!",name:"trash"})),a.a.createElement(go,{"aria-labelledby":"transition-modal-title","aria-describedby":"transition-modal-description",className:ly.a.Modal,open:o,onClose:function(){s(!1)},closeAfterTransition:!0,BackdropComponent:py,BackdropProps:{timeout:500}},a.a.createElement(dy,{in:o},a.a.createElement("div",{className:ly.a.Paper},a.a.createElement("h2",{id:"transition-modal-title"},"Delete Search?"),a.a.createElement("p",{id:"transition-modal-description"},"This action cannot be undone."),a.a.createElement(zs,{variant:"contained",onClick:function(){return n({id:t})}},"Delete Search")))))};my.propTypes={id:l.a.number,deleteSearch:l.a.func};var hy=my;function yy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var _y=function(e){lr()(n,e);var t=yy(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).editing=!1,r}return or()(n,[{key:"onClick",value:function(){this.editing=!0,this.forceUpdate()}},{key:"onChange",value:function(e){this.props.update(e.target.value)}},{key:"onBlur",value:function(e){this.editing=!1,e.stopPropagation(),this.forceUpdate()}},{key:"keyDown",value:function(e){"Enter"===e.key&&(this.editing=!1,e.stopPropagation(),this.forceUpdate())}},{key:"render",value:function(){var e=this;if(this.editing){var t=(this.props.text||"").length||10;return a.a.createElement(fs,{id:"input-with-icon-grid",value:this.props.text,size:t,autoFocus:"autofocus",onChange:function(t){return e.onChange(t)},onBlur:function(t){return e.onBlur(t)},onKeyDown:function(t){e.keyDown(t)}})}var n=this.props.text||this.props.placeholder;return a.a.createElement("span",null,n," ",a.a.createElement("ion-icon",{name:"create",onClick:function(t){e.onClick(t)}}))}}]),n}(r.Component);_y.propTypes={hideIcon:l.a.bool,text:l.a.string,update:l.a.func,placeholder:l.a.string};var vy=r.createContext(),gy=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"table":i,s=e.padding,l=void 0===s?"default":s,u=e.size,c=void 0===u?"medium":u,d=e.stickyHeader,f=void 0!==d&&d,p=Object(Hr.a)(e,["classes","className","component","padding","size","stickyHeader"]),m=r.useMemo((function(){return{padding:l,size:c,stickyHeader:f}}),[l,c,f]);return r.createElement(vy.Provider,{value:m},r.createElement(o,Object(h.a)({role:"table"===o?null:"table",ref:t,className:Object(Nr.a)(n.root,a,f&&n.stickyHeader)},p)))})),by=Object(Jr.a)((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Object(h.a)(Object(h.a)({},e.typography.body2),{},{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(gy);var wy=r.createContext(),My={variant:"head"},ky=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"thead":i,s=Object(Hr.a)(e,["classes","className","component"]);return r.createElement(wy.Provider,{value:My},r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a),ref:t,role:"thead"===o?null:"rowgroup"},s)))})),Ly=Object(Jr.a)({root:{display:"table-header-group"}},{name:"MuiTableHead"})(ky),Ty=r.forwardRef((function(e,t){var n,a,i=e.align,o=void 0===i?"inherit":i,s=e.classes,l=e.className,u=e.component,c=e.padding,d=e.scope,f=e.size,p=e.sortDirection,m=e.variant,y=Object(Hr.a)(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),_=r.useContext(vy),v=r.useContext(wy),g=v&&"head"===v.variant;u?(a=u,n=g?"columnheader":"cell"):a=g?"th":"td";var b=d;!b&&g&&(b="col");var w=c||(_&&_.padding?_.padding:"default"),M=f||(_&&_.size?_.size:"medium"),k=m||v&&v.variant,L=null;return p&&(L="asc"===p?"ascending":"descending"),r.createElement(a,Object(h.a)({ref:t,className:Object(Nr.a)(s.root,s[k],l,"inherit"!==o&&s["align".concat(Object($r.a)(o))],"default"!==w&&s["padding".concat(Object($r.a)(w))],"medium"!==M&&s["size".concat(Object($r.a)(M))],"head"===k&&_&&_.stickyHeader&&s.stickyHeader),"aria-sort":L,role:n,scope:b},y))})),xy=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.body2),{},{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Object(ws.e)(Object(ws.c)(e.palette.divider,1),.88):Object(ws.a)(Object(ws.c)(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(Ty),Sy=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"tr":i,s=e.hover,l=void 0!==s&&s,u=e.selected,c=void 0!==u&&u,d=Object(Hr.a)(e,["classes","className","component","hover","selected"]),f=r.useContext(wy);return r.createElement(o,Object(h.a)({ref:t,className:Object(Nr.a)(n.root,a,f&&{head:n.head,footer:n.footer}[f.variant],l&&n.hover,c&&n.selected),role:"tr"===o?null:"row"},d))})),Yy=Object(Jr.a)((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(Sy);function Ey(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Dy=function(e){lr()(n,e);var t=Ey(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).editing=!1,r.state={goHome:!1},r}return or()(n,[{key:"shouldComponentUpdate",value:function(e){return e.title!==this.title}},{key:"setEditing",value:function(e){this.editing=e}},{key:"updateTitle",value:function(e){var t=""===e?"untitled":e;this.props.updateSearch({id:this.props.search.id,title:t})}},{key:"updateDescription",value:function(e){this.props.updateSearch({id:this.props.search.id,description:e})}},{key:"delete",value:function(e){this.props.deleteSearch(e),this.setState({goHome:!0})}},{key:"render",value:function(){var e=this;if(this.state.goHome)return a.a.createElement(Ie,{to:"/searches",push:!0});var t=_l()(this.props.search.created).local().format("MMM D h:mm A"),n=_l()(this.props.search.modified).local().format("MMM D h:mm A");return a.a.createElement(by,null,a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,null,"Title"),a.a.createElement(xy,null,"Tweet Count"),a.a.createElement(xy,null,"Created"),a.a.createElement(xy,null,"Last Update"),a.a.createElement(xy,null,"Active"),a.a.createElement(xy,null,"Public"),a.a.createElement(xy,null,"Archive"),a.a.createElement(xy,null,"Delete"))),a.a.createElement(Yy,null,a.a.createElement(xy,null,a.a.createElement(_y,{text:this.props.title,update:function(t){e.updateTitle(t)}})),a.a.createElement(xy,null,a.a.createElement("ion-icon",{name:"logo-twitter"})," ",this.props.search.tweetCount.toLocaleString()),a.a.createElement(xy,null,t),a.a.createElement(xy,null,n),a.a.createElement(xy,null,a.a.createElement(ay,{active:this.props.search.active,id:this.props.search.id,searches:this.props.searches,user:this.props.user,updateSearch:this.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(oy,{public:this.props.search.public,id:this.props.search.id,searches:this.props.searches,user:this.props.user,updateSearch:this.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(Hh,{id:this.props.search.id,active:this.props.search.active,archived:this.props.search.archived,archiveStarted:this.props.search.archiveStarted})),a.a.createElement(xy,null,a.a.createElement(hy,{id:this.props.search.id,deleteSearch:function(t){e.delete(t)}}))))}}]),n}(r.Component);function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jy(e,t){return e(t={exports:{}},t.exports),t.exports}Dy.propTypes={search:l.a.object,searches:l.a.array,user:l.a.object,title:l.a.string,description:l.a.string,updateSearch:l.a.func,deleteSearch:l.a.func,createArchive:l.a.func};var Cy=jy((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case o:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case l:return e;default:return t}}case h:case m:case a:return t}}}function _(e){return y(e)===d}t.typeOf=y,t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=h,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=o,t.Suspense=p,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===o||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return _(e)||y(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return y(e)===f},t.isFragment=function(e){return y(e)===i},t.isLazy=function(e){return y(e)===h},t.isMemo=function(e){return y(e)===m},t.isPortal=function(e){return y(e)===a},t.isProfiler=function(e){return y(e)===s},t.isStrictMode=function(e){return y(e)===o},t.isSuspense=function(e){return y(e)===p}}));Oy(Cy),Oy(jy((function(e,t){})));jy((function(e){e.exports=Cy}));var Py=Object.getOwnPropertySymbols,Ay=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}})()&&Object.assign;function Ry(e,t,n,r,a){}Ry.resetWarningCache=function(){};Function.call.bind(Object.prototype.hasOwnProperty);function Ny(){}function Iy(){}Iy.resetWarningCache=Ny;var Wy=jy((function(e){e.exports=function(){function e(e,t,n,r,a,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var o=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 o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Iy,resetWarningCache:Ny};return n.PropTypes=n,n}()})),Fy=[],Uy=function(e){function t(){e.apply(this,arguments),this.state={isLoading:!0}}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.loadTweetForProps=function(e){var t=this,n=function(){window.twttr.ready().then((function(n){var r=n.widgets;t._div&&(t._div.innerHTML="");var a=e.onTweetLoadSuccess,i=e.onTweetLoadError;r.createTweetEmbed(t.props.id,t._div,e.options).then((function(e){t.setState({isLoading:!1}),a&&a(e)})).catch(i)}))},r=window.twttr;r&&r.ready?n():function(e,t){if(0===Fy.length){Fy.push(t);var n=document.createElement("script");n.setAttribute("src",e),n.onload=function(){return Fy.forEach((function(e){return e()}))},document.body.appendChild(n)}else Fy.push(t)}((window.location.protocol.indexOf("file")>=0?this.props.protocol:"")+"//platform.twitter.com/widgets.js",n)},t.prototype.componentDidMount=function(){this.loadTweetForProps(this.props)},t.prototype.shouldComponentUpdate=function(e,t){return this.props.id!==e.id||this.props.className!==e.className},t.prototype.componentWillUpdate=function(e,t){this.props.id!==e.id&&this.loadTweetForProps(e)},t.prototype.render=function(){var e=this;return a.a.createElement("div",{className:this.props.className,ref:function(t){e._div=t}},this.state.isLoading&&this.props.placeholder)},t}(a.a.Component);Uy.propTypes={id:Wy.string,options:Wy.object,protocol:Wy.string,onTweetLoadSuccess:Wy.func,onTweetLoadError:Wy.func,className:Wy.string},Uy.defaultProps={protocol:"https:",options:{},className:null};var zy=Uy,By=n(32),Vy=n.n(By),qy=n(70),Jy=n.n(qy);function $y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Gy=function(e){lr()(n,e);var t=$y(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"makeEmptyCardFor",value:function(e){return a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:Ts.a.NoPadding},a.a.createElement("span",{className:kl.a.Loader},a.a.createElement("ion-icon",{name:"cloud-outline"}))),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},"This search has no ",e,".")))}},{key:"getHostName",value:function(e){var t=new URL(e).host;return t=t.replace(/^www\./,"")}},{key:"render",value:function(){var e=this,t=this.props.search.urlCount<=0?this.makeEmptyCardFor("webpages"):a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},this.props.webpages.slice(0,50).map((function(t,n){if(t.image)return a.a.createElement("div",{key:"wp".concat(n),className:Vy.a.WebPreview},a.a.createElement("a",{key:t.url,rel:"noopener noreferrer",target:"_blank",href:t.url},a.a.createElement("span",null,a.a.createElement("img",{src:t.image,width:"250",onError:function(e){e.target.src=Jy.a}})),e.getHostName(t.url)))}))),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/webpages/")},"View ",parseInt(this.props.search.urlCount,10).toLocaleString()," Webpages →")))),n=this.props.search.imageCount<=0?this.makeEmptyCardFor("images"):a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(fh,{images:this.props.search.images.slice(0,50)})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/images/")},"View ",parseInt(this.props.search.imageCount,10).toLocaleString()," Images →")))),r=this.props.search.videoCount<=0?this.makeEmptyCardFor("videos"):a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(yh,{videos:this.props.search.videos.slice(0,50)})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/videos/")},"View ",parseInt(this.props.search.videoCount,10).toLocaleString()," Videos →"))));return a.a.createElement("div",{className:Ts.a.CardHolder,style:xh.a},a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},this.props.search.tweets.slice(0,10).map((function(e,t){return a.a.createElement(zy,{key:"t".concat(t),id:e.id})}))),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/tweets/")},"View ",parseInt(this.props.search.tweetCount,10).toLocaleString()," Tweets →")))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(Cl,{addSearchTerm:function(){return null},users:this.props.search.users.slice(0,50)})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Vy.a.CardLink},a.a.createElement(xr,{to:"/search/".concat(this.props.searchId,"/users/")},"View ",parseInt(this.props.search.userCount,10).toLocaleString()," Users →")))),a.a.createElement(ys,{raised:!0,className:Ts.a.Card},a.a.createElement(bs,{className:"".concat(Ts.a.Scroll," ").concat(Ts.a.NoPadding)},a.a.createElement(eh,{readOnly:!0,addSearchTerm:function(){return null},hashtags:this.props.search.hashtags,query:this.props.search.query})),a.a.createElement(vs,{className:Ts.a.CardActions},a.a.createElement("h2",{className:Ts.a.PlaceHeader},"Hashtags"))),t,n,r)}}]),n}(r.Component);function Qy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Gy.propTypes={searchId:l.a.string,search:l.a.object,webpages:l.a.array};var Ky=function(e){lr()(n,e);var t=Qy(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.props.resetTwitterSearch(),this.tick(),this.props.getUsers(this.props.searchId),this.props.getTweets(this.props.searchId),this.props.getImages(this.props.searchId),this.props.getVideos(this.props.searchId),this.props.getWebpages(this.props.searchId),this.props.getHashtags(this.props.searchId),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId),this.props.resetTwitterSearch()}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId)}},{key:"render",value:function(){return this.props.search.title?a.a.createElement("div",{className:Vy.a.Insights},a.a.createElement(Dy,{title:this.props.search.title,search:this.props.search,searches:this.props.searches,user:this.props.user,updateSearch:this.props.updateSearch,deleteSearch:this.props.deleteSearch,createArchive:this.props.createArchive}),a.a.createElement(Gy,{searchId:this.props.searchId,search:this.props.search,webpages:this.props.webpages})):a.a.createElement("div",null)}}]),n}(r.Component);Ky.propTypes={searchId:l.a.string,search:l.a.object,searches:l.a.array,user:l.a.object,webpages:l.a.array,getSearch:l.a.func,getTweets:l.a.func,getUsers:l.a.func,getVideos:l.a.func,getImages:l.a.func,getWebpages:l.a.func,resetTwitterSearch:l.a.func,updateSearch:l.a.func,deleteSearch:l.a.func,createArchive:l.a.func,getHashtags:l.a.func};var Zy={getSearch:hn,getTweets:cn,getUsers:dn,getImages:pn,getVideos:mn,getWebpages:An,resetTwitterSearch:an,updateSearch:ln,deleteSearch:un,createArchive:yn,getHashtags:fn},Xy=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,searches:e.searches,user:e.user,webpages:e.webpages,archived:e.search.archived}}),(function(e){return N(Zy,e)}))(Ky),e_=Zr(r.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));var t_=r.forwardRef((function(e,t){var n=e.alt,a=e.children,i=e.classes,o=e.className,s=e.component,l=void 0===s?"div":s,u=e.imgProps,c=e.sizes,d=e.src,f=e.srcSet,p=e.variant,m=void 0===p?"circle":p,y=Object(Hr.a)(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),_=null,v=function(e){var t=e.src,n=e.srcSet,a=r.useState(!1),i=a[0],o=a[1];return r.useEffect((function(){if(t||n){o(!1);var e=!0,r=new Image;return r.src=t,r.srcSet=n,r.onload=function(){e&&o("loaded")},r.onerror=function(){e&&o("error")},function(){e=!1}}}),[t,n]),i}({src:d,srcSet:f}),g=d||f,b=g&&"error"!==v;return _=b?r.createElement("img",Object(h.a)({alt:n,src:d,srcSet:f,sizes:c,className:i.img},u)):null!=a?a:g&&n?n[0]:r.createElement(e_,{className:i.fallback}),r.createElement(l,Object(h.a)({className:Object(Nr.a)(i.root,i.system,i[m],o,!b&&i.colorDefault),ref:t},y),_)})),n_=Object(Jr.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}}),{name:"MuiAvatar"})(t_),r_=r.forwardRef((function(e,t){var n=e.action,a=e.avatar,i=e.classes,o=e.className,s=e.component,l=void 0===s?"div":s,u=e.disableTypography,c=void 0!==u&&u,d=e.subheader,f=e.subheaderTypographyProps,p=e.title,m=e.titleTypographyProps,y=Object(Hr.a)(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),_=p;null==_||_.type===ll||c||(_=r.createElement(ll,Object(h.a)({variant:a?"body2":"h5",className:i.title,component:"span",display:"block"},m),_));var v=d;return null==v||v.type===ll||c||(v=r.createElement(ll,Object(h.a)({variant:a?"body2":"body1",className:i.subheader,color:"textSecondary",component:"span",display:"block"},f),v)),r.createElement(l,Object(h.a)({className:Object(Nr.a)(i.root,o),ref:t},y),a&&r.createElement("div",{className:i.avatar},a),r.createElement("div",{className:i.content},_,v),n&&r.createElement("div",{className:i.action},n))})),a_=Object(Jr.a)({root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}},{name:"MuiCardHeader"})(r_);function i_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var o_=function(e){lr()(n,e);var t=i_(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForUser(this.props.searchId,this.props.screenName)}},{key:"render",value:function(){var e=this,t=null,n=null;this.props.location&&(t=a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},a.a.createElement("a",{href:this.props.location},this.props.location))),this.props.url&&(n=a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.url));var r=new Date(this.props.created);return a.a.createElement(ys,{className:"".concat(Ts.a.Card),style:{height:"365px"}},a.a.createElement(a_,{avatar:a.a.createElement(n_,{"aria-label":"recipe"},a.a.createElement("img",{src:this.props.avatarUrl})),title:this.props.name,subheader:a.a.createElement("a",{href:"https://twitter.com/".concat(this.props.screenName)},"@",this.props.screenName)}),a.a.createElement(bs,null,a.a.createElement(ll,{variant:"body1",component:"p"},this.props.desc),t," ",n,a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},"Joined ",["January","February","March","April","May","June","July","August","September","October","November","December"][r.getMonth()]," ",r.getFullYear()),a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.friends," Following"),a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.followers," Followers")),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count))}}]),n}(r.Component);o_.propTypes={name:l.a.string,screenName:l.a.string,avatarUrl:l.a.string,location:l.a.string,url:l.a.string,created:l.a.string,friends:l.a.number,followers:l.a.number,desc:l.a.string,count:l.a.number,searchId:l.a.string,getTweetsForUser:l.a.func};var s_=n(255),l_=n.n(s_),u_=n(44),c_=n.n(u_);function d_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var f_=function(e){lr()(n,e);var t=d_(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=this,t=document.getElementById("App");return a.a.createElement(l_.a,{isOpen:this.props.isOpen,style:{content:{padding:"0px",marginLeft:"auto",marginRight:"auto",maxWidth:"400px"}},appElement:t},a.a.createElement("div",{className:c_.a.CloseModal},a.a.createElement("ion-icon",{name:"close-circle",onClick:function(){e.props.close()}})),a.a.createElement("div",{className:c_.a.Conversation},this.props.tweets.map((function(e){var t=c_.a.Tweet,n=null;return e.retweet&&(t=c_.a.Retweet,n=a.a.createElement("div",{className:c_.a.UserProfile},a.a.createElement("ion-icon",{name:"repeat"}),a.a.createElement("img",{src:e.user.avatarUrl}),a.a.createElement("div",null,a.a.createElement("a",{target:"_new",href:"https://twitter.com/".concat(e.user.screenName)},e.user.name),a.a.createElement("br",null),a.a.createElement("span",{className:c_.a.ScreenName},"@",e.user.screenName)))),a.a.createElement("div",{key:e.id,className:t},n,a.a.createElement(zy,{id:e.id,options:{cards:"hidden"}}))}))))}}]),n}(r.Component);function p_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}f_.propTypes={tweets:l.a.array,isOpen:l.a.bool,close:l.a.func};var m_=function(e){lr()(n,e);var t=p_(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.search.users.map((function(t){return a.a.createElement(o_,{key:t.id,name:t.name,screenName:t.screenName,avatarUrl:t.avatarUrl,url:t.url,created:t.created,desc:t.description,count:t.tweetsInSearch,friends:t.friendsCount,followers:t.followersCount,searchId:e.props.searchId,getTweetsForUser:e.props.getTweetsForUser})}))))}}]),n}(r.Component);function h_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}m_.propTypes={searchId:l.a.string,search:l.a.object,getTweetsForUser:l.a.func,resetTweets:l.a.func,tweets:l.a.array};var y_=function(e){lr()(n,e);var t=h_(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"render",value:function(){var e=this;return a.a.createElement("div",{style:{margin:"0 auto",maxWidth:"80%",marginTop:"1em"}},a.a.createElement(As,{variant:"extended",size:"medium",color:"primary","aria-label":"add",onClick:function(){return e.props.navigateTo("/search/".concat(e.props.searchId))}},a.a.createElement("ion-icon",{name:"arrow-round-back"}),"Back to Search"))}}]),n}(r.Component);function __(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}y_.propTypes={searchId:l.a.string,navigateTo:l.a.func};var v_=function(e){lr()(n,e);var t=__(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.search.users.length||this.scrolledUp())&&this.props.getUsers(this.props.searchId)}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(m_,{searchId:this.props.searchId,search:this.props.search,getTweetsForUser:this.props.getTweetsForUser,resetTweets:this.props.resetTweets,tweets:this.props.tweets}))}}]),n}(r.Component);v_.propTypes={searchId:l.a.string,search:l.a.object,getUsers:l.a.func,getSearch:l.a.func,getTweetsForUser:l.a.func,resetTweets:l.a.func,updateSearch:l.a.func,tweets:l.a.array,navigateTo:l.a.func};var g_={getSearch:hn,getUsers:dn,getTweetsForUser:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?user=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,updateSearch:ln},b_=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(g_,e),{navigateTo:function(t){e(Ze(t))}})}))(v_);var w_=Object(Jr.a)((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Object(h.a)(Object(h.a)({zIndex:1},e.typography.body2),{},{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,a=e.className,i=e.open,o=e.value,s=e.valueLabelDisplay;return"off"===s?t:r.cloneElement(t,{className:Object(Nr.a)(t.props.className,(i||"on"===s)&&n.open,n.thumb)},r.createElement("span",{className:Object(Nr.a)(n.offset,a)},r.createElement("span",{className:n.circle},r.createElement("span",{className:n.label},o))))}));function M_(e,t){return e-t}function k_(e,t,n){return Math.min(Math.max(t,e),n)}function L_(e,t){return e.reduce((function(e,n,r){var a=Math.abs(t-n);return null===e||a0&&oe.some((function(e){return e.label}))&&o.marked,!1===R&&o.trackFalse,"vertical"===E&&o.vertical,"inverted"===R&&o.trackInverted),onMouseDown:Ee},V),r.createElement("span",{className:o.rail}),r.createElement("span",{className:o.track,style:je}),r.createElement("input",{value:ie.join(","),name:L,type:"hidden"}),oe.map((function(e,t){var n,a=x_(e.value,k,w),i=D_[Le].offset(a);return n=!1===R?-1!==ie.indexOf(e.value):"normal"===R&&(ae?e.value>=ie[0]&&e.value<=ie[ie.length-1]:e.value<=ie[0])||"inverted"===R&&(ae?e.value<=ie[0]||e.value>=ie[ie.length-1]:e.value>=ie[0]),r.createElement(r.Fragment,{key:e.value},r.createElement("span",{style:i,"data-index":t,className:Object(Nr.a)(o.mark,n&&o.markActive)}),null!=e.label?r.createElement("span",{"aria-hidden":!0,"data-index":t,style:i,className:Object(Nr.a)(o.markLabel,n&&o.markLabelActive)},e.label):null)})),ie.map((function(e,t){var s=x_(e,k,w),l=D_[Le].offset(s);return r.createElement(W,{key:t,valueLabelFormat:B,valueLabelDisplay:U,className:o.valueLabel,value:"function"==typeof B?B(O(e),t):B,index:t,open:Z===t||G===t||"on"===U,disabled:m},r.createElement(A,{className:Object(Nr.a)(o.thumb,o["thumbColor".concat(Object($r.a)(u))],G===t&&o.active,m&&o.disabled,fe===t&&o.focusVisible),tabIndex:m?null:0,role:"slider",style:l,"data-index":t,"aria-label":y?y(t):n,"aria-labelledby":a,"aria-orientation":E,"aria-valuemax":O(w),"aria-valuemin":O(k),"aria-valuenow":O(e),"aria-valuetext":_?_(O(e),t):i,onKeyDown:Me,onFocus:_e,onBlur:ve,onMouseOver:ge,onMouseLeave:be}))})))})),C_=Object(Jr.a)((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Object(ws.e)(e.palette.primary.main,.62):Object(ws.a)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(ws.c)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(ws.c)(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(ws.c)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(ws.c)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Object(h.a)(Object(h.a)({},e.typography.body2),{},{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(j_),P_=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.row,o=void 0!==i&&i,s=Object(Hr.a)(e,["classes","className","row"]);return r.createElement("div",Object(h.a)({className:Object(Nr.a)(n.root,a,o&&n.row),ref:t},s))})),A_=Object(Jr.a)({root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},{name:"MuiFormGroup"})(P_),H_=r.forwardRef((function(e,t){e.checked;var n=e.classes,a=e.className,i=e.control,o=e.disabled,s=(e.inputRef,e.label),l=e.labelPlacement,u=void 0===l?"end":l,c=(e.name,e.onChange,e.value,Object(Hr.a)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),d=Fi(),f=o;void 0===f&&void 0!==i.props.disabled&&(f=i.props.disabled),void 0===f&&d&&(f=d.disabled);var p={disabled:f};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===i.props[t]&&void 0!==e[t]&&(p[t]=e[t])})),r.createElement("label",Object(h.a)({className:Object(Nr.a)(n.root,a,"end"!==u&&n["labelPlacement".concat(Object($r.a)(u))],f&&n.disabled),ref:t},c),r.cloneElement(i,p),r.createElement(ll,{component:"span",className:Object(Nr.a)(n.label,f&&n.disabled)},s))})),R_=Object(Jr.a)((function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}}),{name:"MuiFormControlLabel"})(H_),N_=Zr(r.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),I_=Zr(r.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),W_=Zr(r.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"})),F_=r.createElement(I_,null),U_=r.createElement(N_,null),z_=r.createElement(W_,null),B_=r.forwardRef((function(e,t){var n=e.checkedIcon,a=void 0===n?F_:n,i=e.classes,o=e.color,s=void 0===o?"secondary":o,l=e.icon,u=void 0===l?U_:l,c=e.indeterminate,d=void 0!==c&&c,f=e.indeterminateIcon,p=void 0===f?z_:f,m=e.inputProps,y=e.size,_=void 0===y?"medium":y,v=Object(Hr.a)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]);return r.createElement(Qh,Object(h.a)({type:"checkbox",classes:{root:Object(Nr.a)(i.root,i["color".concat(Object($r.a)(s))],d&&i.indeterminate),checked:i.checked,disabled:i.disabled},color:s,inputProps:Object(h.a)({"data-indeterminate":d},m),icon:r.cloneElement(d?p:u,{fontSize:"small"===_?"small":"default"}),checkedIcon:r.cloneElement(d?p:a,{fontSize:"small"===_?"small":"default"}),ref:t},v))})),V_=Object(Jr.a)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(ws.c)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(B_),q_="undefined"==typeof window?r.useEffect:r.useLayoutEffect,J_=r.forwardRef((function(e,t){var n=e.alignItems,a=void 0===n?"center":n,o=e.autoFocus,s=void 0!==o&&o,l=e.button,u=void 0!==l&&l,c=e.children,d=e.classes,f=e.className,p=e.component,m=e.ContainerComponent,y=void 0===m?"li":m,_=e.ContainerProps,v=(_=void 0===_?{}:_).className,g=Object(Hr.a)(_,["className"]),b=e.dense,w=void 0!==b&&b,M=e.disabled,k=void 0!==M&&M,L=e.disableGutters,T=void 0!==L&&L,x=e.divider,S=void 0!==x&&x,Y=e.focusVisibleClassName,E=e.selected,D=void 0!==E&&E,O=Object(Hr.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),j=r.useContext(No),C={dense:w||j.dense||!1,alignItems:a},P=r.useRef(null);q_((function(){s&&P.current&&P.current.focus()}),[s]);var A=r.Children.toArray(c),H=A.length&&qi(A[A.length-1],["ListItemSecondaryAction"]),R=na(r.useCallback((function(e){P.current=i.findDOMNode(e)}),[]),t),N=Object(h.a)({className:Object(Nr.a)(d.root,f,C.dense&&d.dense,!T&&d.gutters,S&&d.divider,k&&d.disabled,u&&d.button,"center"!==a&&d.alignItemsFlexStart,H&&d.secondaryAction,D&&d.selected),disabled:k},O),I=p||"li";return u&&(N.component=p||"div",N.focusVisibleClassName=Object(Nr.a)(d.focusVisible,Y),I=Ea),H?(I=N.component||p?I:"div","li"===y&&("li"===I?I="div":"li"===N.component&&(N.component="div")),r.createElement(No.Provider,{value:C},r.createElement(y,Object(h.a)({className:Object(Nr.a)(d.container,v),ref:R},g),r.createElement(I,N,A),A.pop()))):r.createElement(No.Provider,{value:C},r.createElement(I,Object(h.a)({ref:R},N),A))})),$_=Object(Jr.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(J_),G_=r.forwardRef((function(e,t){var n,a=e.classes,i=e.className,o=e.component,s=void 0===o?"li":o,l=e.disableGutters,u=void 0!==l&&l,c=e.ListItemClasses,d=e.role,f=void 0===d?"menuitem":d,p=e.selected,m=e.tabIndex,y=Object(Hr.a)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==m?m:-1),r.createElement($_,Object(h.a)({button:!0,role:f,tabIndex:n,component:s,selected:p,disableGutters:u,classes:Object(h.a)({dense:a.dense},c),className:Object(Nr.a)(a.root,i,p&&a.selected,!u&&a.gutters),ref:t},y))})),Q_=Object(Jr.a)((function(e){return{root:Object(h.a)(Object(h.a)({},e.typography.body1),{},Object(Rr.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(h.a)(Object(h.a)({},e.typography.body2),{},{minHeight:"auto"})}}),{name:"MuiMenuItem"})(G_),K_=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"div":i,s=e.disableGutters,l=void 0!==s&&s,u=e.variant,c=void 0===u?"regular":u,d=Object(Hr.a)(e,["classes","className","component","disableGutters","variant"]);return r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,n[c],a,!l&&n.gutters),ref:t},d))})),Z_=Object(Jr.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(Rr.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(K_),X_=r.createElement(ea,null),ev=r.createElement(Xr,null),tv=r.createElement(Xr,null),nv=r.createElement(ea,null),rv=r.forwardRef((function(e,t){var n=e.backIconButtonProps,a=e.count,i=e.nextIconButtonProps,o=e.onChangePage,s=e.page,l=e.rowsPerPage,u=Object(Hr.a)(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=Ha();return r.createElement("div",Object(h.a)({ref:t},u),r.createElement(ks,Object(h.a)({onClick:function(e){o(e,s-1)},disabled:0===s,color:"inherit"},n),"rtl"===c.direction?X_:ev),r.createElement(ks,Object(h.a)({onClick:function(e){o(e,s+1)},disabled:-1!==a&&s>=Math.ceil(a/l)-1,color:"inherit"},i),"rtl"===c.direction?tv:nv))}));function av(e){var t=r.useState(e),n=t[0],a=t[1],i=e||n;return r.useEffect((function(){null==n&&a("mui-".concat(Math.round(1e5*Math.random())))}),[n]),i}var iv=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))},ov=[10,25,50,100],sv=r.forwardRef((function(e,t){var n,a=e.ActionsComponent,i=void 0===a?rv:a,o=e.backIconButtonProps,s=e.backIconButtonText,l=void 0===s?"Previous page":s,u=e.classes,c=e.className,d=e.colSpan,f=e.component,p=void 0===f?xy:f,m=e.count,y=e.labelDisplayedRows,_=void 0===y?iv:y,v=e.labelRowsPerPage,g=void 0===v?"Rows per page:":v,b=e.nextIconButtonProps,w=e.nextIconButtonText,M=void 0===w?"Next page":w,k=e.onChangePage,L=e.onChangeRowsPerPage,T=e.page,x=e.rowsPerPage,S=e.rowsPerPageOptions,Y=void 0===S?ov:S,E=e.SelectProps,D=void 0===E?{}:E,O=Object(Hr.a)(e,["ActionsComponent","backIconButtonProps","backIconButtonText","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","nextIconButtonText","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);p!==xy&&"td"!==p||(n=d||1e3);var j=av(),C=av(),P=D.native?"option":Q_;return r.createElement(p,Object(h.a)({className:Object(Nr.a)(u.root,c),colSpan:n,ref:t},O),r.createElement(Z_,{className:u.toolbar},r.createElement("div",{className:u.spacer}),Y.length>1&&r.createElement(ll,{color:"inherit",variant:"body2",className:u.caption,id:C},g),Y.length>1&&r.createElement(us,Object(h.a)({classes:{select:u.select,icon:u.selectIcon},input:r.createElement(ji,{className:Object(Nr.a)(u.input,u.selectRoot)}),value:x,onChange:L,id:j,labelId:C},D),Y.map((function(e){return r.createElement(P,{className:u.menuItem,key:e.value?e.value:e,value:e.value?e.value:e},e.label?e.label:e)}))),r.createElement(ll,{color:"inherit",variant:"body2",className:u.caption},_({from:0===m?0:T*x+1,to:-1!==m?Math.min(m,(T+1)*x):(T+1)*x,count:-1===m?-1:m,page:T})),r.createElement(i,{className:u.actions,backIconButtonProps:Object(h.a)({title:l,"aria-label":l},o),count:m,nextIconButtonProps:Object(h.a)({title:M,"aria-label":M},b),onChangePage:k,page:T,rowsPerPage:x})))})),lv=Object(Jr.a)((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),overflow:"auto","&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(sv),uv=n(91),cv=n.n(uv);function dv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var fv=function(e){lr()(n,e);var t=dv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r.state={postsToShow:r.props.chunkSize,rangeValue:[1,100],displayRetweets:r.props.displayRetweets},r.tweets=r.props.tweets,r.page=0,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("scroll",(function(){return e.handleScroll()}))}},{key:"componentDidUpdate",value:function(){this.tweets.length>0&&this.props.tweets.length>0&&this.tweets[0].id!==this.props.tweets[0].id&&(this.tweets=this.props.tweets)}},{key:"handlePageChange",value:function(e,t){var n=100*t;n<=this.props.tweetCount&&(this.props.getTweets(this.props.searchId,!0,n,t),this.page=t)}},{key:"update",value:function(){document.documentElement.offsetHeight-(window.scrollY+window.innerHeight)<150&&this.setState({postsToShow:this.state.postsToShow+this.props.chunkSize}),this.ticking=!1}},{key:"handleScroll",value:function(){var e=this;this.ticking||(this.ticking=!0,requestAnimationFrame((function(){return e.update()})))}},{key:"handleSlide",value:function(e,t){this.setState({rangeValue:t,postsToShow:this.props.chunkSize})}},{key:"displayRetweets",value:function(e){this.setState({displayRetweets:e})}},{key:"render",value:function(){var e=this,t=this.tweets;return t=t.filter((function(t,n){return n>e.state.rangeValue[0]&&n<=e.state.rangeValue[1]+1})),a.a.createElement("div",null,a.a.createElement("div",{className:cv.a.Controls},a.a.createElement($i,{component:"fieldset"},a.a.createElement(A_,null,a.a.createElement(R_,{control:a.a.createElement(V_,{checked:this.state.displayRetweets,onChange:function(t){e.displayRetweets(t.target.checked)},value:"disretw"}),label:"Display Retweets"}))),a.a.createElement("div",null,a.a.createElement("div",{style:{paddingTop:"40px"}},a.a.createElement(C_,{value:this.state.rangeValue,valueLabelFormat:function(t){var n=t+100*e.page;return n>e.props.tweetCount?e.props.tweetCount:n},onChange:function(t,n){e.handleSlide(t,n)},valueLabelDisplay:"on",step:10,marks:!0,min:1,max:100})),a.a.createElement(lv,{component:"div",count:this.props.tweetCount?this.props.tweetCount:0,rowsPerPage:100,rowsPerPageOptions:[100],labelRowsPerPage:"Tweets per page:",page:this.props.page?this.props.page:this.page,onChangePage:function(t,n){e.handlePageChange(t,n)}}))),a.a.createElement("div",{className:cv.a.Holder},t.filter((function(t){return e.state.displayRetweets||!t.retweet})).slice(0,this.state.postsToShow).map((function(e,t){return a.a.createElement(zy,{key:"t".concat(t),id:e.id})}))))}}]),n}(r.Component);fv.defaultProps={displayRetweets:!0,chunkSize:20},fv.propTypes={searchId:l.a.string,displayRetweets:l.a.bool,chunkSize:l.a.number,tweets:l.a.array,tweetCount:l.a.number,getTweets:l.a.func,page:l.a.number};var pv=fv;function mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var hv=function(e){lr()(n,e);var t=mv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),0===this.props.search.tweets.length&&this.props.getTweets(this.props.searchId)}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(pv,{displayRetweets:this.props.displayRetweets,chunkSize:this.props.chunkSize,tweets:this.props.search.tweets,tweetCount:this.props.search.tweetCount,searchId:this.props.searchId,getTweets:this.props.getTweets}))}}]),n}(r.Component);hv.propTypes={displayRetweets:l.a.bool,chunkSize:l.a.number,searchId:l.a.string,search:l.a.object,getTweets:l.a.func,getSearch:l.a.func,updateSearch:l.a.func,navigateTo:l.a.func};var yv=hv,_v={getSearch:hn,getTweets:cn,updateSearch:ln},vv=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(_v,e),{navigateTo:function(t){e(Ze(t))}})}))(yv),gv=n(256),bv=n.n(gv),wv=n(76),Mv=n.n(wv),kv=n(55),Lv=n.n(kv);function Tv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var xv=function(e){lr()(n,e);var t=Tv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){this.props.checkArchive(this.props.url)}},{key:"saveArchive",value:function(){this.props.saveArchive(this.props.url)}},{key:"render",value:function(){var e=this;if(this.props.archive&&this.props.archive.url){var t=_l()(this.props.archive.time).fromNow(),n="Last archived ".concat(t);return a.a.createElement(ks,{"aria-label":"view on Internet Archive",className:"".concat(Lv.a.Wayback," ").concat(Lv.a.WaybackFound),href:this.props.archive.url,target:"_new"},a.a.createElement("img",{title:n,alt:n,src:Mv.a}))}if(this.props.archive&&this.props.archive.error){var r="Internet Archive cannot archive!";return a.a.createElement(ks,{"aria-label":"archive at Internet Archive",className:"".concat(Lv.a.Wayback," ").concat(Lv.a.WaybackError),onClick:function(){e.saveArchive()}},a.a.createElement("img",{title:r,alt:r,src:Mv.a}))}var i="Click to archive at Internet Archive";return a.a.createElement(ks,{"aria-label":"archive at Internet Archive",className:Lv.a.Wayback,onClick:function(){e.saveArchive()}},a.a.createElement("img",{title:i,alt:i,src:Mv.a}))}}]),n}(r.Component);xv.propTypes={url:l.a.string,archive:l.a.object,checkArchive:l.a.func,saveArchive:l.a.func};var Sv=n(92),Yv=n.n(Sv),Ev=n(257),Dv=n.n(Ev),Ov=["video","audio","picture","iframe","img"],jv=r.forwardRef((function(e,t){var n=e.children,a=e.classes,i=e.className,o=e.component,s=void 0===o?"div":o,l=e.image,u=e.src,c=e.style,d=Object(Hr.a)(e,["children","classes","className","component","image","src","style"]),f=-1!==Ov.indexOf(s),p=!f&&l?Object(h.a)({backgroundImage:'url("'.concat(l,'")')},c):c;return r.createElement(s,Object(h.a)({className:Object(Nr.a)(a.root,i,f&&a.media,-1!=="picture img".indexOf(s)&&a.img),ref:t,style:p,src:f?l||u:void 0},d),n)})),Cv=Object(Jr.a)({root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}},{name:"MuiCardMedia"})(jv);function Pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Av=function(e){lr()(n,e);var t=Pv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).state={selected:r.props.selected},r}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForUrl(this.props.searchId,this.props.url)}},{key:"toggleSelect",value:function(){return this.state.selected?this.deselect():this.select()}},{key:"select",value:function(){this.setState({selected:!0}),this.props.selectWebpage(this.props.searchId,this.props.url)}},{key:"deselect",value:function(){this.setState({selected:!1}),this.props.deselectWebpage(this.props.searchId,this.props.url)}},{key:"archive",value:function(){this.props.archive(this.props.url)}},{key:"render",value:function(){var e=this,t=new URL(this.props.url).host;t=t.replace(/^www\./,"");var n=this.props.image||Jy.a;return a.a.createElement(ys,{className:"".concat(Ts.a.Card," ").concat(Ts.a.Scroll," ").concat(Yv.a.Webpage)},a.a.createElement(Cv,{style:{paddingTop:"160px",position:"relative"},image:n},a.a.createElement(V_,{className:Dv.a.Checkbox,checked:this.state.selected,onChange:function(){return e.toggleSelect()},inputProps:{"aria-label":"primary checkbox"}})),a.a.createElement(bs,{style:{overflowY:"scroll",height:"190px"}},a.a.createElement(ll,{variant:"h2",component:"h2"},this.props.title),a.a.createElement(ll,{variant:"body2",color:"textSecondary",component:"p"},this.props.description)),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count,a.a.createElement(zs,{size:"small",color:"primary",href:this.props.url,target:"_new",className:Yv.a.UrlButton},t),a.a.createElement(bv.a,{offsetVertical:800},a.a.createElement(xv,{url:this.props.url,archive:this.props.archive,checkArchive:this.props.checkArchive,saveArchive:this.props.saveArchive}))))}}]),n}(r.Component);function Hv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Av.propTypes={url:l.a.string,title:l.a.string,image:l.a.string,description:l.a.string,keywords:l.a.array,count:l.a.number,selected:l.a.bool,deselected:l.a.bool,searchId:l.a.string,archive:l.a.object,getTweetsForUrl:l.a.func,selectWebpage:l.a.func,deselectWebpage:l.a.func,checkArchive:l.a.func,saveArchive:l.a.func};var Rv=function(e){lr()(n,e);var t=Hv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.webpages.map((function(t){return a.a.createElement(Av,{key:t.url,url:t.url,title:t.title,image:t.image,count:t.count,description:t.description,keywords:t.keywords,selected:t.selected,deselected:t.deselected,archive:t.archive,checkArchive:e.props.checkArchive,saveArchive:e.props.saveArchive,searchId:e.props.searchId,getTweetsForUrl:e.props.getTweetsForUrl,selectWebpage:e.props.selectWebpage,deselectWebpage:e.props.deselectWebpage})}))))}}]),n}(r.Component);Rv.propTypes={searchId:l.a.string,search:l.a.object,webpages:l.a.array,getTweetsForUrl:l.a.func,resetTweets:l.a.func,tweets:l.a.array,selectWebpage:l.a.func,deselectWebpage:l.a.func,checkArchive:l.a.func,saveArchive:l.a.func};var Nv=n(258),Iv=n.n(Nv);function Wv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Fv=function(e){lr()(n,e);var t=Wv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.webpages.length||this.scrolledUp())&&(this.props.getQueueStats(this.props.searchId),this.props.getWebpages(this.props.searchId))}},{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement("div",{className:Iv.a.Queue},"URLs Checked: ",this.props.total-this.props.remaining,"/",this.props.total),a.a.createElement(Rv,{searchId:this.props.searchId,search:this.props.search,webpages:this.props.webpages,getTweetsForUrl:this.props.getTweetsForUrl,resetTweets:this.props.resetTweets,tweets:this.props.tweets,selectWebpage:this.props.selectWebpage,deselectWebpage:this.props.deselectWebpage,checkArchive:this.props.checkArchive,saveArchive:this.props.saveArchive}))}}]),n}(r.Component);Fv.propTypes={searchId:l.a.string,search:l.a.object,webpages:l.a.array,getWebpages:l.a.func,resetWebpages:l.a.func,getQueueStats:l.a.func,getTweetsForUrl:l.a.func,resetTweets:l.a.func,total:l.a.number,remaining:l.a.number,tweets:l.a.array,selectWebpage:l.a.func,deselectWebpage:l.a.func,checkArchive:l.a.func,saveArchive:l.a.func,getSearch:l.a.func,updateSearch:l.a.func,navigateTo:l.a.func};var Uv={getSearch:hn,getWebpages:An,resetWebpages:function(){return{type:"RESET_WEBPAGES"}},getQueueStats:function(e){return function(t){fetch("/api/v1/search/".concat(e,"/queue"),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){t(function(e){return{type:"SET_QUEUE",queue:e}}(e))}))}},getTweetsForUrl:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?url=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,selectWebpage:function(e,t){return function(n){n({type:"SELECT_WEBPAGE",searchId:e,url:t});var r={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,selected:!0}),credentials:"same-origin"};fetch("/api/v1/search/".concat(e,"/webpages"),r)}},deselectWebpage:function(e,t){return function(n){n({type:"DESELECT_WEBPAGE",searchId:e,url:t});var r={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,deselected:!0}),credentials:"same-origin"};fetch("/api/v1/search/".concat(e,"/webpages"),r)}},checkArchive:function(e){return function(t){var n="/api/v1/wayback/"+encodeURIComponent(e);fetch(n,{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(n){null!==n&&t({type:"SET_WEBPAGE_ARCHIVE",url:e,archiveUrl:n.url,archiveTime:n.time})}))}},saveArchive:function(e){return function(){var t=Pn()(jn.a.mark((function t(n){var r,a,i;return jn.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="/api/v1/wayback/"+encodeURIComponent(e),t.next=3,fetch(r,{credentials:"same-origin",method:"PUT"});case 3:return a=t.sent,t.next=6,a.json();case 6:i=t.sent,n(i?{type:"SET_WEBPAGE_ARCHIVE",url:e,archiveUrl:i.url,archiveTime:i.time}:{type:"ARCHIVE_ERROR",url:e});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},updateSearch:ln},zv=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,webpages:e.webpages,total:e.queue.total,remaining:e.queue.remaining,tweets:e.tweets}}),(function(e){return Object.assign(N(Uv,e),{navigateTo:function(t){e(Ze(t))}})}))(Fv);function Bv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Vv=function(e){lr()(n,e);var t=Bv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForImage(this.props.searchId,this.props.url)}},{key:"render",value:function(){var e=this;return a.a.createElement(ys,{className:"".concat(Ts.a.Card)},a.a.createElement(Cv,{style:{paddingTop:"240px",position:"relative"},image:this.props.url}),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count))}}]),n}(r.Component);function qv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Vv.propTypes={url:l.a.string,count:l.a.number,searchId:l.a.string,getTweetsForImage:l.a.func};var Jv=function(e){lr()(n,e);var t=qv(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.search.images.map((function(t){return a.a.createElement(Vv,{key:t.url,url:t.url,count:t.count,searchId:e.props.searchId,getTweetsForImage:e.props.getTweetsForImage})}))))}}]),n}(r.Component);function $v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Jv.propTypes={searchId:l.a.string,search:l.a.object,getTweetsForImage:l.a.func,resetTweets:l.a.func,tweets:l.a.array};var Gv=function(e){lr()(n,e);var t=$v(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.search.images.length||this.scrolledUp())&&this.props.getImages(this.props.searchId)}},{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(Jv,{searchId:this.props.searchId,search:this.props.search,getTweetsForImage:this.props.getTweetsForImage,resetTweets:this.props.resetTweets,tweets:this.props.tweets}))}}]),n}(r.Component);Gv.propTypes={searchId:l.a.string,search:l.a.object,getImages:l.a.func,getSearch:l.a.func,getTweetsForImage:l.a.func,resetTweets:l.a.func,updateSearch:l.a.func,tweets:l.a.array,navigateTo:l.a.func};var Qv={getSearch:hn,getImages:pn,getTweetsForImage:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?image=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,updateSearch:ln},Kv=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(Qv,e),{navigateTo:function(t){e(Ze(t))}})}))(Gv);function Zv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Xv=function(e){lr()(n,e);var t=Zv(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"showTweets",value:function(){this.props.getTweetsForVideo(this.props.searchId,this.props.url)}},{key:"render",value:function(){var e=this;return a.a.createElement(ys,{className:"".concat(Ts.a.Card),style:{height:"365px"}},a.a.createElement(Cv,null,a.a.createElement("video",{style:{width:"300px",height:"300px"},controls:!0,src:this.props.url})),a.a.createElement(vs,null,a.a.createElement(ks,{"aria-label":"show tweets",onClick:function(){e.showTweets()}},a.a.createElement("ion-icon",{name:"logo-twitter"})),this.props.count))}}]),n}(r.Component);function eg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}Xv.propTypes={url:l.a.string,count:l.a.number,searchId:l.a.string,getTweetsForVideo:l.a.func};var tg=function(e){lr()(n,e);var t=eg(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).modalOpen=!0,r}return or()(n,[{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){var e=this,t=this.props.tweets.length>0;return a.a.createElement("div",null,a.a.createElement(f_,{isOpen:t,close:function(){e.closeModal()},tweets:this.props.tweets}),a.a.createElement("div",{className:Ts.a.CardHolder},this.props.search.videos.map((function(t){return a.a.createElement(Xv,{key:t.url,url:t.url,count:t.count,searchId:e.props.searchId,getTweetsForVideo:e.props.getTweetsForVideo})}))))}}]),n}(r.Component);function ng(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}tg.propTypes={searchId:l.a.string,search:l.a.object,getTweetsForVideo:l.a.func,resetTweets:l.a.func,tweets:l.a.array};var rg=function(e){lr()(n,e);var t=ng(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).timerId=null,r}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"scrolledUp",value:function(){return 0===document.documentElement.scrollTop}},{key:"tick",value:function(){this.props.getSearch(this.props.searchId),(0===this.props.search.videos.length||this.scrolledUp())&&this.props.getVideos(this.props.searchId)}},{key:"closeModal",value:function(){this.props.resetTweets()}},{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement(Dy,{title:this.props.search.title,description:this.props.search.description,search:this.props.search,updateSearch:this.props.updateSearch}),a.a.createElement(y_,{searchId:this.props.searchId,navigateTo:this.props.navigateTo}),a.a.createElement(tg,{searchId:this.props.searchId,search:this.props.search,getTweetsForVideo:this.props.getTweetsForVideo,resetTweets:this.props.resetTweets,tweets:this.props.tweets}))}}]),n}(r.Component);rg.propTypes={searchId:l.a.string,search:l.a.object,getVideos:l.a.func,getSearch:l.a.func,getTweetsForVideo:l.a.func,resetTweets:l.a.func,updateSearch:l.a.func,tweets:l.a.array,navigateTo:l.a.func};var ag={getSearch:hn,getVideos:mn,getTweetsForVideo:function(e,t){return function(n){fetch("/api/v1/search/".concat(e,"/tweets?video=").concat(t),{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){n(Bn(e))}))}},resetTweets:Vn,updateSearch:ln},ig=ne((function(e,t){return{searchId:t.match.params.searchId,search:e.search,tweets:e.tweets,location:e.router.location.pathname}}),(function(e){return Object.assign(N(ag,e),{navigateTo:function(t){e(Ze(t))}})}))(rg),og={variant:"body"},sg=r.forwardRef((function(e,t){var n=e.classes,a=e.className,i=e.component,o=void 0===i?"tbody":i,s=Object(Hr.a)(e,["classes","className","component"]);return r.createElement(wy.Provider,{value:og},r.createElement(o,Object(h.a)({className:Object(Nr.a)(n.root,a),ref:t,role:"tbody"===o?null:"rowgroup"},s)))})),lg=Object(Jr.a)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(sg);function ug(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var cg=function(e){lr()(n,e);var t=ug(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){var e=this.props.forUserId||this.props.user.id;this.props.getSearches(e)}},{key:"render",value:function(){var e=this;return a.a.createElement(by,null,a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,null,"Title"),a.a.createElement(xy,null,"Tweet Count"),a.a.createElement(xy,null,"Created"),a.a.createElement(xy,null,"Last Update"),a.a.createElement(xy,null,"Active"),a.a.createElement(xy,null,"Public"),a.a.createElement(xy,null,"Archive"),a.a.createElement(xy,null,"Delete"))),a.a.createElement(lg,null,this.props.searches.map((function(t){var n=_l()(t.created).local().format("MMM D h:mm A"),r=_l()(t.updated).local().format("MMM D h:mm A");return a.a.createElement(Yy,{key:t.id},a.a.createElement(xy,null,a.a.createElement(xr,{to:"/search/".concat(t.id,"/")},t.title)),a.a.createElement(xy,null,a.a.createElement("ion-icon",{name:"logo-twitter"})," ",t.tweetCount.toLocaleString()),a.a.createElement(xy,null,n),a.a.createElement(xy,null,r),a.a.createElement(xy,null,a.a.createElement(ay,{id:t.id,active:t.active,user:e.props.user,searches:e.props.searches,updateSearch:e.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(oy,{id:t.id,public:t.public,user:e.props.user,searches:e.props.searches,updateSearch:e.props.updateSearch})),a.a.createElement(xy,null,a.a.createElement(Hh,{id:t.id,active:t.active,archived:t.archived,archiveStarted:t.archiveStarted})),a.a.createElement(xy,null,a.a.createElement(hy,{id:t.id,deleteSearch:e.props.deleteSearch})))}))))}}]),n}(r.Component);cg.propTypes={searches:l.a.array,updateSearch:l.a.func,deleteSearch:l.a.func,getSearches:l.a.func,user:l.a.object,forUserId:l.a.number};var dg={getSearches:Mn,updateSearch:ln,deleteSearch:un},fg=ne((function(e,t){return{searches:e.searches,user:e.user,forUserId:t.match.params.userId}}),(function(e){return N(dg,e)}))(cg),pg=n(27),mg=n.n(pg);function hg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var yg=function(e){lr()(n,e);var t=hg(n);function n(){var e;return ar()(this,n),(e=t.call(this)).toggleActive=e.toggleActive.bind(Os()(e)),e.toggleAdmin=e.toggleAdmin.bind(Os()(e)),e.udpateQuota=e.updateQuota.bind(Os()(e)),e}return or()(n,[{key:"componentDidMount",value:function(){var e=this;0===this.props.users.length&&this.tick(),this.timerId=setInterval((function(){e.tick()}),1e4)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){this.props.getUsers()}},{key:"toggleActive",value:function(e){e.active?this.props.deactivateUser(e):this.props.activateUser(e)}},{key:"toggleAdmin",value:function(e){e.isSuperUser?this.props.deactivateAdmin(e):this.props.activateAdmin(e)}},{key:"updateQuota",value:function(e,t){this.props.updateQuota(e,t)}},{key:"render",value:function(){var e=this;return a.a.createElement(by,{className:mg.a.UserList},a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,{className:mg.a.Avatar},"Avatar"),a.a.createElement(xy,{className:mg.a.Username},"Username"),a.a.createElement(xy,{className:mg.a.Name},"Name"),a.a.createElement(xy,{className:mg.a.Collections},"Collections"),a.a.createElement(xy,{className:mg.a.Tweets},"Tweets"),a.a.createElement(xy,{className:mg.a.Active},"Active"),a.a.createElement(xy,{className:mg.a.Admin},"Admin"),a.a.createElement(xy,{className:mg.a.Quota},"Quota"))),a.a.createElement(lg,null,this.props.users.map((function(t){var n=t.searches.map((function(e){return e.tweetCount})).reduce((function(e,t){return e+t}),0);return a.a.createElement(Yy,{key:t.twitterScreenName},a.a.createElement(xy,{className:mg.a.Avatar},a.a.createElement("a",{href:"https://twitter.com/".concat(t.twitterScreenName)},a.a.createElement("img",{src:t.twitterAvatarUrl}))),a.a.createElement(xy,{className:mg.a.Username},a.a.createElement(xr,{to:"/searches/".concat(t.id)},t.twitterScreenName)),a.a.createElement(xy,{className:mg.a.Name},t.name),a.a.createElement(xy,{className:mg.a.Collections},t.searches.length),a.a.createElement(xy,{className:mg.a.Tweets},n),a.a.createElement(xy,{className:mg.a.Active},a.a.createElement(Zh,{checked:t.active,onChange:function(){e.toggleActive(t)},color:"primary"})),a.a.createElement(xy,{className:ny.Admin},a.a.createElement(Zh,{checked:t.isSuperUser,onChange:function(){e.toggleAdmin(t)},color:"primary"})),a.a.createElement(xy,{className:mg.a.Quota},a.a.createElement(fs,{className:mg.a.TweetQuota,defaultValue:t.tweetQuota,onChange:function(n){e.updateQuota(t,n.target.value)}})))}))))}}]),n}(r.Component);yg.propTypes={users:l.a.array,getUsers:l.a.func,activateUser:l.a.func,deactivateUser:l.a.func,activateAdmin:l.a.func,deactivateAdmin:l.a.func,updateQuota:l.a.func};var _g={getUsers:function(){return function(e){fetch("/api/v1/users",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){e({type:"SET_USERS",users:t})}))}},activateUser:function(e){return function(t){t({type:"ACTIVATE_USER",user:e}),t(Nt(At(At({},e),{},{active:!0})))}},deactivateUser:function(e){return function(t){t({type:"DEACTIVATE_USER",user:e}),t(Nt(At(At({},e),{},{active:!1})))}},activateAdmin:function(e){return function(t){t({type:"ACTIVATE_ADMIN",user:e}),t(Nt(At(At({},e),{},{isSuperUser:!0})))}},deactivateAdmin:function(e){return function(t){t({type:"DEACTIVATE_ADMIN",user:e}),t(Nt(At(At({},e),{},{isSuperUser:!1})))}},updateQuota:function(e,t){return function(n){n({type:"UPDATE_QUOTA",user:e,quota:t}),n(Nt(At(At({},e),{},{tweetQuota:t})))}}},vg=ne((function(e){return{users:e.users}}),(function(e){return N(_g,e)}))(yg),gg=[0,1,2,3,4,5,6,7,8,9,10],bg=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function wg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var Mg=r.forwardRef((function(e,t){var n=e.alignContent,a=void 0===n?"stretch":n,i=e.alignItems,o=void 0===i?"stretch":i,s=e.classes,l=e.className,u=e.component,c=void 0===u?"div":u,d=e.container,f=void 0!==d&&d,p=e.direction,m=void 0===p?"row":p,y=e.item,_=void 0!==y&&y,v=e.justify,g=void 0===v?"flex-start":v,b=e.lg,w=void 0!==b&&b,M=e.md,k=void 0!==M&&M,L=e.sm,T=void 0!==L&&L,x=e.spacing,S=void 0===x?0:x,Y=e.wrap,E=void 0===Y?"wrap":Y,D=e.xl,O=void 0!==D&&D,j=e.xs,C=void 0!==j&&j,P=e.zeroMinWidth,A=void 0!==P&&P,H=Object(Hr.a)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),R=Object(Nr.a)(s.root,l,f&&[s.container,0!==S&&s["spacing-xs-".concat(String(S))]],_&&s.item,A&&s.zeroMinWidth,"row"!==m&&s["direction-xs-".concat(String(m))],"wrap"!==E&&s["wrap-xs-".concat(String(E))],"stretch"!==o&&s["align-items-xs-".concat(String(o))],"stretch"!==a&&s["align-content-xs-".concat(String(a))],"flex-start"!==g&&s["justify-xs-".concat(String(g))],!1!==C&&s["grid-xs-".concat(String(C))],!1!==T&&s["grid-sm-".concat(String(T))],!1!==k&&s["grid-md-".concat(String(k))],!1!==w&&s["grid-lg-".concat(String(w))],!1!==O&&s["grid-xl-".concat(String(O))]);return r.createElement(c,Object(h.a)({className:R,ref:t},H))})),kg=Object(Jr.a)((function(e){return Object(h.a)(Object(h.a)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return gg.forEach((function(r){var a=e.spacing(r);0!==a&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(wg(a,2)),width:"calc(100% + ".concat(wg(a),")"),"& > $item":{padding:wg(a,2)}})})),n}(e,"xs")),e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};bg.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var a="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:a,flexGrow:0,maxWidth:a}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?Object(h.a)(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(Mg),Lg=n(77),Tg=n.n(Lg);function xg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Sg=function(e){lr()(n,e);var t=xg(n);function n(){return ar()(this,n),t.apply(this,arguments)}return or()(n,[{key:"componentDidMount",value:function(){var e=this;this.tick(),this.timerId=setInterval((function(){e.tick()}),3e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timerId)}},{key:"tick",value:function(){this.props.getPublicSearches()}},{key:"render",value:function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement(kg,{container:!0,spacing:3,className:Tg.a.Header},a.a.createElement(kg,{item:!0,xs:9},a.a.createElement(ll,{variant:"body1"},this.props.settings.instanceDescription)),a.a.createElement(kg,{item:!0,xs:3},a.a.createElement(zs,{variant:"contained",color:"primary",className:Tg.a.FindMeBtn},"Find me")),a.a.createElement(kg,{item:!0,xs:12,className:Tg.a.Title},a.a.createElement(ll,{variant:"h2"},"Active Collections"))),a.a.createElement(by,null,a.a.createElement(Ly,null,a.a.createElement(Yy,null,a.a.createElement(xy,null,"Title"),a.a.createElement(xy,null,"Tweet Count"),a.a.createElement(xy,null,"Users"),a.a.createElement(xy,null,"Created"),a.a.createElement(xy,null,"Last Update"),a.a.createElement(xy,null,"Collector"),a.a.createElement(xy,null,"Contact"))),a.a.createElement(lg,null,this.props.searches.map((function(e){var t=_l()(e.created).local().format("MMM D h:mm A"),n=_l()(e.updated).local().format("MMM D h:mm A"),r=e.creator.email?e.creator.email:"No email provided.";return a.a.createElement(Yy,{key:e.id},a.a.createElement(xy,null,a.a.createElement(xr,{to:"/collection/".concat(e.id,"/")},e.title)),a.a.createElement(xy,null,a.a.createElement("ion-icon",{name:"logo-twitter"})," ",e.tweetCount.toLocaleString()),a.a.createElement(xy,null,e.userCount),a.a.createElement(xy,null,t),a.a.createElement(xy,null,n),a.a.createElement(xy,null,a.a.createElement("a",{href:"https://twitter.com/".concat(e.creator.twitterScreenName)},e.creator.twitterScreenName)),a.a.createElement(xy,null,r))})))))}}]),n}(r.Component);Sg.propTypes={searches:l.a.array.isRequired,settings:l.a.object,forUserId:l.a.number,getPublicSearches:l.a.func.isRequired};var Yg={getPublicSearches:function(){return function(e){fetch("/api/v1/searches?public=true",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){e(wn(t))}))}}},Eg=ne((function(e,t){return{settings:e.settings,searches:e.searches,forUserId:t.match.params.userId}}),(function(e){return N(Yg,e)}))(Sg),Dg=n(78),Og=n.n(Dg);function jg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fr()(e);if(t){var a=fr()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cr()(this,n)}}var Cg=function(e){lr()(n,e);var t=jg(n);function n(e){var r;return ar()(this,n),(r=t.call(this,e)).state={headerStyle:Og.a.Header},r}return or()(n,[{key:"componentWillMount",value:function(){nr.dispatch(Yt()),nr.dispatch(Rt()),nr.dispatch((function(e){fetch("/api/v1/world",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(t){var n=Object.values(t).reduce((function(e,t){return e[t.name]?e[t.name].push(t):e[t.name]=[t],e}),{});Object.keys(n).map((function(e){n[e].length>1&&(n[e].forEach((function(e){var t=e.name+", "+e.countryCode;n[t]=[e]})),delete n[e])}),{}),e(function(e){return{type:"SET_WORLD",world:e}}(n))}))})),nr.dispatch(Mn()),fetch("/api/v1/setup",{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){e||nr.dispatch(Ze("/settings/"))}))}},{key:"componentDidMount",value:function(){this.setMediaQuery("(max-width: 780px)",Og.a.App,Og.a.AppUnder780px)}},{key:"render",value:function(){return a.a.createElement("div",{id:"App",className:this.state.mediaStyle},a.a.createElement(Ga,null),a.a.createElement("main",null,a.a.createElement(br,null,a.a.createElement(Ge,null,a.a.createElement(ze,{exact:!0,name:"trends",path:"/",component:Js}),a.a.createElement(ze,{exact:!0,name:"settings",path:"/settings/",component:il}),a.a.createElement(ze,{exact:!0,name:"profile",path:"/profile/",component:hl}),a.a.createElement(ze,{exact:!0,name:"explore",path:"/explore/",component:Dh}),a.a.createElement(ze,{exact:!0,name:"searches",path:"/searches/:userId?",component:fg}),a.a.createElement(ze,{exact:!0,name:"users",path:"/users/",component:vg}),a.a.createElement(ze,{exact:!0,name:"insights",path:"/search/:searchId/",component:Xy}),a.a.createElement(ze,{exact:!0,name:"insightsUsers",path:"/search/:searchId/users/",component:b_}),a.a.createElement(ze,{exact:!0,name:"tweets",path:"/search/:searchId/tweets/",component:vv}),a.a.createElement(ze,{exact:!0,name:"webpages",path:"/search/:searchId/webpages/",component:zv}),a.a.createElement(ze,{exact:!0,name:"images",path:"/search/:searchId/images/",component:Kv}),a.a.createElement(ze,{exact:!0,name:"videos",path:"/search/:searchId/videos/",component:ig}),a.a.createElement(ze,{exact:!0,name:"collections",path:"/collections/:userId?",component:Eg})))))}}]),n}(mr);Object(i.render)(a.a.createElement(m,{store:nr},a.a.createElement(yt,{history:Xn},a.a.createElement(Cg,null))),document.querySelector("#app"))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var a=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(a[e]="".concat(t[e]," ").concat(n[e]))})),a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),a=n(40);function i(e){return e&&"object"===Object(a.a)(e)&&e.constructor===Object}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},a=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?a[r]=o(e[r],t[r],n):a[r]=t[r])})),a}},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var a,i=t.props[n];for(a in i)void 0===r[a]&&(r[a]=i[a]);return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return Fe})),n.d(t,"b",(function(){return Ue}));var r=n(2),a=n(5),i=n(0),o=n.n(i),s=(n(1),n(396)),l=n(26),u=Date.now(),c="fnValues"+u,d="fnStyle"+ ++u;var f=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Object(l.d)(e,{},n);return r[d]=t,r},onProcessStyle:function(e,t){if(c in t||d in t)return e;var n={};for(var r in e){var a=e[r];"function"==typeof a&&(delete e[r],n[r]=a)}return t[c]=n,e},onUpdate:function(e,t,n,r){var a=t,i=a[d];i&&(a.style=i(e)||{});var o=a[c];if(o)for(var s in o)a.prop(s,o[s](e),r)}}},p="@global",m=function(){function e(e,t,n){for(var a in this.type="global",this.at=p,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new l.a(Object(r.a)({},n,{parent:this})),t)this.rules.add(a,t[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),h=function(){function e(e,t,n){this.type="global",this.at=p,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var a=e.substr("@global ".length);this.rule=n.jss.createRule(a,t,Object(r.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),y=/\s*,\s*/g;function _(e,t){for(var n=e.split(y),r="",a=0;a-1){var a=ge[e];if(!Array.isArray(a))return J+re(a)in t&&$+a;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},a=Object.keys(t).sort(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,o=void 0===i?"jss":i,s=e.seed,l=void 0===s?"":s,u=""===l?"":"".concat(l,"-"),c=0,d=function(){return c+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==a.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(u).concat(i,"-").concat(e.key);return t.options.theme[r]&&""===l?"".concat(s,"-").concat(d()):s}return"".concat(u).concat(o).concat(d())}}}]); +//# sourceMappingURL=main-e7b081c34806c044fbe6.js.map \ No newline at end of file diff --git a/dist/client/main-b9c4ef83bece6e60c164.js.map b/dist/client/main-e7b081c34806c044fbe6.js.map similarity index 92% rename from dist/client/main-b9c4ef83bece6e60c164.js.map rename to dist/client/main-e7b081c34806c044fbe6.js.map index 2000dc53..0b36e000 100644 --- a/dist/client/main-b9c4ef83bece6e60c164.js.map +++ b/dist/client/main-e7b081c34806c044fbe6.js.map @@ -1 +1 @@ -{"version":3,"file":"main-b9c4ef83bece6e60c164.js","sources":["webpack:///main-b9c4ef83bece6e60c164.js"],"mappings":"AAAA;;AAgpLA;;;;;;;AA41HA;;;;;AAixFA;AAmPA;AAAA;AAwFA;AAAA;AA8MA;AAAA;AAuKA;AAAA;AAqEA;AAAA;AA2LA;AAAA;AAqEA;AAAA;AAuHA;AAAA;AAqEA;AAAA;AA8HA;AAAA;AAkJA;AAAA;AAoGA;AAAA;AAkEA;AAAA;AAqIA;AAAA;AAyIA;AAAA;AAqLA;AAAA;AAmKA;AAAA;AAgHA;AAAA;AA0LA;AAAA;AA8EA;AAAA;AA+GA;AAAA;AAsEA;AAAA;AA2FA;AAAA;AAwFA;AAAA;AAwFA;AAAA;AAgHA;AAAA;AAgHA;AAAA;AAmFA;AAAA;AA+EA;AAAA;AAmFA;AAAA;AAmFA;AAAA;AA+EA;AAAA;AAmFA;AAAA;AAmFA;AAAA;AAsFA;AAAA;AAgFA;AAAA;AAsHA;AAAA;AAuHA;AAAA;AAuHA;AAAA;AA4FA;AAAA;AA8EA;AAAA;AA6HA;AAAA;AAwIA;AAAA;AAyEA;AAAA;AAsEA;AAAA;AA6FA;AAAA;AAoFA;AAAA;AAwFA;AAAA;AAoIA;AAAA;AA8GA;AAAA;AAsEA;AAAA;AAyFA;AAAA;AA2IA;AAAA;AA2IA;AAAA;AA0IA;AAAA;AA2GA;AAAA;AAsIA;AAAA;AAyKA;AAAA;AAmIA;AAAA;AA4GA;AAAA;AA0FA;AAAA;AA4JA;AAAA;AAuHA;AAAA;AA+EA;AAAA;AAoKA;AAAA;AA0FA;AAAA;AA2GA;AAAA;AAiGA;AAAA;AAqHA;AAAA;AA2IA;AAAA;AAyFA;AAAA;AAqIA;AAAA;AAoGA;AAAA;AAqJA;AAAA;AAgFA;AAAA;AA2IA;AAAA;AA2GA;AAAA;AAqIA;AAAA;AA2EA;AAAA;AAoGA;AAAA;AA+FA;AAAA;AAmHA;AAAA;AAwNA;AAAA;AA2FA;AAAA;AA0FA;AAAA;AAwEA;AAAA;AA0GA;AAAA;AAwEA;AAAA;AAwIA;AAAA;AAqHA;AAAA;AAqHA;AAAA;AAwEA;AAAA;AAkGA;AAAA;AAwIA;AAAA;AAgJA;AAAA;AA2EA;AAAA;AAyEA;AAAA;AA+FA;AAAA;AAgNA;AAAA;AAgGA;AAAA;AAyEA;AAAA;AAmFA;AAAA;AA8JA;AAAA;AA2LA;AAAA;AA8EA;AAAA;AAoIA;AAAA;AAkIA;AAAA;AAkGA;AAAA;AAmFA;AAAA;AAqEA;AAAA;AAgJA;AAAA;AAuGA;AAAA;AAiFA;AAAA;AA8HA;AAAA;AA6EA;AAAA;AAwEA;AAAA;AA6IA;AAAA;AAoLA;AAAA;AA0CA;AAAA;AAoEA;AAAA;AAoEA;AAAA;AAsIA;AAAA;AA0KA;AAAA;AAgGA;AAAA;AAkEA;AAAA;AAqEA;AAAA;AA2FA;AAAA;AAsFA;AAAA;AAsEA;AAAA;AAsIA;AAAA;AAmHA;AAAA;AAkHA;AAAA;;;;;;;;;;;;AAgJA;;;;;;;;AA82CA;;;;;;;;AAmCA;;;;;;;;AAoTA;;;;;;;;AAsHA;;;;;;;;AAsBA;;;;;AAkxGA","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"main-e7b081c34806c044fbe6.js","sources":["webpack:///main-e7b081c34806c044fbe6.js"],"mappings":"AAAA;;AAgpLA;;;;;;;AA41HA;;;;;AAixFA;AAmPA;AAAA;AAwFA;AAAA;AA8MA;AAAA;AAuKA;AAAA;AAqEA;AAAA;AA2LA;AAAA;AAqEA;AAAA;AAuHA;AAAA;AAqEA;AAAA;AA8HA;AAAA;AAkJA;AAAA;AAoGA;AAAA;AAkEA;AAAA;AAqIA;AAAA;AAyIA;AAAA;AAqLA;AAAA;AAmKA;AAAA;AAgHA;AAAA;AA0LA;AAAA;AA8EA;AAAA;AA+GA;AAAA;AAsEA;AAAA;AA2FA;AAAA;AAwFA;AAAA;AAwFA;AAAA;AAgHA;AAAA;AAgHA;AAAA;AAmFA;AAAA;AA+EA;AAAA;AAmFA;AAAA;AAmFA;AAAA;AA+EA;AAAA;AAmFA;AAAA;AAmFA;AAAA;AAsFA;AAAA;AAgFA;AAAA;AAsHA;AAAA;AAuHA;AAAA;AAuHA;AAAA;AA4FA;AAAA;AA8EA;AAAA;AA6HA;AAAA;AAwIA;AAAA;AAyEA;AAAA;AAsEA;AAAA;AA6FA;AAAA;AAoFA;AAAA;AAwFA;AAAA;AAoIA;AAAA;AA8GA;AAAA;AAsEA;AAAA;AAyFA;AAAA;AA2IA;AAAA;AA2IA;AAAA;AA0IA;AAAA;AA2GA;AAAA;AAsIA;AAAA;AAyKA;AAAA;AAmIA;AAAA;AA4GA;AAAA;AA0FA;AAAA;AA4JA;AAAA;AAuHA;AAAA;AA+EA;AAAA;AAoKA;AAAA;AA0FA;AAAA;AA2GA;AAAA;AAiGA;AAAA;AAqHA;AAAA;AA2IA;AAAA;AAyFA;AAAA;AAqIA;AAAA;AAoGA;AAAA;AAqJA;AAAA;AAgFA;AAAA;AA2IA;AAAA;AA2GA;AAAA;AAqIA;AAAA;AA2EA;AAAA;AAoGA;AAAA;AA+FA;AAAA;AAmHA;AAAA;AAwNA;AAAA;AA2FA;AAAA;AA0FA;AAAA;AAwEA;AAAA;AA0GA;AAAA;AAwEA;AAAA;AAwIA;AAAA;AAqHA;AAAA;AAqHA;AAAA;AAwEA;AAAA;AAkGA;AAAA;AAwIA;AAAA;AAgJA;AAAA;AA2EA;AAAA;AAyEA;AAAA;AA+FA;AAAA;AAgNA;AAAA;AAgGA;AAAA;AAyEA;AAAA;AAmFA;AAAA;AA8JA;AAAA;AA2LA;AAAA;AA8EA;AAAA;AAoIA;AAAA;AAkIA;AAAA;AAkGA;AAAA;AAmFA;AAAA;AAqEA;AAAA;AAgJA;AAAA;AAuGA;AAAA;AAiFA;AAAA;AA8HA;AAAA;AA6EA;AAAA;AAwEA;AAAA;AA6IA;AAAA;AAoLA;AAAA;AA0CA;AAAA;AAoEA;AAAA;AAoEA;AAAA;AAsIA;AAAA;AA0KA;AAAA;AAgGA;AAAA;AAkEA;AAAA;AAqEA;AAAA;AA2FA;AAAA;AAsFA;AAAA;AAsEA;AAAA;AAsIA;AAAA;AAmHA;AAAA;AAkHA;AAAA;;;;;;;;;;;;AAgJA;;;;;;;;AA82CA;;;;;;;;AAmCA;;;;;;;;AAoTA;;;;;;;;AAsHA;;;;;;;;AAsBA;;;;;AAkxGA","sourceRoot":""} \ No newline at end of file diff --git a/dist/server/api.js b/dist/server/api.js index 96b2a8bb..3d837a27 100644 --- a/dist/server/api.js +++ b/dist/server/api.js @@ -169,9 +169,7 @@ app.get('/settings', /*#__PURE__*/function () { settings = _context3.sent; if (!settings || !req.user) { - res.json({}); - } else { - if (!req.user.isSuperUser) { + if (!req.user || !req.user.isSuperUser) { delete settings.appKey; delete settings.appSecret; } diff --git a/dist/server/db.js b/dist/server/db.js index bd38603a..9a3fd2c7 100644 --- a/dist/server/db.js +++ b/dist/server/db.js @@ -1154,7 +1154,8 @@ var Database = /*#__PURE__*/function () { results.map(function (s) { s.creator = { id: s.creator.id, - name: s.creator.name + name: s.creator.name, + twitterScreenName: s.creator.twitterScreenName }; }); // add stats to each search