1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2056],{7844:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/monitor-cdn",function(){return s(66520)}])},66520:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var r=s(37876),n=s(14232),l=s(4545),a=s(87319),i=s(12667),c=s(18847),o=s.n(c),d=s(99198),x=s(31777);let m="https://origin-hcm.fptplay53.net",h="https://origin-hn.fptplay53.net",p=o()(()=>s.e(9078).then(s.bind(s,59078)),{loadableGenerated:{webpack:()=>[59078]},ssr:!1}),u=e=>{let t=e.trim();if(!t)return"";let s=t.toLowerCase().startsWith("https://"),r=t.replace(/^https?:\/\//i,"").split("/")[0];return r?(s?"https://":"http://")+r:""},g=(e,t)=>{let s=e;if(s.startsWith("/wmt:")||s.startsWith("/wmt%3A")){let e=s.indexOf("/",1);s=e>=0?s.slice(e):"/"}return s+(t?t.startsWith("?")?t:"?"+t:"")},f=e=>t=>{if(!e||!t)return t;let s=(e=>{let t=e.trim().replace(/\/+$/,""),s=t.match(/^(https?):\/\/([^/]+)/i);if(!s)return t;let r=s[1],n=s[2],l=/:\d+$/.test(n)?n:n+("https"===r.toLowerCase()?":443":":80");return"".concat(r,"://").concat(l)})(e);try{let e=new URL(t),r=g(e.pathname,e.search);return s+r+e.hash}catch(e){try{let e=t.match(/(https?:\/\/)([^/]+)(\/[^#]*)?(#.*)?/);if(e){let t=e[3]||"/",r=e[4]||"",[n,l]=t.split("?"),a=g(n||"/",l?"?"+l:"");return s+a+r}}catch(e){}return t}},j=e=>e?e.replace(/^https?:\/\//i,"").split("/")[0]:"",b=()=>{let e=(0,x.wA)(),[t,s]=(0,n.useState)(m),[c,o]=(0,n.useState)(null),[g,b]=(0,n.useState)(h),[y,N]=(0,n.useState)(null),{eventsRender:v,deviceOptions:w,loading:k,refreshKeyEvent:C}=(0,i.O5)({platformQuery:"web"}),L=(0,n.useMemo)(()=>(null==w?void 0:w.find(e=>"web"===e.val))||(null==w?void 0:w[0]),[w]),[M,D]=(0,n.useState)(!1),[_,S]=(0,n.useState)(!1),P=(0,n.useRef)(!1);(0,n.useEffect)(()=>{D(!0),S(!!localStorage.getItem("token"))},[]),(0,n.useEffect)(()=>{if(!k&&v.length>0&&!P.current){let e=u(m);e&&o(e);let t=u(h);t&&N(t),P.current=!0}},[k,v.length]);let E=(0,n.useCallback)(()=>{e((0,d.ny)())},[e]),X=(0,n.useCallback)(async()=>{try{localStorage.removeItem("token"),S(!1),window.location.reload()}catch(e){}},[]),O=(0,n.useCallback)(()=>{o(u(t)||null)},[t]),W=(0,n.useCallback)(e=>{"Enter"===e.key&&O()},[O]),H=(0,n.useCallback)(()=>{N(u(g)||null)},[g]),I=(0,n.useCallback)(e=>{"Enter"===e.key&&H()},[H]),B=(0,n.useMemo)(()=>({cdnHostname:c,replaceUrl:f(c)}),[c]),U=(0,n.useMemo)(()=>({cdnHostname:y,replaceUrl:f(y)}),[y]);return(0,r.jsx)(l.r,{children:(0,r.jsx)("div",{className:"min-h-screen text-white",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 py-6",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold text-white-smoke",children:"Monitor CDN"}),M&&(0,r.jsx)(r.Fragment,{children:_?(0,r.jsx)("button",{onClick:X,className:"cursor-pointer px-6 py-2 bg-linear-to-r from-portland-orange to-lust rounded-lg font-medium text-sm hover:brightness-110 transition-all duration-200 transform",children:"ÄÄng xuất"}):(0,r.jsx)("button",{onClick:E,className:"cursor-pointer px-6 py-2 bg-linear-to-r from-portland-orange to-lust rounded-lg font-medium text-sm hover:brightness-110 transition-all duration-200 transform",children:"ÄÄng nháºp"})})]}),k&&(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-primary-gray",children:"Äang tải sá»± kiá»n..."}),!k&&0===v.length&&(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-primary-gray",children:"Kh\xf4ng c\xf3 sá»± kiá»n n\xe0o"}),!k&&v.length>0&&(0,r.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"p-4 bg-eerie-black rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,r.jsx)("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-linear-to-r from-portland-orange to-lust text-white font-bold text-sm",children:"1"}),(0,r.jsx)("label",{className:"text-sm font-medium text-primary-text",children:"IP Origin - HCM"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{type:"text",value:t,onChange:e=>s(e.target.value),onKeyPress:W,placeholder:"Nháºp IP Origin",className:"flex-1 bg-c
1harleston-green text-white rounded px-4 py-2 text-sm border border-gray-600 focus:outline-none focus:border-fpl focus:ring-1 focus:ring-fpl"}),(0,r.jsx)("button",{onClick:O,className:"cursor-pointer px-6 py-2 bg-linear-to-r from-portland-orange to-lust rounded-lg font-medium text-sm hover:brightness-110 transition-all duration-200 transform whitespace-nowrap",children:"\xc1p dụng"})]}),c?(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-primary-gray",children:"Äang \xe1p dụng CDN:"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs",children:[(0,r.jsx)("strong",{className:"text-fpl",children:j(c)}),(0,r.jsx)("button",{onClick:()=>{o(null),s("")},className:"ml-1 text-primary-gray hover:text-white transition-colors",title:"X\xf3a CDN v\xe0 chuyá»n vá» luá»ng gá»c",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}):(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-primary-gray",children:"Äang ph\xe1t:"}),(0,r.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs text-primary-gray",children:(0,r.jsx)("strong",{children:"Luá»ng gá»c"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("span",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-linear-to-r from-portland-orange to-lust text-white font-bold text-xs",children:"1"}),(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Äầu HCM"}),c?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs text-primary-gray",children:["CDN: ",j(c),(0,r.jsx)("button",{onClick:()=>{o(null),s("")},className:"ml-1 hover:text-white transition-colors",title:"X\xf3a CDN v\xe0 chuyá»n vá» luá»ng gá»c",children:(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):(0,r.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs text-primary-gray",children:"Luá»ng gá»c"}),(0,r.jsxs)("span",{className:"text-sm text-primary-gray",children:["⢠",v.length," sá»± kiá»n"]})]}),(0,r.jsx)(a.X.Provider,{value:B,children:(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:v.map((e,t)=>(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(p,{eventData:e,deviceMonitor:(null==L?void 0:L.val)||"web",index:t,initDelay:0}),(0,r.jsx)("div",{className:"absolute top-2 right-2 z-20 flex items-center justify-center w-7 h-7 rounded-full text-white text-xs font-bold backdrop-blur-md",style:{border:"1.5px solid rgba(255, 255, 255, 0.3)",boxShadow:"0 8px 32px 0 rgba(59, 130, 246, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.3)"},children:t+1})]})},"hcm-".concat(C,"-").concat(e.id,"-").concat(t)))})})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"p-4 bg-eerie-black rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,r.jsx)("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-linear-to-r from-portland-orange to-lust text-white font-bold text-sm",children:"2"}),(0,r.jsx)("label",{className:"text-sm font-medium text-primary-text",children:"IP Origin - HN"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{type:"text",value:g,onChange:e=>b(e.target.value),onKeyPress:I,placeholder:"Nháºp IP Origin",className:"flex-1 bg-charleston-green text-white rounded px-4 py-2 text-sm border border-gray-600 focus:outline-none focus:border-fpl focus:ring-1 focus:ring-fpl"}),(0,r.jsx)("button",{onClick:H,className:"cursor-pointer px-6 py-2 bg-linear-to-r from-portland-orange to-lust roun
1ded-lg font-medium text-sm hover:brightness-110 transition-all duration-200 transform whitespace-nowrap",children:"\xc1p dụng"})]}),y?(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-primary-gray",children:"Äang \xe1p dụng CDN:"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs",children:[(0,r.jsx)("strong",{className:"text-fpl",children:j(y)}),(0,r.jsx)("button",{onClick:()=>{N(null),b("")},className:"ml-1 text-primary-gray hover:text-white transition-colors",title:"X\xf3a CDN v\xe0 chuyá»n vá» luá»ng gá»c từ getStream",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}):(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-primary-gray",children:"Äang ph\xe1t:"}),(0,r.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs text-primary-gray",children:(0,r.jsx)("strong",{children:"Luá»ng gá»c"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("span",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-linear-to-r from-portland-orange to-lust text-white font-bold text-xs",children:"2"}),(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Äầu HN"}),y?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs text-primary-gray",children:["CDN: ",j(y),(0,r.jsx)("button",{onClick:()=>{N(null),b("")},className:"ml-1 hover:text-white transition-colors",title:"X\xf3a CDN v\xe0 chuyá»n vá» luá»ng gá»c",children:(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):(0,r.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-charleston-green rounded text-xs text-primary-gray",children:"Luá»ng gá»c"}),(0,r.jsxs)("span",{className:"text-sm text-primary-gray",children:["⢠",v.length," sá»± kiá»n"]})]}),(0,r.jsx)(a.X.Provider,{value:U,children:(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:v.map((e,t)=>(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(p,{eventData:e,deviceMonitor:(null==L?void 0:L.val)||"web",index:t,initDelay:800*v.length}),(0,r.jsx)("div",{className:"absolute top-2 right-2 z-20 flex items-center justify-center w-7 h-7 rounded-full text-white text-xs font-bold backdrop-blur-md",style:{border:"1.5px solid rgba(255, 255, 255, 0.3)",boxShadow:"0 8px 32px 0 rgba(59, 130, 246, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.3)"},children:t+1})]})},"hn-".concat(C,"-").concat(e.id,"-").concat(t)))})})]})]})]})]})})})}},87319:(e,t,s)=>{"use strict";s.d(t,{F:()=>l,X:()=>n});var r=s(14232);let n=r.createContext({cdnHostname:null,replaceUrl:e=>e}),l=()=>r.useContext(n)}},e=>{e.O(0,[2667,636,6593,8792],()=>e(e.s=7844)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.