1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21298],{3998:(e,t,s)=>{s.d(t,{$:()=>o,r:()=>i});var n=s(95155);s(12115);var l=s(32467),a=s(83101),r=s(64269);let i=(0,a.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 o(e){let{className:t,variant:s,size:a,asChild:o=!1,...d}=e,c=o?l.DX:"button";return(0,n.jsx)(c,{"data-slot":"button",className:(0,r.cn)(i({variant:s,size:a,className:t})),...d})}},11186:(e,t,s)=>{s.d(t,{bg:()=>p,bq:()=>u,eb:()=>m,gC:()=>h,l6:()=>c,yv:()=>x});var n=s(95155),l=s(12115),a=s(47887),r=s(24033),i=s(5917),o=s(12108),d=s(64269);function c(e){let{...t}=e;return(0,n.jsx)(a.bL,{"data-slot":"select",...t})}function x(e){let{...t}=e;return(0,n.jsx)(a.WT,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:s="default",children:l,icon:i,iconClassName:o,...c}=e;return(0,n.jsxs)(a.l9,{"data-slot":"select-trigger","data-size":s,className:(0,d.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit cursor-pointer items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=md]:h-10 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...c,children:[l,(0,n.jsx)(a.In,{asChild:!0,children:null!=i?i:(0,n.jsx)(r.A,{className:(0,d.cn)("size-4 opacity-50",o)})})]})}function h(e){let{className:t,children:s,position:l="popper",...r}=e;return(0,n.jsx)(a.ZL,{children:(0,n.jsxs)(a.UC,{"data-slot":"select-content",className:(0,d.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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:l,...r,children:[(0,n.jsx)(g,{}),(0,n.jsx)(a.LM,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,n.jsx)(f,{})]})})}function p(e){let{onLoadMore:t}=e,s=l.useRef(null);return l.useEffect(()=>{let e=s.current;if(!e||!t)return;let n=new IntersectionObserver(e=>{let[s]=e;s.isIntersecting&&t()},{threshold:.1});return n.observe(e),()=>n.disconnect()},[t]),(0,n.jsx)("div",{ref:s,className:"h-1"})}function m(e){let{className:t,children:s,...l}=e;return(0,n.jsxs)(a.q7,{"data-slot":"select-item",className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...l,children:[(0,n.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,n.jsx)(a.VF,{children:(0,n.jsx)(i.A,{className:"size-4"})})}),(0,n.jsx)(a.p4,{children:s})]})}function g(e){let{className:t,...s}=e;return(0,n.jsx)(a.PP,{"data-slot":"select-scroll-up-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,n.jsx)(o.A,{className:"size-4"})})}function f(e){let{className:t,...s}=e;return(0,n.jsx)(a.wn,{"data-slot":"select-scroll-down-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,n.jsx)(r.A,{className:"size-4"})})}},46199:(e,t,s)=>{s.d(t,{A:()=>H});var n=s(95155),l=s(39180),a=s(41052),r=s(64269),i=s(12963),o=s(76830),d=s(66942),c=s(12115),x=s(22544),u=s(15653),h=s(57913),p=s(68388),m=s(65142),g=s(11186),f=s(75746),v=s(13744),b=s(64240),j=s(60919),w=s(61362),C=s(52056),N=s(24033),y=s(96199),k=s(20063),_=s(18720);let z=u.z.object({taxCodeId:u.z.string().optional(),mst:u.z.string().nonempty({message:"Mst l\xe0 bắt buá»c"}),email:u.z.string().optional(),companyName:u.z.string().optional(),address:u.z.string().optional(),buyer:u.z.string().optional()}),M={notEnoughCoin:"T\xe0i khoản kh\xf4ng Äá»§ tiá»n",notFound:"Sá» Äiá»n thoại kh\xf4ng tá»n tại",notEnoughProxy:"Kh\xf4ng Äá»§ proxy"};function L(e){return(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M10.5492 18.3333H15C15.442 18.3333 15.866 18.1577 16.1785 17.8452C16.4911 17.5326 16.6667 17.1087 16.6667 16.6667V6.66667C16.6673 6.40259 16.6157 6.141 16.5147 5.89699C16.4137 5.65299 16.2654 5.43139 16.0783 5.245L13.0883 2.255C12.9019 2.06793 12.6803 1.91963 12.4363 1.81865C12.1923 1.71768 11.9307 1.66602 11.6667 1.66667H5C4.55797 1.66667 4.13405 1.84226 3.82149 2.15482C3.50893 2.46738 3.33333 2.89131 3.33333 3.33333V11.1167",stroke:"#1B56D6",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M11.6667 1.66667V5.83333C11.6667 6.05435 11.7545 6.26631 11.9107 6.42259C12.067 6.57887 12.279 6.66667 12.5 6.66667H16.6667",stroke:"#1B56D6",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.64833 10.5183C8.98019 10.1868 9.43014 10.0007 9.89922 10.0009C10.3683 10.0012 10.8181 10.1877 11.1496 10.5196C11.4811 10.8514 11.6672 11.3014 11.667 11.7705C11.6667 12.2395 11.4802 12.6893 11.1483 13.0208L6.96667 17.1975C6.76865 17.3956 6.52389 17.54
106 6.255 17.6192L3.86583 18.3167C3.79413 18.3376 3.71812 18.3388 3.64576 18.3203C3.5734 18.3018 3.50736 18.2641 3.45454 18.2113C3.40172 18.1585 3.36407 18.0924 3.34554 18.0201C3.327 17.9477 3.32825 17.8717 3.34917 17.8L4.04583 15.4092C4.12448 15.1406 4.26949 14.8961 4.4675 14.6983L8.64833 10.5183Z",stroke:"#1B56D6",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}let A="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 V(e){let{label:t,en:s}=e;return(0,n.jsxs)(a.lR,{className:"flex items-start gap-[4px] text-[14px] leading-normal font-normal 2xl:leading-[19px]",children:[(0,n.jsx)("span",{className:"text-black",children:t}),(0,n.jsxs)("span",{className:"text-[#8e8e92]",children:["(",s,")"]})]})}function T(e){var t,s,l,r;let{payload:i,open:o,onClose:u,formParent:T,redirect:B="/proxies"}=e,F=(0,f.k)(e=>e.user),E={mst:"",taxCodeId:"chon",address:"",email:null!=(t=null==F?void 0:F.email)?t:"",buyer:null!=(r="".concat(null!=(s=null==F?void 0:F.firstName)?s:""," ").concat(null!=(l=null==F?void 0:F.lastName)?l:"").trim())?r:""},I=(0,x.mN)({resolver:(0,d.u)(z),values:E}),{formState:{isSubmitting:H}}=I,{data:S}=(0,y.wV)(),W=(0,k.useRouter)(),[D,Z]=(0,c.useState)([]),P=(0,f.k)(e=>e.updateCoin),[q,J]=(0,c.useState)(!1),O=I.watch("taxCodeId");async function R(e){var t,s,l,a,r,o,d,c;try{let a={...i};if("chon"===e.taxCodeId?a.taxCode={id:(await v.A.postApi("/api/v1/tax-codes",e,(null==S?void 0:S.user).accessToken)).id}:a.taxCode={id:e.taxCodeId},"WALLET"===i.paymentMethod){let e="/api/v1/orders";if((null==F||null==(t=F.role)?void 0:t.id)=="2"&&(e+="/merchant"),(null==F?void 0:F.coin)>=i.total){let t=await v.A.postApi(e,a,null==S||null==(s=S.user)?void 0:s.accessToken);(null==F||null==(l=F.role)?void 0:l.id)=="3"&&"WALLET"===a.paymentMethod&&P(-t.amount),_.toast.success("Mua h\xe0ng th\xe0nh c\xf4ng",{duration:5e3,icon:(0,n.jsx)(w.A,{className:"h-4 w-4 text-green-600"})}),W.push(B)}else u(),J(!0)}}catch(e){if(e instanceof j.pe){let t=null==(a=e.response)?void 0:a.data;(null==t?void 0:t.message)?_.toast.error("Xá» l\xfd ÄÆ¡n h\xe0ng lá»i",{description:null!=(r=null==M?void 0:M[t.message])?r:t.message,duration:5e3,icon:(0,n.jsx)(C.A,{className:"h-4 w-4 text-red-500"})}):(null==t?void 0:t.errors)&&((null==(o=t.errors)?void 0:o.user)?_.toast.error("Xá» l\xfd ÄÆ¡n h\xe0ng lá»i",{description:null!=(d=null==M?void 0:M[t.errors.user])?d:t.errors.user,duration:5e3,icon:(0,n.jsx)(C.A,{className:"h-4 w-4 text-red-500"})}):(v.A.handleFormErrorFromResponse(T,null==(c=t.errors)?void 0:c.products[0],M),u()))}else _.toast.error("Xá» l\xfd ÄÆ¡n h\xe0ng lá»i",{description:"Lá»i kết ná»i Äến m\xe1y chá»§.",duration:5e3,icon:(0,n.jsx)(C.A,{className:"h-4 w-4 text-red-500"})})}}return(0,c.useEffect)(()=>{var e,t,s,n,l,a,r,i,o;if("chon"===O)I.setValue("mst",""),I.setValue("address",""),I.setValue("buyer",null!=(s="".concat(null!=(e=null==F?void 0:F.firstName)?e:""," ").concat(null!=(t=null==F?void 0:F.lastName)?t:"").trim())?s:""),I.setValue("companyName",""),I.setValue("email",null!=(n=null==F?void 0:F.email)?n:"");else{let e=D.find(e=>e.id===O);I.setValue("mst",null!=(l=null==e?void 0:e.mst)?l:""),I.setValue("address",null!=(a=null==e?void 0:e.address)?a:""),I.setValue("buyer",null!=(r=null==e?void 0:e.buyer)?r:""),I.setValue("companyName",null!=(i=null==e?void 0:e.companyName)?i:""),I.setValue("email",null!=(o=null==e?void 0:e.email)?o:"")}},[O,F]),(0,c.useEffect)(()=>{o&&(null==S?void 0:S.user).accessToken&&v.A.fetchApi("/api/v1/tax-codes?page=1&limit=1000",(null==S?void 0:S.user).accessToken).then(e=>{var t;return Z(null!=(t=e.data)?t:[])}).catch(()=>{})},[o,S]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.a,{title:"",description:"",headerClassName:"hidden",isOpen:o,onClose:u,closeButtonClassName:"top-0 right-0 h-6 w-6 hover:rotate-0",className:"max-h-[90vh] w-[320px] max-w-[94vw] overflow-hidden rounded-none bg-[#F5F5F6]",children:(0,n.jsxs)("div",{className:"relative overflow-hidden bg-[#f5f5f6] p-[16px]",children:[(0,n.jsx)("svg",{className:"pointer-events-none absolute top-[-29px] left-[-27px]",width:"72",he
1ight:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("circle",{cx:"36",cy:"36",r:"36",fill:"#1F93FF"})}),(0,n.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,n.jsx)("circle",{cx:"61",cy:"61",r:"61",fill:"#96C0E7"})}),(0,n.jsx)("div",{className:"relative z-10 max-h-[90vh] overflow-auto",children:(0,n.jsxs)("div",{className:"flex w-full flex-col items-start gap-[12px] rounded-[8px] bg-white p-[12px]",children:[(0,n.jsxs)("div",{className:"flex items-start gap-[8px]",children:[(0,n.jsx)(L,{className:"size-[20px] shrink-0"}),(0,n.jsx)("p",{className:"text-[14px] leading-normal font-semibold text-[#272a36] 2xl:leading-[19px]",children:"Th\xf4ng tin thuế"})]}),(0,n.jsx)(a.lV,{...I,children:(0,n.jsxs)("form",{onSubmit:I.handleSubmit(R),className:"flex w-full flex-col gap-[12px]",children:[(0,n.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,n.jsx)(a.zB,{control:I.control,name:"taxCodeId",render:e=>{let{field:t}=e;return(0,n.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,n.jsx)(V,{label:"M\xe3 sá» thuế",en:"Tax code"}),(0,n.jsxs)(g.l6,{onValueChange:e=>t.onChange(e),...t,children:[(0,n.jsx)(a.MJ,{children:(0,n.jsx)(g.bq,{className:A,icon:(0,n.jsx)(N.A,{className:"size-5 text-[#8e8e92]"}),children:(0,n.jsx)(g.yv,{placeholder:"Chá»n loại m\xe3 sá» thuế"})})}),(0,n.jsxs)(g.gC,{children:[(0,n.jsx)(g.eb,{value:"chon",children:"Chá»n"},"chon"),D.length>0&&D.map(e=>(0,n.jsx)(g.eb,{value:e.id,children:e.mst},e.id))]})]}),(0,n.jsx)(a.C5,{})]})}}),(0,n.jsx)(a.zB,{control:I.control,name:"mst",render:e=>{let{field:t}=e;return(0,n.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,n.jsx)(V,{label:"M\xe3 sá» thuế",en:"MST"}),(0,n.jsx)(a.MJ,{children:(0,n.jsx)(m.p,{placeholder:"Nháºp m\xe3 sá» thuế",className:A,...t})}),(0,n.jsx)(a.C5,{})]})}}),(0,n.jsx)(a.zB,{control:I.control,name:"buyer",render:e=>{let{field:t}=e;return(0,n.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,n.jsx)(V,{label:"Ngưá»i mua",en:"Buyer"}),(0,n.jsx)(a.MJ,{children:(0,n.jsx)(m.p,{placeholder:"Nháºp t\xean ngưá»i mua",className:A,...t})}),(0,n.jsx)(a.C5,{})]})}}),(0,n.jsx)(a.zB,{control:I.control,name:"companyName",render:e=>{let{field:t}=e;return(0,n.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,n.jsx)(V,{label:"T\xean c\xf4ng ty",en:"
1Company name"}),(0,n.jsx)(a.MJ,{children:(0,n.jsx)(m.p,{placeholder:"Nháºp t\xean c\xf4ng ty",className:A,...t})}),(0,n.jsx)(a.C5,{})]})}}),(0,n.jsx)(a.zB,{control:I.control,name:"email",render:e=>{let{field:t}=e;return(0,n.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,n.jsx)(V,{label:"Email nháºn h\xf3a ÄÆ¡n",en:"Email"}),(0,n.jsx)(a.MJ,{children:(0,n.jsx)(m.p,{placeholder:"Nháºp email",className:A,...t})}),(0,n.jsx)(a.C5,{})]})}}),(0,n.jsx)(a.zB,{control:I.control,name:"address",render:e=>{let{field:t}=e;return(0,n.jsxs)(a.eI,{className:"w-full gap-[4px]",children:[(0,n.jsx)(V,{label:"Äá»a chá»",en:"Address"}),(0,n.jsx)(a.MJ,{children:(0,n.jsx)(m.p,{placeholder:"Nháºp Äá»a chá» c\xf4ng ty",className:A,...t})}),(0,n.jsx)(a.C5,{})]})}})]}),(0,n.jsx)(h.$,{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:H,type:"submit",children:(0,n.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Thanh to\xe1n"})})]})})]})})]})}),q&&(0,n.jsx)(b.A,{open:q,onClose:()=>J(!1)})]})}var B=s(34510);let F=u.z.object({paymentMethod:u.z.string().nonempty("Phương thức thanh to\xe1n l\xe0 bắt buá»c"),withTaxCode:u.z.boolean()});function E(e){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{d:"M2.273 5.625C3.09435 4.89854 4.15348 4.4983 5.25 4.5H18.75C19.891 4.5 20.933 4.925 21.727 5.625C21.6357 4.89994 21.2828 4.23315 20.7346 3.74982C20.1865 3.2665 19.4808 2.99987 18.75 3H5.25C4.51921 2.99987 3.81349 3.2665 3.26536 3.74982C2.71722 4.23315 2.36435 4.89994 2.273 5.625ZM2.273 8.625C3.09435 7.89854 4.15348 7.4983 5.25 7.5H18.75C19.891 7.5 20.933 7.925 21.727 8.625C21.6357 7.89994 21.2828 7.23315 20.7346 6.74983C20.1865 6.2665 19.4808 5.99987 18.75 6H5.25C4.51921 5.99987 3.81349 6.2665 3.26536 6.74983C2.71722 7.23315 2.36435 7.89994 2.273 8.625ZM5.25 9C4.45435 9 3.69129 9.31607 3.12868 9.87868C2.56607 10.4413 2.25 11.2044 2.25 12V18C2.25 18.7956 2.56607 19.5587 3.12868 20.1213C3.69129 20.6839 4.45435 21 5.25 21H18.75C19.5456 21 20.3087 20.6839 20.8713 20.1213C21.4339 19.5587 21.75 18.7956 21.75 18V12C21.75 11.2044 21.4339 10.4413 20.8713 9.87868C20.3087 9.31607 19.5456 9 18.75 9H15C14.8011 9 14.6103 9.07902 14.4697 9.21967C14.329 9.36032 14.25 9.55109 14.25 9.75C14.25 10.3467 14.0129 10.919 13.591 11.341C13.169 11.7629 12.5967 12 12 12C11.4033 12 10.831 11.7629 10.409 11.341C9.98705 10.919 9.75 10.3467 9.75 9.75C9.75 9.55109 9.67098 9.36032 9.53033 9.21967C9.38968 9.07902 9.19891 9 9 9H5.25Z",fill:"currentColor"})})}function I(e){let{checked:t,disabled:s}=e,l=s?"#D4D4D5":t?"#1B56D6":"#9E9E9F";return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:t?(0,n.jsx)("path",{d:"M8.83333 13.5L14.7083 7.625L13.5417 6.45833L8.83333 11.1667L6.45833 8.79167L5.29167 9.95833L8.83333 13.5ZM4.16667 17.5C3.70833 17.5 3.31597 17.3368 2.98958 17.0104C2.66319 16.684 2.5 16.2917 2.5 15.8333V4.16667C2.5 3.70833 2.66319 3.31597 2.98958 2.98958C3.31597 2.66319 3.70833 2.5 4.16667 2.5H15.8333C16.2917 2.5 16.684 2.66319 17.0104 2.98958C17.3368 3.31597 17.5 3.70833 17.5 4.16667V15.8333C17.5 16.2917 17.3368 16.684 17.0104 17.0104C16.684 17.3368 16.2917 17.5 15.8333 17.5H4.16667Z",fill:l}):(0,n.jsx)("path",{d:"M4.16667 17.5C3.70833 17.5 3.31597 17.3368 2.98958 17.0104C2.66319 16.684 2.5 16.2917 2.5 15.8333V4.16667C2.5 3.70833 2.66319 3.31597 2.98958 2.98958C3.31597 2.66319 3.70833 2.5 4.16667 2.5H15.8333C16.2917 2.5 16.684 2.66319 17.0104 2.98958C17.3368 3.31597 17.5 3.70833 17.5 4.16667V15.8333C17.5 16.2917 17.3368 16.684 17.0104 17.0104C16.684 17.3368 16.2917 17.5 15.8333 17.5H4.16667ZM4.16667 15.8333H15.8333V4.16667H4.16667V15.8333Z",fill:l})})}function H(e){let{payload:t,open:s,onClose:u,formParent:m,redirect:g="/proxies"}=e,f=(0,x.mN)({resolver:(0,d.u)(F),values:{paymentMethod:"WALLET",withTaxCode:!1}}),{formState:{isSubmitting:b}}=f,[j,w]=(0,c.useState)(!1),C=(0,l.r)(e=>e.config),[N,y]=(0,c.useState)(!1),{submit:k,refData:_}=(0,B.U)({payload:t,redirect:g,formParent:m,onClose:u,onOpenTaxcodeModal:()=>w(!0),onNotEnoughCoin:()=>{u(),y(!0)}});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.a,{title:"",description:"",headerClassName:"hidden",isOpen:s,onClose:u,closeButtonClassName:"top-0 right-0 h-6 w-6 hover:rotate-0",className:"max-h-[80vh] w-[350px] max-w-[94vw] overflow-hidden rounded-none bg-[#F5F5F6] sm:w-[420px] 2xl:w-[380px]",children:(0,n.jsxs)("div",{className:"relative overflow-hidden bg-[#f5f5f6] p-[16px]",children:[(0,n.jsx)("svg",{className:"pointer-events-none absolute top-[-29px] left-[-27px]",width:"72",he
1ight:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("circle",{cx:"36",cy:"36",r:"36",fill:"#1F93FF"})}),(0,n.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,n.jsx)("circle",{cx:"61",cy:"61",r:"61",fill:"#96C0E7"})}),(0,n.jsx)("div",{className:"max-h-[80vh] overflow-auto",children:(0,n.jsxs)("div",{className:"relative flex w-full flex-col items-center gap-4 rounded-[8px] bg-white p-2",children:[(0,n.jsx)("h1",{className:"w-full text-center text-[16px] leading-[1.3] font-semibold text-[#0c3ca4]",children:"Chá»n phương thức thanh to\xe1n"}),(0,n.jsx)(a.lV,{...f,children:(0,n.jsxs)("form",{onSubmit:f.handleSubmit(k),className:"flex w-full flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex w-full flex-col gap-[14px] rounded-[8px] border border-[#e8e8e9] bg-[#f5f5f6] px-3 py-4 2xl:border-0 2xl:shadow-[inset_0_0_0_1px_#e8e8e9]",children:[(0,n.jsx)("h2",{className:"w-full text-[14px] leading-normal font-semibold text-black 2xl:leading-[19px]",children:"Lá»±a chá»n h\xecnh thức"}),[{label:"Thanh to\xe1n qua v\xed cá»§a t\xf4i",value:"WALLET",icon:"WalletIcon",url:"/icons/wallet-i.png",disabled:!1,iconSize:"size-6"},{label:"Thanh to\xe1n qua thẻ ng\xe2n h\xe0ng",value:"BANK",icon:"CreditIcon",url:"/icons/bank.png",disabled:!0,iconSize:"size-5"},{label:"Thanh to\xe1n qua Momo",value:"MOMO",icon:"MomoIcon",url:"/icons/momo.png",disabled:!0,iconSize:"size-6"}].map(e=>{let t="WALLET"===e.value?E:e.icon?o.F[e.icon]:o.F.WalletIcon;return(0,n.jsx)(a.zB,{control:f.control,name:"paymentMethod",render:s=>{let{field:l}=s,a=l.value===e.value&&!e.disabled;return(0,n.jsxs)("button",{type:"button",disabled:e.disabled,"data-selected":l.value===e.value,className:(0,r.cn)("flex w-full items-center gap-2",e.disabled?"cursor-not-allowed":"cursor-pointer"),onClick:()=>!e.disabled&&l.onChange(e.value),children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center p-1",children:(0,n.jsx)(I,{checked:a,disabled:e.disabled})}),(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-1 items-center gap-2 px-4 py-2",a?"rounded bg-[#c4e8ff]":"rounded-[8px]"),children:[t&&(0,n.jsx)(t,{className:(0,r.cn)(e.iconSize,"shrink-0",e.disabled?"text-gray-400":"WALLET"===e.value?"text-primary":"BANK"===e.value?"text-gray-600":"text-[#D82D8B]")}),(0,n.jsx)("p",{className:(0,r.cn)("text-left text-[14px] leading-normal font-normal whitespace-nowrap 2xl:leading-[19px]",e.disabled?"text-gray-400":"text-black"),children:e.label})]})]})}},e.value)})]}),(0,n.jsx)(a.zB,{control:f.control,name:"withTaxCode",render:e=>{var s,l,r,i;let{field:o}=e;return(0,n.jsxs)(a.eI,{className:"flex flex-row items-center gap-2 space-y-0",children:[(null==C||null==(s=C.theme)?void 0:s.taxPercent)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.MJ,{children:(0,n.jsx)("button",{type:"button",onClick:()=>o.onChange(!o.value),className:"flex shrink-0 cursor-pointer items-center p-1",children:(0,n.jsx)(I,{checked:o.value})})}),(0,n.jsxs)(a.lR,{className:"flex flex-wrap items-center gap-2 text-[12px] leading-normal font-normal text-black",children:["Thanh to\xe1n k\xe8m xuất h\xf3a ÄÆ¡n (".concat(null==C||null==(l=C.theme)?void 0:l.taxPercent,"%):"),(0,n.jsx)("span",{className:"text-[14px] leading-normal font-semibold text-[#1b56d6]",children:o.value?"".concat(v.A.formatNum2(Math.round(t.total+t.total*Number(null!=(i=null==C||null==(r=C.theme)?void 0:r.taxPercent)?i:1)/100)),"Ä"):"".concat(v.A.formatNum2(Math.round(t.total)),"Ä")})]})]}):(0,n.jsxs)(a.lR,{className:"flex w-full items-center justify-between text-[16px] leading-[1.3] font-semibold",children:[(0,n.jsx)("p",{className:"text-[16px] leading-[1.3] font-semibold text-black",children:"Tá»ng tiá»n thanh to\xe1n:"}),(0,n.jsx)("p",{className:"text-[16px] leading-[1.3] font-semibold text-[#1b56d6]",children:"".concat(v.A.formatNum2(Math.round(t.total))," VND")})]}),(0,n.jsx)(a.C5,{})]})}}),(0,n.jsx)(h.$,{className:"flex h-10 w-full items-center justify-center gap-2 rounded bg-[#1b56d6] px-3 py-2.5 shadow-[0px_2px_2px_0px_rgba(0,0,0,0.15)] hover:bg-[#1b56d6]/90",disabled:b,type:"submit",children:(0,n.jsx)("span",{className:"text-[14px] leading-[1.3] font-semibold text-white",children:"Thanh to\xe1n"})})]})})]})})]})}),(0,n.jsx)(T,{open:j,onClose:()=>w(!1),payload:{...t,...f.getValues(),..._&&{refData:_}},formParent:m,redirect:g}),N&&(0,n.jsx)(i.A,{open:N,onClose:()=>y(!1)})]})}},65142:(e,t,s)=>{s.d(t,{p:()=>a});var n=s(95155);s(12115);var l=s(64269);function a(e){let{className:t,type:s,...a}=e;return(0,n.jsx)("input",{type:s,"data-slot":"input",className:(0,l.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),...a})}},80389:(e,t,s)=>{s.d(t,{c:()=>i});var n=s(95155);s(12115);var l=s(55817),a=s(31719),r=s(64269);function i(e){let{className:t,...s}=e;return(0,n.jsx)(l.bL,{children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(l.pd,{className:(0,r.cn)("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 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),...s}),(0,n.jsx)(l.lM,{id:s.id+"btn-toggle",className:"absolute top-1/2 right-2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:(0,n.jsx)(l.In,{visible:(0,n.jsx)(a.N5q,{}),hidden:(0,n.jsx)(a.V$C,{})})})]})})}}}]);
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.