1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4397],{98131:function(e,t,n){var r=n(52676),a=n(79406),s=n(78051);t.Z=e=>{let{visible:t,onOk:n,onCancel:l,title:i,content:d,danger:u=!1,okButtonText:o,cancelButtonText:c,loading:m,disabled:p}=e;return(0,r.jsxs)(a.Z,{open:t,title:i,footer:null,closeIcon:null,centered:!0,onCancel:()=>{p||null==l||l()},children:[d,(0,r.jsxs)("div",{className:"flex gap-5 mt-5",children:[(0,r.jsx)(s.ZP,{size:"large",onClick:l,block:!0,disabled:p,children:c||"Cancel"}),(0,r.jsx)(s.ZP,{size:"large",type:"primary",danger:u,onClick:n,block:!0,loading:m,disabled:p,children:o||"Ok"})]})]})}},46976:function(e,t,n){var r=n(52676),a=n(75271),s=n(9059),l=n(96516),i=n(4948),d=n(89120),u=n.n(d);t.Z=e=>{let{fetchOptions:t,debounceTimeout:n=500,...d}=e,[o,c]=(0,a.useState)(!1),[m,p]=(0,a.useState)([]),[x,f]=(0,a.useState)(""),h=(0,a.useRef)(0),Z=(0,a.useMemo)(()=>u()(e=>{h.current+=1;let n=h.current;t(e).then(e=>{n===h.current&&(p(e),c(!1))})},n),[t,n]),j=o?(0,r.jsx)("div",{className:"py-2 flex justify-center",children:(0,r.jsx)(s.Z,{size:"small"})}):(0,r.jsx)(l.Z,{});return(0,r.jsx)(i.default,{labelInValue:!0,filterOption:!1,onSearch:e=>{p([]),f(e),void 0!==e&&(c(!0),Z(e))},onFocus:()=>{p([]),c(!0),Z("")},notFoundContent:j,...d,options:m,showSearch:!0,loading:o,searchValue:x})}},16882:function(e,t,n){var r=n(52676),a=n(57722),s=n(37986);t.Z=e=>{let{address:t,onEdit:n}=e,l=[t.addressLine1,t.addressLine2,t.city,t.state,t.postcode].filter(Boolean).join(", ");return(0,r.jsxs)("div",{className:"flex flex-col justify-center gap-2 p-4 border border-gray-300 rounded-md hover:shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("div",{className:"flex items-center min-w-0 gap-2 text-lg font-bold",children:(0,r.jsxs)("span",{className:"truncate",children:[t.lastName," ",t.firstName," "]})}),(0,r.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[t.isDefault?(0,r.jsx)(a.Z,{color:"default",className:"w-fit",children:"Default"}):"",(0,r.jsx)(s.Z,{className:"w-4 h-4 cursor-pointer hover:text-blue-500",onClick:n})]})]}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:t.phone}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:l})]})}},50706:function(e,t,n){var r=n(52676),a=n(18060),s=n(29350),l=n(77471),i=n(21844),d=n(4948),u=n(78672),o=n(78051),c=n(75271),m=n(74563),p=n.n(m),x=n(30746);n(41877);let f={refId:"",firstName:"",lastName:"",phone:"",addressLine1:"",addressLine2:"",postcode:"",city:"",state:"",country:"Malaysia",isDefault:!1};t.Z=e=>{let{onFinish:t,form:n,loading:m,disabled:h,defaultAddressValue:Z,defaultAddressLocked:j}=e,g=a.Z.useWatch("state",n),b=a.Z.useWatch("city",n),y=(0,x.Pz)(),v=(0,x.MC)(g),N=(0,x.Wy)(g,b);return(0,c.useEffect)(()=>{"boolean"==typeof Z&&n.setFieldValue("isDefault",Z)},[Z,n]),(0,r.jsxs)(a.Z,{form:n,onFinish:t,layout:"vertical",initialValues:{...f,isDefault:null!=Z?Z:f.isDefault},children:[(0,r.jsxs)(s.Z,{gutter:16,children:[(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"firstName",label:"First Name",rules:[{required:!0}],children:(0,r.jsx)(i.default,{})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"lastName",label:"Last Name",rules:[{required:!0}],children:(0,r.jsx)(i.default,{})})})]}),(0,r.jsx)(s.Z,{gutter:16,children:(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"phone",label:"Phone",rules:[{required:!0}],children:(0,r.jsx)(p(),{inputProps:{required:!0},country:"my",inputClass:"form-control",inputStyle:{width:"100%",borderRadius:"6px"},buttonStyle:{borderRadius:"6px 0px 0px 6px",backgroundColor:"#FFFFFF"}})})})}),(0,r.jsxs)(s.Z,{gutter:16,children:[(0,r.jsx)(l.Z,{xs:24,sm:24,children:(0,r.jsx)(a.Z.Item,{name:"addressLine1",label:"Address Line 1",rules:[{required:!0}],children:(0,r.jsx)(i.default,{})})}),(0,r.jsx)(l.Z,{xs:24,sm:24,children:(0,r.jsx)(a.Z.Item,{name:"addressLine2",label:"Address Line 2",children:(0,r.jsx)(i.default,{})})})]}),(0,r.jsxs)(s.Z,{gutter:16,children:[(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{label:"State",name:"state",rules:[{required:!0,message:"Please enter your state"}],children:(0,r.jsx)(d.default,{showSearch:!0,size:"large",options:y.map(e=>({label:e,value:e})),onChange:()=>{n.setFieldValue("city",void 0),n.setFieldValue("postcode",void 0)}})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{label:"City",name:"city",rules:[{required:!0,message:"Please enter your city"}],children:(0,r.jsx)(d.default,{showSearch:!0,size:"large",options:v.map(e=>({label:e,value:e})),disabled:!g,onChange:()=>{n.setFieldValue("postcode",void 0)}})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{label:"Postcode",name:"postcode",rules:[{required:!0,message:"Please enter your postcode"}],children:(0,r.jsx)(d.default,{showSearch:!0,size:"large",options:N.map(e=>({label:e,value:e})),disabled:!g||!b})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{label:"Country",name:"country",initialValue:"Malaysia",children:(0,r.jsx)(i.default,{disabled:!0,value:"Malaysia",size:"large"})})})]}),(0,r.jsx)(s.Z,{gutter:16,children:(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{layout:"horizontal",name:"isDefault",label:"Set as default address",valuePropName:"checked",children:(0,r.jsx)(u.Z,{disabled:j})})})}),t&&(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(o.ZP,{type:"primary",htmlType:"submit",loading:m,disabled:h,children:"Save"})})]})}},29802:function(e,t,n){var r=n(52676);n(75271);var a=n(79406),s=n(27151),l=n(22903);t.Z=e=>{let{open:t,onClose:n,popup:i,onClaim:d,claiming:u,claimed:o}=e,c=(0,l.I)(i.desktopImage.key),m=(0,l.I)(i.mobileImage.key),p=!!i.coupon&&!!d,x=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:c,alt:"Popup",className:"hidden w-full h-auto md:block"}),(0,r.jsx)("img",{src:m,alt:"Popup",className:"block w-full h-auto md:hidden"})]});return(0,r.jsx)(a.Z,{open:t,onCancel:n,footer:null,width:1050,centered:!0,closeIcon:null,styles:{content:{padding:0,background:"transparent",boxShadow:"none"}},children:(0,r.jsxs)("div",{className:"relative w-full overflow-hidden rounded-[24px]",children:[i.link&&!i.ctaText?(0,r.jsx)("a",{href:i.link,className:"block w-full",children:x}):x,i.ctaText&&(0,r.jsx)("button",{type:"button",disabled:p&&(u||o),onClick:()=>
1{if(p){u||o||null==d||d();return}i.link&&(window.location.href=i.link)},className:"absolute left-1/2 top-[41%] z-20 -translate-x-1/2 -translate-y-1/2 rounded-full border-none bg-[#E31B4D] px-8 py-2.5 text-[15px] font-medium text-white shadow-md shadow-red-200/60 transition-colors cursor-pointer hover:bg-[#c4163f] disabled:cursor-default disabled:opacity-80 md:left-[28%] md:top-[68%] md:px-10",children:p?o?"Claimed â":u?"Claimingâ¦":i.ctaText:i.ctaText}),(0,r.jsx)(s.Z,{className:"absolute top-3 right-3 z-20 w-8 h-8 text-lg text-white rounded-full border-none duration-200 transform cursor-pointer pointer-events-auto md:right-4 md:top-4 md:w-10 md:h-10 md:text-xl",onClick:n})]})})}},99085:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(52676),a=n(75271),s=n(85842),l=n(27151),i=e=>{let{isFulfilled:t,passwordHint:n}=e;return(0,r.jsxs)("div",{className:"flex items-center",children:[t?(0,r.jsx)(s.Z,{className:"!text-green-500",width:16,height:16}):(0,r.jsx)(l.Z,{className:"!text-red-500",width:16,height:16}),(0,r.jsx)("span",{className:"ml-1",children:n})]})},d=e=>{let{password:t}=e,[n,s]=(0,a.useState)(!1),[l,d]=(0,a.useState)(!1),[u,o]=(0,a.useState)(!1),[c,m]=(0,a.useState)(!1),[p,x]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!t){s(!1),d(!1),o(!1),m(!1),x(!1);return}t.length<8||t.length>20?s(!1):s(!0),/[a-z]/.test(t)?d(!0):d(!1),/[A-Z]/.test(t)?o(!0):o(!1),/[^A-Za-z0-9]/.test(t)?m(!0):m(!1),/[0-9]/.test(t)?x(!0):x(!1)},[t]),(0,r.jsxs)("div",{className:"mb-2",children:[(0,r.jsx)("div",{children:"Password must contains:"}),(0,r.jsx)(i,{isFulfilled:n,passwordHint:"8-20 characters"}),(0,r.jsx)(i,{isFulfilled:l,passwordHint:"Minimum 1 lowercase character"}),(0,r.jsx)(i,{isFulfilled:u,passwordHint:"Minimum 1 uppercase character"}),(0,r.jsx)(i,{isFulfilled:p,passwordHint:"Minimum 1 number"}),(0,r.jsx)(i,{isFulfilled:c,passwordHint:"Minimum 1 special character"})]})}},64944:function(e,t,n){var r=n(52676),a=n(75271),s=n(18060),l=n(79406),i=n(4948),d=n(78051),u=n(76517),o=n(46976),c=n(72626),m=n(39936),p=n(57418),x=n(22047);let f=Object.values(p.Cw);t.Z=e=>{let{open:t,onClose:n,onAdd:p,existingProductIds:h}=e,[Z]=s.Z.useForm(),[j,g]=(0,a.useState)(!1),b=s.Z.useWatch("productType",Z);(0,a.useEffect)(()=>{Z.resetFields(["product"])},[b,Z]);let y=async e=>b?(await (0,c.vd)(b,e)).data.map(e=>({label:e.label,value:e.value})):[],v=()=>{Z.resetFields(),n()},N=async()=>{try{var e;let t=await Z.validateFields();if(h.includes(t.product.value)){u.Am.error("Product is already added.");return}g(!0);let r=(await (0,m.iT)({refId:t.product.value})).data;p({productId:r.refId,name:r.name,sku:r.sku,imageKey:(null===(e=r.image)||void 0===e?void 0:e.key)||null}),Z.resetFields(),n()}catch(e){u.Am.error("Unable to add product.")}finally{g(!1)}};return(0,r.jsx)(l.Z,{open:t,onCancel:v,footer:null,title:"Register Product",closeIcon:null,centered:!0,children:(0,r.jsxs)(s.Z,{form:Z,layout:"vertical",children:[(0,r.jsx)(s.Z.Item,{name:"productType",label:"Product Type",rules:[{required:!0}],children:(0,r.jsx)(i.default,{options:[{label:"Choose product type",value:null,disabled:!0},...f.map(e=>({label:(0,x.U$)(e),value:e}))]})}),(0,r.jsx)(s.Z.Item,{name:"product",label:"Product",rules:[{required:!0}],children:(0,r.jsx)(o.Z,{fetchOptions:y,placeholder:b?"Start typing to search":"Select product type",disabled:!b})}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(d.ZP,{block:!0,size:"large",onClick:v,disabled:j,children:"Cancel"}),(0,r.jsx)(d.ZP,{size:"large",type:"primary",block:!0,onClick:N,loading:j,disabled:j,children:"Add Product"})]})]})})}},95809:function(e,t,n){var r=n(75271);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[t,n]=(0,r.useState)(e);return{visible:t,open:()=>{n(!0)},close:()=>{n(!1)},toggle:()=>{n(e=>!e)}}}},56346:function(e,t,n){var r=n(75271),a=n(94170);t.Z=e=>{let[t,n]=(0,r.useState)({page:1,pageSize:10,total:0,sortOrder:a.As.DESC,sortField:"createdAt",...e});return[t,n,(e,t,r)=>{n(t=>{var n;return{...t,page:e.current||1,pageSize:e.pageSize||10,sortField:null!==(n=null==r?void 0:r.field)&&void 0!==n?n:null==t?void 0:t.sortField,sortOrder:"ascend"==r.order?a.As.ASC:r.order?a.As.DESC:t.sortOrder}})}]}},10623:function(e,t,n){n.d(t,{d:function(){return s}});var r=n(69834),a=n(73143);let s=()=>(0,r.a)({queryKey:["role","option"],queryFn:a.Rn,select:e=>e.data,staleTime:3e5})},3023:function(e,t,n){var r,a,s,l;n.d(t,{Bi:function(){return r},ZF:function(){return a},yD:function(){return i}}),(s=r||(r={})).HOME="HOME",s.COLLECTION="COLLECTION",(l=a||(a={})).HOME="HOME",l.WARRANTY_REGISTER="WARRANTY_REGISTER";let i={HOME:"Home Page",WARRANTY_REGISTER:"Warranty Register Success"}},66380:function(e,t,n){var r=n(52676),a=n(18060),s=n(29350),l=n(77471),i=n(21844),d=n(88463),u=n(4948),o=n(15036),c=n(78051),m=n(10623),p=n(63309),x=n(74563),f=n.n(x);n(41877),t.Z=e=>
1{let{onUpdateUserProfile:t,onCancel:n,loading:x,disabled:h,form:Z,isMyProfile:j=!1}=e,g=(0,m.d)(),b=(g.data||[]).map(e=>({label:e.name,value:e.refId}));return(0,r.jsxs)(a.Z,{form:Z,onFinish:t,layout:"vertical",children:[(0,r.jsxs)(s.Z,{gutter:16,children:[(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"firstName",label:"First Name",rules:[{required:!0}],children:(0,r.jsx)(i.default,{})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"lastName",label:"Last Name",rules:[{required:!0}],children:(0,r.jsx)(i.default,{})})})]}),!j&&(0,r.jsx)(s.Z,{gutter:16,children:(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"username",label:"Username",rules:[{required:!0,message:"Please enter a username"},{min:3,max:30,message:"Username must be between 3 and 30 characters"},{pattern:/^[a-zA-Z0-9._-]+$/,message:"Username can only contain letters, numbers, dots, underscores and hyphens"}],children:(0,r.jsx)(i.default,{})})})}),(0,r.jsxs)(s.Z,{gutter:16,children:[(0,r.jsx)(l.Z,{xs:24,sm:12,children:j?(0,r.jsx)(a.Z.Item,{name:"dob",label:"Date of Birth",rules:[{required:!0}],children:(0,r.jsx)(d.default,{className:"w-full"})}):(0,r.jsx)(a.Z.Item,{name:"roleId",label:"Role",rules:[{required:!0}],children:(0,r.jsx)(u.default,{options:b,loading:g.isFetching})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"phone",label:"Phone",rules:[{required:!0}],children:(0,r.jsx)(f(),{inputProps:{required:!0},country:"my",inputClass:"form-control",inputStyle:{width:"100%",borderRadius:"6px"},buttonStyle:{borderRadius:"6px 0px 0px 6px",backgroundColor:"#FFFFFF"}})})})]}),!j&&(0,r.jsx)(s.Z,{gutter:16,children:(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"dob",label:"Date of Birth",rules:[{required:!0}],children:(0,r.jsx)(d.default,{className:"w-full"})})})}),!j&&(0,r.jsxs)(s.Z,{gutter:16,children:[(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"registeredAt",label:"Registered At",children:(0,r.jsx)(d.default,{className:"w-full",showTime:!0,disabled:!0})})}),(0,r.jsx)(l.Z,{xs:24,sm:12,children:(0,r.jsx)(a.Z.Item,{name:"verifiedAt",label:"Verified At",children:(0,r.jsx)(d.default,{className:"w-full",showTime:!0,disabled:!0})})})]}),(0,r.jsx)(o.Z,{}),(0,r.jsxs)("div",{className:(0,p.cn)("flex gap-5",j&&"justify-end"),children:[!j&&(0,r.jsx)(c.ZP,{block:!0,size:"large",htmlType:"button",onClick:n,disabled:h,children:"Cancel"}),(0,r.jsx)(c.ZP,{block:!0,size:"large",type:"primary",htmlType:"submit",loading:x,disabled:h,className:(0,p.cn)(j&&"!w-auto"),children:"Update"})]})]})}},21413:function(e,t,n){n.d(t,{Z:function(){return F}});var r=n(52676),a=n(75271),s=n(69834),l=n(71030),i=n(18060),d=n(79406),u=n(76517),o=n(83214),c=n(21844),m=n(88463),p=n(4948),x=n(78051),f=n(74563),h=n.n(f);n(41877);var Z=n(57418),j=n(53970),g=n(22047),b=n(64944),y=n(22903),v=n(40372),N=n(98774);let I=Object.values(Z.TT);var E=e=>{let{user:t,onFinish:n,form:l,loading:d,disabled:u,selectedUserId:o,onCancel:f}=e,E={fullName:t?t.firstName+" "+t.lastName:"",phoneNumber:t?t.phone:"",emailAddress:t?t.email:"",dateOfPurchase:"",placeOfPurchase:null,orderNumber:"",products:[]},[S,A]=(0,a.useState)(!1),w=i.Z.useWatch("products",l)||[],P=e=>{l.setFieldValue("products",w.filter(t=>t.productId!==e))};return(0,s.a)({queryKey:["product-warranty","user",o],queryFn:async()=>{var e,t,n,r;let a=await (0,j.GA)({id:o});return l.setFieldsValue({fullName:(null===(e=a.data)||void 0===e?void 0:e.lastName)+" "+(null===(t=a.data)||void 0===t?void 0:t.firstName),phoneNumber:(null===(n=a.data)||void 0===n?void 0:n.phone)||"",emailAddress:(null===(r=a.data)||void 0===r?void 0:r.email)||""}),a},select:e=>e.data,enabled:!!o}),(0,r.jsxs)(i.Z,{form:l,onFinish:n,layout:"vertical",initialValues:{...E},children:[(0,r.jsx)(i.Z.Item,{name:"fullName",label:"Full Name",rules:[{required:!0}],children:(0,r.jsx)(c.default,{placeholder:"Enter your full name"})}),(0,r.jsx)(i.Z.Item,{name:"phoneNumber",label:"Phone Number",rules:[{required:!0}],children:(0,r.jsx)(h(),{inputProps:{required:!0},country:"my",inputClass:"form-control",inputStyle:{width:"100%",borderRadius:"6px"},buttonStyle:{borderRadius:"6px 0px 0px 6px",backgroundColor:"#FFFFFF"},placeholder:"00-000 0000"})}),(0,r.jsx)(i.Z.Item,{name:"emailAddress",label:"Email Address",rules:[{required:!0,type:"email"}],children:(0,r.jsx)(c.default,{type:"email",placeholder:"Enter your email address"})}),(0,r.jsx)(i.Z.Item,{name:"dateOfPurchase",label:"Date of Purchase",rules:[{required:!0,type:"date"}],children:(0,r.jsx)(m.default,{className:"w-full"})}),(0,r.jsx)(i.Z.Item,{name:"placeOfPurchase",label:"Place of Purchase",rules:[{required:!0}
1],children:(0,r.jsx)(p.default,{options:[{label:"Choose place",value:null,disabled:!0},...I.map(e=>({label:e===Z.TT.EXPO_FAIR_WH_SALES?"Expo / Fair / Warehouse Sales":(0,g.U$)(e),value:e}))]})}),(0,r.jsx)(i.Z.Item,{name:"orderNumber",label:"Order Number / Invoice Number",rules:[{required:!0}],children:(0,r.jsx)(c.default,{placeholder:"Enter the number"})}),(0,r.jsx)(i.Z.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=l.getFieldError("products");return(0,r.jsx)(i.Z.Item,{label:"Registered Products",required:!0,validateStatus:e.length?"error":void 0,help:e.length?e[0]:void 0,children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[0===w.length?(0,r.jsx)("div",{className:"text-sm text-gray-400",children:"No products registered yet"}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:w.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-md border border-gray-200 p-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center overflow-hidden rounded-md border border-gray-200 bg-white",children:e.imageKey?(0,r.jsx)("img",{src:(0,y.I)(e.imageKey),alt:e.name,className:"h-full w-full object-contain"}):(0,r.jsx)("span",{className:"text-[10px] text-gray-400",children:"No Image"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate font-medium",children:e.name}),e.sku?(0,r.jsx)("div",{className:"text-xs text-gray-500",children:e.sku}):null]})]}),(0,r.jsx)(x.ZP,{type:"text",danger:!0,icon:(0,r.jsx)(v.Z,{size:18}),onClick:()=>P(e.productId)})]},e.productId))}),(0,r.jsx)(x.ZP,{type:"dashed",onClick:()=>A(!0),icon:(0,r.jsx)(N.Z,{size:18}),block:!0,children:"Register Product"})]})})}}),(0,r.jsx)(i.Z.Item,{name:"products",rules:[{validator:(e,t)=>t&&t.length>0?Promise.resolve():Promise.reject(Error("Please register at least one product"))}],noStyle:!0}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(x.ZP,{block:!0,size:"large",onClick:f,disabled:u,children:"Cancel"}),(0,r.jsx)(x.ZP,{size:"large",type:"primary",block:!0,htmlType:"submit",loading:d,disabled:u,children:"Submit"})]}),(0,r.jsx)(b.Z,{open:S,onClose:()=>A(!1),onAdd:e=>{l.setFieldValue("products",[...w,e])},existingProductIds:w.map(e=>e.productId)})]})},S=n(3716),A=n(32218),w=n(3023),P=n(29802),F=e=>{var t,n;let{user:c,open:m,onSuccess:p,onClose:x,selectedUserId:f,setSelectedUserId:h,enableVoucherClaim:Z=!1}=e,[j]=i.Z.useForm(),[g,b]=(0,a.useState)(!1),y=null!==(t=(0,s.a)({queryKey:["content","popup","WARRANTY_REGISTER","public"],queryFn:()=>(0,A.xE)(w.ZF.WARRANTY_REGISTER),select:e=>e.data,enabled:Z}).data)&&void 0!==t?t:null,v=(0,l.D)({mutationFn:()=>(0,A.Ld)(w.ZF.WARRANTY_REGISTER),onError:e=>{u.Am.error("Failed to claim voucher: ".concat((0,o._g)(e)))}}),N=null!==(n=null!=f?f:null==c?void 0:c.refId)&&void 0!==n?n:null,I=(0,l.D)({mutationFn:e=>!Z&&N?(0,S.YJ)(e,N):(0,S.wf)(e),onSuccess:()=>{j.resetFields(),null==x||x(),p(),v.reset(),Z&&y&&b(!0)}}),F=()=>{j.resetFields(),null==x||x(),null==h||h(null)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{open:m,onCancel:F,footer:null,title:"Register Warranty",closeIcon:null,centered:!0,children:(0,r.jsx)(E,{user:c,form:j,onFinish:e=>{let t={...e};u.Am.promise(I.mutateAsync(t),{pending:"Registering warranty...",success:"Warranty registered successfully",error:{render(e){let{data:t}=e;return"Error creating address: ".concat((0,o._g)(t))}}})},loading:I.isPending,disabled:I.isPending,selectedUserId:f,onCancel:F})}),Z&&y&&(0,r.jsx)(P.Z,{open:g,onClose:()=>b(!1),popup:y,onClaim:y.coupon?()=>v.mutate():void 0,claiming:v.isPending,claimed:v.isSuccess})]})}},57418:function(e,t,n){var r,a,s,l,i,d,u,o,c,m;n.d(t,{Cw:function(){return r},RL:function(){return i},TT:function(){return a},bR:function(){return l},e_:function(){return s}}),(d=r||(r={})).BABY_AND_MUMMY="BABY_AND_MUMMY",d.KITCHEN_APPLIANCES="KITCHEN_APPLIANCES",d.HOME_APPLIANCES="HOME_APPLIANCES",d.BEAUTY_AND_HEALTH="BEAUTY_AND_HEALTH",(u=a||(a={})).LAZADA="LAZADA",u.SHOPEE="SHOPEE",u.WOW_SHOP="WOW_SHOP",u.WEBSITE="WEBSITE",u.TIK_TOK="TIK_TOK",u.PG_MALL="PG_MALL",u.ZALORA="ZALORA",u.OFFLINE_DEALER="OFFLINE_DEALER",u.EXPO_FAIR_WH_SALES="EXPO_FAIR_WH_SALES",u.WALK_IN="WALK_IN",(o=s||(s={})).COMMENT="COMMENT",o.STATUS_CHANGE="STATUS_CHANGE",(c=l||(l={})).USER="USER",c.ADMIN="ADMIN",(m=i||(i={})).PENDING="PENDING",m.IN_PROCESSING="IN_PROCESSING",m.RESOLVED="RESOLVED",m.CLOSED="CLOSED"},22047:function(e,t,n){n.d(t,{U$:function(){return l},rp:function(){return a},z2:function(){return s}});var r=n(57418);let a=e=>({[r.RL.PENDING]:"Pending",[r.RL.IN_PROCESSING]:"In Processing",[r.RL.RESOLVED]:"Resolved",[r.RL.CLOSED]:"Closed"})[e],s=e=>({[r.RL.PENDING]:"orange",[r.RL.IN_PROCESSING]:"blue",[r.RL.RESOLVED]:"green",[r.RL.CLOSED]:"default"})[e],l=e=>e.toLowerCase().replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).replace(/ And /g," & ")},32218:function(e,t,n){n.d(t,{IF:function(){return c},Ld:function(){return v},Up:function(){return f},Vj:function(){return b},WG:function(){return g},WK:function(){return h},ZS:function(){return x},du:function(){return s},fN:function(){return o},i6:function(){return u},it:function(){return d},n5:function(){return j},nA:function(){return a},o:function(){return m},r$:function(){return Z},rR:function(){return i},ty:function(){return l},wl:function(){return p},xE:function(){return y}});var r=n(5409);let a=e=>r.Z.get("/admin/content/banners",{params:e?{page:e}:{}}),s=e=>r.Z.put("/admin/content/banners",e),l=()=>r.Z.get("/admin/content/popups"),i=e=>r.Z.put("/admin/content/popups",e),d=()=>r.Z.get("/admin/content/testimonials"),u=e=>r.Z.post("/admin/content/testimonials",e),o=(e,t)=>r.Z.put("/admin/content/testimonials/".concat(e),t),c=e=>r.Z.delete("/admin/content/testimonials/".concat(e)),m=e=>r.Z.put("/admin/content/testimonials/reorder",{refIds:e}),p=()=>r.Z.get("/admin/content/videos"),x=e=>r.Z.post("/admin/content/videos",e),f=(e,t)=>r.Z.put("/admin/content/videos/".concat(e),t),h=e=>r.Z.delete("/admin/content/videos/".concat(e)),Z=e=>r.Z.put("/admin/content/videos/reorder",{refIds:e}),j=e=>r.Z.get("/public/content/banners",{params:{page:e}}),g=()=>r.Z.get("/public/content/testimonials"),b=()=>r.Z.get("/public/content/videos"),y=e=>r.Z.get("/public/content/popup",{params:{page:e}}),v=e=>r.Z.post("/public/content/popup/".concat(e,"/claim-voucher"))},73143:function(e,t,n){n.d(t,{JV:function(){return u},Rd:function(){return i},Rn:function(){return a},cq:function(){return d},fA:function(){return s},ul:function(){return l},xQ:function(){return o}});var r=n(5409);let a=()=>r.Z.get("/admin/role/options"),s=e=>r.Z.post("/admin/role",e),l=(e,t)=>
1r.Z.put("/admin/role/".concat(e),t),i=e=>r.Z.delete("/admin/role/".concat(e.id),{params:e}),d=e=>r.Z.put("/admin/role/".concat(e.id,"/status"),{active:e.active}),u=e=>r.Z.get("/admin/role",{params:e}),o=e=>r.Z.get("/admin/role/".concat(e.id))},53970:function(e,t,n){n.d(t,{$X:function(){return c},Fx:function(){return h},GA:function(){return i},Lj:function(){return x},Ny:function(){return a},OL:function(){return p},Oe:function(){return m},PF:function(){return d},Zy:function(){return j},cJ:function(){return Z},gJ:function(){return u},gn:function(){return o},h8:function(){return f},lE:function(){return s},pe:function(){return l}});var r=n(5409);let a=e=>r.Z.post("/admin/user",e),s=e=>r.Z.get("/admin/user",{params:e}),l=()=>r.Z.get("/admin/user/export",{responseType:"blob"}),i=e=>r.Z.get("/admin/user/".concat(e.id)),d=e=>r.Z.get("/admin/user/".concat(e.id,"/address")),u=e=>r.Z.get("/admin/user/address/".concat(e.addressId)),o=e=>r.Z.post("/admin/user/".concat(e.id,"/address"),e.address),c=e=>r.Z.put("/admin/user/address/".concat(e.addressId),e.address),m=e=>r.Z.delete("/admin/user/address/".concat(e.addressId)),p=e=>r.Z.put("/admin/user/".concat(e.id,"/status"),e),x=e=>r.Z.put("/admin/user/".concat(e.id,"/profile"),e),f=e=>r.Z.delete("/admin/user/".concat(e.id)),h=e=>r.Z.put("/admin/user/".concat(e.id,"/resend-email-verification"),e),Z=e=>r.Z.put("/admin/user/".concat(e.id,"/email"),e),j=e=>r.Z.put("/admin/user/".concat(e.id,"/password"),e)},3716:function(e,t,n){n.d(t,{DQ:function(){return a},E0:function(){return j},Gt:function(){return c},JU:function(){return h},M1:function(){return g},ND:function(){return Z},OR:function(){return p},R8:function(){return m},Y3:function(){return b},YE:function(){return l},YJ:function(){return o},e_:function(){return s},g5:function(){return f},hH:function(){return d},li:function(){return i},nf:function(){return x},wf:function(){return u}});var r=n(5409);let a=()=>r.Z.get("warranty"),s=()=>r.Z.get("warranty/claims"),l=e=>r.Z.get("admin/warranty",{params:e}),i=e=>r.Z.get("/admin/warranty/".concat(e.id)),d=e=>r.Z.get("/warranty/".concat(e.id)),u=e=>r.Z.post("warranty/register-warranty",e),o=(e,t)=>r.Z.post("admin/warranty/register",{...e,userId:t}),c=e=>r.Z.put("admin/warranty/".concat(e.warrantyId),e),m=e=>r.Z.post("warranty/claim-warranty",e),p=e=>r.Z.put("admin/claim/".concat(e.warrantyClaimId),e),x=(e,t)=>r.Z.put("admin/claim/".concat(e,"/status"),{status:t}),f=(e,t)=>r.Z.put("admin/claim/".concat(e,"/comment"),t),h=e=>r.Z.delete("/admin/warranty/".concat(e.id)),Z=e=>r.Z.get("admin/claim",{params:e}),j=e=>r.Z.delete("/admin/claim/".concat(e.id)),g=e=>r.Z.get("/admin/claim/".concat(e.id)),b=e=>r.Z.get("/warranty/claims/".concat(e.id))},57597:function(e,t,n){n.d(t,{B:function(){return r}});let r=/^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[!@#$%^&*()\-=_+{};':"|<,>.?/~])(?=.{8,20}$)\S+$/}}]);
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.