1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6870],{41356:function(e,t,i){"use strict";var n=i(91980);t.Z=void 0;var r=n(i(60710)),o=i(52676);t.Z=(0,r.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},15327:function(e,t,i){"use strict";var n=i(91980);t.Z=void 0;var r=n(i(60710)),o=i(52676);t.Z=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2M4 12c0-4.4 3.6-8 8-8 1.8 0 3.5.6 4.9 1.7L5.7 16.9C4.6 15.5 4 13.8 4 12m8 8c-1.8 0-3.5-.6-4.9-1.7L18.3 7.1C19.4 8.5 20 10.2 20 12c0 4.4-3.6 8-8 8"}),"DoDisturb")},69434:function(e,t,i){"use strict";var n=i(91980);t.Z=void 0;var r=n(i(60710)),o=i(52676);t.Z=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z"}),"RemoveCircle")},12350:function(e,t,i){"use strict";i.d(t,{Z:function(){return useMediaQuery}});var n,r=i(75271),o=i(56691),s=i(8438),a=i(21859);let l=(n||(n=i.t(r,2))).useSyncExternalStore;function useMediaQuery(e,t={}){let i=(0,a.Z)(),n="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:d=!1,matchMedia:c=n?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:h=!1}=(0,s.Z)({name:"MuiUseMediaQuery",props:t,theme:i}),m="function"==typeof e?e(i):e;m=m.replace(/^@media( ?)/m,"");let p=(void 0!==l?function(e,t,i,n,o){let s=r.useCallback(()=>t,[t]),a=r.useMemo(()=>{if(o&&i)return()=>i(e).matches;if(null!==n){let{matches:t}=n(e);return()=>t}return s},[s,e,n,o,i]),[d,c]=r.useMemo(()=>{if(null===i)return[s,()=>()=>{}];let t=i(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[s,i,e]),u=l(c,d,a);return u}:function(e,t,i,n,s){let[a,l]=r.useState(()=>s&&i?i(e).matches:n?n(e).matches:t);return(0,o.Z)(()=>{let t=!0;if(!i)return;let n=i(e),updateMatch=()=>{t&&l(n.matches)};return updateMatch(),n.addListener(updateMatch),()=>{t=!1,n.removeListener(updateMatch)}},[e,i]),a})(m,d,c,u,h);return p}},23901:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/editor-choice/edit/[editorChoiceId]",function(){return i(44411)}])},32470:function(e,t,i){"use strict";i.d(t,{a:function(){return getMainImage}});let getMainImage=e=>{var t,i;return null!==(i=null===(t=e.filter(e=>{let{is_main:t}=e;return t})[0])||void 0===t?void 0:t.image_path)&&void 0!==i?i:""}},927:function(e,t,i){"use strict";var n=i(52676),r=i(38362),o=i(5079),s=i(41356),a=i(69434),l=i(4322),d=i(19551),c=i(55466),u=i(67600),h=i(79715),m=i(25598),p=i(14781),x=i(8771),f=i(25282);t.Z=e=>{let{title:t,placeHolder:i,onAddClick:g,btnText:v="ì¶ê°",items:j=[],checkbox:b=!1,handleCheckClick:Z=(e,t)=>{let{id:i,identifier:n}=e},onRemoveClick:C}=e,{control:E,handleSubmit:S,reset:y}=(0,f.cI)({defaultValues:{target:""}});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Z,{variant:"h6",sx:{mb:1},children:t}),(0,n.jsx)(d.Z,{mt:2,children:(0,n.jsx)("form",{onSubmit:S(e=>{g(e.target),y()}),children:(0,n.jsxs)(c.ZP,{container:!0,spacing:1,mb:2,children:[(0,n.jsx)(c.ZP,{item:!0,xs:9,children:(0,n.jsx)(f.Qr,{name:"target",control:E,rules:{required:!0},render:e=>{var t;let{field:r,fieldState:{error:o}}=e;return(0,n.jsx)(u.Z,{label:i,variant:"filled",fullWidth:!0,size:"small",...r,error:!!o,helperText:null!==(t=null==o?void 0:o.message)&&void 0!==t?t:""})}})}),(0,n.jsx)(c.ZP,{item:!0,xs:3,children:(0,n.jsx)(h.Z,{type:"submit",fullWidth:!0,className:"h-full text-white bg-green hover:bg-green-700",children:(0,n.jsxs)("div",{className:"flex items-center justify-center w-full gap-1",children:[(0,n.jsx)(s.Z,{}),(0,n.jsx)("div",{className:"font-bold",children:v})]})})})]})})}),(0,n.jsx)(d.Z,{className:"grid gap-2",children:(null!=j?j:[]).map((e,t)=>{let{imagePath:i,name:s,id:l,description:c,identifier:u,isChecked:h}=e;return(0,n.jsxs)("div",{className:"grid grid-cols-7 gap-2 p-2 border rounded",children:[i?(0,n.jsx)(d.Z,{className:"relative w-full col-span-2 aspect-1/1",children:(0,n.jsx)(o.Z,{src:(0,r.a)(i),alt:s,fill:!0,sizes:"100"})}):null,(0,n.jsx)(d.Z,{className:"flex items-center col-span-4 text-sm md:text-base",children:(0,n.jsxs)("div",{className:"flex items-center w-full",children:[(0,n.jsx)("div",{className:"flex-1",children:c}),(0,n.jsx)("div",{children:b?(0,n.jsx)(m.Z,{control:(0,n.jsx)(p.Z,{checked:h,onChange:e=>Z({id:l,identifier:u},e.target.checked)}),label:"ë©ì¸"}):null})]})}),(0,n.jsx)(d.Z,{className:"flex items-center justify-center",children:(0,n.jsx)(x.Z,{onClick:()=>C({identifier:u,id:l}),children:(0,n.jsx)(a.Z,{})})})]},t)})})]})}},58066:function(e,t,i){"use strict";i.d(t,{Z:function(){return Blog}});var n=i(52676),r=i(65298),o=i.n(r),s=i(19551),a=i(79715),l=i(37892),d=i(93287),c=i(86298),u=i(52534);let h=o()(()=>Promise.all([i.e(9774),i.e(8883),i.e(9678),i.e(5282),i.e(9652),i.e(5990),i.e(9690),i.e(2619),i.e(880),i.e(7003),i.e(3595)]).then(i.bind(i,73595)).then(e=>e),{loadableGenerated:{webpack:()=>[73595]},ssr:!1});function Blog(e){let{blogId:t,onBlogCreated:i}=e,r=(0,c.T)(),{mutate:o}=(0,u.sS)({onSuccess:async e=>{let{data:t}=e;if(t.success){let e=t.data.blog.id;i(e)}else{var n,o;r((0,d.OV)({content:null!==(o=null===(n=t.data)||void 0===n?void 0:n.error)&&void 0!==o?o:"ë¤ì íë² ìëí´ì£¼ì¸ì."}))}}});return(0,n.jsxs)(n.Fragment,{children:[!t&&(0,n.jsx)(s.Z,{sx:{display:"flex",justifyContent:"flex-start",width:"100%",mt:2,mb:2},children:(0,n.jsxs)(a.Z,{variant:"contained",size:"large",sx:{width:"250px",backgroundColor:"#1976d2 !important"},onClick:()=>{o({state:"hidden"})},children:[(0,n.jsx)(l.Z,{sx:{mr:1}}),"ë¸ë¡ê·¸ ìì±"]})}),t&&(0,n.jsx)(h,{blogId:t})]})}},98169:function(e,t,i){"use strict";i.d(t,{C:function(){return c},Z:function(){return DropZone}});var n=i(52676),r=i(75271),o=i(77163),s=i(19551),a=i(93287),l=i(86298),d=i(5079);function DropZone(e){let{imagePath:t,imageKey:i,onUploaded:c,onRemoved:u,minWidth:h,minHeight:m,maxWidth:p,maxHeight:x,maxSize:f,validExtensions:g}=e,v=(0,r.useRef)(null),j=(0,r.useCallback)(async e=>{c(e,i)},[]),[b,Z]=(0,r.useState)(!1),C=(0,l.T)(),{getRootProps:E,getInputProps:S,isDragActive:y}=(0,o.uI)({onDrop:async(e,t)=>{if(e.length>1){C((0,a.OV)({content:"íëì íì¼ë§ ì
ë¡ë í ì ììµëë¤."}));return}if(e.length>0){let t=e[0];if(validateFileExtension(t)&&validateFileSize(t)){let e=await getImageDimensions(t);validateFileDimension(e)&&j(t)}}}});(0,r.useEffect)(()=>{let updateHeight=()=>{let e=v.current;if(e){let t=e.offsetWidth;e.style.height="".concat(t,"px")}};return window.addEventListener("resize",updateHeight),updateHeight(),()=>{window.removeEventListener("resize",updateHeight)}},[]);let validateFileExtension=e=>{if(-1===g.indexOf(e.type)){g.map(e=>e.split("/")[1].toUpperCase());let e=g.join(", ");return C((0,a.OV)({content:"íì¼ íì : ".concat(e)})),!1}return!0},validateFileSize=e=>!(e.size>f)||(C((0,a.OV)({content:"íì¼ ìµë í¬ê¸° : ".concat(f/1e6,"MB")})),!1),getImageDimensions=e=>new Promise((t,i)=>{let n=document.createElement("img");n.onload=()=>t({width:n.width,height:n.height}),n.onerror=i;let r=new FileReader;r.onload=e=>{var t;"string"==typeof(null===(t=e.target)||void 0===t?void 0:t.result)&&(n.src=e.target.result)}
1,r.onerror=i,r.readAsDataURL(e)}),validateFileDimension=e=>!(e.width<h)&&!(e.height<m)&&!(e.width>p)&&!(e.height>x)||(C((0,a.OV)({content:"ìµì ".concat(h," x ").concat(m," px\n ìµë ").concat(p," x ").concat(x," px\n í¬ê¸°ì ì´ë¯¸ì§ë§ ì
ë¡ë ê°ë¥í©ëë¤.")})),!1);return(0,n.jsxs)("div",{...E(),children:[(0,n.jsx)("input",{...S()}),(0,n.jsx)("div",{ref:v,style:{cursor:"pointer",position:"relative",width:"100%",height:"100%"},children:(0,n.jsxs)("div",{onMouseOver:e=>{e.stopPropagation(),Z(!0)},onMouseOut:e=>{e.stopPropagation(),Z(!1)},style:{width:"100%",height:"100%"},children:[!!t&&!!b&&(0,n.jsx)(s.Z,{sx:{width:"100%",height:"100%",position:"absolute",left:0,right:0,background:"rgba(33, 150, 243, 0.8)",zIndex:10},children:(0,n.jsx)(s.Z,{sx:{width:"60px",height:"40px",color:"#fff",border:"1px solid #fff",textAlign:"center",lineHeight:"40px",position:"absolute",left:20,bottom:20},onClick:e=>{e.stopPropagation(),u(i)},children:"ìì "})}),t?(0,n.jsx)(d.Z,{alt:"Product Image",src:t.startsWith("http")?t:"https://cdn.withgoods.net/"+t,fill:!0,style:{objectFit:"cover"}}):(0,n.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",height:"100%",color:"#b5b5b5",fontSize:"1rem",fontWeight:"500",border:"1px solid #e0e0e0",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"#f3f3f3"}},children:[(0,n.jsx)(s.Z,{mb:1,children:(0,n.jsx)(d.Z,{src:"/img/default-images/file-upload.svg",alt:"defaultImage",width:"100",height:"100"})}),(0,n.jsx)("p",{children:"ëëê·¸ or í´ë¦ì¼ë¡"}),(0,n.jsx)("p",{children:"ëìì¸ ì
ë¡ë"})]})]})})]})}let c=r.memo(DropZone)},5079:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(52676),r=i(73155),o=i(19551),s=i(52588),a=i(15171),common_CircularProgress=function(e){let{isMobile:t}=(0,r.Pd)();return(0,n.jsxs)(o.Z,{sx:{position:"relative"},children:[(0,n.jsx)(s.Z,{variant:"determinate",sx:{color:e=>e.palette.grey["light"===e.palette.mode?200:800]},size:50,thickness:4,...e,value:100}),(0,n.jsx)(s.Z,{variant:"indeterminate",disableShrink:!0,sx:{color:e=>"light"===e.palette.mode?"#6e6e6e":"#434343",animationDuration:"850ms",position:"absolute",left:0,["& .".concat(a.Z.circle)]:{strokeLinecap:"round"}},size:50,thickness:4,...e})]})},l=i(15327),d=i(45924),c=i(39678),u=i.n(c),h=i(75271);let DefaultImage=e=>{let{progress:t,noDefaultImage:i}=e;return i?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)("div",{className:"flex flex-col items-center justify-center h-full font-subhead-3",children:t?(0,n.jsx)(common_CircularProgress,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Z,{className:"text-gray-07"}),(0,n.jsx)("div",{children:"ì´ë¯¸ì§ ìì"})]})})},m=h.forwardRef((e,t)=>{let{src:i,alt:r="",customStyle:o="",onError:s,noDefaultImage:a=!1,progress:l=!1,...c}=e,[m,p]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{p(!1)},[i]),(0,n.jsx)(n.Fragment,{children:m?(0,n.jsx)(DefaultImage,{progress:l,noDefaultImage:a}):(0,n.jsx)(u(),{...c,src:i,alt:r,onError:s||(()=>{p(!0)}),className:(0,d.Z)(c.className,o),unoptimized:!0,ref:t})})});var p=m},73155:function(e,t,i){"use strict";i.d(t,{Pd:function(){return useBreakPoint},YD:function(){return Tablet},g7:function(){return o},ij:function(){return Mobile}});var n=i(52676);i(75271);var r=i(12350);let o=960,Mobile=e=>{let{...t}=e,i=(0,r.Z)("(max-width: ".concat(o-1,"px)"));return(0,n.jsx)(n.Fragment,{children:i&&t.children})},Tablet=e=>{let{...t}=e,i=(0,r.Z)("(min-width: ".concat(o,"px)"));return(0,n.jsx)(n.Fragment,{children:i&&t.children})},useBreakPoint=()=>{let e=(0,r.Z)("(max-width: ".concat(o-1,"px)")),t=(0,r.Z)("(min-width: ".concat(o,"px)")),i=(0,r.Z)("(min-width: ".concat(1280,"px)"));return{isMobile:e,isTablet:t,isDesktop:i}}},52534:function(e,t,i){"use strict";i.d(t,{XP:function(){return useUpdateBlog},sS:function(){return useCreateBlog},x3:function(){return getBlog}});var n,r=i(35360),o=i(21964),s=i(79155),a=i(78554);(n||(n={})).Blog="blog";let useCreateBlog=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,a.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,o.D)({mutationFn:e=>(0,r.eE)(t).post("/api/admin/blogs",e),onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},useUpdateBlog=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,a.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,o.D)({mutationFn:e=>{let{blogId:i,data:n}=e;return(0,r.eE)(t).put("/api/admin/blogs/".concat(i),n)},onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},getBlog=e=>{let{blogId:t}=e;return(0,a.BJ)({})(e=>{let{token:i,options:n}=e;return(0,s.a)(["blog"],e=>(0,r.eE)(i).get("/api/blog/".concat(t)),n)})}},7144:function(e,t,i){"use strict";i.d(t,{FM:function(){return useUpdateEditorChoice},LH:function(){return getEditorChoice},To:function(){return getMainEditorChoices},bL:function(){return useAddEditorChoiceGood},jH:function(){return r},lT:function(){return useCreateEditorChoice},r9:function(){return useSortEditorChoice},sk:function(){return useRemoveEditorChoiceGood},tY:function(){return getEditorChoices}});var n,r,o=i(35360),s=i(79155),a=i(21964),l=i(78554);(n=r||(r={})).EditorChoices="editorChoices",n.EditorChoice="editorChoice";let getMainEditorChoices=()=>(0,l.BJ)({})(e=>{let{token:t,options:i}=e;return(0,s.a)(["editorChoices"],e=>(0,o.eE)().get("/api/editor-choices",{params:{state:"live",sortBy:"sorting_key",orderBy:"ASC",page:0,pageSize:4}}),i)}),useCreateEditorChoice=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,l.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,a.D)({mutationFn:e=>{let{data:i}=e;return(0,o.eE)(t).post("/api/admin/editor-choices",i)},onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},useUpdateEditorChoice=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,l.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,a.D)({mutationFn:e=>{let{editorChoiceId:i,data:n}=e;return(0,o.eE)(t).put("/api/admin/editor-choices/".concat(i),n)},onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},useSortEditorChoice=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,l.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,a.D)({mutationFn:e=>{let{editorChoiceId:i,data:n}=e;return(0,o.eE)(t).put("/api/admin/editor-choices/".concat(i,"/sort"),n)},onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},useAddEditorChoiceGood=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,l.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,a.D)({mutationFn:e=>{let{editorChoiceId:i,data:n}=e;return(0,o.eE)(t).put("/api/admin/editor-choices/".concat(i,"/add-good"),n)},onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},useRemoveEditorChoiceGood=e=>{let{onSuccess:t,onError:i,onSettled:n}=e;return(0,l.Q$)({onSuccess:t,onError:i,onSettled:n})(e=>{let{token:t,options:i}=e;return(0,a.D)({mutationFn:e=>{let{editorChoiceId:i,data:n}=e;return(0,o.eE)(t).put("/api/admin/editor-choices/".concat(i,"/remove-good"),n)},onSuccess:null==i?void 0:i.onSuccess,onError:null==i?void 0:i.onError,onSettled:null==i?void 0:i.onSettled})})},getEditorChoices=e=>{let{params:t}=e;return(0,l.BJ)({})(e=>{let{token:i,options:n}=e;return(0,s.a)(["editorChoices"],()=>(0,o.eE)(i).get("/api/editor-choices",{params:t}),n)})},getEditorChoice=e=>{let{editorChoiceId:t,params:i}=e;return(0,l.BJ)({})(e=>{let{token:n,options:r}=e;return(0,s.a)(["editorChoice",t],()=>(0,o.eE)(n).get("/api/editor-choices/".concat(t),{params:i}),r)})}},44411:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return w},default:function(){return _editorChoiceId_}});var n=i(52676),r=i(54153),o=i(86298),s=i(3917),a=i(35360),l=i(71675),d=i(93287),c=i(7144);let AdminEditorChoice=e=>({createEditorChoice:t=>(0,a.eH)(e).post("/api/admin/editor-choices",t),updateEditorChoice:(t,i)=>(0,a.eH)(e).put("/api/admin/editor-choices/".concat(t),i),sortEditorChoice:(t,i)=>(0,a.eH)(e).put("/api/admin/editor-choices/".concat(t,"/sort"),i),addGood:(t,i)=>(0,a.eH)(e).put("/api/admin/editor-choices/".concat(t,"/add-good"),i),removeGood:(t,i)=>(0,a.eH)(e).put("/api/admin/editor-choices/".concat(t,"/remove-good"),i),uploadImage:t=>(0,a.eH)(e).post("/api/admin/editor-choices/upload-image",t)});var u=i(55466),h=i(19551),m=i(4322),p=i(67600),x=i(25598),f=i(14781),g=i(79715),v=i(75616),j=i(25282),b=i(98169),Z=i(927),C=i(32470),E=i(58066);let S={minWidth:s.O8.admin.minWidth,minHeight:s.O8.admin.minHeight,maxWidth:s.O8.admin.maxWidth,maxHeight:s.O8.admin.maxHeight,maxSize:s.O8.admin.maxSize,validExtensions:s.O8.admin.validExtensions};var editorChoice_AdminEditorChoiceEditForm=e=>{var t;let{editorChoiceId:i}=e,r=(0,v.NL)(),y=r.getQueryData([c.jH.EditorChoice,i]),{control:w,handleSubmit:_,setValue:k,watch:O}=(0,j.cI)(),F=(0,o.T)(),{mutate:P}=(0,c.FM)({onSuccess:async e=>{let{data:t}=e;if(t.success)F((0,d.OV)({content:"Editor Choiceê° ì±ê³µì ì¼ë¡ ì
ë°ì´í¸ëììµëë¤."})),r.invalidateQueries([c.jH.EditorChoice,i]);else{var n,o;F((0,d.OV)({content:null!==(o=null===(n=t.data)||void 0===n?void 0:n.error)&&void 0!==o?o:"ë¤ì íë² ìëí´ì£¼ì¸ì."}))}}}),{mutate:I}=(0,c.bL)({onSuccess:async e=>{let{data:t}=e;if(t.success)F((0,d.OV)({content:"굿ì¦ê° ì±ê³µì ì¼ë¡ ì
ë°ì´í¸ëììµëë¤."})),r.invalidateQueries([c.jH.EditorChoice,i]);else{var n,o;F((0,d.OV)({content:null!==(o=null===(n=t.data)||void 0===n?void 0:n.error)&&void 0!==o?o:"ë¤ì íë² ìëí´ì£¼ì¸ì."}))}}}),{mutate:D}=(0,c.sk)({onSuccess:async e=>{let{data:t}=e;if(t.success)F((0,d.OV)({content:"굿ì¦ê° ì±ê³µì ì¼ë¡ ì
ë°ì´í¸ëììµëë¤."})),r.invalidateQueries([c.jH.EditorChoice,i]);else{var n,o;F((0,d.OV)({content:null!==(o=null===(n=t.data)||void 0===n?void 0:n.error)&&void 0!==o?o:"ë¤ì íë² ìëí´ì£¼ì¸ì."}))}}});if(!y)return(0,n.jsx)("div",{children:"Loading..."});let{data:{editorChoice:N}}=y,imageUploader=async(e,t)=>await (0,a.LQ)(AdminEditorChoice({authorization:"bearer ".concat(e)}).uploadImage(t)),onUploadedImage=async e=>{let t=new FormData;t.append("file",e);let i=await imageUploader(l.Z.getCurrentToken(),t);
1if(i.success)k("image_path",i.data.url);else{var n,r;F((0,d.OV)({content:null!==(r=null===(n=i.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"ë¤ì íë² ìëí´ì£¼ì¸ì."}))}},onAddClick=(e,t)=>{I({editorChoiceId:e,data:{good_id:t}})},onRemoveClick=(e,t)=>{D({editorChoiceId:e,data:{good_id:t}})};return(0,n.jsxs)(u.ZP,{container:!0,direction:"row",width:"100%",justifyContent:"space-between",children:[(0,n.jsx)(u.ZP,{container:!0,item:!0,direction:"row",xs:12,md:6,pr:2,children:(0,n.jsx)("form",{onSubmit:_(e=>{let{name:t,video_id:i,description:n,is_image_prioritised:r,image_path:o}=e;P({editorChoiceId:N.id,data:{name:t,video_id:i,description:n,is_image_prioritised:r,image_path:o}})}),className:"w-full",children:(0,n.jsxs)(h.Z,{borderRadius:2,bgcolor:"white",className:"w-full p-4 shadow-sm",children:[(0,n.jsx)(m.Z,{variant:"h6",sx:{mb:1},className:"text-lg lg:text-xl",children:"기본ì ë³´"}),(0,n.jsxs)(u.ZP,{container:!0,spacing:1,mb:2,mt:3,children:[(0,n.jsxs)(u.ZP,{item:!0,xs:6,children:[(0,n.jsx)(m.Z,{children:"ì´ë¯¸ì§"}),(0,n.jsx)(b.Z,{imagePath:null!==(t=O("image_path"))&&void 0!==t?t:N.image_path,onUploaded:onUploadedImage,onRemoved:()=>{k("image_path","")},imageKey:"image_path",...S}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(j.Qr,{control:w,name:"name",defaultValue:N.name,render:e=>{let{field:t}=e;return(0,n.jsx)(p.Z,{label:"ì´ë¦",variant:"filled",size:"small",fullWidth:!0,...t})}})})]}),(0,n.jsxs)(u.ZP,{item:!0,xs:6,pl:1,children:[(0,n.jsx)(m.Z,{children:"ë¹ëì¤"}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(j.Qr,{control:w,name:"video_id",defaultValue:N.video_id,render:e=>{let{field:t}=e;return(0,n.jsx)(p.Z,{label:"Vimeo ë¹ëì¤ id",variant:"filled",size:"small",fullWidth:!0,...t})}})}),(0,n.jsx)("div",{children:(0,n.jsx)(j.Qr,{control:w,name:"is_image_prioritised",defaultValue:N.is_image_prioritised,render:e=>{let{field:t}=e;return(0,n.jsx)(x.Z,{control:(0,n.jsx)(f.Z,{checked:t.value,...t}),label:"ì´ë¯¸ì§ ì°ì íì"})}})}),(0,n.jsx)(m.Z,{variant:"body2",className:"text-gray-400",children:"\xb7 기본ì ì¼ë¡ ë¹ëì¤ê° ì°ì íìë©ëë¤."}),(0,n.jsx)(m.Z,{variant:"body2",className:"text-gray-400",children:"\xb7 ë¹ëì¤ IDë§ ì
ë ¥í©ëë¤ (ex: 54352345)"})]})]}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(j.Qr,{control:w,name:"description",defaultValue:N.description,render:e=>{let{field:t}=e;return(0,n.jsx)(p.Z,{label:"ì¤ëª
",multiline:!0,rows:4,variant:"filled",size:"small",fullWidth:!0,...t})}})}),(0,n.jsx)(h.Z,{className:"flex justify-end mt-2",children:(0,n.jsx)(g.Z,{type:"submit",className:"text-white btn-default",children:"íì¸"})})]})})}),(0,n.jsx)(u.ZP,{container:!0,item:!0,direction:"row",xs:12,md:6,pr:2,children:(0,n.jsx)(h.Z,{borderRadius:2,bgcolor:"white",className:"w-full p-4 shadow-sm",children:(0,n.jsx)(Z.Z,{title:"êµ¿ì¦ ì í",placeHolder:"ì¶ê°í êµ¿ì¦ ID를 ì
ë ¥íì¸ì",btnText:"굿ì¦",items:N.Goods.map(e=>({id:e.id,description:"".concat(e.id," ").concat(s.GOOD.stateKR[e.state],"(").concat(s.GOOD.typeKR[e.type],") | ").concat(e.Artwork.name," | ").concat(e.Artwork.User.display_name),name:e.Artwork.name,imagePath:(0,C.a)(e.GoodImages),identifier:e.id})),onAddClick:e=>onAddClick(N.id,e),onRemoveClick:e=>{let{identifier:t}=e;return onRemoveClick(N.id,t.toString())}})})}),(0,n.jsx)(u.ZP,{item:!0,xs:12,md:12,pr:2,children:(0,n.jsxs)(h.Z,{bgcolor:"white",p:2,mt:2,children:[(0,n.jsx)(m.Z,{variant:"h6",sx:{mb:2},children:"ë¸ë¡ê·¸ í¸ì§ê¸°"}),(0,n.jsx)(E.Z,{onBlogCreated:e=>{P({editorChoiceId:null==N?void 0:N.id,data:{blog_id:e}})},blogId:N.blog_id})]})})]})},y=i(22654),w=!0,_editorChoiceId_=e=>{let{editorChoiceId:t}=e,{isLoading:i}=(0,c.LH)({editorChoiceId:t,params:{scope:["deep","blog"]}});return(0,n.jsx)(r.Z,{children:(0,n.jsxs)(y.Z,{maxWidth:!1,sx:{mt:4,mb:4,height:"100%"},children:[(0,n.jsx)(m.Z,{variant:"h5",sx:{mb:2},children:"Editor's Choice ìì "}),i?(0,n.jsx)("div",{children:"Loading..."}):(0,n.jsx)(editorChoice_AdminEditorChoiceEditForm,{editorChoiceId:t})]})})}},74049:function(e,t,i){"use strict";var n=i(36257);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,i,r,o,s){if(s!==n){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol
1:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},40507:function(e,t,i){e.exports=i(74049)()},36257:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[3060,5082,3337,9155,8619,9678,5282,1625,5397,5466,6721,9413,9914,7163,4100,8847,4153,9774,2888,179],function(){return e(e.s=23901)}),_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.