PageSourceSearch

https://samugiken.com/_next/static/chunks/pages/admin/content/reviews-08927716a286e5df.js

js samugiken.com collected 2026-10-07 01:50:37 UTC 24,058 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6742,9810],{92346:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/content/reviews",function(){return t(28832)}])},4180:function(e,n){"use strict";n.Z={src:"/_next/static/media/samu-giken.1bf2ec60.webp",height:549,width:1920,blurDataURL:"data:image/webp;base64,UklGRmQAAABXRUJQVlA4WAoAAAAQAAAABwAAAQAAQUxQSBEAAAAAGjk6MjtENBAZNi4qQzcvCgBWUDggLAAAAJABAJ0BKggAAgACQDgloAJ0ugADmAD+6ez/dAAp+z/+0s/+pZ/9Sz/NAAAA",blurWidth:8,blurHeight:2}},39577:function(e,n,t){"use strict";var r=t(52676),i=t(98807),l=t(78051),a=t(92966),s=t(63309);n.Z=e=>{let{children:n,className:t,...o}=e;return(0,r.jsx)(i.Z,{trigger:["click"],rootClassName:(0,s.cn)("!min-w-[100px]",t),...o,children:n||(0,r.jsx)(l.ZP,{className:"!px-2",children:(0,r.jsx)(a.Z,{})})})}},98131:function(e,n,t){"use strict";var r=t(52676),i=t(79406),l=t(78051);n.Z=e=>{let{visible:n,onOk:t,onCancel:a,title:s,content:o,danger:c=!1,okButtonText:d,cancelButtonText:u,loading:m,disabled:h}=e;return(0,r.jsxs)(i.Z,{open:n,title:s,footer:null,closeIcon:null,centered:!0,onCancel:()=>{h||null==a||a()},children:[o,(0,r.jsxs)("div",{className:"flex gap-5 mt-5",children:[(0,r.jsx)(l.ZP,{size:"large",onClick:a,block:!0,disabled:h,children:u||"Cancel"}),(0,r.jsx)(l.ZP,{size:"large",type:"primary",danger:c,onClick:t,block:!0,loading:m,disabled:h,children:d||"Ok"})]})]})}},30489:function(e,n,t){"use strict";t.d(n,{D:function(){return u}});var r=t(52676),i=t(75271),l=t(77894),a=t(82887),s=t(43183),o=t(71691),c=t(78434);let d=(0,i.createContext)({}),u=()=>{let{setActivatorNodeRef:e,listeners:n}=(0,i.useContext)(d);return(0,r.jsx)("button",{type:"button","aria-label":"Drag to reorder",ref:e,className:"cursor-grab text-neutral-400 hover:text-neutral-600",...n,children:(0,r.jsx)(a.Z,{size:16})})},m=e=>{let{attributes:n,listeners:t,setNodeRef:l,setActivatorNodeRef:a,transform:s,transition:u,isDragging:m}=(0,o.nB)({id:e["data-row-key"]}),h={...e.style,transform:c.ux.Translate.toString(s),transition:u,...m?{position:"relative",zIndex:999}:{}},x=(0,i.useMemo)(()=>({setActivatorNodeRef:a,listeners:t}),[a,t]);return(0,r.jsx)(d.Provider,{value:x,children:(0,r.jsx)("tr",{...e,ref:l,style:h,...n})})};n.Z=function(e){let{columns:n,dataSource:t,rowKey:i,loading:a,scroll:c,sortable:d=!0,onReorder:u}=e,h=(0,s.Dy)((0,s.VT)(s.we,{activationConstraint:{distance:8}})),x=t.map(i),p=(0,r.jsx)(l.Z,{columns:n,dataSource:t,rowKey:i,loading:a,scroll:c,pagination:!1,components:d?{body:{row:m}}:void 0});return d?(0,r.jsx)(s.LB,{sensors:h,collisionDetection:s.pE,onDragEnd:e=>{let{active:n,over:t}=e;if(!t||n.id===t.id)return;let r=x.indexOf(n.id),i=x.indexOf(t.id);-1!==r&&-1!==i&&u((0,o.Rp)(x,r,i))},children:(0,r.jsx)(o.Fo,{items:x,strategy:o.qw,children:p})}):p}},49810:function(e,n,t){"use strict";t.d(n,{Z:function(){return B}});var r=t(52676),i=t(75271),l=t(46035),a=t(33022),s=t(40150),o=t(28994),c=t(85304),d=t(4180),u=t(16624),m=t(27026),h=t.n(m),x=t(78051),p=t(98807),f=t(15036),g=t(32623),v=t.n(g);let y=e=>{let{isMobile:n,isDrawerOpen:t,setIsDrawerOpen:i,collapsed:l,setCollapsed:a,fullName:s}=e,{logout:o}=(0,c.a)();return(0,r.jsxs)("div",{style:{borderBottom:"1px solid #e8e8e8",position:"fixed",width:"100%",zIndex:100},className:"flex items-center justify-between h-16 px-6 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center h-full gap-2",children:[(0,r.jsx)(x.ZP,{onClick:()=>{n?i(!t):a(!l)},"aria-controls":"sidebar",className:"flex items-center justify-center w-8 px-1 py-0",icon:(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),!n&&(0,r.jsx)(h(),{href:"/",className:"h-full",children:(0,r.jsx)(v(),{src:d.Z,alt:"Samugiken",className:"w-[100%] h-[60px]"})})]}),(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsx)("div",{className:"flex items-center justify-center col-row",children:(0,r.jsx)(p.Z,{arrow:!0,placement:"bottomRight",overlayClassName:"shadow-[rgba(0,0,0,0.35)_0_5px_15px] rounded-xl top-10",trigger:["click"],dropdownRender:()=>(0,r.jsxs)("div",{className:"flex flex-col p-3 bg-white rounded-md shadow-md gap-y-1",children:[(0,r.jsx)(h(),{href:"/my-profile",className:"font-medium leading-[normal] text-primary hover:text-primary",children:(0,r.jsx)("div",{className:"cursor-pointer rounded-[4px]  p-3 duration-100 hover:bg-primary/10",children:"My Profile"})}),(0,r.jsx)(f.Z,{className:"!my-2"}),(0,r.jsx)(x.ZP,{type:"primary",danger:!0,onClick:o,children:"Logout"})]}),children:(0,r.jsxs)("div",{className:"flex items-center cursor-pointer gap-x-3",children:[(0,r.jsx)("div",{className:"flex items-center gap-2 ml-2",children:(0,r.jsx)("span",{className:"font-semibold",children:s})}),(0,r.jsx)(u.ZP,{name:s,round:!0,maxInitials:1,size:"35",textSizeRatio:2,fgColor:"white",color:"black"})]})})})})]})};var j=t(73640),N=t(62581),A=t(26134),w=t(1952),Z=t(7144),b=t(42439),E=t(88483),R=t(42720),C=t(43146),k=t(57221),T=t(84176),I=t(54216),O=t(12285),D=t(20188),_=t(19254);let S=e=>{var n,t,l,a,s,o,d,u,m,x,p;let{activeMenu:f,activeDropdown:g}=e,[v,y]=(0,i.useState)(f),{user:S}=(0,c.a)(),P=null==S?void 0:S.role.accessRights,M=e=>{y([e])},U=[{key:"dashboard",label:(0,r.jsx)(h(),{href:N.Z.ADMIN_DASHBOARD,children:"Dashboard"}),icon:(0,r.jsx)(w.Z,{width:16,height:16}),onClick:()=>M("dashboard")},...(0,A.f)(null==P?void 0:null===(n=P.PRODUCT)||void 0===n?void 0:n.READ,[{key:"product",label:(0,r.jsx)(h(),{href:N.Z.PRODUCT,children:"Product"}),icon:(0,r.jsx)(Z.Z,{width:16,height:16}),onClick:()=>M("product")}]),...(0,A.f)(null==P?void 0:null===(t=P.REVIEW)||void 0===t?void 0:t.READ,[{key:"review",label:(0,r.jsx)(h(),{href:N.Z.REVIEW,children:"Reviews"}),icon:(0,r.jsx)(b.Z,{width:16,height:16}),onClick:()=>M("review")}]),...(0,A.f)(null==P?void 0:null===(l=P.WARRANTY)||void 0===l?void 0:l.READ,[{key:"warranty",label:"Warranty",icon:(0,r.jsx)(_.Z,{width:16,height:16}),children:[{key:"warranty-register",label:(0,r.jsx)(h(),{href:N.Z.WARRANTY_REGISTER,children:"Warranty Register"}),onClick:()=>M("warranty-register")},{key:"warranty-claim",label:(0,r.jsx)(h(),{href:N.Z.WARRANTY_CLAIM,children:"Warranty Claim"}),onClick:()=>M("warranty-claim")}]}]),...(0,A.f)(null==P?void 0:null===(a=P.COUPON)||void 0===a?void 0:a.READ,[{key:"c
1oupon",label:(0,r.jsx)(h(),{href:N.Z.COUPON,children:"Coupon"}),icon:(0,r.jsx)(E.Z,{width:16,height:16}),onClick:()=>M("coupon")}]),...(0,A.f)(null==P?void 0:null===(s=P.ORDER)||void 0===s?void 0:s.READ,[{key:"order",label:(0,r.jsx)(h(),{href:N.Z.ORDER,children:"Orders"}),icon:(0,r.jsx)(_.Z,{width:16,height:16}),onClick:()=>M("order")},{key:"abandonment",label:(0,r.jsx)(h(),{href:N.Z.ABANDONMENT,children:"Abandonment"}),icon:(0,r.jsx)(R.Z,{width:16,height:16}),onClick:()=>M("abandonment")}]),...(0,A.f)(null==P?void 0:null===(o=P.BLOG)||void 0===o?void 0:o.READ,[{key:"blog",label:(0,r.jsx)(h(),{href:N.Z.BLOG,children:"Blog"}),icon:(0,r.jsx)(C.Z,{width:16,height:16}),onClick:()=>M("blog")}]),...(0,A.f)(null==P?void 0:null===(d=P.OUR_PARTNERS)||void 0===d?void 0:d.READ,[{key:"our-partners",label:(0,r.jsx)(h(),{href:N.Z.OUR_PARTNERS,children:"Our Partners"}),icon:(0,r.jsx)(k.Z,{width:16,height:16}),onClick:()=>M("our-partners")}]),...(0,A.f)(null==P?void 0:null===(u=P.CONTENT_MANAGEMENT)||void 0===u?void 0:u.READ,[{key:"content",label:"Content Management",icon:(0,r.jsx)(T.Z,{width:16,height:16}),children:[{key:"content-banners",label:(0,r.jsx)(h(),{href:N.Z.CONTENT_BANNER,children:"Banners"}),onClick:()=>M("content-banners")},{key:"content-reviews",label:(0,r.jsx)(h(),{href:N.Z.CONTENT_REVIEW,children:"Customer Reviews"}),onClick:()=>M("content-reviews")},{key:"content-videos",label:(0,r.jsx)(h(),{href:N.Z.CONTENT_VIDEO,children:"Product Videos"}),onClick:()=>M("content-videos")},{key:"content-popups",label:(0,r.jsx)(h(),{href:N.Z.CONTENT_POPUP,children:"Popups"}),onClick:()=>M("content-popups")}]}]),...(0,A.f)(null==P?void 0:null===(m=P.USER)||void 0===m?void 0:m.READ,[{key:"user",label:(0,r.jsx)(h(),{href:N.Z.USER,children:"User"}),icon:(0,r.jsx)(I.Z,{width:16,height:16}),onClick:()=>M("user")}]),...(0,A.f)(null==P?void 0:null===(x=P.ROLE)||void 0===x?void 0:x.READ,[{key:"role",label:(0,r.jsx)(h(),{href:N.Z.ROLE,children:"Role"}),icon:(0,r.jsx)(O.Z,{width:16,height:16}),onClick:()=>M("role")}]),...(0,A.f)(null==P?void 0:null===(p=P["SYSTEM_CONFIG/CATEGORY"])||void 0===p?void 0:p.READ,[{key:"system-config",label:(0,r.jsx)(h(),{href:N.Z.SYSTEM_CONFIG,children:"System Config"}),icon:(0,r.jsx)(D.Z,{width:16,height:16}),onClick:()=>M("category")}])];return(0,r.jsx)(j.Z,{theme:"light",mode:"inline",defaultOpenKeys:g||[],defaultSelectedKeys:v,items:U,className:"h-full font-medium"})};var P=t(63309);let{Sider:M,Content:U}=a.default;var B=e=>{let{children:n,user:t,activeMenu:u=[],activeDropdown:m=[],seoConfig:h,withPadding:x=!0,card:p=!0,contentClassName:f}=e,g=(0,o.ac)("(max-width: 768px)"),[j,N]=(0,i.useState)(!1),[A,w]=(0,i.useState)(!1);return(0,r.jsx)(c.H,{user:t,children:(0,r.jsxs)(a.default,{className:"!min-h-screen",children:[(0,r.jsx)(l.PB,{...h}),(0,r.jsx)(y,{isMobile:g,isDrawerOpen:A,setIsDrawerOpen:w,collapsed:j,setCollapsed:N,fullName:(null==t?void 0:t.firstName)+" "+(null==t?void 0:t.lastName)||""}),(0,r.jsx)("div",{className:"mt-[64px]"}),(0,r.jsxs)(a.default,{hasSider:!0,style:{minHeight:"100%"},children:[g?(0,r.jsx)(s.Z,{placement:"left",open:A,onClose:()=>w(!1),width:"250px",styles:{body:{padding:0}},closable:!1,children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"py-2",children:(0,r.jsx)(v(),{src:d.Z,alt:"Samugiken",className:"w-[100%] h-[70px]"})}),(0,r.jsx)(S,{activeMenu:u,activeDropdown:m})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:j?"duration-200 ml-[80px]":"duration-200 ml-[250px]"}),(0,r.jsx)(M,{trigger:null,collapsible:!0,collapsed:j,theme:"light",width:250,className:"hide-scrollbar",style:{overflow:"scroll",position:"fixed",marginTop:"64px",left:0,top:0,bottom:0,zIndex:100},children:(0,r.jsx)(S,{activeMenu:u,activeDropdown:m})})]}),(0,r.jsx)(U,{className:(0,P.cn)("min-h-full",x&&"px-3 py-5 md:p-9"),children:(0,r.jsx)("div",{className:(0,P.cn)(p&&"rounded-lg bg-white p-8 shadow-sm",f),children:n})})]})]})})}},5409:function(e,n,t){"use strict";t.d(n,{J:function(){return s}});var r=t(15989),i=t(39771),l=t(91340);let a=r.Z.create({baseURL:i.T5+"/api",headers:{"Content-Type":"application/json"},withCredentials:!0});a.interceptors.request.use(e=>{if((0,l.rD)()){let n=(0,l.Zd)();n&&(e.headers=e.headers||{},e.headers["x-session-id"]=n)}else e.headers&&e.headers["x-session-id"]&&delete e.headers["x-session-id"];return e});let s=r.Z.create({baseURL:i.T5+"/api",headers:{"Content-Type":"multipart/form-data"},maxContentLength:1/0,maxBodyLength:1/0,withCredentials:!0});n.Z=a}
1,95809:function(e,n,t){"use strict";var r=t(75271);n.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[n,t]=(0,r.useState)(e);return{visible:n,open:()=>{t(!0)},close:()=>{t(!1)},toggle:()=>{t(e=>!e)}}}},85304:function(e,n,t){"use strict";t.d(n,{H:function(){return h},a:function(){return x}});var r=t(52676),i=t(75271),l=t(76517),a=t(73414),s=t(71030),o=t(83214),c=t(62581),d=t(69504),u=t(91340);let m=(0,i.createContext)(null),h=e=>{let{children:n,user:t}=e,h=(0,a.useRouter)(),{mutate:x}=(0,s.D)({mutationFn:d.kS,onError:e=>l.Am.error((0,o._g)(e)),onSuccess:()=>{h.push(c.Z.LOGIN)}});return(0,i.useEffect)(()=>{t?(0,u.hv)():(0,u.wN)()},[t]),(0,r.jsx)(m.Provider,{value:{user:t,logout:x},children:n})},x=()=>{let e=(0,i.useContext)(m);if(!e)throw Error("useAuth must be used within a AuthProvider");return e}},86516:function(e,n,t){"use strict";var r=t(52676),i=t(43532),l=t(78051),a=t(57786),s=t(57065),o=t(29607),c=t(76517),d=t(39771),u=t(83471),m=t(88290);let{Dragger:h}=i.default;n.Z=e=>{let{value:n,onChange:t,disabled:x,aspect:p}=e;if(n)return(0,r.jsxs)("div",{className:"relative w-full h-32",children:[(0,r.jsx)("img",{src:n.url,alt:n.name,className:"object-contain w-full h-full rounded-lg border border-gray-200 bg-neutral-50"}),(0,r.jsx)("div",{className:"absolute top-2 right-2",children:(0,r.jsx)(l.ZP,{danger:!0,size:"small",icon:(0,r.jsx)(s.Z,{size:12}),onClick:()=>t(null),disabled:x})})]});let f=(0,r.jsxs)(h,{disabled:x,customRequest:e=>(0,u.c)(m.T.CONTENT_IMAGE,e),showUploadList:!1,onChange:e=>{"done"===e.file.status&&t(e.file.response)},beforeUpload:e=>!(e.size/1024/1024>d.Pg)||(c.Am.error("File too large (max ".concat(d.Pg,"MB)")),i.default.LIST_IGNORE),children:[(0,r.jsx)(o.Z,{size:40,className:"mx-auto"}),(0,r.jsx)("p",{children:"Click or drag image to upload"})]});return(0,r.jsx)("div",{className:"h-32 [&_.ant-upload-wrapper]:!h-full [&_.ant-upload-drag]:!h-full",children:p?(0,r.jsx)(a.Z,{aspect:p,children:f}):f})}},83471:function(e,n,t){"use strict";t.d(n,{$:function(){return a},c:function(){return l}});var r=t(5409),i=t(22903);let l=async(e,n,t)=>{let l=new FormData;l.append("file",n.file);try{let a=await r.J.post(null!=t?t:"/file/upload/".concat(e),l),s=(0,i.I)(a.data.key),o={uid:a.data.refId,name:a.data.name,url:s,status:"done",type:n.file.type,originFileObj:n.file};n.onSuccess(o)}catch(e){n.onError(e)}},a=async(e,n,t)=>{let l=new FormData;l.append("video",n.file);try{let a=await r.J.post(null!=t?t:"/video/upload/".concat(e),l),s=(0,i.I)(a.data.key),o={uid:a.data.refId,name:a.data.name,url:s,status:"done",type:n.file.type,originFileObj:n.file};return n.onSuccess(o),{success:!0,fileObject:o}}catch(e){return n.onError(e),{success:!1,error:e.response.data.message}}}},88290:function(e,n,t){"use strict";var r,i,l,a;t.d(n,{T:function(){return r},Z:function(){return i}}),(l=r||(r={})).PRODUCT_IMAGE="product-image",l.BLOG_IMAGE="blog-image",l.WARRANTY_CLAIM="warranty-claim",l.REVIEW="review",l.CONTENT_IMAGE="content-image",(a=i||(i={})).warranty_claim="warranty-claim",a.description="product-description",a.review="review"},28832:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return D},default:function(){return _}});var r=t(52676),i=t(75271),l=t(98774),a=t(69947),s=t(78051),o=t(49810),c=t(76517),d=t(37986),u=t(1705),m=t(69834),h=t(71030),x=t(84020),p=t(57722),f=t(39577),g=t(98131),v=t(30489),y=t(95809),j=t(83214),N=t(26134),A=t(22903),w=t(85304),Z=t(32218);let b=["content","testimonials"];var E=e=>{let{onEdit:n}=e,{user:t}=(0,w.a)(),l=t.role.accessRights,s=l.CONTENT_MANAGEMENT.UPDATE,o=(0,a.NL)(),[E,R]=(0,i.useState)(null),[C,k]=(0,i.useState)([]),T=(0,y.Z)(),I=(0,m.a)({queryKey:b,queryFn:Z.it,select:e=>e.data});(0,i.useEffect)(()=>{I.data&&k(I.data)},[I.data]);let O=(0,h.D)({mutationFn:e=>(0,Z.IF)(e),onSuccess:()=>{T.close(),R(null),o.invalidateQueries({queryKey:b})}}),D=(0,h.D)({mutationFn:e=>(0,Z.o)(e),onSettled:()=>{o.invalidateQueries({queryKey:b})}}),_=e=>{c.Am.promise(O.mutateAsync(e),{pending:"Deleting review...",success:"Review deleted successfully",error:{render(e){let{data:n}=e;return"Failed to delete review: ".concat((0,j._g)(n))}}})},S=[...(0,N.f)(s,[{key:"sort",width:48,align:"center",render:()=>(0,r.jsx)(v.D,{})}]),{title:"Profile Photo",dataIndex:["image","key"],render:e=>e?(0,r.jsx)("img",{src:(0,A.I)(e),alt:"profile",className:"object-cover w-12 h-12 rounded-full"}):"-"},{title:"Name",dataIndex:"name"},{title:"Rating",dataIndex:"rating",render:e=>(0,r.jsx)(x.Z,{disabled:!0,value:e})},{title:"Description",dataIndex:"description",render:e=>(0,r.jsx)("span",{className:"line-clamp-2 max-w-[320px]",children:e})},{title:"Status",dataIndex:"active",render:e=>(0,r.jsx)(p.Z,{color:e?"green":"red",children:e?"Active":"Inactive"})},{dataIndex:"refId",width:50,render:(e,t)=>(0,r.jsx)(f.Z,{menu:{items:[...(0,N.f)(l.CONTENT_MANAGEMENT.UPDATE,[{key:"edit",label:"Edit",icon:(0,r.jsx)(d.Z,{}),onClick:()=>n(t)}
1]),...(0,N.f)(l.CONTENT_MANAGEMENT.DELETE,[{key:"delete",label:"Delete",danger:!0,icon:(0,r.jsx)(u.Z,{}),onClick:()=>{R(t),T.open()}}])]}})}];return(0,r.jsxs)(r.Fragment,{children:[s&&C.length>1&&(0,r.jsx)("p",{className:"mb-3 text-sm text-neutral-500",children:"Drag the handle to reorder. The order here is the display order on the site."}),(0,r.jsx)(v.Z,{columns:S,dataSource:C,loading:I.isFetching,rowKey:e=>e.refId,scroll:{x:800},sortable:s,onReorder:e=>{let n=new Map(C.map(e=>[e.refId,e]));k(e.map(e=>n.get(e)).filter(e=>!!e)),c.Am.promise(D.mutateAsync(e),{pending:"Saving order...",success:"Order saved",error:{render(e){let{data:n}=e;return"Failed to save order: ".concat((0,j._g)(n))}}})}}),(0,r.jsx)(g.Z,{visible:T.visible,title:"Delete Review",content:"Are you sure you want to delete this review?",okButtonText:"Delete",danger:!0,onCancel:()=>{T.close(),R(null)},onOk:()=>E&&_(E.refId),loading:O.isPending,disabled:O.isPending})]})},R=t(18060),C=t(79406),k=t(21844),T=t(39649),I=t(86516),O=e=>{let{open:n,editing:t,onClose:l,onSuccess:a}=e,[o]=R.Z.useForm(),[d,u]=(0,i.useState)(null);(0,i.useEffect)(()=>{n&&(t?(o.setFieldsValue({name:t.name,rating:t.rating,description:t.description,active:t.active}),u(t.image?{uid:t.image.refId,name:t.image.name,url:(0,A.I)(t.image.key),status:"done"}:null)):(o.resetFields(),u(null)))},[n,t,o]);let m=(0,h.D)({mutationFn:e=>{var n,r,i,l;let a={name:e.name.trim(),rating:e.rating,description:null!==(r=null===(n=e.description)||void 0===n?void 0:n.trim())&&void 0!==r?r:"",imageId:null!==(i=null==d?void 0:d.uid)&&void 0!==i?i:null,active:null===(l=e.active)||void 0===l||l};return t?(0,Z.fN)(t.refId,a):(0,Z.i6)(a)},onSuccess:()=>{a(),l()}});return(0,r.jsx)(C.Z,{open:n,onCancel:l,footer:null,title:t?"Edit Review":"Create Review",closeIcon:null,centered:!0,children:(0,r.jsxs)(R.Z,{form:o,layout:"vertical",onFinish:e=>{c.Am.promise(m.mutateAsync(e),{pending:t?"Updating review...":"Creating review...",success:t?"Review updated successfully":"Review created successfully",error:{render(e){let{data:n}=e;return"Failed to save review: ".concat((0,j._g)(n))}}})},initialValues:{rating:5,active:!0},children:[(0,r.jsx)(R.Z.Item,{name:"name",label:"Name",rules:[{required:!0}],children:(0,r.jsx)(k.default,{})}),(0,r.jsx)(R.Z.Item,{name:"rating",label:"Rating",rules:[{required:!0}],children:(0,r.jsx)(x.Z,{})}),(0,r.jsx)(R.Z.Item,{name:"description",label:"Description",rules:[{required:!0}],children:(0,r.jsx)(k.default.TextArea,{rows:4})}),(0,r.jsx)(R.Z.Item,{label:"Profile Photo (optional)",children:(0,r.jsx)(I.Z,{value:d,onChange:u,disabled:m.isPending})}),(0,r.jsx)(R.Z.Item,{name:"active",label:"Active",valuePropName:"checked",children:(0,r.jsx)(T.Z,{})}),(0,r.jsxs)("div",{className:"flex gap-5",children:[(0,r.jsx)(s.ZP,{block:!0,size:"large",htmlType:"button",onClick:l,disabled:m.isPending,children:"Cancel"}),(0,r.jsx)(s.ZP,{block:!0,size:"large",type:"primary",htmlType:"submit",loading:m.isPending,disabled:m.isPending,children:t?"Update":"Create"})]})]})})},D=!0,_=e=>{var n;let{user:t}=e,c=(0,a.NL)(),[d,u]=(0,i.useState)(null),[m,h]=(0,i.useState)(!1);return(0,r.jsxs)(o.Z,{user:t,activeMenu:["content-reviews"],activeDropdown:["content"],
1children:[(null===(n=t.role.accessRights)||void 0===n?void 0:n.CONTENT_MANAGEMENT.CREATE)&&(0,r.jsx)("div",{className:"flex justify-end mb-5",children:(0,r.jsxs)(s.ZP,{type:"primary",onClick:()=>{u(null),h(!0)},children:[(0,r.jsx)(l.Z,{}),"New"]})}),(0,r.jsx)(E,{onEdit:e=>{u(e),h(!0)}}),(0,r.jsx)(O,{open:m,editing:d,onClose:()=>{h(!1),u(null)},onSuccess:()=>{c.invalidateQueries({queryKey:b})}})]})}},69504:function(e,n,t){"use strict";t.d(n,{A9:function(){return c},IU:function(){return l},c0:function(){return o},kS:function(){return a},o9:function(){return s},x4:function(){return i}});var r=t(5409);let i=async e=>r.Z.post("/auth/login",e),l=async e=>r.Z.post("/auth/signup",e),a=async()=>r.Z.post("/auth/logout"),s=async e=>r.Z.post("/auth/forget-password",e),o=async e=>r.Z.post("/auth/password-reset/confirm",e),c=async e=>r.Z.post("/auth/verify-user",e)},32218:function(e,n,t){"use strict";t.d(n,{IF:function(){return u},Ld:function(){return A},Up:function(){return p},Vj:function(){return j},WG:function(){return y},WK:function(){return f},ZS:function(){return x},du:function(){return l},fN:function(){return d},i6:function(){return c},it:function(){return o},n5:function(){return v},nA:function(){return i},o:function(){return m},r$:function(){return g},rR:function(){return s},ty:function(){return a},wl:function(){return h},xE:function(){return N}});var r=t(5409);let i=e=>r.Z.get("/admin/content/banners",{params:e?{page:e}:{}}),l=e=>r.Z.put("/admin/content/banners",e),a=()=>r.Z.get("/admin/content/popups"),s=e=>r.Z.put("/admin/content/popups",e),o=()=>r.Z.get("/admin/content/testimonials"),c=e=>r.Z.post("/admin/content/testimonials",e),d=(e,n)=>r.Z.put("/admin/content/testimonials/".concat(e),n),u=e=>r.Z.delete("/admin/content/testimonials/".concat(e)),m=e=>r.Z.put("/admin/content/testimonials/reorder",{refIds:e}),h=()=>r.Z.get("/admin/content/videos"),x=e=>r.Z.post("/admin/content/videos",e),p=(e,n)=>r.Z.put("/admin/content/videos/".concat(e),n),f=e=>r.Z.delete("/admin/content/videos/".concat(e)),g=e=>r.Z.put("/admin/content/videos/reorder",{refIds:e}),v=e=>r.Z.get("/public/content/banners",{params:{page:e}}),y=()=>r.Z.get("/public/content/testimonials"),j=()=>r.Z.get("/public/content/videos"),N=e=>r.Z.get("/public/content/popup",{params:{page:e}}),A=e=>r.Z.post("/public/content/popup/".concat(e,"/claim-voucher"))},62581:function(e,n,t){"use strict";var r,i;t.d(n,{Z:function(){return r}}),(i=r||(r={})).LOGIN="/login",i.ADMIN_DASHBOARD="/admin/dashboard",i.HOME="/",i.USER="/admin/user",i.ROLE="/admin/role",i.NEW_ROLE="/admin/role/new",i.SYSTEM_CONFIG="/admin/system-config",i.PRODUCT="/admin/product",i.BLOG="/admin/blog",i.ORDER="/admin/order",i.ABANDONMENT="/admin/abandonment",i.WARRANTY_REGISTER="/admin/warranty-register",i.WARRANTY_CLAIM="/admin/warranty-claim",i.COUPON="/admin/coupon",i.OUR_PARTNERS="/admin/our-partners",i.REVIEW="/admin/review",i.CONTENT_BANNER="/admin/content/banners",i.CONTENT_REVIEW="/admin/content/reviews",i.CONTENT_VIDEO="/admin/content/videos",i.CONTENT_POPUP="/admin/content/popups"},26134:function(e,n,t){"use strict";t.d(n,{f:function(){return r}});let r=(e,n,t)=>void 0===n?void 0!==t?t:Array.isArray(n)?[]:{}:e?n:void 0!==t?t:Array.isArray(n)?[]:{}},83214:function(e,n,t){"use strict";t.d(n,{_g:function(){return l},i$:function(){return a}});var r=t(52043),i=t.n(r);let l=e=>{if("response"in e){var n,t;return null===(t=e.response)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.message}return e.message},a=(e,n)=>{let t=i()(e);return e&&t.isValid()?i()(e).format("DD MMM YYYY, hh:mm a"):n||null}},22903:function(e,n,t){"use strict";t.d(n,{B:function(){return i},I:function(){return r}});let r=e=>"".concat("https://cdn.samugiken.com","/").concat("production","/").concat(encodeURIComponent(e)),i=e=>"".concat("https://cdn.samugiken.com","/").concat("production","/").concat(encodeURIComponent(e))},91340:function(e,n,t){"use strict";t.d(n,{Zd:function(){return l},hv:function(){return s},rD:function(){return o},wN:function(){return a}});let r="session_id",i="session_header_enabled";function l(){try{let e=localStorage.getItem(r);if(e&&e.length>0)return e;let n="undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():c();return localStorage.setItem(r,n),n}catch(e){return c()}}function a(){try{localStorage.setItem(i,"1")}catch(e){}}function s(){try{localStorage.setItem(i,"0"),localStorage.removeItem(r)}catch(e){}}function o(){try{return"1"===localStorage.getItem(i)}catch(e){return!1}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})}}},function(e){e.O(0,[5989,4237,7610,8174,9834,8051,9513,4540,928,4298,4190,6631,6220,9575,7444,9406,150,1887,5934,8060,9059,8672,1795,8374,7894,3532,6138,6345,2902,2888,9774,179],function(){return e(e.s=92346)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.