(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{8954:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return t(1142)}])},5521:function(n,e,t){"use strict";t.d(e,{Z:function(){return L}});var r=t(5893),i=t(1113),o=t(1496),c=t(2293),a=t(7357),l=t(2992),s=t(4799),u=t(7294),f=t(7169),d=t(4433),p=t(9029),h=t(7533),g=t(8462),m=t(7212),v=t(8619),x=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],j={width:"40em",height:"40em"},w=t(4390),b=t(582),y=t(4690),Z=t(1770),S=t(7750),k=t(1081);function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(e).concat(n)]}),[t]),o=(0,u.useCallback)((function(){return i("user")}),[i]);return(0,u.useEffect)((function(){if(n){var e=document.cookie.split(/\s*;\s*/);r(e.reduce((function(n,e){var t,r=C(e.split("=",2),2),i=r[0],o=r[1],c=decodeURIComponent(o);if(c.startsWith("j:"))try{t=JSON.parse(c.substring(2))}catch(a){t=o}else t=o;return n[i]=t,n}),{}))}}),[n]),{cookieJar:t,getCookie:i,getSessionUser:o}};function P(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function N(n){for(var e=1;e0)},ref:e})]})}},1081:function(n,e,t){"use strict";var r=t(7294);e.Z=function(){var n=(0,r.useRef)(!0);return n.current?(n.current=!1,!0):n.current}},8336:function(n,e){"use strict";e.Z=function(n,e){return fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}},1142:function(n,e,t){"use strict";t.r(e);var r=t(5893),i=t(7294),o=t(1163),c=t(9008),a=t(7357),l=t(1496),s=t(7906),u=t(5521);function f(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var d="Server",p={preview:"".concat(d,"-preview"),fullView:"".concat(d,"-fullView")},h=(0,l.ZP)("div")((function(n){var e,t=n.theme;return f(e={},"& .".concat(p.preview),f({width:"25%",height:"100%"},t.breakpoints.down("md"),{width:"100%"})),f(e,"& .".concat(p.fullView),{display:"flex",flexDirection:"row",width:"100%",justifyContent:"center"}),e}));e.default=function(){var n=(0,i.useState)(!0),e=n[0],t=n[1],l=(0,o.useRouter)().query,f=l.server_name,d=l.uuid,g=l.vnc,m=((null===g||void 0===g?void 0:g.toString())||"").length>0,v=(null===d||void 0===d?void 0:d.toString())||"",x=(null===f||void 0===f?void 0:f.toString())||"";return(0,i.useEffect)((function(){m&&t(!1)}),[m]),(0,r.jsxs)(h,{children:[(0,r.jsx)(c.default,{children:(0,r.jsx)("title",{children:x})}),(0,r.jsx)(u.Z,{}),e?(0,r.jsx)(a.Z,{className:p.preview,children:(0,r.jsx)(s.M,{onClickPreview:function(){t(!1)},serverName:x,serverUUID:v})}):(0,r.jsx)(a.Z,{className:p.fullView,children:(0,r.jsx)(s.S,{onClickCloseButton:function(){t(!0)},serverUUID:v,serverName:x})})]})}}},function(n){n.O(0,[382,894,227,746,906,774,888,179],(function(){return e=8954,n(n.s=e);var e}));var e=n.O();_N_E=e}]);