(this["webpackJsonpedge-troubleshoot-tool"]=this["webpackJsonpedge-troubleshoot-tool"]||[]).push([[0],{21:function(e,t,a){"use strict";(function(e){t.a={private:e&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,REACT_APP_DNS_WILDCARD_DOMAIN:"ctt.csod.com",REACT_APP_PRIVATE_API_URL:"https://80d9edu2v4.execute-api.us-west-1.amazonaws.com/Prod/",REACT_APP_PUBLIC_API_URL:"https://wmm2y5ynm7.execute-api.us-west-1.amazonaws.com/Prod/"})?"https://80d9edu2v4.execute-api.us-west-1.amazonaws.com/Prod/":"/",public:e&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,REACT_APP_DNS_WILDCARD_DOMAIN:"ctt.csod.com",REACT_APP_PRIVATE_API_URL:"https://80d9edu2v4.execute-api.us-west-1.amazonaws.com/Prod/",REACT_APP_PUBLIC_API_URL:"https://wmm2y5ynm7.execute-api.us-west-1.amazonaws.com/Prod/"})?"https://wmm2y5ynm7.execute-api.us-west-1.amazonaws.com/Prod/":"/",dnsWildcard:!(!e||!Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,REACT_APP_DNS_WILDCARD_DOMAIN:"ctt.csod.com",REACT_APP_PRIVATE_API_URL:"https://80d9edu2v4.execute-api.us-west-1.amazonaws.com/Prod/",REACT_APP_PUBLIC_API_URL:"https://wmm2y5ynm7.execute-api.us-west-1.amazonaws.com/Prod/"}))&&"ctt.csod.com"}}).call(this,a(86))},81:function(e,t,a){e.exports=a(96)},96:function(e,t,a){"use strict";a.r(t);var n=a(0),c=a.n(n),r=a(10),o=a.n(r),l=a(151),s=a(150),i=a(8),m=a(149),u=a(154),E=a(137),d=a(134),p=a(136),g=a(21);function h(){var e=Object(n.useState)(!!window.navigator.cookieEnabled),t=Object(i.a)(e,1)[0],a=Object(n.useState)(),r=Object(i.a)(a,2),o=r[0],l=r[1],s=Object(n.useState)(),m=Object(i.a)(s,2),E=m[0],h=m[1],b=Object(n.useState)(!1),O=Object(i.a)(b,2),P=O[0],f=O[1],j=Object(n.useState)(),S=Object(i.a)(j,2),_=S[0],v=S[1],T=Object(n.useState)(),I=Object(i.a)(T,2),D=I[0],A=I[1],w=Object(n.useState)(),C=Object(i.a)(w,2),y=C[0],R=C[1],k=Object(n.useState)(),L=Object(i.a)(k,2),U=L[0],N=L[1];return Object(n.useEffect)((function(){fetch("/egde-check.json",{method:"GET",headers:new Headers({Accept:"application/json"})}).then((function(e){v(e.headers.get("x-amz-cf-pop")||"no-edge-found")})).catch((function(e){return console.log(e)}))}),[v]),Object(n.useEffect)((function(){_&&fetch("".concat(g.a.public,"session"),{method:"PUT",headers:new Headers({Accept:"application/json"}),body:JSON.stringify({POPID:_,Cookies:t})}).then((function(e){return e.json()})).then((function(e){l(e.userAgent),h(e.Timestamp),R(e.ClientIP),A(e.HTTPVersion),N(e.SessionID),f(!0)})).catch((function(e){return console.log(e)}))}),[_,t,l,h,f,A,R,N]),Object(n.useEffect)((function(){g.a.dnsWildcard&&U&&fetch("https://".concat(U,".").concat(g.a.dnsWildcard,"/egde-check.json"),{method:"GET",headers:new Headers({Accept:"application/json"})}).then((function(e){v(e.headers.get("x-amz-cf-pop")||"no-edge-found")})).catch((function(e){return console.log(e)}))}),[U]),c.a.createElement(n.Fragment,null,P?c.a.createElement(u.a,{my:4},c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},c.a.createElement("strong",null,"Session ID:")),c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},U),c.a.createElement(d.a,{variant:"subtitle1",align:"center",component:"p",gutterBottom:!0},"Please provide this session ID to your customer support representative."),c.a.createElement("br",null),c.a.createElement(p.a,null),c.a.createElement("br",null),c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},c.a.createElement("strong",null,"Session Details:")),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"POP ID:")," ",_),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"Timestamp:")," ",E),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"User Agent:")," ",o),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"Cookies:")," ",t?"Yes":"No"),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"HTTPVersion:")," ",D),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"ClientIP:")," ",y)):c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"Loading...:")))}function b(e){var t=Object(n.useState)(!1),a=Object(i.a)(t,2),r=a[0],o=a[1];return c.a.createElement(n.Fragment,null,c.a.createElement(u.a,{align:"center",my:4},c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1",gutterBottom:!0},"Client Troubleshooting Tool"),c.a.createElement(d.a,{variant:"subtitle1",align:"center",component:"h4",gutterBottom:!0},"This tool will collect data about your browser and network including, what browser you are using, your IP address, cookies, and DNS information. If you want to share this with your technical support representative and agree to this press start."),!r&&c.a.createElement(E.a,{onClick:function(){o(!0)},variant:"contained",color:"primary"},"Start Session")),r&&c.a.createElement(n.Fragment,null,c.a.createElement(p.a,null),c.a.createElement(h,null)))}var O=a(33);function P(e){var t=e.match.params.id,a=Object(n.useState)(),r=Object(i.a)(a,2),o=r[0],l=r[1],s=Object(n.useState)(),m=Object(i.a)(s,2),h=m[0],b=m[1],P=Object(n.useState)(),f=Object(i.a)(P,2),j=f[0],S=f[1],_=Object(n.useState)(),v=Object(i.a)(_,2),T=v[0],I=v[1],D=Object(n.useState)(),A=Object(i.a)(D,2),w=A[0],C=A[1],y=Object(n.useState)(),R=Object(i.a)(y,2),k=R[0],L=R[1],U=Object(n.useState)(),N=Object(i.a)(U,2),W=N[0],x=N[1],H=Object(n.useState)(),B=Object(i.a)(H,2),z=B[0],K=B[1],V=Object(n.useState)(),F=Object(i.a)(V,2),G=F[0],J=F[1],M=Object(n.useState)(!1),Y=Object(i.a)(M,2),q=Y[0],$=Y[1];return Object(n.useEffect)((function(){fetch("".concat(g.a.private,"session/").concat(t),{method:"GET",headers:new Headers({Accept:"application/json"})}).then((function(e){return e.json()})).then((function(e){return e[0]})).then((function(e){e?(b(e.UserAgent),S(e.Timestamp),x(e.ClientIP),L(e.HTTPVersion),J(e.SessionID),l(e.Cookies),K(e.DnsResolver),C(e.POPID),I(!0)):$(!0)})).catch((function(e){return console.log(e)}))}),[t,l,C,b,S,I,L,x,J,K]),c.a.createElement(n.Fragment,null,c.a.createElement(E.a,{color:"primary",component:O.b,to:"/admin"},"Back to Session List"),T?c.a.createElement(u.a,{my:4},c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},c.a.createElement("strong",null,"Session ID:")),c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},G),c.a.createElement(d.a,{variant:"subtitle1",align:"center",component:"p",gutterBottom:!0}),c.a.createElement("br",null),c.a.createElement(p.a,null),c.a.createElement("br",null),c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},c.a.createElement("strong",null,"Session Details:")),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"POP ID:")," ",w),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"Timestamp:")," ",j),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"User Agent:")," ",h),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"Cookies:")," ",o?"Yes":"No"),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"HTTPVersion:")," ",k),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"ClientIP:")," ",W),c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,"DNS Resolver IP:")," ",z)):c.a.createElement(d.a,{align:"center"},c.a.createElement("strong",null,q?"Session ID Not Found":"Loading...")))}var f=a(61),j=a(12),S=a(143),_=a(147),v=a(146),T=a(142),I=a(155),D=a(144),A=a(145),w=a(156),C=a(138),y=a(141),R=a(148);function k(){var e=Object(n.useState)([]),t=Object(i.a)(e,2),a=t[0],r=t[1],o=Object(n.useState)(5),l=Object(i.a)(o,2),s=l[0],m=l[1],h=Object(n.useState)(""),b=Object(i.a)(h,2),O=b[0],P=b[1],k=c.a.useState(0),L=Object(i.a)(k,2),U=L[0],N=L[1],W=Object(n.useState)(!0),x=Object(i.a)(W,2),H=x[0],B=x[1],z=Object(n.useState)(!1),K=Object(i.a)(z,2),V=K[0],F=K[1],G=Object(n.useState)("Enter a session ID and hit find to find a specific session."),J=Object(i.a)(G,2),M=J[0],Y=J[1],q=Object(j.f)();Object(n.useEffect)((function(){fetch("".concat(g.a.private,"session/"),{method:"GET",headers:new Headers({Accept:"application/json"})}).then((function(e){return e.json()})).then((function(e){return e.Items.sort((function(e,t){return e.Timestamp>t.Timestamp?-1:t.Timestamp>e.Timestamp?1:0}))})).then((function(e){r(e),B(!1)})).catch((function(e){return console.log(e)}))}),[r,B]);var $=function(e){q.push("/admin/".concat(e))},Q=function(){O&&30===O.length?$(O):(Y("Please enter a valid Session ID"),F(!0))};return c.a.createElement("div",null,c.a.createElement(d.a,{variant:"h2",align:"center",component:"h1"},c.a.createElement("strong",null,"Sessions")),c.a.createElement("br",null),c.a.createElement(p.a,null),c.a.createElement("br",null),c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},c.a.createElement("strong",null,"Find By ID")),c.a.createElement(u.a,{align:"center"},c.a.createElement(C.a,null,c.a.createElement(w.a,{error:V,onKeyDown:function(e){13===e.keyCode&&Q()},id:"standard-required",label:"Session ID",helperText:M,onChange:function(e){P(e.target.value)},value:O}),c.a.createElement(E.a,{onClick:Q,variant:"contained",color:"primary"},"Find Session"))),c.a.createElement("br",null),c.a.createElement(p.a,null),c.a.createElement("br",null),c.a.createElement(d.a,{variant:"h4",align:"center",component:"h1"},c.a.createElement("strong",null,"Session List")),c.a.createElement(T.a,{component:y.a},c.a.createElement(S.a,{"aria-label":"simple table"},c.a.createElement(D.a,null,c.a.createElement(A.a,null,c.a.createElement(v.a,null,"Session ID"),c.a.createElement(v.a,null,"Timestamp"),c.a.createElement(v.a,null,"Client IP"),c.a.createElement(v.a,null,"POP ID"))),c.a.createElement(_.a,null,H?c.a.createElement(n.Fragment,null,Object(f.a)(Array(4)).map((function(e,t){return c.a.createElement(A.a,{key:"row-".concat(t)},Object(f.a)(Array(4)).map((function(e,t){return c.a.createElement(v.a,{key:"cell-".concat(t)},c.a.createElement(R.a,null))})))}))):c.a.createElement(n.Fragment,null,a.slice(U*s,U*s+s).map((function(e){return c.a.createElement(A.a,{hover:!0,onClick:function(){$(e.SessionID)},key:e.SessionID},c.a.createElement(v.a,{component:"th",scope:"row"},e.SessionID),c.a.createElement(v.a,null,e.Timestamp),c.a.createElement(v.a,null,e.ClientIP),c.a.createElement(v.a,null,e.POPID))})))))),c.a.createElement(I.a,{rowsPerPageOptions:[5,10,25],component:"div",count:a.length,rowsPerPage:s,page:U,onChangePage:function(e,t){N(t)},onChangeRowsPerPage:function(e){m(parseInt(e.target.value,10)),N(0)}}))}function L(){var e=Object(n.useState)(!1),t=Object(i.a)(e,2),a=t[0],r=t[1];return Object(n.useEffect)((function(){fetch("".concat(g.a.private,"session/ping")).then((function(e){return e.json()})).then((function(e){"pong"===e.status&&r(!0)}))}),[r]),c.a.createElement(O.a,null,c.a.createElement(m.a,{maxWidth:"md"},c.a.createElement(j.c,null,c.a.createElement(j.a,{exact:!0,path:"/"},c.a.createElement(u.a,{align:"right"},a&&c.a.createElement(E.a,{color:"primary",component:O.b,to:"/admin"},"Admin Dashboard")),c.a.createElement(b,null)),c.a.createElement(j.a,{exact:!0,path:"/admin",component:k}),c.a.createElement(j.a,{exact:!0,path:"/admin/:id",component:P}))))}var U=a(54),N=a(67),W=Object(N.a)({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:U.a.A400},background:{default:"#fff"}}});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));o.a.render(c.a.createElement(s.a,{theme:W},c.a.createElement(l.a,null),c.a.createElement(L,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[81,1,2]]]); //# sourceMappingURL=main.61f8ddf8.chunk.js.map