(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{D46e:function(e,a,t){e.exports={header:"_3PCSxT0l14",list:"_1yYRIyvlRd",proxy:"_1OcDlvlM5R",proxySelectable:"_3oAxPKtZFv"}},FWZb:function(e,a,t){e.exports={proxy:"NpfXwxWAxo",now:"_2zD7drviYH",proxyType:"_1rVl-Kdmss",proxyName:"_3kdi5nima5",proxyLatencyWrap:"_12JM32OJa5"}},L5YO:function(e,a,t){e.exports={body:"pWc1mov26e",group:"_1myfcMimT9",fabgrp:"_1khaX45NQe"}},RbL9:function(e,a,t){e.exports={proxyLatency:"_2V-RqIAl7n"}},wyCT:function(e,a,t){"use strict";t.r(a);var n=t("o0o1"),r=t.n(n),c=t("HaE+"),o=t("q1tI"),l=t.n(o),s=t("u4Dv"),p=t("DKqX"),m=t("rePB"),i=t("17x9"),u=t.n(i),y=t("TSYQ"),b=t.n(y),x=t("RbL9"),d=t.n(x),f={good:"#67C23A",normal:"#E6A23C",bad:"#F56C6C",na:"#909399"};function v(e){var a=e.latency,t=a.number,n=a.error,r=Object(o.useMemo)((function(){return function(e,a){return""!==a?f.na:e<200?f.good:e<400?f.normal:f.bad}(t,n)}),[t,n]);return l.a.createElement("span",{className:d.a.proxyLatency,style:{color:r}},""!==n?l.a.createElement("span",null,n):l.a.createElement("span",null,t," ms"))}v.propTypes={latency:u.a.shape({number:u.a.number,error:u.a.string})};var E=t("FWZb"),O=t.n(E),w=t("EQlU"),N=function(e){return{proxies:Object(w.d)(e),delay:Object(w.c)(e)}};function j(e){var a=e.now,t=e.name,n=Object(s.c)(N),r=n.proxies,c=n.delay[t],o=r[t];return l.a.createElement("div",{className:b()(O.a.proxy,Object(m.a)({},O.a.now,a))},l.a.createElement("div",{className:O.a.proxyName},t),l.a.createElement("div",{className:O.a.proxyType,style:{opacity:a?.6:.2}},o.type),l.a.createElement("div",{className:O.a.proxyLatencyWrap},c?l.a.createElement(v,{latency:c}):null))}j.propTypes={now:u.a.bool,name:u.a.string};var g=j,h=t("D46e"),_=t.n(h),T=function(e){return{proxies:Object(w.d)(e)}};function k(e){var a=e.name,t=Object(s.c)(T).proxies,n=Object(s.b)({switchProxy:w.g}),r=t[a],c=r.all;return l.a.createElement("div",{className:_.a.group},l.a.createElement("div",{className:_.a.header},l.a.createElement("h2",null,l.a.createElement("span",null,a),l.a.createElement("span",null,r.type))),l.a.createElement("div",{className:_.a.list},c.map((function(e){var t="Selector"===r.type,c=b()(_.a.proxy,Object(m.a)({},_.a.proxySelectable,t));return l.a.createElement("div",{className:c,key:e,onClick:function(){t&&n.switchProxy(a,e)}},l.a.createElement(g,{isSelectable:t,name:e,now:e===r.now}))}))))}k.propTypes={name:u.a.string};var L=t("5Wrh"),C=t("L5YO"),D=t.n(C);t.d(a,"default",(function(){return W}));var P=function(e){return{proxies:Object(w.d)(e),groupNames:Object(w.e)(e)}},A={fetchProxies:w.b,requestDelayAll:w.f};function W(){var e=Object(s.b)(A),a=e.fetchProxies,t=e.requestDelayAll;Object(o.useEffect)((function(){Object(c.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a();case 2:case"end":return e.stop()}}),e)})))()}),[a,t]);var n=Object(s.c)(P).groupNames;return l.a.createElement(l.a.Fragment,null,l.a.createElement(p.a,{title:"Proxies"}),l.a.createElement("div",{className:D.a.body},l.a.createElement("div",{className:D.a.fabgrp},l.a.createElement(L.a,{label:"Test Latency",onClick:t})),n.map((function(e){return l.a.createElement("div",{className:D.a.group,key:e},l.a.createElement(k,{name:e}))}))))}}}]);