PageSourceSearch

https://j2proxy.vn/_next/static/chunks/23981.5fd74121744358ea.js

js j2proxy.vn collected 2026-10-02 02:17:01 UTC 100,821 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[23981],{3998:(e,t,n)=>{n.d(t,{$:()=>i,r:()=>o});var l=n(95155);n(12115);var a=n(32467),r=n(83101),s=n(64269);let o=(0,r.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-primary focus-visible:ring-primary/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:n,size:r,asChild:i=!1,...d}=e,c=i?a.DX:"button";return(0,l.jsx)(c,{"data-slot":"button",className:(0,s.cn)(o({variant:n,size:r,className:t})),...d})}},6097:(e,t,n)=>{function l(e){let{column:t,withBorder:n=!1}=e,l=t.getIsPinned(),a="left"===l&&t.getIsLastColumn("left"),r="right"===l&&t.getIsFirstColumn("right");return{boxShadow:n?a?"-4px 0 4px -4px hsl(var(--border)) inset":r?"4px 0 4px -4px hsl(var(--border)) inset":void 0:void 0,left:"left"===l?"".concat(t.getStart("left"),"px"):void 0,right:"right"===l?"".concat(t.getAfter("right"),"px"):void 0,opacity:l?.97:1,position:l?"sticky":"relative",background:"hsl(var(--background))",width:t.getSize(),maxWidth:t.columnDef.maxSize,minWidth:t.columnDef.minSize,zIndex:+!!l}}n.d(t,{Z0:()=>l}),n(278)},10383:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])},11821:(e,t,n)=>{n.d(t,{Lv:()=>a,f3:()=>r,mz:()=>l});let l=e=>(e=>Array.isArray(e)?e:e&&"object"==typeof e?[e]:[])(e).flatMap(e=>{var t;return Array.isArray(null==e||null==(t=e.data)?void 0:t.results)?e.data.results:Array.isArray(null==e?void 0:e.results)?e.results:Array.isArray(null==e?void 0:e.data)?e.data:[]}),a=e=>{let t=[],n=[],l=[];return e.forEach(e=>{var a,r;let s=null!=(a=null==e?void 0:e.username)?a:"unknown",o=null==e?void 0:e.status,i=null!=(r=null==e?void 0:e.time_remaining)?r:null==e?void 0:e.timeRemaining;switch(o){case"success":t.push("".concat(s,": Xoay proxy th\xe0nh c\xf4ng"));break;case"too_soon":n.push("".concat(s,": Chưa tới thời gian xoay").concat("number"==typeof i?" (".concat(i,"s)"):""));break;case"not_found":l.push("".concat(s,": Kh\xf4ng t\xecm thấy proxy"));break;case"failed":l.push("".concat(s,": ").concat((null==e?void 0:e.error)||"Xoay proxy thất bại"));break;default:(null==e?void 0:e.error)?l.push("".concat(s,": ").concat(e.error)):(null==e?void 0:e.message)&&o&&"success"!==o&&l.push("".concat(s,": ").concat(e.message))}}),{successMessages:t,tooSoonMessages:n,errorMessages:l}},r=e=>{var t;let n=null==e?void 0:e.status,l=null==e?void 0:e.message,a=null!=(t=null==e?void 0:e.timeRemaining)?t:null==e?void 0:e.time_remaining,r=null==e?void 0:e.proxy;return"success"===n&&r?{type:"success",title:l||"Xoay proxy th\xe0nh c\xf4ng",description:r}:"too_soon"===n||"number"==typeof a&&a>0?{type:"too_soon",title:"Chưa tới thời gian xoay proxy",description:l||"Vui l\xf2ng chờ th\xeam ".concat("number"==typeof a?a:0,"s để xoay tiếp.")}:{type:"error",title:"Xoay proxy thất bại",description:l||"Lỗi kh\xf4ng x\xe1c định"}}},14734:(e,t,n)=>{n.d(t,{F:()=>r});var l=n(12115),a=n(32140);function r(e){let{notifications:t,isConnected:n,clearNotifications:r,initSocket:s,disconnectSocket:o,emit:i}=(0,a.U)();(0,l.useEffect)(()=>{e&&s(e)},[e,s]);let d=(0,l.useCallback)((e,t,n)=>{i(e,t,n)},[i]);return{socket:null,notifications:t,isConnected:n,emit:d,disconnect:(0,l.useCallback)(()=>{o()},[o]),clearNotifications:(0,l.useCallback)(()=>r(),[r])}}}
1,15239:(e,t,n)=>{n.d(t,{default:()=>a.a});var l=n(54652),a=n.n(l)},17262:(e,t,n)=>{n.d(t,{EU:()=>i,Eh:()=>x,N4:()=>c,fI:()=>d});var l=n(95155),a=n(12115),r=n(67907),s=n(41968);let o=(0,a.createContext)(null),i=e=>{let{children:t}=e,n=(0,s.O)();return(0,l.jsx)(o.Provider,{value:n,children:t})},d=()=>{let e=(0,a.useContext)(o);if(!e)throw Error("useShiftSelectContext must be used within ShiftSelectProvider");return e},c=e=>{let{row:t,table:n}=e,{handleClick:a}=d();return(0,l.jsx)("div",{className:"checkbox-container","data-checkbox":!0,onClick:a(t,n),children:(0,l.jsx)(r._,{disabled:!t.getCanSelect(),checked:t.getIsSelected()})})},x=e=>{let{table:t}=e,{resetAnchor:n}=d();return(0,l.jsx)(r._,{checked:t.getIsAllRowsSelected(),onCheckedChange:e=>{t.getToggleAllRowsSelectedHandler()({target:{checked:e}}),n()}})}},18332:(e,t,n)=>{n.d(t,{Fc:()=>o,TN:()=>d,XL:()=>i});var l=n(95155);n(12115);var a=n(83101),r=n(64269);let s=(0,a.F)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:n,...a}=e;return(0,l.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,r.cn)(s({variant:n}),t),...a})}function i(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"alert-title",className:(0,r.cn)("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...n})}function d(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"alert-description",className:(0,r.cn)("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...n})}},20243:(e,t,n)=>{n.d(t,{E:()=>r});var l=n(95155),a=n(64269);function r(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"skeleton",className:(0,a.cn)("bg-accent animate-pulse rounded-md",t),...n})}},23117:(e,t,n)=>{n.d(t,{p:()=>o});var l=n(95155);n(12115);var a=n(64269),r=n(12108),s=n(24033);function o(e){let{className:t,type:n,useCustomStepper:o=!1,disabled:i=!1,...d}=e,c="number"===n;return c&&o?(0,l.jsxs)("div",{className:"group relative",children:[(0,l.jsx)("input",{type:n,"data-slot":"input",disabled:i,className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 text-normal flex h-10 w-full min-w-0 bg-transparent shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","placeholder:text-icon placeholder:text-sm placeholder:font-normal","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","border-border-input gap-2 rounded-lg border px-3 py-2.5 shadow-none","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",c&&"w-full",t),...d}),c&&!1===i&&(0,l.jsxs)("div",{className:(0,a.cn)("pointer-events-none absolute top-1/2 right-1.5 flex -translate-y-1/2 flex-col items-center justify-center opacity-0 transition-opacity duration-150","group-hover:pointer-events-auto group-hover:opacity-100"),children:[(0,l.jsx)("button",{type:"button",className:"hover:text-icon/110 text-icon h-4 w-4 translate-y-1 transition-colors",onClick:e=>{var t;let n=null==(t=e.currentTarget.parentElement)?void 0:t.previousElementSibling;n.stepUp(),n.dispatchEvent(new Event("change",{bubbles:!0}))},children:(0,l.jsx)(r.A,{className:"h-4 w-4",strokeWidth:3})}),(0,l.jsx)("button",{type:"button",className:"hover:text-icon/110 text-icon h-4 w-4 -translate-y-1 transition-colors",onClick:e=>{var t;let n=null==(t=e.currentTarget.parentElement)?void 0:t.previousElementSibling;n.stepDown(),n.dispatchEvent(new Event("change",{bubbles:!0}))},children:(0,l.jsx)(s.A,{className:"h-4 w-4",strokeWidth:3})})]})]}):(0,l.jsx)("input",{type:n,"data-slot":"input",disabled:i,className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 text-normal flex h-10 w-full min-w-0 bg-transparent shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed md:text-sm","placeholder:text-icon placeholder:text-sm placeholder:font-normal","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","border-border-input gap-2 rounded-lg border px-3 py-2.5 shadow-none","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","truncate overflow-hidden text-ellipsis whitespace-nowrap",t),...d})}}
1,26333:(e,t,n)=>{n.d(t,{AM:()=>s,Wv:()=>o,dT:()=>d,hl:()=>i});var l=n(95155);n(12115);var a=n(82286),r=n(64269);function s(e){let{...t}=e;return(0,l.jsx)(a.bL,{"data-slot":"popover",...t})}function o(e){let{...t}=e;return(0,l.jsx)(a.l9,{"data-slot":"popover-trigger",...t})}function i(e){let{className:t,align:n="center",sideOffset:s=4,...o}=e;return(0,l.jsx)(a.ZL,{children:(0,l.jsx)(a.UC,{"data-slot":"popover-content",align:n,sideOffset:s,className:(0,r.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...o})})}function d(e){let{...t}=e;return(0,l.jsx)(a.Mz,{"data-slot":"popover-anchor",...t})}},32140:(e,t,n)=>{n.d(t,{U:()=>r});var l=n(25959),a=n(9829);let r=(0,l.v)()((e,t)=>({notifications:[],socket:null,isConnected:!1,currentToken:null,addNotification:t=>e(e=>({notifications:[...e.notifications,t]})),clearNotifications:()=>e({notifications:[]}),initSocket:n=>{let l=t();if(l.socket&&l.currentToken===n)return;l.socket&&l.socket.disconnect();let r=(0,a.io)("https://api.homeproxy.vn",{transports:["websocket"],auth:{token:n}});r.on("connect",()=>{e({isConnected:!0}),r.emit("register")}),r.on("connect_error",()=>{e({isConnected:!1})}),r.on("disconnect",()=>{e({isConnected:!1})}),r.on("transactionUpdate",e=>{t().addNotification(e)}),r.on("userproxyUpdate",e=>{t().addNotification(e)}),e({socket:r,currentToken:n})},disconnectSocket:()=>{let{socket:n}=t();n&&(n.disconnect(),e({socket:null,isConnected:!1,currentToken:null}))},emit:(e,n,l)=>{let{socket:a,isConnected:r}=t();a&&r&&a.emit(e,n,l)}}))},34857:(e,t,n)=>{n.d(t,{M:()=>c});var l=n(95155),a=n(61362),r=n(52056),s=n(12115),o=n(18720),i=n(52095),d=n(39180);function c(){let[e,t]=(0,s.useState)(""),[n,c]=(0,s.useState)(!1),[x,p]=(0,s.use
1State)(!1),[u,h]=(0,s.useState)([]),{config:m}=(0,d.r)(),f=null==m?void 0:m.hostName,g=async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.trim().split("\n").map(e=>e.trim()).filter(e=>e);if(0===n.length)return void o.toast.error("Vui l\xf2ng nhập \xedt nhất một key");t?c(!0):p(!0),h([]);let s=await Promise.all(n.map(async e=>{try{let n=(0,i.z)({hostName:f,token:e,checkOnly:t}),l=await fetch(n),a=await l.json();if(("success"===a.status||t)&&a.proxy)return{key:e,proxy:a.proxy,timeRemaining:a.timeRemaining,location:a.location,provider:a.provider,lastRotate:a.lastRotate};return{key:e,proxy:null,error:a.message||"Kh\xf4ng lấy được proxy"}}catch(t){return{key:e,proxy:null,error:"Lỗi kết nối API"}}}));h(s),t?c(!1):p(!1);let d=s.filter(e=>e.proxy).length,x=s.filter(e=>!e.proxy).length;if(d>0){let e=t?"Xem th\xe0nh c\xf4ng ".concat(d,"/").concat(s.length," proxy"):"Xoay & lấy th\xe0nh c\xf4ng ".concat(d,"/").concat(s.length," proxy");o.toast.success(e,{icon:(0,l.jsx)(a.A,{className:"h-4 w-4 text-green-600"})})}x>0&&o.toast.error("".concat(x,"/").concat(s.length," proxy thất bại"),{icon:(0,l.jsx)(r.A,{className:"h-4 w-4 text-red-500"})})};return{input:e,setInput:t,loadingCheck:n,loadingRotate:x,results:u,handleFetch:g,handleCopyResults:()=>{let e=u.filter(e=>e.proxy).map(e=>e.proxy).join("\n");e&&(navigator.clipboard.writeText(e),o.toast.success("Đ\xe3 copy danh s\xe1ch proxy!"))}}}},35299:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},39867:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},40789:(e,t,n)=>{n.d(t,{P:()=>d});var l=n(13744);function a(e){var t,n,l,a,r,s;return null!=(s=null!=(r=null!=(a=null==e||null==(t=e.ipaddress)?void 0:t.provider)?a:null==e||null==(l=e.proxy)||null==(n=l.ipaddress)?void 0:n.provider)?r:null==e?void 0:e.provider)?s:""}var r=n(96199),s=n(20063),o=n(12115),i=n(85400);function d(e,t){var n,d;let{data:c,status:x}=(0,r.wV)(),p=(0,s.usePathname)(),{data:u,mutate:h,isLoading:m,isValidating:f}=(0,i.Ay)("authenticated"===x?["/api/v1/users/proxies",e,p]:null,e=>{let[t,n]=e;return l.A.fetchApi(t+n,null==c?void 0:c.accessToken).then(e=>null!=e?e:{}).catch(()=>({}))},{suspense:null!=(n=null==t?void 0:t.suspense)&&n,revalidateOnFocus:!1,keepPreviousData:!0});return{userProxies:(0,o.useMemo)(()=>{var e,t;return t=null!=(e=null==u?void 0:u.data)?e:[],"/proxies-datacenter"===p||"/proxies-datacenter-vn"===p?t.filter(e=>{var t;let n=null==(t=a(e))?void 0:t.trim().toUpperCase();return"US"===n||"USA"===n||"CMC"===n||"USOLD"===n}):t.filter(e=>{var t;let n=null==(t=a(e))?void 0:t.trim().toUpperCase();return!function(e){let t=null==e?void 0:e.trim().toUpperCase();return"US"===t||"USA"===t||"USOLD"===t}(n)&&"CMC"!==n})},[null==u?void 0:u.data,p]),total:null!=(d=null==u?void 0:u.total)?d:0,isLoading:null!=m&&m,isValidating:null!=f&&f,mutate:h,status:x}}},41052:(e,t,n)=>{n.d(t,{C5:()=>b,MJ:()=>f,Rr:()=>g,eI:()=>h,lR:()=>m,lV:()=>d,zB:()=>x});var l=n(95155),a=n(12115),r=n(32467),s=n(22544),o=n(64269),i=n(76444);let d=s.Op,c=a.createContext({}),x=e=>{let{...t}=e;return(0,l.jsx)(c.Provider,{value:{name:t.name},children:(0,l.jsx)(s.xI,{...t})})},p=()=>{let e=a.useContext(c),t=a.useContext(u),{getFieldState:n}=(0,s.xW)(),l=(0,s.lN)({name:e.name}),r=n(e.name,l);if(!e)throw Error("useFormField should be used within <FormField>");let{id:o}=t;return{id:o,name:e.name,formItemId:"".concat(o,"-form-item"),formDescriptionId:"".concat(o,"-form-item-description"),formMessageId:"".concat(o,"-form-item-message"),...r}},u=a.createContext({});function h(e){let{className:t,...n}=e,r=a.useId();return(0,l.jsx)(u.Provider,{value:{id:r},children:(0,l.jsx)("div",{"data-slot":"form-item",className:(0,o.cn)("grid gap-2",t),...n})})}function m(e){let{className:t,...n}=e,{error:a,formItemId:r}=p();return(0,l.jsx)(i.J,{"data-slot":"form-label","data-error":!!a,className:(0,o.cn)("data-[error=true]:text-destructive",t),htmlFor:r,...n})}function f(e){let{...t}=e,{error:n,formItemId:a,formDescriptionId:s,formMessageId:o}=p();return(0,l.jsx)(r.DX,{"data-slot":"form-control",id:a,"aria-describedby":n?"".concat(s," ").concat(o):"".concat(s),"aria-invalid":!!n,...t})}function g(e){let{className:t,...n}=e,{formDescriptionId:a}=p();return(0,l.jsx)("p",{"data-slot":"form-description",id:a,className:(0,o.cn)("text-muted-foreground text-sm",t),...n})}function b(e){var t;let{className:n,...a}=e,{error:r,formMessageId:s}=p(),i=r?String(null!=(t=null==r?void 0:r.message)?t:""):a.children;return i?(0,l.jsx)("p",{"data-slot":"form-message",id:s,className:(0,o.cn)("text-destructive text-sm",n),...a,children:i}):null}},41968:(e,t,n)=>{n.d(t,{O:()=>a});var l=n(12115);function a(){let e=(0,l.useRef)(null);return{anchorIdRef:e,handleClick:(t,n)=>l=>{if(l.stopPropagation(),l.shiftKey&&null!==e.current){let{rows:l,rowsById:a}=n.getRowModel(),r=a[e.current];
1if(r){let e=r.index,n=Math.min(e,t.index),a=Math.max(e,t.index);for(let e=0;e<l.length;e++){let t=e>=n&&e<=a;l[e].toggleSelected(t)}}else e.current=t.id,t.toggleSelected(!t.getIsSelected())}else t.toggleSelected(!t.getIsSelected()),e.current=t.id},resetAnchor:()=>{e.current=null}}}},42348:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},51834:(e,t,n)=>{n.d(t,{Cf:()=>p,Es:()=>h,HM:()=>c,L3:()=>m,LC:()=>x,ZJ:()=>d,c7:()=>u,lG:()=>o,rr:()=>f,zM:()=>i});var l=n(95155);n(12115);var a=n(89511),r=n(65229),s=n(64269);function o(e){let{...t}=e;return(0,l.jsx)(a.bL,{"data-slot":"dialog",...t})}function i(e){let{...t}=e;return(0,l.jsx)(a.l9,{"data-slot":"dialog-trigger",...t})}function d(e){let{...t}=e;return(0,l.jsx)(a.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{...t}=e;return(0,l.jsx)(a.bm,{"data-slot":"dialog-close",...t})}function x(e){let{className:t,...n}=e;return(0,l.jsx)(a.hJ,{"data-slot":"dialog-overlay",className:(0,s.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function p(e){let{className:t,iconColor:n,template:o,hideCloseButton:i,closeClassName:c,children:p,...u}=e;return(0,l.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,l.jsx)(x,{}),(0,l.jsxs)(a.UC,{"data-slot":"dialog-content",className:(0,s.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...u,children:[p,!i&&(0,l.jsxs)(a.bm,{className:(0,s.cn)("ring-offset-background focus:ring-primary data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 z-50 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",c),children:[(0,l.jsx)(r.A,{className:(0,s.cn)("!h-6 !w-6",n,"blue-tech"===o&&"text-primary")}),(0,l.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function u(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("flex flex-col gap-2 text-center sm:text-left",t),...n})}function h(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"dialog-footer",className:(0,s.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})}function m(e){let{className:t,...n}=e;return(0,l.jsx)(a.hE,{"data-slot":"dialog-title",className:(0,s.cn)("text-lg leading-none font-semibold",t),...n})}function f(e){let{className:t,...n}=e;return(0,l.jsx)(a.VY,{"data-slot":"dialog-description",className:(0,s.cn)("text-muted-foreground text-sm",t),...n})}},52095:(e,t,n)=>{n.d(t,{z:()=>r});let l=e=>e.replace(/\/+$/,""),a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.baseUrl)return l(e.baseUrl);if(e.hostName)return"https://".concat(e.hostName.replace(/^https?:\/\//,""),"/api");let t="https://api-proxy.homeproxy.vn";return t?l(t):l(e.fallbackBaseUrl||"")},r=e=>{let{baseUrl:t,hostName:n,token:l,checkOnly:r=!1,encodeToken:s=!0}=e,o=a({baseUrl:t,hostName:n}),i=s?encodeURIComponent(l):l;return"".concat(o,"/v3/users/rotatev2?token=").concat(i).concat(r?"&checkOnly=true":"")}},54652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return i},getImageProps:function(){return o}});let l=n(28140),a=n(75040),r=n(81356),s=l._(n(71124));function o(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let i=r.Image},58067:(e,t,n)=>{n.d(t,{b:()=>s,k:()=>r});var l=n(87813),a=n.n(l);let r=e=>{let t=e.replace(/\D/g,"");return t.startsWith("0")?"+84".concat(t.substring(1)):11===t.length&&t.startsWith("84")?"+".concat(t):e},s=async e=>{if(navigator.clipboard&&window.isSecureContext&&"undefined"!=typeof ClipboardItem)try{let t=new ClipboardItem({"text/plain":e.then(e=>new Blob([e],{type:"text/plain"}))});return await navigator.clipboard.write([t]),!0}catch(t){try{let t=await e;return await navigator.clipboard.writeText(t),!0}catch(e){}}try{let t=await e;return a()(t)}catch(e){return!1}}},58795:(e,t,n)=>{n.d(t,{f:()=>a});var l=n(13744);let a=async(e,t)=>l.A.fetchApi("/api/v2/proxies/".concat(e,"/generate-token"),t).then(e=>null==e?void 0:e.token)},60919:(e,t,n)=>{n.d(t,{pe:()=>a});let{Axios:l,AxiosError:a,CanceledError:r,isCancel:s,CancelToken:o,VERSION:i,all:d,Cancel:c,isAxiosError:x,spread:p,toFormData:u,AxiosHeaders:h,HttpStatusCode:m,formToJSON:f,getAdapter
1:g,mergeConfig:b}=n(95125).A},61362:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},61504:(e,t,n)=>{n.d(t,{Cf:()=>c,lG:()=>o});var l=n(95155);n(12115);var a=n(89511),r=n(65229),s=n(64269);function o(e){let{...t}=e;return(0,l.jsx)(a.bL,{"data-slot":"dialog",...t})}function i(e){let{...t}=e;return(0,l.jsx)(a.ZL,{"data-slot":"dialog-portal",...t})}function d(e){let{className:t,...n}=e;return(0,l.jsx)(a.hJ,{"data-slot":"dialog-overlay",className:(0,s.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function c(e){let{className:t,children:n,showCloseButton:o=!0,title:c,titleClassName:u="",headerClassName:h="",description:m,...f}=e;return(0,l.jsxs)(i,{"data-slot":"dialog-portal",children:[(0,l.jsx)(d,{}),(0,l.jsxs)(a.UC,{"data-slot":"dialog-content",className:(0,s.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex w-auto max-w-[583px] min-w-0 translate-x-[-50%] translate-y-[-50%] flex-col rounded-[24px] border-none shadow-[0_2px_4px_0_var(--shadow-modal)] duration-200 sm:max-w-[886px]",t),...f,children:[(0,l.jsxs)(x,{className:h,children:[(0,l.jsx)(p,{className:c?"text-text-normal-template-3 h-full align-middle text-[18px] leading-5 font-semibold ".concat(u," "):"hidden",children:c}),o&&(0,l.jsxs)(a.bm,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-primary data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs transition-opacity hover:cursor-pointer hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,l.jsx)(r.A,{className:"!h-6 !w-6 text-neutral-900"}),(0,l.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n]})]})}function x(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("sticky top-0 z-50 flex h-12 w-auto flex-row items-center justify-between rounded-t-[24px] bg-[#F3EAE2] px-8 py-4 text-center sm:text-left",t),...n})}function p(e){let{className:t,...n}=e;return(0,l.jsx)(a.hE,{"data-slot":"dialog-title",className:(0,s.cn)("text-normal text-base leading-none font-semibold",t),...n})}},63817:(e,t,n)=>{n.d(t,{G7:()=>i,L$:()=>x,fx:()=>p,h_:()=>u,oI:()=>d,uB:()=>o,xL:()=>c});var l=n(95155);n(12115);var a=n(41808),r=n(86651),s=n(64269);function o(e){let{className:t,...n}=e;return(0,l.jsx)(a.uB,{"data-slot":"command",className:(0,s.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...n})}function i(e){let{className:t,...n}=e;return(0,l.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,l.jsx)(r.A,{className:"size-4 shrink-0 opacity-50"}),(0,l.jsx)(a.uB.Input,{"data-slot":"command-input",className:(0,s.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...n})]})}function d(e){let{className:t,...n}=e;return(0,l.jsx)(a.uB.List,{"data-slot":"command-list",onWheel:e=>e.stopPropagation(),className:(0,s.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...n})}function c(e){let{...t}=e;return(0,l.jsx)(a.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function x(e){let{className:t,...n}=e;return(0,l.jsx)(a.uB.Group,{"data-slot":"command-group",className:(0,s.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...n})}function p(e){let{className:t,...n}=e;return(0,l.jsx)(a.uB.Separator,{"data-slot":"command-separator",className:(0,s.cn)("bg-border -mx-1 h-px",t),...n})}function u(e){let{className:t,...n}=e;return(0,l.jsx)(a.uB.Item,{"data-slot":"command-item",className:(0,s.cn)("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}n(51834)},65142:(e,t,n)=>{n.d(t,{p:()=>r});var l=n(95155);n(12115);var a=n(64269);function r(e){let{className:t,type:n,...r}=e;return(0,l.jsx)("input",{type:n,"data-slot":"input",className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary focus-visible:ring-primary/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...r})}},66630:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]])},67907:(e,t,n)=>{n.d(t,{S:()=>i,_:()=>d});var l=n(95155),a=n(12115),r=n(38162),s=n(5917),o=n(64269);let i=a.forwardRef((e,t)=>
1{let{className:n,iconClassName:a,...i}=e;return(0,l.jsx)(r.bL,{ref:t,className:(0,o.cn)("peer data-[state=checked]:text-background hover:border-checkbox-blur hover:ring-checkbox-blur/40 h-5 w-5 shrink-0 rounded-sm border border-[#AEAEB2] shadow-none hover:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-none data-[state=checked]:bg-[#34c759]",n),...i,children:(0,l.jsx)(r.C1,{className:(0,o.cn)("text-background flex items-center justify-center"),children:(0,l.jsx)(s.A,{className:(0,o.cn)("h-4 w-4",a)})})})});i.displayName=r.bL.displayName;let d=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,l.jsx)(r.bL,{ref:t,className:(0,o.cn)("peer focus-visible:ring-primary/10 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground hover:border-checkbox-blur h-4 w-4 shrink-0 rounded-[3px] border-2 border-[#18181B] shadow-none hover:cursor-pointer hover:ring-1 hover:ring-black/50 focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),...a,children:(0,l.jsx)(r.C1,{className:(0,o.cn)("flex items-center justify-center text-current"),children:(0,l.jsx)(s.A,{className:"h-3 w-3"})})})});d.displayName=r.bL.displayName},68114:(e,t,n)=>{n.d(t,{I:()=>d});var l=n(15243),a=n(66942),r=n(12115),s=n(22544),o=n(15653);let i=o.z.object({password:o.z.string().nonempty("Mật khẩu l\xe0 bắt buộc"),rotateInterval:o.z.number().min(0,"Thời gian xoay lớn hơn 0").int({message:"Phải l\xe0 số nguy\xean"}).optional(),isAutoRotate:o.z.boolean()});function d(e){var t,n,o,d,c;let{selectedProxy:x,selectedProxies:p=[],onClose:u}=e,{router:h,accessToken:m,merchantId:f}=(0,l.x)(),g=null!=x?x:p[0],b=x?[x.id]:p.map(e=>e.id),v=(0,s.mN)({resolver:(0,a.u)(i),values:{password:null!=(d=null==g||null==(t=g.proxy)?void 0:t.password)?d:"",rotateInterval:null!=(c=null==g||null==(n=g.proxy)?void 0:n.rotateInterval)?c:0,isAutoRotate:(null==g||null==(o=g.proxy)?void 0:o.rotateInterval)!=0}}),y=v.watch("isAutoRotate");(0,r.useEffect)(()=>{y||v.setValue("rotateInterval",0)},[v,y]);let w=async e=>{await (0,l.C)({form:v,userProxyIds:b,values:e,accessToken:m,merchantId:f,onSuccess:()=>{h.refresh(),u()}})};return{form:v,activeProxy:g,wIsAutoRotate:y,onSubmit:v.handleSubmit(w),isSubmitting:v.formState.isSubmitting}}},68388:(e,t,n)=>{n.d(t,{a:()=>s});var l=n(95155),a=n(61504),r=n(64269);let s=e=>{let{title:t,description:n,isOpen:s,onClose:o,children:i,className:d,titleClassName:c,headerClassName:x,closeButtonClassName:p}=e;return(0,l.jsx)(a.lG,{open:s,onOpenChange:e=>{e||o()},children:(0,l.jsxs)(a.Cf,{className:d,title:t,description:n,titleClassName:null!=c?c:"",headerClassName:null!=x?x:"",onOpenAutoFocus:e=>{e.preventDefault()},showCloseButton:!1,children:[(0,l.jsx)("button",{type:"button",onClick:o,className:(0,r.cn)("absolute z-99 top-4 right-4 flex h-10 w-10 items-center justify-center rounded-full transition-all duration-200 hover:bg-gray-100 hover:rotate-90 cursor-pointer focus:outline-none",p),children:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-6 w-6 text-[#636364]",children:[(0,l.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,l.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,l.jsx)("div",{children:i})]})})}},69605:(e,t,n)=>{n.d(t,{Ru:()=>x,YB:()=>c,oA:()=>d});var l=n(95155),a=n(18720),r=n(52056),s=n(61362),o=n(11821);let i=e=>(0,l.jsx)("div",{className:"toast-clamp",children:e.join("\n")}),d=e=>{let t=(0,o.f3)(e);if("success"===t.type)return void a.toast.success(t.title,{description:t.description?(0,l.jsx)("div",{className:"toast-clamp",children:t.description}):void 0,duration:5e3});a.toast.error(t.title,{description:t.description,duration:5e3,icon:(0,l.jsx)(r.A,{className:"h-4 w-4 text-red-500"})})},c=e=>{let{successMessages:t,tooSoonMessages:n,errorMessages:r}=e;t.length>0&&a.toast.success("Xoay th\xe0nh c\xf4ng ".concat(t.length," proxy"),{description:i(t),duration:5e3,icon:(0,l.jsx)(s.A,{className:"h-4 w-4 text-green-600"})}),n.length>0&&a.toast.error("C\xf3 ".concat(n.length," proxy chưa thể xoay"),{description:i(n),duration:8e3}),r.length>0&&a.toast.error("C\xf3 ".concat(r.length," proxy xoay thất bại"),{description:i(r),duration:8e3})},x=()=>{a.toast.error("Kh\xf4ng nhận được kết quả xoay proxy từ hệ thống")}},69750:(e,t,n)=>{n.d(t,{D:()=>s});var l=n(95155),a=n(52619),r=n.n(a);function s(e){let{message:t,actionLabel:n,actionHref:a}=e;return(0,l.jsx)("div",{className:"flex w-full items-start justify-center rounded-[8px] bg-white px-[16px] py-[48px]",children:(0,l.jsxs)("div",{className:"flex items-center gap-[8px]",children:[(0,l.jsx)("p",{className:"text-[16px] leading-[1.3] font-normal text-[#636364]",children:t}),(0,l.jsx)(r(),{href:a,className:"flex h-[40px] items-center rounded-[4px] px-[12px] py-[10px] text-[14px] leading-[1.3] font-semibold whitespace-nowrap text-[#1b56d6] hover:bg-[#f5f5f6]",children:n})]})})}}
1,72798:(e,t,n)=>{n.d(t,{$:()=>r});var l=n(97453),a=n(12115);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPage:t="1",defaultLimit:n="50",persistentFilters:r=[],defaultSort:s,additionalParams:o={}}=e,[i]=(0,l.ZA)("page",{defaultValue:t}),[d]=(0,l.ZA)("limit",{defaultValue:n}),[c]=(0,l.ZA)("filter",{defaultValue:""}),[x]=(0,l.ZA)("filters",{defaultValue:""}),[p]=(0,l.ZA)("sort",{defaultValue:""}),[u]=(0,l.ZA)("s",{defaultValue:""});return(0,a.useMemo)(()=>{let e=new URLSearchParams;e.set("page",i),e.set("limit",d);let t=[];if(c&&t.push(c),r.length>0&&t.push(...r),t.length>0&&e.set("filter",t.join(";")),x){let t="object"==typeof x?JSON.stringify(x):x;e.set("filters",t)}if(p){let t;t="string"==typeof p?p:"object"==typeof p?JSON.stringify((Array.isArray(p)?p:[p]).map(e=>({orderBy:e.id||e.orderBy,order:"boolean"==typeof e.desc?e.desc?"desc":"asc":e.order||"asc"}))):String(p),e.set("sort",t)}else s&&e.set("sort",s);return u&&e.set("s",u),Object.entries(o).forEach(t=>{let[n,l]=t;if(l)if(e.has(n))try{let t=JSON.parse(e.get(n)),a=JSON.parse(l),r={...t,...a};e.set(n,JSON.stringify(r))}catch(e){}else e.append(n,l)}),"?"+e.toString()},[i,d,c,x,p,r,s,o])}},75221:(e,t,n)=>{n.d(t,{O:()=>o});var l=n(95155),a=n(20243),r=n(87270),s=n(64269);function o(e){let{columnCount:t,rowCount:n=10,filterCount:o=0,cellWidths:i=["auto"],withViewOptions:d=!0,withPagination:c=!0,shrinkZero:x=!1,className:p,...u}=e,h=Array.from({length:t},(e,t)=>{var n;return null!=(n=i[t%i.length])?n:"auto"});return(0,l.jsxs)("div",{className:(0,s.cn)("flex flex-1 flex-col space-y-4",p),...u,children:[(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 overflow-auto p-1",children:[(0,l.jsx)("div",{className:"flex flex-1 items-center gap-2",children:o>0?Array.from({length:o}).map((e,t)=>(0,l.jsx)(a.E,{className:"h-7 w-[4.5rem] border-dashed"},t)):null}),d?(0,l.jsx)(a.E,{className:"ml-auto hidden h-7 w-[4.5rem] lg:flex"}):null]}),(0,l.jsx)("div",{className:"flex-1 rounded-md border",children:(0,l.jsxs)(r.Table,{children:[(0,l.jsx)(r.TableHeader,{children:Array.from({length:1}).map((e,n)=>(0,l.jsx)(r.TableRow,{className:"hover:bg-transparent",children:Array.from({length:t}).map((e,t)=>(0,l.jsx)(r.TableHead,{style:{width:h[t],minWidth:x?h[t]:"auto"},children:(0,l.jsx)(a.E,{className:"h-6 w-full"})},t))},n))}),(0,l.jsx)(r.TableBody,{children:Array.from({length:n}).map((e,n)=>(0,l.jsx)(r.TableRow,{className:"hover:bg-transparent",children:Array.from({length:t}).map((e,t)=>(0,l.jsx)(r.TableCell,{style:{width:h[t],minWidth:x?h[t]:"auto"},children:(0,l.jsx)(a.E,{className:"h-6 w-full"})},t))},n))})]})}),c?(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-4 overflow-auto p-1 sm:gap-8",children:[(0,l.jsx)(a.E,{className:"h-7 w-40 shrink-0"}),(0,l.jsxs)("div",{className:"flex items-center gap-4 sm:gap-6 lg:gap-8",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(a.E,{className:"h-7 w-24"}),(0,l.jsx)(a.E,{className:"h-7 w-[4.5rem]"})]}),(0,l.jsx)("div",{className:"flex items-center justify-center text-sm font-medium",children:(0,l.jsx)(a.E,{className:"h-7 w-20"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(a.E,{className:"hidden size-7 lg:block"}),(0,l.jsx)(a.E,{className:"size-7"}),(0,l.jsx)(a.E,{className:"size-7"}),(0,l.jsx)(a.E,{className:"hidden size-7 lg:block"})]})]})]}):null]})}},75426:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},76444:(e,t,n)=>{n.d(t,{J:()=>s});var l=n(95155);n(12115);var a=n(10489),r=n(64269);function s(e){let{className:t,...n}=e;return(0,l.jsx)(a.b,{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...n})}},85134:(e,t,n)=>{n.d(t,{m:()=>a});let l={VIETTEL:"Viettel",FPT:"FPT",VNPT:"VNPT"};function a(e){let{pathname:t,filterParam:n,typeParam:a}=e,r=function(e){if(!e)return null;let t=e.match(/ipaddress\.provider:\$eq:string:(\w+)/i);return t?t[1].toUpperCase():null}(n);return r&&l[r]?{message:"Qu\xfd kh\xe1ch kh\xf4ng c\xf3 đơn h\xe0ng Proxy d\xe2n cư tÄ©nh n\xe0o",actionLabel:"Tạo má
1»›i Proxy d\xe2n cư tÄ©nh",actionHref:"/proxy-tinh?provider=".concat(r)}:"/proxies-datacenter"===t?{message:"Qu\xfd kh\xe1ch kh\xf4ng c\xf3 đơn h\xe0ng Proxy Datacenter US n\xe0o",actionLabel:"Tạo mới Proxy Datacenter US",actionHref:"/proxy-datacenter"}:"/proxies-datacenter-vn"===t?{message:"Qu\xfd kh\xe1ch kh\xf4ng c\xf3 đơn h\xe0ng Proxy Datacenter VN n\xe0o",actionLabel:"Tạo mới Proxy Datacenter VN",actionHref:"/proxy-datacenter-vn"}:"keys-xoay"===a||"/keys-xoay"===t?{message:"Qu\xfd kh\xe1ch kh\xf4ng c\xf3 đơn h\xe0ng Key xoay n\xe0o",actionLabel:"Tạo mới Key xoay",actionHref:"/key-xoay?type=keys-xoay"}:"/proxies-xoay"===t?{message:"Qu\xfd kh\xe1ch kh\xf4ng c\xf3 đơn h\xe0ng Proxy d\xe2n cư xoay n\xe0o",actionLabel:"Tạo mới Proxy d\xe2n cư xoay",actionHref:"/proxy-xoay"}:{message:"Qu\xfd kh\xe1ch kh\xf4ng c\xf3 đơn h\xe0ng Proxy d\xe2n cư tÄ©nh n\xe0o",actionLabel:"Tạo mới Proxy d\xe2n cư tÄ©nh",actionHref:"/proxy-tinh"}}},87270:(e,t,n)=>{n.d(t,{Table:()=>r,TableBody:()=>o,TableCell:()=>c,TableHead:()=>d,TableHeader:()=>s,TableRow:()=>i});var l=n(95155);n(12115);var a=n(64269);function r(e){let{className:t,...n}=e;return(0,l.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,l.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",t),...n})})}function s(e){let{className:t,...n}=e;return(0,l.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",t),...n})}function o(e){let{className:t,...n}=e;return(0,l.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",t),...n})}function i(e){let{className:t,...n}=e;return(0,l.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...n})}function d(e){let{className:t,...n}=e;return(0,l.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...n})}function c(e){let{className:t,...n}=e;return(0,l.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...n})}},87415:(e,t,n)=>{n.d(t,{E:()=>d,Q:()=>i});var l=n(95155),a=n(14734),r=n(96199),s=n(12115);let o=(0,s.createContext)({notifications:[],isConnected:!1});function i(e){var t;let{children:n}=e,{data:i}=(0,r.wV)(),{notifications:d,isConnected:c,emit:x}=(0,a.F)(null==i||null==(t=i.user)?void 0:t.accessToken);return(0,s.useEffect)(()=>{c&&x("user-proxies")},[c]),(0,l.jsx)(o.Provider,{value:{notifications:d,isConnected:c},children:n})}function d(){return(0,s.useContext)(o)}},87527:(e,t,n)=>{n.d(t,{o:()=>r});var l=n(9180),a=n(92118);function r(e,t,n){var r;let s=((0,a.a)(e)-(0,a.a)(t))/l.Cg;return(r=null==n?void 0:n.roundingMethod,e=>{let t=(r?Math[r]:Math.trunc)(e);return 0===t?0:t})(s)}},90368:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(71847).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},95941:(e,t,n)=>{n.d(t,{w:()=>ek});var l=n(95155),a=n(65142),r=n(58067),s=n(12115),o=n(24033),i=n(86651),d=n(10383),c=n(71847);let x=(0,c.A)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]),p=(0,c.A)("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),u=(0,c.A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);var h=n(66630),m=n(52056),f=n(65229),g=n(18720);function b(e){g.toast.custom(t=>(0,l.jsxs)("div",{className:"flex min-w-[292px] flex-col gap-[4px] rounded-[4px] bg-white p-[12px] shadow-[0px_0px_1px_rgba(0,0,0,0.12),0px_8px_8px_rgba(0,0,0,0.14),0px_0px_4px_rgba(0,0,0,0.2),0px_14px_14px_rgba(0,0,0,0.24)]",children:[(0,l.jsxs)("div",{className:"flex w-full items-start gap-[12px]",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-[8px]",children:[(0,l.jsx)(m.A,{className:"size-[20px] shrink-0 text-[#E9A106]"}),(0,l.jsx)("p",{className:"min-w-0 flex-1 text-[14px] font-semibold text-[#171717]",children:"Chọn \xedt nhất 1 d\xf2ng để thá»±c hiện lệnh"})]}),(0,l.jsx)("button",{type:"button",onClick:()=>g.toast.dismiss(t),"aria-label":"Đ\xf3ng",className:"shrink-0 cursor-pointer text-[#171717]",children:(0,l.jsx)(f.A,{className:"size-[20px]"})})]}),(0,l.jsxs)("p",{className:"pl-[28px] text-[14px] text-[#171717]",children:["Bạn cần chọn \xedt nhất 1 proxy d\xf2ng để ",e]})]}))}var v=n(68388),y=n(76830),w=n(64269),j=n(61589),k=n(63817),N=n(26333),C=n(6259),_=n(41052),A=n(23117),z=n(13744),V=n(96334);function S(e){let{selectedProxies:t,onClose:n}=e,{form:a,watchDayOfRenewal:r,calculateTotalAmount:s,renewalUnit:o,renewalInputPlaceholder:i,onSubmit:c,isSubmitting:x}=(0,V.I)({selectedProxies:t,categoryTypeId:1,onClose:n});return(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,l.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,l.jsx)(d.A,{className:"size-[20px] shrink-0 text-[#1b56d6]"}),(0,l.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Gia hạn Proxy"})]}),(0,l.jsx)(_.lV,{...a,children:(0,l.jsxs)("form",{onSubmit:c,className:"flex w-full flex-col gap-[12px]",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[8px] border-y border-[#e8e8e9] py-[12px] 2xl:border-y-0 2xl:shadow-[inset_0_1px_0_0_#e8e8e9,
1inset_0_-1px_0_0_#e8e8e9]",children:[(0,l.jsx)("textarea",{readOnly:!0,className:"h-[121px] w-full resize-none rounded-[4px] border border-[#d4d4d5] bg-[#f5f5f6] p-[12px] text-[14px] leading-normal text-black placeholder:text-[#bdbdbf] focus:outline-none 2xl:h-[127px]",placeholder:"Nhập Proxy của bạn",defaultValue:t.map(e=>{var t,n;return null==e||null==(n=e.proxy)||null==(t=n.ipaddress)?void 0:t.ip}).join("\n")}),(0,l.jsx)(_.zB,{control:a.control,name:"dayOfRenewal",render:e=>{let{field:t}=e;return(0,l.jsxs)(_.eI,{className:"w-full gap-[4px]",children:[(0,l.jsx)(_.lR,{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"Thời hạn"}),(0,l.jsx)(_.MJ,{children:(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-[16px] rounded-[4px] border border-[#d4d4d5] px-[16px] py-[8px] 2xl:border-0 2xl:shadow-[inset_0_0_0_1px_#d4d4d5]",children:[(0,l.jsx)(A.p,{type:"number",placeholder:i,step:1,min:0,useCustomStepper:!0,className:"h-auto min-w-0 flex-1 border-none bg-transparent p-0 text-[14px] leading-normal font-semibold text-[#171717] shadow-none focus-visible:ring-0 2xl:leading-[19px]",...t,onChange:e=>t.onChange(e.target.value?+e.target.value:"")}),(0,l.jsx)("span",{className:"shrink-0 text-[14px] leading-normal font-normal text-[#171717] 2xl:leading-[19px]",children:o.charAt(0).toUpperCase()+o.slice(1)})]})}),(0,l.jsx)(_.C5,{})]})}})]}),(0,l.jsxs)("div",{className:"flex w-full items-center justify-between whitespace-nowrap",children:[(0,l.jsx)("p",{className:"text-[16px] leading-[21px] font-semibold text-[#171717]",children:"Tổng tiền"}),(0,l.jsxs)("p",{className:"text-[18px] leading-[23px] font-semibold text-[#1b56d6]",children:[z.A.formatNum(s(r))," VND"]})]}),(0,l.jsx)("button",{type:"submit",disabled:x,className:"flex h-[40px] w-full items-center justify-center gap-2 rounded-[4px] bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90",children:(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Gia hạn"})})]})})]})}var L=n(98368),M=n(98535);let I="h-auto w-full rounded-[4px] border-[#d4d4d5] bg-white px-[10px] py-[8px] text-[14px] leading-normal font-normal text-black shadow-none transition-colors placeholder:text-[#bdbdbf] hover:border-[#3976f9] focus-visible:border-[#3976f9] focus-visible:ring-0 2xl:border-0 2xl:leading-[20px] 2xl:shadow-[inset_0_0_0_1px_#d4d4d5] 2xl:hover:shadow-[inset_0_0_0_1px_#3976f9] 2xl:focus-visible:shadow-[inset_0_0_0_1px_#3976f9]";function F(e){let{selectedProxies:t,onClose:n}=e,{form:r,onSubmit:s,isSubmitting:o}=(0,L.N)({selectedProxies:t,onClose:n});return(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,l.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,l.jsx)(x,{className:"size-[20px] shrink-0 text-[#1b56d6]"}),(0,l.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Đổi mật khẩu"})]}),(0,l.jsx)(_.lV,{...r,children:(0,l.jsxs)("form",{onSubmit:s,autoComplete:"off",className:"relative flex w-full flex-col gap-[12px]",children:[(0,l.jsx)(M.vU,{}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[8px] border-y border-[#e8e8e9] py-[12px] 2xl:border-y-0 2xl:shadow-[inset_0_1px_0_0_#e8e8e9,inset_0_-1px_0_0_#e8e8e9]",children:[(0,l.jsx)(_.zB,{control:r.control,name:"username",render:e=>{let{field:t}=e;return(0,l.jsxs)(_.eI,{className:"w-full gap-[4px]",children:[(0,l.jsx)(_.lR,{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"T\xe0i khoản"}),(0,l.jsx)(_.MJ,{children:(0,l.jsx)(a.p,{placeholder:"Nhập t\xe0i khoản",className:I,...t,...M.OV})}),(0,l.jsx)(_.C5,{})]})}}),(0,l.jsx)(_.zB,{control:r.control,name:"password",render:e=>{let{field:t}=e;return(0,l.jsxs)(_.eI,{className:"w-full gap-[4px]",children:[(0,l.jsx)(_.lR,{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"Mật khẩu"}),(0,l.jsx)(_.MJ,{children:(0,l.jsx)(a.p,{placeholder:"Nhập mật khẩu",className:I,...t,...M.P1})}),(0,l.jsx)(_.C5,{})]})}})]}),(0,l.jsx)("button",{type:"submit",disabled:o,className:"flex h-[40px] w-full items-center justify-center gap-2 rounded-[4px] bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90",children:(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Cập nhật"})})]})})]})}var P=n(62216),T=n(30030);function E(e){let{selectedProxies:t,onClose:n}=e,{form:a,onSubmit:r,isSubmitting:s}=(0,P.d)({selectedProxies:t,onClose:n});return(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,l.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,l.jsx)(x,{className:"size-[20px] shrink-0 text-[#1b56d6]"}),(0,l.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Đổi bảo mật"})]}),(0,l.jsx)(_.lV,{...a,children:(0,l.jsxs)("form",{onSubmit:r,className:"flex w-full flex-col gap-[12px]",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[8px] border-y border-[#e8e8e9] py-[12px] 2xl:border-y-0 2xl:shadow-[inset_0_1px_0_0_#e8e8e9,
1inset_0_-1px_0_0_#e8e8e9]",children:[(0,l.jsx)("ul",{className:"max-h-[150px] w-full list-disc overflow-y-auto rounded-[4px] border border-[#d4d4d5] bg-[#f5f5f6] py-[12px] pr-[12px] pl-[33px] text-[14px] leading-normal text-[#171717] 2xl:h-[150px]",children:t.map(e=>{var t,n;return(0,l.jsx)("li",{children:null==e||null==(n=e.proxy)||null==(t=n.ipaddress)?void 0:t.ip},e.id)})}),(0,l.jsx)(_.zB,{control:a.control,name:"protocol",render:e=>{let{field:t}=e;return(0,l.jsxs)(_.eI,{className:"w-full gap-[4px]",children:[(0,l.jsx)("p",{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"Giao thức"}),(0,l.jsxs)(j.l6,{value:t.value,onValueChange:e=>t.onChange(e),children:[(0,l.jsx)(j.bq,{icon:(0,l.jsx)(o.A,{className:"size-[20px] text-[#636364]"}),className:"h-auto w-full rounded-[4px] border-[#d4d4d5] px-[10px] py-[8px] text-[14px] leading-[20px] font-normal text-black shadow-none focus:ring-0 data-[state=open]:border-[#3976f9] data-[state=open]:ring-0 2xl:border-0 2xl:shadow-[inset_0_0_0_1px_#d4d4d5] 2xl:data-[state=open]:shadow-[inset_0_0_0_1px_#3976f9]",children:(0,l.jsx)(j.yv,{placeholder:"HTTP"})}),(0,l.jsx)(j.gC,{children:T.q.map(e=>(0,l.jsx)(j.eb,{value:e.value,className:"rounded-[2px] p-[4px] text-[14px] font-normal text-black focus:bg-[#e8e8e9] focus:text-black data-[state=checked]:bg-[#e8e8e9]",children:e.name},e.value))})]}),(0,l.jsx)(_.C5,{})]})}})]}),(0,l.jsx)("button",{type:"submit",disabled:s,className:"flex h-[40px] w-full items-center justify-center gap-2 rounded-[4px] bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90",children:(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Cập nhật"})})]})})]})}var D=n(29279),B=n(37787),H=n(8873);function R(e){let{icon:t,label:n,onClick:a,disabled:r,width:s}=e;return(0,l.jsxs)("button",{type:"button",onClick:a,disabled:r,style:{width:s},className:(0,w.cn)("flex h-[40px] shrink-0 items-center justify-center gap-[8px] rounded-[4px] border bg-white px-[12px] py-[10px] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] disabled:cursor-not-allowed disabled:opacity-50",r?"border-[#d4d4d5] text-[#9e9e9f]":"border-[#1b56d6] text-[#1b56d6] hover:bg-[#c4e8ff]"),children:[(0,l.jsx)(t,{className:"size-[20px] shrink-0"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold whitespace-nowrap",children:n})]})}function O(e){return(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M10.0007 12.4997L5.83398 8.33301H14.1673L10.0007 12.4997Z",fill:"currentColor"})})}function U(e){return(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16.875 2.5H6.875C6.70924 2.5 6.55027 2.56585 6.43306 2.68306C6.31585 2.80027 6.25 2.95924 6.25 3.125V6.25H3.125C2.95924 6.25 2.80027 6.31585 2.68306 6.43306C2.56585 6.55027 2.5 6.70924 2.5 6.875V16.875C2.5 17.0408 2.56585 17.1997 2.68306 17.3169C2.80027 17.4342 2.95924 17.5 3.125 17.5H13.125C13.2908 17.5 13.4497 17.4342 13.5669 17.3169C13.6842 17.1997 13.75 17.0408 13.75 16.875V13.75H16.875C17.0408 13.75 17.1997 13.6842 17.3169 13.5669C17.4342 13.4497 17.5 13.2908 17.5 13.125V3.125C17.5 2.95924 17.4342 2.80027 17.3169 2.68306C17.1997 2.56585 17.0408 2.5 16.875 2.5ZM16.25 12.5H13.75V6.875C13.75 6.70924 13.6842 6.55027 13.5669 6.43306C13.4497 6.31585 13.2908 6.25 13.125 6.25H7.5V3.75H16.25V12.5Z",fill:"currentColor"})})}function Z(e){var t,n,a;let{table:r}=e,[c,m]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[_,A]=(0,s.useState)("change-renewal"),z=(0,s.useMemo)(()=>r.getAllColumns().filter(e=>e.getCanFilter()),[r]),V=s.useCallback(e=>{var t;return"s"===e.columnDef.id||(null==(t=e.columnDef.meta)?void 0:t.variant)==="text"},[]),L=(0,s.useMemo)(()=>z.filter(e=>V(e)),[z,V]),[M,I]=(0,s.useState)(()=>{var e,t;return null!=(t=null==(e=L[0])?void 0:e.id)?t:""}),[P,T]=(0,s.useState)(()=>{let e=L[0];return(null==e?void 0:e.getFilterValue())||""});s.useEffect(()=>{let e=L.find(e=>e.id===M);e&&T(e.getFilterValue()||"")},[M,L]);let Z=s.useCallback(()=>{let e=L.find(e=>e.id===M);if(e){let t=P.trim();e.setFilterValue(t||void 0),L.filter(e=>
1e.id!==M).forEach(e=>e.setFilterValue(void 0))}},[L,M,P]),W=s.useCallback(e=>{"Enter"===e.key&&(e.preventDefault(),Z())},[Z]),J=s.useMemo(()=>r.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()),[r]),{selectedProxies:K}=(0,B.C)(r),q=e=>{b(e)},G=(e,t)=>{if(0===K.length)return void q(t);A(e),m(!0)},X=(0,H.R)({selectedProxies:K}),$=(0,D.H)({selectedProxies:K}),Q=L.find(e=>e.id===M),Y=(null!=(a=null==Q||null==(t=Q.columnDef.meta)?void 0:t.placeholder)?a:null==Q||null==(n=Q.columnDef.meta)?void 0:n.label)+"...";return(0,l.jsxs)("div",{className:"w-full min-w-0",children:[(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-[12px] sm:flex-row sm:flex-wrap sm:items-center sm:justify-start 2xl:justify-between",children:[(0,l.jsxs)("div",{className:"flex h-[40px] w-full min-w-0 items-center rounded-[4px] border border-[#d4d4d5] bg-white hover:border-[#1b56d6] has-[[data-state=open]]:border-[#1b56d6] lg:w-[433px] lg:shrink-0",children:[(0,l.jsxs)(j.l6,{value:M,onValueChange:e=>I(e),children:[(0,l.jsx)(j.bq,{icon:(0,l.jsx)(o.A,{className:"size-[20px] shrink-0 text-[#636364] transition-transform"}),className:"h-[40px] w-fit shrink-0 gap-[4px] rounded-none border-none bg-transparent px-[12px] py-[10px] text-[14px] font-normal whitespace-nowrap text-black shadow-none focus:ring-0 data-[state=open]:border-none data-[state=open]:ring-0 [&[data-state=open]_svg]:rotate-180",children:(0,l.jsx)(j.yv,{})}),(0,l.jsx)(j.gC,{className:"w-[134px] min-w-[134px] rounded-[4px] border-[#d4d4d5] p-[8px] shadow-[0px_8px_16px_0px_rgba(0,0,0,0.14),0px_0px_2px_0px_rgba(0,0,0,0.12)]",children:L.map(e=>{var t,n;return(0,l.jsx)(j.eb,{value:e.id,className:"rounded-[2px] p-[4px] text-[14px] font-normal text-black focus:bg-[#e8e8e9] focus:text-black data-[state=checked]:bg-[#e8e8e9]",children:null!=(n=null==(t=e.columnDef.meta)?void 0:t.label)?n:e.id},e.id)})})]}),(0,l.jsx)("div",{className:"h-full w-px shrink-0 bg-[#d4d4d5]"}),(0,l.jsx)("input",{placeholder:Y,value:P,onChange:e=>T(e.target.value),onKeyDown:W,className:"h-full min-w-0 flex-1 bg-transparent px-[12px] text-[14px] text-black placeholder:text-[#9e9e9f] focus:outline-none"}),(0,l.jsx)("button",{type:"button",onClick:Z,title:"T\xecm kiếm",className:"flex size-[40px] shrink-0 items-center justify-center rounded-[2px] bg-[#1b56d6] hover:bg-[#0c3ca4]",children:(0,l.jsx)(i.A,{className:"size-[20px] text-white"})})]}),(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-wrap items-center gap-[8px] sm:w-auto",children:[(0,l.jsx)(R,{icon:d.A,label:"Gia hạn",width:101,onClick:()=>G("change-renewal","gia hạn")}),(0,l.jsx)(R,{icon:x,label:"Đổi mật khẩu",width:138,onClick:()=>G("change-info","đổi mật khẩu")}),(0,l.jsx)(R,{icon:p,label:"Đổi giao thức",width:139,onClick:()=>G("change-protocol","đổi giao thức")}),(0,l.jsx)(R,{icon:u,label:"Fix",width:70,onClick:()=>{if(0===K.length)return void q("fix");$()}}),(0,l.jsxs)(C.rI,{modal:!1,open:f,onOpenChange:e=>{if(e&&0===K.length)return void q("copy");g(e)},children:[(0,l.jsx)(C.ty,{asChild:!0,children:(0,l.jsx)("button",{type:"button",title:"Copy h\xe0ng loạt",className:"flex size-[40px] shrink-0 items-center justify-center rounded-[4px] border border-[#1b56d6] bg-white text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:(0,l.jsx)(U,{className:"size-[20px]"})})}),(0,l.jsxs)(C.SQ,{align:"start",children:[(0,l.jsxs)(C._2,{onClick:()=>X("proxyIp"),className:"hover:cursor-pointer",children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Proxy IP"]}),(0,l.jsxs)(C._2,{onClick:()=>X("proxyDomain"),className:"hover:cursor-pointer",children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Proxy Domain"]}),(0,l.jsxs)(C._2,{onClick:()=>X("id"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy ID"]}),(0,l.jsxs)(C._2,{onClick:()=>X("id-proxy"),className:"hover:cursor-pointer",children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy ID and Proxy"]}),(0,l.jsxs)(C._2,{onClick:()=>X("prevIp"),className:"hover:cursor-pointer",children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Proxy cũ"]})]})]}),(0,l.jsxs)(N.AM,{children:[(0,l.jsx)(N.Wv,{asChild:!0,children:(0,l.jsxs)("button",{type:"button",style:{width:131},className:"flex h-[40px] shrink-0 items-center justify-center gap-[8px] rounded-[4px] border border-[#1b56d6] bg-white px-[12px] py-[10px] text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:[(0,l.jsx)(h.A,{className:"size-[20px] shrink-0"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold whitespace-nowrap",children:"Hiển thị"}),(0,l.jsx)(O,{className:"size-[20px] shrink-0"})]})}),(0,l.jsx)(N.hl,{align:"end",className:"w-[170px] rounded-lg px-0 py-3",children:(0,l.jsx)(k.uB,{className:"rounded-none",children:(0,l.jsxs)(k.oI,{children:[(0,l.jsx)(k.xL,{children:"No columns found."}),(0,l.jsx)(k.L$,{className:"rounded-none p-0",children:J.map(e=>{var t,n;return"filter"===e.id||"products"===e.id||"toAddress"===e.id||"proxy"===e.id||"protocol"===e.id?null:(0,l.jsxs)(k.h_,{onSelect:()=>{e.toggleVisibility(!e.getIsVisible()),0===J.filter(e=>
1e.getIsVisible()).length&&J.forEach(e=>e.toggleVisibility(!0))},className:"h-8 w-[170px] cursor-pointer justify-between gap-2 rounded-none px-4 py-[7px]",children:[(0,l.jsx)("span",{className:"truncate text-sm font-normal",children:null!=(n=null==(t=e.columnDef.meta)?void 0:t.label)?n:e.id}),(0,l.jsx)(y.F.CheckIcon,{className:(0,w.cn)("h-4 w-4 shrink-0",e.getIsVisible()?"opacity-100":"opacity-0")})]},e.id)})})]})})})]})]})]}),(0,l.jsx)(v.a,{title:"",description:"",isOpen:c,onClose:()=>m(!1),className:"w-[320px] max-w-[calc(100%-2rem)] gap-0 overflow-hidden rounded-none border-none bg-[#F5F5F6] p-0 shadow-none",headerClassName:"hidden",closeButtonClassName:"top-0 right-0 h-6 w-6 hover:rotate-0",children:(0,l.jsxs)("div",{className:"relative overflow-hidden bg-[#f5f5f6] p-[16px]",children:[(0,l.jsx)("svg",{className:"pointer-events-none absolute top-[-29px] left-[-27px]",width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("circle",{cx:"36",cy:"36",r:"36",fill:"#1F93FF"})}),(0,l.jsx)("svg",{className:"pointer-events-none absolute right-[-49px] bottom-[-70px]",width:"122",height:"122",viewBox:"0 0 122 122",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("circle",{cx:"61",cy:"61",r:"61",fill:"#96C0E7"})}),(0,l.jsx)("div",{className:"relative z-10",children:(()=>{let e;switch(_){case"change-info":e=(0,l.jsx)(F,{onClose:()=>m(!1),selectedProxies:K});break;case"change-protocol":e=(0,l.jsx)(E,{onClose:()=>m(!1),selectedProxies:K});break;case"change-renewal":e=(0,l.jsx)(S,{onClose:()=>m(!1),selectedProxies:K});break;default:return null}return e})()})]})})]})}var W=n(39180),J=n(52095),K=n(96199),q=n(20063),G=n(31342),X=n(11821),$=n(69605);function Q(e){let{selectedProxies:t,onClose:n}=e,{form:a,watchDayOfRenewal:r,calculateTotalAmount:s,renewalUnit:o,renewalInputPlaceholder:i,onSubmit:c,isSubmitting:x}=(0,V.I)({selectedProxies:t,categoryTypeId:2,onClose:n});return(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,l.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,l.jsx)(d.A,{className:"size-[20px] shrink-0 text-[#1b56d6]"}),(0,l.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Gia hạn Proxy"})]}),(0,l.jsx)(_.lV,{...a,children:(0,l.jsxs)("form",{onSubmit:c,className:"flex w-full flex-col gap-[12px]",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[8px] border-y border-[#e8e8e9] py-[12px] 2xl:border-y-0 2xl:shadow-[inset_0_1px_0_0_#e8e8e9,inset_0_-1px_0_0_#e8e8e9]",children:[(0,l.jsx)("textarea",{readOnly:!0,className:"h-[121px] w-full resize-none rounded-[4px] border border-[#d4d4d5] bg-[#f5f5f6] p-[12px] text-[14px] leading-normal text-black placeholder:text-[#bdbdbf] focus:outline-none 2xl:h-[127px]",placeholder:"Nhập Proxy của bạn",defaultValue:t.map(e=>{var t,n,l;return(null==e||null==(n=e.proxy)||null==(t=n.ipaddress)?void 0:t.ip)+":"+(null==e||null==(l=e.proxy)?void 0:l.port)}).join("\n")}),(0,l.jsx)(_.zB,{control:a.control,name:"dayOfRenewal",render:e=>{let{field:t}=e;return(0,l.jsxs)(_.eI,{className:"w-full gap-[4px]",children:[(0,l.jsx)(_.lR,{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"Thời hạn"}),(0,l.jsx)(_.MJ,{children:(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-[16px] rounded-[4px] border border-[#d4d4d5] px-[16px] py-[8px] 2xl:border-0 2xl:shadow-[inset_0_0_0_1px_#d4d4d5]",children:[(0,l.jsx)(A.p,{type:"number",placeholder:i,step:1,min:0,useCustomStepper:!0,className:"h-auto min-w-0 flex-1 border-none bg-transparent p-0 text-[14px] leading-normal font-semibold text-[#171717] shadow-none focus-visible:ring-0 2xl:leading-[19px]",...t,onChange:e=>t.onChange(e.target.value?+e.target.value:"")}),(0,l.jsx)("span",{className:"shrink-0 text-[14px] leading-normal font-normal text-[#171717] 2xl:leading-[19px]",children:o.charAt(0).toUpperCase()+o.slice(1)})]})}),(0,l.jsx)(_.C5,{})]})}})]}),(0,l.jsxs)("div",{className:"flex w-full items-center justify-between whitespace-nowrap",children:[(0,l.jsx)("p",{className:"text-[16px] leading-[21px] font-semibold text-[#171717]",children:"Tổng tiền"}),(0,l.jsxs)("p",{className:"text-[18px] leading-[23px] font-semibold text-[#1b56d6]",children:[z.A.formatNum
1(s(r))," VND"]})]}),(0,l.jsx)("button",{type:"submit",disabled:x,className:"flex h-[40px] w-full items-center justify-center gap-2 rounded-[4px] bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90",children:(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Gia hạn"})})]})})]})}var Y=n(98080),ee=n(58795);function et(e){let{icon:t,label:n,onClick:a,width:r}=e;return(0,l.jsxs)("button",{type:"button",onClick:a,style:{width:r},className:"flex h-[40px] shrink-0 items-center justify-center gap-[8px] rounded-[4px] border border-[#1b56d6] bg-white px-[12px] py-[10px] text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:[(0,l.jsx)(t,{className:"size-[20px] shrink-0"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold whitespace-nowrap",children:n})]})}function en(e){return(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M10.0007 12.4997L5.83398 8.33301H14.1673L10.0007 12.4997Z",fill:"currentColor"})})}function el(e){return(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"M10 10.8333V13.3333",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M16.6667 10.8333C16.6667 15 13.75 17.0833 10.2833 18.2917C10.1018 18.3532 9.90461 18.3502 9.725 18.2833C6.25 17.0833 3.33333 15 3.33333 10.8333V5C3.33333 4.77899 3.42113 4.56702 3.57741 4.41074C3.73369 4.25446 3.94565 4.16667 4.16667 4.16667C5.83333 4.16667 7.91667 3.16667 9.36667 1.9C9.54321 1.74917 9.76779 1.66629 10 1.66629C10.2322 1.66629 10.4568 1.74917 10.6333 1.9C12.0917 3.175 14.1667 4.16667 15.8333 4.16667C16.0543 4.16667 16.2663 4.25446 16.4226 4.41074C16.5789 4.56702 16.6667 4.77899 16.6667 5V10.8333Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10 10.8333C10.9205 10.8333 11.6667 10.0871 11.6667 9.16667C11.6667 8.24619 10.9205 7.5 10 7.5C9.07953 7.5 8.33333 8.24619 8.33333 9.16667C8.33333 10.0871 9.07953 10.8333 10 10.8333Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ea(e){return(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"M17.5 10C17.5 8.01088 16.7098 6.10322 15.3033 4.6967C13.8968 3.29018 11.9891 2.5 10 2.5C7.90329 2.50789 5.89081 3.32602 4.38333 4.78333L2.5 6.66667",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M2.5 2.5V6.66667H6.66667",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M2.5 10C2.5 11.9891 3.29018 13.8968 4.6967 15.3033C6.10322 16.7098 8.01088 17.5 10 17.5C12.0967 17.4921 14.1092 16.674 15.6167 15.2167L17.5 13.3333",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13.3333 13.3333H17.5V17.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10 10.8333C10.4602 10.8333 10.8333 10.4602 10.8333 10C10.8333 9.53976 10.4602 9.16667 10 9.16667C9.53976 9.16667 9.16667 9.53976 9.16667 10C9.16667 10.4602 9.53976 10.8333 10 10.8333Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function er(e){return(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16.875 2.5H6.875C6.70924 2.5 6.55027 2.56585 6.43306 2.68306C6.31585 2.80027 6.25 2.95924 6.25 3.125V6.25H3.125C2.95924 6.25 2.80027 6.31585 2.68306 6.43306C2.56585 6.55027 2.5 6.70924 2.5 6.875V16.875C2.5 17.0408 2.56585 17.1997 2.68306 17.3169C2.80027 17.4342 2.95924 17.5 3.125 17.5H13.125C13.2908 17.5 13.4497 17.4342 13.5669 17.3169C13.6842 17.1997 13.75 17.0408 13.75 16.875V13.75H16.875C17.0408 13.75 17.1997 13.6842 17.3169 13.5669C17.4342 13.4497 17.5 13.2908 17.5 13.125V3.125C17.5 2.95924 17.4342 2.80027 17.3169 2.68306C17.1997 2.56585 17.0408 2.5 16.875 2.5ZM16.25 12.5H13.75V6.875C13.75 6.70924 13.6842 6.55027 13.5669 6.43306C13.4497 6.31585 13.2908 6.25 13.125 6.25H7.5V3.75H16.25V12.5Z",fill:"currentColor"})})}function es(e){var t,n,a;let{table:o}
1=e,[c,x]=(0,s.useState)(!1),[p,u]=(0,s.useState)(!1),[m,f]=(0,s.useState)("change-renewal"),{data:_}=(0,K.wV)(),A=(0,q.useRouter)(),{config:V}=(0,W.r)(),S=null==V?void 0:V.hostName,L=(0,s.useMemo)(()=>o.getAllColumns().filter(e=>e.getCanFilter()),[o]),M=s.useCallback(e=>{var t;return"s"===e.columnDef.id||(null==(t=e.columnDef.meta)?void 0:t.variant)==="text"},[]),I=(0,s.useMemo)(()=>L.filter(e=>M(e)),[L,M]),[F,P]=(0,s.useState)(()=>{var e,t;return null!=(t=null==(e=I[0])?void 0:e.id)?t:""}),[T,E]=(0,s.useState)(()=>{let e=I[0];return(null==e?void 0:e.getFilterValue())||""});s.useEffect(()=>{let e=I.find(e=>e.id===F);e&&E(e.getFilterValue()||"")},[F,I]);let D=s.useCallback(()=>{let e=I.find(e=>e.id===F);if(e){let t=T.trim();e.setFilterValue(t||void 0),I.filter(e=>e.id!==F).forEach(e=>e.setFilterValue(void 0))}},[I,F,T]),B=s.useCallback(e=>{"Enter"===e.key&&(e.preventDefault(),D())},[D]),H=s.useMemo(()=>o.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()),[o]),R=(0,s.useMemo)(()=>o.getSelectedRowModel().rows.map(e=>e.original),[o.getSelectedRowModel().rows]),O=e=>{b(e)},U=(e,t)=>{if(0===R.length)return void O(t);f(e),x(!0)},Z=async()=>{if(0===R.length)return void O("xoay");try{let e=R.map(e=>e.id),t=await z.A.postApi("/api/v1/proxies/rotate-by-ids",{userproxiesIds:e},null==_?void 0:_.accessToken),n=(0,X.mz)(t);if(n.length>0){let{successMessages:e,tooSoonMessages:t,errorMessages:l}=(0,X.Lv)(n);(0,$.YB)({successMessages:e,tooSoonMessages:t,errorMessages:l}),(0,G.j)(e=>null==e?void 0:e.toString().startsWith("/api/v1/users/proxies")),A.refresh()}else(0,$.Ru)()}catch(s){var e,t,n,a,r;if((null==s||null==(e=s.response)?void 0:e.status)===400&&(null==s||null==(r=s.response)||null==(a=r.data)||null==(n=a.errors)||null==(t=n.msg)?void 0:t.skipped)){let e=[];s.response.data.errors.msg.skipped.forEach(t=>{e.push("".concat(t.username,": ").concat(t.reason))}),g.toast.error("Tất cả proxy đều chưa tới thời gian xoay",{description:(0,l.jsx)("div",{className:"toast-clamp",children:e.join("\n")}),duration:8e3})}else g.toast.error("C\xf3 lỗi xảy ra khi xoay proxy")}},es=async e=>{let t;if(0===R.length)return void O("copy");switch(e){case"id":t=Promise.resolve(R.map(e=>e.code).join("\n"));break;case"old-id":t=Promise.resolve(R.map(e=>e.id).join("\n"));break;case"proxy":t=Promise.resolve(R.filter(e=>{var t;return(null==(t=e.status)?void 0:t.id)=="6"}).map(e=>{var t,n,l,a,r;return"".concat(null==(n=e.proxy)||null==(t=n.ipaddress)?void 0:t.ip,":").concat(null==(l=e.proxy)?void 0:l.port,":").concat(null==(a=e.proxy)?void 0:a.username,":").concat(null==(r=e.proxy)?void 0:r.password)}).join("\n"));break;case"link":{let e=S?"https://".concat(S,"/api"):"https://api-proxy.homeproxy.vn";t=Promise.all(R.map(async t=>{let n=await (0,ee.f)(t.id,null==_?void 0:_.accessToken);return n?(0,J.z)({baseUrl:e,token:n}):""})).then(e=>e.filter(e=>e).join("\n"))}break;case"proxy-link":{let e=S?"https://".concat(S,"/api"):"https://api-proxy.homeproxy.vn";t=Promise.all(R.map(async t=>{var n,l,a,r,s;let o=await (0,ee.f)(t.id,null==_?void 0:_.accessToken);if(!o)return"";let i="".concat(null==(l=t.proxy)||null==(n=l.ipaddress)?void 0:n.ip,":").concat(null==(a=t.proxy)?void 0:a.port,":").concat(null==(r=t.proxy)?void 0:r.username,":").concat(null==(s=t.proxy)?void 0:s.password),d=(0,J.z)({baseUrl:e,token:o});return"".concat(i,"|").concat(d)})).then(e=>e.filter(e=>e).join("\n"))}break;default:t=Promise.resolve(R.map(e=>{var t,n,l,a,r;return"".concat(e.code,":").concat(null==(n=e.proxy)||null==(t=n.ipaddress)?void 0:t.ip,":").concat(null==(l=e.proxy)?void 0:l.port,":").concat(null==(a=e.proxy)?void 0:a.username,":").concat(null==(r=e.proxy)?void 0:r.password)}).join("\n"))}let n=await (0,r.b)(t),a=await t;n?g.toast.success("Copied to clipboard!",{description:(0,l.jsx)("div",{className:"toast-clamp",children:a}),duration:5e3}):g.toast.error("Failed to copy")},eo=I.find(e=>
1e.id===F),ei=(null!=(a=null==eo||null==(t=eo.columnDef.meta)?void 0:t.placeholder)?a:null==eo||null==(n=eo.columnDef.meta)?void 0:n.label)+"...";return(0,l.jsxs)("div",{className:"w-full min-w-0",children:[(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-[12px] sm:flex-row sm:flex-wrap sm:items-center sm:justify-start 2xl:justify-between",children:[(0,l.jsxs)("div",{className:"flex h-[40px] w-full min-w-0 items-center rounded-[4px] border border-[#d4d4d5] bg-white hover:border-[#1b56d6] has-[[data-state=open]]:border-[#1b56d6] xl:w-[596px] xl:shrink-0",children:[(0,l.jsxs)(j.l6,{value:F,onValueChange:e=>P(e),children:[(0,l.jsx)(j.bq,{icon:(0,l.jsx)(en,{className:"size-[20px] shrink-0 text-[#636364] transition-transform"}),className:"h-[40px] w-fit shrink-0 gap-[4px] rounded-none border-none bg-transparent px-[12px] py-[10px] text-[14px] font-normal whitespace-nowrap text-black shadow-none focus:ring-0 data-[state=open]:border-none data-[state=open]:ring-0 [&[data-state=open]_svg]:rotate-180",children:(0,l.jsx)(j.yv,{})}),(0,l.jsx)(j.gC,{className:"min-w-[134px] rounded-[4px] border-[#d4d4d5] p-[8px] shadow-[0px_8px_16px_0px_rgba(0,0,0,0.14),0px_0px_2px_0px_rgba(0,0,0,0.12)]",children:I.map(e=>{var t,n;return(0,l.jsx)(j.eb,{value:e.id,className:"rounded-[2px] p-[4px] text-[14px] font-normal text-black focus:bg-[#e8e8e9] focus:text-black data-[state=checked]:bg-[#e8e8e9]",children:null!=(n=null==(t=e.columnDef.meta)?void 0:t.label)?n:e.id},e.id)})})]}),(0,l.jsx)("div",{className:"h-full w-px shrink-0 bg-[#d4d4d5]"}),(0,l.jsx)("input",{placeholder:ei,value:T,onChange:e=>E(e.target.value),onKeyDown:B,className:"h-full min-w-0 flex-1 bg-transparent px-[12px] text-[14px] text-black placeholder:text-[#9e9e9f] focus:outline-none"}),(0,l.jsx)("button",{type:"button",onClick:D,title:"T\xecm kiếm",className:"flex size-[40px] shrink-0 items-center justify-center rounded-[2px] bg-[#1b56d6] hover:bg-[#0c3ca4]",children:(0,l.jsx)(i.A,{className:"size-[20px] text-white"})})]}),(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-wrap items-center gap-[8px] sm:w-auto",children:[(0,l.jsx)(et,{icon:d.A,label:"Gia hạn",width:101,onClick:()=>U("change-renewal","gia hạn")}),(0,l.jsx)(et,{icon:el,label:"Thiết lập",width:108,onClick:()=>U("change-info","thiết lập")}),(0,l.jsx)(et,{icon:ea,label:"Xoay",width:84,onClick:Z}),(0,l.jsxs)(C.rI,{modal:!1,open:p,onOpenChange:e=>{if(e&&0===R.length)return void O("copy");u(e)},children:[(0,l.jsx)(C.ty,{asChild:!0,children:(0,l.jsx)("button",{type:"button",title:"Copy h\xe0ng loạt",className:"flex size-[40px] shrink-0 items-center justify-center rounded-[4px] border border-[#1b56d6] bg-white text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:(0,l.jsx)(er,{className:"size-[20px]"})})}),(0,l.jsxs)(C.SQ,{align:"start",children:[(0,l.jsxs)(C._2,{onClick:()=>es("proxy"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Proxy"]}),(0,l.jsxs)(C._2,{onClick:()=>
1es("link"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Link xoay"]}),(0,l.jsxs)(C._2,{onClick:()=>es("proxy-link"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Proxy v\xe0 Link xoay"]}),(0,l.jsxs)(C._2,{onClick:()=>es("id"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy ID"]}),(0,l.jsxs)(C._2,{onClick:()=>es("old-id"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy ID cũ"]})]})]}),(0,l.jsxs)(N.AM,{children:[(0,l.jsx)(N.Wv,{asChild:!0,children:(0,l.jsxs)("button",{type:"button",style:{width:131},className:"flex h-[40px] shrink-0 items-center justify-center gap-[8px] rounded-[4px] border border-[#1b56d6] bg-white px-[12px] py-[10px] text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:[(0,l.jsx)(h.A,{className:"size-[20px] shrink-0"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold whitespace-nowrap",children:"Hiển thị"}),(0,l.jsx)(en,{className:"size-[20px] shrink-0"})]})}),(0,l.jsx)(N.hl,{align:"end",className:"w-[170px] rounded-lg px-0 py-3",children:(0,l.jsx)(k.uB,{className:"rounded-none",children:(0,l.jsxs)(k.oI,{children:[(0,l.jsx)(k.xL,{children:"No columns found."}),(0,l.jsx)(k.L$,{className:"rounded-none p-0",children:H.map(e=>{var t,n;return"filter"===e.id||"products"===e.id||"toAddress"===e.id||"proxy"===e.id||"protocol"===e.id?null:(0,l.jsxs)(k.h_,{onSelect:()=>{e.toggleVisibility(!e.getIsVisible()),0===H.filter(e=>e.getIsVisible()).length&&H.forEach(e=>e.toggleVisibility(!0))},className:"h-8 w-[170px] cursor-pointer justify-between gap-2 rounded-none px-4 py-[7px]",children:[(0,l.jsx)("span",{className:"truncate text-sm font-normal",children:null!=(n=null==(t=e.columnDef.meta)?void 0:t.label)?n:e.id}),(0,l.jsx)(y.F.CheckIcon,{className:(0,w.cn)("h-4 w-4 shrink-0",e.getIsVisible()?"opacity-100":"opacity-0")})]},e.id)})})]})})})]})]})]}),(0,l.jsx)(v.a,{title:"",description:"",isOpen:c,onClose:()=>x(!1),className:"w-[320px] max-w-[calc(100%-2rem)] gap-0 overflow-hidden rounded-none border-none bg-[#F5F5F6] p-0 shadow-none",headerClassName:"hidden",closeButtonClassName:"top-0 right-0 h-6 w-6 hover:rotate-0",children:(0,l.jsxs)("div",{className:"relative overflow-hidden bg-[#f5f5f6] p-[16px]",children:[(0,l.jsx)("svg",{className:"pointer-events-none absolute top-[-29px] left-[-27px]",width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("circle",{cx:"36",cy:"36",r:"36",fill:"#1F93FF"})}),(0,l.jsx)("svg",{className:"pointer-events-none absolute right-[-49px] bottom-[-70px]",width:"122",height:"122",viewBox:"0 0 122 122",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("circle",{cx:"61",cy:"61",r:"61",fill:"#96C0E7"})}),(0,l.jsx)("div",{className:"relative z-10",children:(()=>{let e;switch(m){case"change-info":e=(0,l.jsx)(Y.A,{onClose:()=>x(!1),selectedProxies:R});break;case"change-renewal":e=(0,l.jsx)(Q,{onClose:()=>x(!1),selectedProxies:R});break;default:return null}return e})()})]})})]})}var eo=n(39867),ei=n(3998),ed=n(76444),ec=n(34857),ex=n(61362),ep=n(75426),eu=n(35299),eh=n(18332),em=n(52619),ef=n.n(em);function eg(e){let{onClose:t}=e,{input:n,setInput:a,loadingCheck:r,loadingRotate:s,results:o,handleFetch:i,handleCopyResults:d}=(0,ec.M)();return(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,l.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,l.jsx)(eo.A,{className:"size-[20px] shrink-0 text-[#1b56d6]"}),(0,l.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Lấy Proxy"})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[16px] border-y border-[#e8e8e9] py-[12px] 2xl:border-y-0 2xl:shadow-[inset_0_1px_0_0_#e8e8e9,inset_0_-1px_0_0_#e8e8e9]",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-[8px] text-[14px] leading-normal text-black 2xl:[&>p]:leading-[19px]",children:[(0,l.jsx)("p",{children:"Nhập key v\xe0o \xf4 b\xean dưới để xem th\xf4ng tin proxy hiện tại"}),(0,l.jsx)("p",{children:'Lấy link xoay: Sử dụng n\xfat "Copy Link xoay" trong bảng danh s\xe1ch'}),(0,l.jsxs)("p",{children:["Tham khảo"," ",(0,l.jsx)(ef(),{href:"/tai-lieu-api",className:"text-[#1b56d6] underline hover:text-[#1b56d6]/80",children:"t\xe0i liệu API"})," ","để biết th\xeam chi tiết"]})]}),(0,l.jsx)("textarea",{id:"input",placeholder:"Key 1\nKey 2\nKey 3",value:n,onChange:e=>a(e.target.value),rows:6,wrap:"off",spellCheck:!1,disabled:r||s,className:"h-[181px] w-full resize-none rounded-[4px] border border-[#d4d4d5] bg-[#f5f5f6] p-[12px] text-[14px] leading-normal text-black placeholder:text-[#bdbdbf] focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",style:{overflow:"auto",whiteSpace:"pre",wordWrap:"normal",overflowWrap:"normal",wordBreak:"normal"}}),o.length>0&&(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[8px]",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)(ed.J,{className:"text-[14px] leading-normal font-semibold text-black",children:["Kết quả (",o.length,")"]}),(0,l.jsx)(ei.$,{type:"button",size:"sm",variant:"outline",onClick:d,disabled:!o.some(e=>e.proxy),className:"h-8 rounded-[4px] text-xs sm:h-9 sm:text-sm",children:"Copy tất cả proxy"})]}),(0,l.jsx)("div",{className:"max-h-[200px] space-y-1 overflow-y-auto rounded-[4px] border border-[#d4d4d5] p-2 sm:max-h-[280px] sm:space-y-1.5 sm:p-3",children:o.map((e,t)=>(0,l.jsxs)("div",{className:"space-y-0.5",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1 sm:gap-1.5",children:[e.proxy?(0,l.jsx)(ex.A,{className:"h-3 w-3 flex-shrink-0 text-green-600 sm:h-3.5 sm:w-3.5"}):(0,l.jsx)(m.A,{className:"h-3 w-3 flex-shrink-0 text-red-500 sm:h-3.5 sm:w-3.5"}),(0,l.jsx)("span",{className:"font-mono text-[10px] font-medium sm:text-xs",title:e.key,children:e.key.length>
115?"".concat(e.key.substring(0,15),"..."):e.key})]}),e.proxy?(0,l.jsxs)("div",{className:"ml-4 flex items-start gap-1 sm:ml-5 sm:gap-1.5",children:[(0,l.jsxs)("div",{className:"bg-muted flex-1 rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight break-all sm:px-2 sm:py-1 sm:text-[11px]",children:[e.proxy,null!=e.timeRemaining&&(0,l.jsxs)("span",{className:"ml-2 font-semibold ".concat(0===e.timeRemaining?"text-green-500":"text-red-500"),children:[e.timeRemaining,"s"]})]}),(0,l.jsx)(ei.$,{type:"button",size:"sm",variant:"ghost",className:"h-5 w-5 flex-shrink-0 p-0 sm:h-6 sm:w-6",onClick:()=>{navigator.clipboard.writeText(e.proxy),g.toast.success("Đ\xe3 copy proxy!")},children:(0,l.jsx)(ep.A,{className:"h-3 w-3 sm:h-3.5 sm:w-3.5"})})]}):(0,l.jsx)(eh.Fc,{variant:"destructive",className:"ml-4 py-0.5 sm:ml-5 sm:py-1",children:(0,l.jsx)(eh.TN,{className:"text-[10px] sm:text-[11px]",children:e.error})})]},t))})]})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>i(!1),disabled:r||s||!n.trim(),className:"flex h-[40px] w-full items-center justify-center gap-2 rounded-[4px] bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90 disabled:cursor-not-allowed disabled:opacity-50",children:[s&&(0,l.jsx)(eu.A,{className:"size-[16px] animate-spin text-white"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:s?"Đang lấy proxy...":"Lấy proxy"})]})]})}function eb(e){let{icon:t,label:n,onClick:a,width:r}=e;return(0,l.jsxs)("button",{type:"button",onClick:a,style:{width:r},className:"flex h-[40px] shrink-0 items-center justify-center gap-[8px] rounded-[4px] border border-[#1b56d6] bg-white px-[12px] py-[10px] text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:[(0,l.jsx)(t,{className:"size-[20px] shrink-0"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold whitespace-nowrap",children:n})]})}function ev(e){return(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M10.0007 12.4997L5.83398 8.33301H14.1673L10.0007 12.4997Z",fill:"currentColor"})})}function ey(e){return(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16.875 2.5H6.875C6.70924 2.5 6.55027 2.56585 6.43306 2.68306C6.31585 2.80027 6.25 2.95924 6.25 3.125V6.25H3.125C2.95924 6.25 2.80027 6.31585 2.68306 6.43306C2.56585 6.55027 2.5 6.70924 2.5 6.875V16.875C2.5 17.0408 2.56585 17.1997 2.68306 17.3169C2.80027 17.4342 2.95924 17.5 3.125 17.5H13.125C13.2908 17.5 13.4497 17.4342 13.5669 17.3169C13.6842 17.1997 13.75 17.0408 13.75 16.875V13.75H16.875C17.0408 13.75 17.1997 13.6842 17.3169 13.5669C17.4342 13.4497 17.5 13.2908 17.5 13.125V3.125C17.5 2.95924 17.4342 2.80027 17.3169 2.68306C17.1997 2.56585 17.0408 2.5 16.875 2.5ZM16.25 12.5H13.75V6.875C13.75 6.70924 13.6842 6.55027 13.5669 6.43306C13.4497 6.31585 13.2908 6.25 13.125 6.25H7.5V3.75H16.25V12.5Z",fill:"currentColor"})})}function ew(e){var t,n,a;let{table:r}
1=e,[o,c]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[u,m]=(0,s.useState)("change-renewal"),{data:f}=(0,K.wV)(),{config:_}=(0,W.r)(),A=null==_?void 0:_.hostName,z=(0,s.useMemo)(()=>r.getAllColumns().filter(e=>e.getCanFilter()),[r]),V=s.useCallback(e=>{var t;return"s"===e.columnDef.id||(null==(t=e.columnDef.meta)?void 0:t.variant)==="text"},[]),S=(0,s.useMemo)(()=>z.filter(e=>V(e)),[z,V]),[L,M]=(0,s.useState)(()=>{var e,t;return null!=(t=null==(e=S[0])?void 0:e.id)?t:""}),[I,F]=(0,s.useState)(()=>{let e=S[0];return(null==e?void 0:e.getFilterValue())||""});s.useEffect(()=>{let e=S.find(e=>e.id===L);e&&F(e.getFilterValue()||"")},[L,S]);let P=s.useCallback(()=>{let e=S.find(e=>e.id===L);if(e){let t=I.trim();e.setFilterValue(t||void 0),S.filter(e=>e.id!==L).forEach(e=>e.setFilterValue(void 0))}},[S,L,I]),T=s.useCallback(e=>{"Enter"===e.key&&(e.preventDefault(),P())},[P]),E=s.useMemo(()=>r.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()),[r]),D=(0,s.useMemo)(()=>r.getSelectedRowModel().rows.map(e=>e.original),[r.getSelectedRowModel().rows]),B=e=>{b(e)},H=async e=>{let t="";switch(e){case"id":t=D.map(e=>e.code).join("\n");break;case"key":t=(await Promise.all(D.map(async e=>{let t=await (0,ee.f)(e.id,null==f?void 0:f.accessToken);return t?"".concat(t):""}))).filter(e=>e).join("\n");break;case"link":{let e=A?"https://".concat(A,"/api"):"https://api-proxy.homeproxy.vn";t=(await Promise.all(D.map(async t=>{let n=await (0,ee.f)(t.id,null==f?void 0:f.accessToken);return n?(0,J.z)({baseUrl:e,token:n}):""}))).filter(e=>e).join("\n")}break;default:t=""}navigator.clipboard.writeText(t).then(()=>{g.toast.success("Copied to clipboard!",{description:(0,l.jsx)("div",{className:"toast-clamp",children:t}),duration:5e3})}).catch(()=>{g.toast.error("Failed to copy")})},R=S.find(e=>e.id===L),O=(null!=(a=null==R||null==(t=R.columnDef.meta)?void 0:t.placeholder)?a:null==R||null==(n=R.columnDef.meta)?void 0:n.label)+"...";return(0,l.jsxs)("div",{className:"w-full min-w-0",children:[(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-[12px] sm:flex-row sm:flex-wrap sm:items-center sm:justify-start 2xl:justify-between",children:[(0,l.jsxs)("div",{className:"flex h-[40px] w-full min-w-0 items-center rounded-[4px] border border-[#d4d4d5] bg-white hover:border-[#1b56d6] has-[[data-state=open]]:border-[#1b56d6] xl:w-[683px] xl:shrink-0",children:[(0,l.jsxs)(j.l6,{value:L,onValueChange:e=>M(e),children:[(0,l.jsx)(j.bq,{icon:(0,l.jsx)(ev,{className:"size-[20px] shrink-0 text-[#636364] transition-transform"}),className:"h-[40px] w-fit shrink-0 gap-[4px] rounded-none border-none bg-transparent px-[12px] py-[10px] text-[14px] font-normal whitespace-nowrap text-black shadow-none focus:ring-0 data-[state=open]:border-none data-[state=open]:ring-0 [&[data-state=open]_svg]:rotate-180",children:(0,l.jsx)(j.yv,{})}),(0,l.jsx)(j.gC,{className:"min-w-[134px] rounded-[4px] border-[#d4d4d5] p-[8px] shadow-[0px_8px_16px_0px_rgba(0,0,0,0.14),0px_0px_2px_0px_rgba(0,0,0,0.12)]",children:S.map(e=>{var t,n;return(0,l.jsx)(j.eb,{value:e.id,className:"rounded-[2px] p-[4px] text-[14px] font-normal text-black focus:bg-[#e8e8e9] focus:text-black data-[state=checked]:bg-[#e8e8e9]",children:null!=(n=null==(t=e.columnDef.meta)?void 0:t.label)?n:e.id},e.id)})})]}),(0,l.jsx)("div",{className:"h-[24px] w-px shrink-0 bg-[#d4d4d5]"}),(0,l.jsx)("input",{placeholder:O,value:I,onChange:e=>F(e.target.value),onKeyDown:T,className:"h-full min-w-0 flex-1 bg-transparent px-[12px] text-[14px] text-black placeholder:text-[#9e9e9f] focus:outline-none"}),(0,l.jsx)("button",{type:"button",onClick:P,title:"T\xecm kiếm",className:"flex size-[40px] shrink-0 items-center justify-center rounded-[2px] bg-[#1b56d6] hover:bg-[#0c3ca4]",children:(0,l.jsx)(i.A,{className:"size-[20px] text-white"})})]}),(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-wrap items-center gap-[8px] sm:w-auto",children:[(0,l.jsx)(eb,{icon:d.A,label:"Gia hạn",width:101,onClick:()=>{if(0===D.length)return void B("gia hạn");m("change-renewal"),c(!0)}}),(0,l.jsx)(eb,{icon:eo.A,label:"Lấy proxy",width:113,onClick:()=>{m("fetch-proxy"),c(!0)}}),(0,l.jsxs)(C.rI,{modal:!1,open:x,onOpenChange:e=>{if(e&&0===D.length)return void B("copy");p(e)},children:[(0,l.jsx)(C.ty,{asChild:!0,children:(0,l.jsx)("button",{type:"button",title:"Copy h\xe0ng loạt",className:"flex size-[40px] shrink-0 items-center justify-center rounded-[4px] border border-[#1b56d6] bg-white text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:(0,l.jsx)(ey,{className:"size-[20px]"})})}),(0,l.jsxs)(C.SQ,{align:"start",children:[(0,l.jsxs)(C._2,{onClick:()=>H("key"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Key"]}),(0,l.jsxs)(C._2,{onClick:()=>
1H("link"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy Link xoay"]}),(0,l.jsxs)(C._2,{onClick:()=>H("id"),children:[(0,l.jsx)(y.F.CopyIcon,{className:"text-primary h-4 w-4"}),"Copy ID"]})]})]}),(0,l.jsxs)(N.AM,{children:[(0,l.jsx)(N.Wv,{asChild:!0,children:(0,l.jsxs)("button",{type:"button",style:{width:131},className:"flex h-[40px] shrink-0 items-center justify-center gap-[8px] rounded-[4px] border border-[#1b56d6] bg-white px-[12px] py-[10px] text-[#1b56d6] shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#c4e8ff]",children:[(0,l.jsx)(h.A,{className:"size-[20px] shrink-0"}),(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold whitespace-nowrap",children:"Hiển thị"}),(0,l.jsx)(ev,{className:"size-[20px] shrink-0"})]})}),(0,l.jsx)(N.hl,{align:"end",className:"w-[170px] rounded-lg px-0 py-3",children:(0,l.jsx)(k.uB,{className:"rounded-none",children:(0,l.jsxs)(k.oI,{children:[(0,l.jsx)(k.xL,{children:"No columns found."}),(0,l.jsx)(k.L$,{className:"rounded-none p-0",children:E.map(e=>{var t,n;return"filter"===e.id||"products"===e.id||"toAddress"===e.id||"proxy"===e.id||"protocol"===e.id?null:(0,l.jsxs)(k.h_,{onSelect:()=>{e.toggleVisibility(!e.getIsVisible()),0===E.filter(e=>e.getIsVisible()).length&&E.forEach(e=>e.toggleVisibility(!0))},className:"h-8 w-[170px] cursor-pointer justify-between gap-2 rounded-none px-4 py-[7px]",children:[(0,l.jsx)("span",{className:"truncate text-sm font-normal",children:null!=(n=null==(t=e.columnDef.meta)?void 0:t.label)?n:e.id}),(0,l.jsx)(y.F.CheckIcon,{className:(0,w.cn)("h-4 w-4 shrink-0",e.getIsVisible()?"opacity-100":"opacity-0")})]},e.id)})})]})})})]})]})]}),(0,l.jsx)(v.a,{title:"",description:"",isOpen:o,onClose:()=>c(!1),className:(0,w.cn)("max-w-[calc(100%-2rem)] gap-0 overflow-hidden rounded-none border-none bg-[#F5F5F6] p-0 shadow-none","fetch-proxy"===u?"w-[465px]":"w-[320px]"),headerClassName:"hidden",closeButtonClassName:"top-0 right-1 h-8 w-8",children:(0,l.jsxs)("div",{className:"relative overflow-hidden bg-[#f5f5f6] p-[16px]",children:[(0,l.jsx)("svg",{className:"pointer-events-none absolute top-[-29px] left-[-27px]",width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("circle",{cx:"36",cy:"36",r:"36",fill:"#1F93FF"})}),(0,l.jsx)("svg",{className:"pointer-events-none absolute right-[-49px] bottom-[-70px]",width:"122",height:"122",viewBox:"0 0 122 122",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("circle",{cx:"61",cy:"61",r:"61",fill:"#96C0E7"})}),(0,l.jsx)("div",{className:"relative z-10",children:(()=>{let e;switch(u){case"fetch-proxy":e=(0,l.jsx)(eg,{onClose:()=>c(!1)});break;case"change-renewal":e=(0,l.jsx)(Q,{onClose:()=>c(!1),selectedProxies:D});break;default:return null}return e})()})]})})]})}var ej=n(97453);function ek(e){let{toolbarCustomProxy:t,table:n,children:a,className:o,title:i,...d}=e,[c]=(0,ej.ZA)("type");n.getState().columnFilters.length;let x=s.useCallback(e=>{let t=e.findIndex(e=>{var t,n,l;let a=null==(n=e.columnDef.meta)||null==(t=n.label)?void 0:t.toString().toLowerCase();return(null==(l=e.id)?void 0:l.toString().toLowerCase())==="proxy"||"proxy"===a});if(t>0){let n=e.slice(),[l]=n.splice(t,1);return n.unshift(l),n}return e},[]),p=s.useCallback(e=>{let t=e.findIndex(e=>{var t,n,l;let a=null==(n=e.columnDef.meta)||null==(t=n.label)?void 0:t.toString().toLowerCase();return(null==(l=e.id)?void 0:l.toString().toLowerCase())==="id"||"id"===a});if(t>-1&&t!==e.length-1){let n=e.slice(),[l]=n.splice(t,1);return n.push(l),n}return e},[]),u=s.useMemo(()=>n.getAllColumns().filter(e=>e.getCanFilter()),[n]),h=s.useCallback(e=>{var t;return"s"===e.columnDef.id||(null==(t=e.columnDef.meta)?void 0:t.variant)==="text"},[]);p(x(u.filter(e=>!h(e))));let m=s.useMemo(()=>p(x(u.filter(e=>h(e)))),[u,h,x,p]),[f]=s.useState(()=>{var e,t;return null!=(t=null==(e=m[0])?void 0:e.id)?t:""}),[g,b]=s.useState(()=>{let e=m[0];return(null==e?void 0:e.getFilterValue())||""});s.useEffect(()=>{let e=m.find(e=>e.id===f);e&&b(e.getFilterValue()||"")},[f]),s.useCallback(()=>{n.resetColumnFilters()},[n]);let v=s.useCallback(()=>{let e=m.find(e=>e.id===f);if(e){let t=g.trim();g&&g.trim().startsWith("0")&&(t=(0,r.k)(g)),e.setFilterValue(t),m.filter(e=>
1e.id!==f).forEach(e=>e.setFilterValue(void 0))}},[m,f,g]);return(s.useCallback(e=>{"Enter"===e.key&&(e.preventDefault(),v())},[v]),"proxies"===t)?(0,l.jsx)("div",{className:"flex w-full min-w-0 items-center",children:(0,l.jsx)(Z,{table:n})}):"keys-xoay"===c?(0,l.jsx)("div",{className:"flex w-full min-w-0 items-center",children:(0,l.jsx)(ew,{table:n})}):(0,l.jsx)("div",{className:"flex w-full min-w-0 items-center",children:(0,l.jsx)(es,{table:n})})}},98080:(e,t,n)=>{n.d(t,{A:()=>x});var l=n(95155),a=n(41052),r=n(65142),s=n(68114),o=n(98535),i=n(64269);function d(e){return(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"M10 10.8333V13.3333",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M16.6667 10.8333C16.6667 15 13.75 17.0833 10.2833 18.2917C10.1018 18.3532 9.90461 18.3502 9.725 18.2833C6.25 17.0833 3.33333 15 3.33333 10.8333V5C3.33333 4.77899 3.42113 4.56703 3.57741 4.41074C3.73369 4.25446 3.94565 4.16667 4.16667 4.16667C5.83333 4.16667 7.91667 3.16667 9.36667 1.9C9.54321 1.74917 9.76779 1.66629 10 1.66629C10.2322 1.66629 10.4568 1.74917 10.6333 1.9C12.0917 3.175 14.1667 4.16667 15.8333 4.16667C16.0543 4.16667 16.2663 4.25446 16.4226 4.41074C16.5789 4.56703 16.6667 4.77899 16.6667 5V10.8333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10 10.8333C10.9205 10.8333 11.6667 10.0871 11.6667 9.16667C11.6667 8.24619 10.9205 7.5 10 7.5C9.07953 7.5 8.33333 8.24619 8.33333 9.16667C8.33333 10.0871 9.07953 10.8333 10 10.8333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}function c(e){let{checked:t,...n}=e;return(0,l.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[t&&(0,l.jsx)("path",{d:"M10.6 16.2L17.65 9.15L16.25 7.75L10.6 13.4L7.75 10.55L6.35 11.95L10.6 16.2Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM5 19H19V5H5V19Z",fill:"currentColor"})]})}function x(e){let{selectedProxies:t,onClose:n}=e,{form:x,activeProxy:p,wIsAutoRotate:u,onSubmit:h,isSubmitting:m}=(0,s.I)({selectedProxies:t,onClose:n});return p?(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,l.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,l.jsx)(d,{className:"size-[20px] shrink-0 text-[#1b56d6]"}),(0,l.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Thiết lập"})]}),(0,l.jsx)(a.lV,{...x,children:(0,l.jsxs)("form",{onSubmit:h,autoComplete:"off",className:"relative flex w-full flex-col gap-[12px]",children:[(0,l.jsx)(o.vU,{}),(0,l.jsx)("div",{className:"w-full border-y border-[#e8e8e9] py-[12px] 2xl:border-y-0 2xl:shadow-[inset_0_1px_0_0_#e8e8e9,inset_0_-1px_0_0_#e8e8e9]",children:(0,l.jsx)("textarea",{readOnly:!0,className:"block h-[121px] w-full resize-none rounded-[4px] border border-[#d4d4d5] bg-[#f5f5f6] p-[12px] text-[14px] leading-normal text-black placeholder:text-[#bdbdbf] focus:outline-none 2xl:h-[127px]",placeholder:"Nhập Proxy của bạn",defaultValue:t.map(e=>{var t,n,l;return(null==e||null==(n=e.proxy)||null==(t=n.ipaddress)?void 0:t.ip)+":"+(null==e||null==(l=e.proxy)?void 0:l.port)}).join("\n")})}),(0,l.jsx)(a.zB,{control:x.control,name:"password",render:e=>{let{field:t}=e;return(0,l.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,l.jsx)(a.lR,{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"Mật khẩu"}),(0,l.jsx)(a.MJ,{children:(0,l.jsx)(r.p,{placeholder:"Nhập mật khẩu",className:"h-auto w-full rounded-[4px] border-[#d4d4d5] bg-white px-[10px] py-[8px] text-[14px] leading-normal font-normal text-black shadow-none placeholder:text-[#bdbdbf] focus-visible:border-[#3976f9] focus-visible:ring-0 2xl:border-0 2xl:leading-[20px] 2xl:shadow-[inset_0_0_0_1px_#d4d4d5] 2xl:focus-visible:shadow-[inset_0_0_0_1px_#3976f9]",...t,...o.P1})}),(0,l.jsx)(a.C5,{})]})}}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-[4px]",children:[(0,l.jsx)("p",{className:"text-[14px] leading-normal font-normal text-black 2xl:leading-[19px]",children:"Thời gian xoay"}),(0,l.jsxs)("div",{className:"flex h-[36px] w-full items-center justify-between gap-[10px] rounded-[4px] border border-[#e8e8e9] bg-white px-[10px] py-[8px]",children:[(0,l.jsx)(a.zB,{control:x.control,name:"rotateInterval",render:e=>{let{field:t}=e;return(0,l.jsxs)(a.eI,{className:"flex-1 gap-0",children:[(0,l.jsx)(a.MJ,{children:(0,l.jsx)("input",{step:1,min:0,type:"number",placeholder:"0",disabled:!u,className:"no-spinner w-full border-none bg-transparent text-[14px] leading-normal text-black focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",value:t.value,onChange:e=>{let n=e.target.value;if(""===n)return void t.onChange("");
1t.onChange(+n)},onBlur:()=>{(!t.value||t.value<0)&&t.onChange(0)}})}),(0,l.jsx)(a.C5,{})]})}}),(0,l.jsx)("span",{className:"shrink-0 text-[14px] leading-normal text-[#636364]",children:"/ ph\xfat"})]})]}),(0,l.jsx)(a.zB,{control:x.control,name:"isAutoRotate",render:e=>{let{field:t}=e;return(0,l.jsxs)(a.eI,{className:"flex w-full flex-row items-center justify-between gap-[8px]",children:[(0,l.jsx)(a.lR,{className:"text-[14px] leading-normal font-normal text-black",children:"Tự động xoay"}),(0,l.jsx)(a.MJ,{children:(0,l.jsx)("button",{type:"button",onClick:()=>t.onChange(!t.value),className:(0,i.cn)("flex items-center justify-center p-[4px]",t.value?"text-[#1b56d6]":"text-[#9e9e9f]"),children:(0,l.jsx)(c,{checked:t.value,className:"size-[24px]"})})})]})}}),(0,l.jsx)("button",{type:"submit",disabled:m,className:"flex h-[40px] w-full items-center justify-center gap-2 rounded-[4px] bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90",children:(0,l.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Cập nhật"})})]})})]}):null}},98346:(e,t,n)=>{n.d(t,{ZI:()=>d,k$:()=>i,m_:()=>o});var l=n(95155);n(12115);var a=n(47520),r=n(64269);function s(e){let{delayDuration:t=0,...n}=e;return(0,l.jsx)(a.Kq,{"data-slot":"tooltip-provider",delayDuration:t,...n})}function o(e){let{...t}=e;return(0,l.jsx)(s,{children:(0,l.jsx)(a.bL,{"data-slot":"tooltip",...t})})}function i(e){let{...t}=e;return(0,l.jsx)(a.l9,{"data-slot":"tooltip-trigger",...t})}function d(e){let{className:t,sideOffset:n=0,children:s,...o}=e;return(0,l.jsx)(a.ZL,{children:(0,l.jsxs)(a.UC,{"data-slot":"tooltip-content",sideOffset:n,className:(0,r.cn)("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-[2px] bg-[#1b56d6] px-[12px] py-[4px] text-[14px] text-balance text-white",t),...o,children:[s,(0,l.jsx)(a.i3,{width:10,height:4,className:"fill-[#1b56d6]"})]})})}}}]);

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.