1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7843],{52569:function(e,l,s){s.d(l,{L:function(){return Dropdown}});var i=s(85893);s(67294);var a=s(45697),n=s.n(a),t=s(28052);let Dropdown=e=>{let{id:l,title:s,titleClassName:a,subtitle:n,className:o,toggleVariant:d,toggleClassName:r,menuClassName:c,children:u,chevronIcon:m}=e;return(0,i.jsxs)(t.Z,{className:o,children:[(0,i.jsx)(t.Z.Toggle,{id:l,variant:d,className:r,children:(0,i.jsxs)("span",{className:a,children:[s," ",m&&(0,i.jsx)("i",{className:"air ai-angle-down"})," "]})}),(0,i.jsx)(t.Z.Menu,{className:c,children:u}),n&&(0,i.jsx)("span",{className:"subtitle",children:n})]})};Dropdown.propTypes={id:n().string,onClick:n().any,children:n().any,className:n().string,toggleVariant:n().string,toggleClassName:n().string,menuClassName:n().string},Dropdown.defaultProps={title:"Title",titleClassName:"",subtitle:null,className:"",toggleVariant:"",toggleClassName:"",menuClassName:""}},72309:function(e,l,s){var i=s(85893),a=s(11163),n=s(67294),t=s(35343),o=s(16310),d=s(50319),r=s(6661),c=s(4656),u=s(23048),m=s(77050),v=s(45007),p=s(5679);let FormNotifyMe=e=>{let{touched:l,errors:s,handleSubmit:a,loading:n,values:t,handleChange:o,setFieldValue:d,statusMessage:r,message:m}=e;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("form",{onSubmit:a,children:[(0,i.jsx)("div",{className:"form-group",children:(0,i.jsx)(c.II,{formik:!0,id:"email",name:"email",placeholder:"Email",label:"Email",variant:"underline",touched:l,errors:s,disabled:n,type:"email",value:t.email,onChange:o,floatingLabel:!0})}),(0,i.jsx)(u.z,{type:"submit",variant:"secondary",className:"w-100 ".concat(n&&"loading"),children:"Submit"})]})})};l.Z=e=>{let{skuId:l,setBtnTextSuccess:s,setModal:c,skus:u}=e;(0,a.useRouter)();let h=(0,v.I0)(),[g,N]=(0,n.useState)({email:"",sku_id:l}),[x,{data:j,loading:f}]=(0,d.D)(r.XG,{errorPolicy:"all"}),b=(0,t.j0)({validationSchema:o.Ry().shape({email:o.Z_().required("Email is required!")}),mapPropsToValues(e){let{email:l}=e;return{email:l||g.email}},handleSubmit:async e=>{N(l=>({...l,email:e.email}));try{let{data:l}=await x({variables:{email:e.email,sku_id:(null==u?void 0:u.length)==1?u[0].id:g.sku_id}});if(l){let{status:e,message:s}=l.addToNotify;"success"===e&&(h({type:m.SET_TOAST,payload:{message:s,status:!0,type:"success"}}),c(null))}}catch(e){(0,p.q)("","general",h)}}})(FormNotifyMe);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(b,{loading:f})})}},72355:function(e,l,s){var i=s(85893),a=s(67294),n=s(25675),t=s.n(n),o=s(42050);s(64519);var d=s(23048),r=s(52569),c=s(28052),u=s(72309),m=s(38227),v=s(45007);l.Z=e=>{var l,s,n,p,h,g,N,x,j,f;let{data:b,addToCart:k,loading:y,shopBag:_,handleAddNotify:I}=e,{user_data:w,is_login:C}=(0,v.v9)(e=>e.authReducer),[S,T]=a.useState(0),[D]=a.useState(100/b.length),[E,Z]=a.useState(0+100/b.length),[F,A]=a.useState(null===(s=b[S])||void 0===s?void 0:null===(l=s.options[0])||void 0===l?void 0:l.values[0]),[M,z]=a.useState(!0),[L,Y]=a.useState([]),[q,O]=a.useState(null),[R,G]=a.useState(null),[P,U]=a.useState(null),[V,B]=a.useState(null),handleSelectColor=e=>{var l;A(e);let s=null===(l=b[S])||void 0===l?void 0:l.skus.find(l=>l.option_detail_key1===e.value);
1s&&(0===s.stock?(z(!0),U(s.id)):z(!1))};return(0,i.jsx)("section",{className:"sc-product-details bundle pr-3",children:(0,i.jsxs)("div",{className:"row row-3",children:[(0,i.jsxs)("div",{className:"col-12 d-md-none",children:[(0,i.jsx)("h2",{children:"Choose Color"}),(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)("div",{className:"col-10 py-1",children:(0,i.jsx)("div",{children:(0,i.jsx)(o.Z,{className:"progress-bundle",now:E})})}),(0,i.jsx)("div",{className:"col-2 text-center",children:(0,i.jsxs)("div",{className:"progress-count",children:[S+1," of ",b.length]})})]})]}),(0,i.jsx)("div",{className:"col-md-6",children:(0,i.jsx)("div",{className:"sc-product-image",children:(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)(t(),{ratio:"r-1-1",src:null===(n=b[S])||void 0===n?void 0:n.images[0],width:1080,height:1080,unoptimized:!0,className:"image-bundle",style:{width:"100%",height:"auto"},alt:"Make Over"}),(0,i.jsx)("div",{className:"col-xl-2 d-none d-xl-block col-thumb",children:(0,i.jsx)("div",{className:"product-image-thumb-overlay"})})]})})}),(0,i.jsx)("div",{className:"col-md-6",children:(0,i.jsxs)("section",{className:"sc-product-options p-0 pt-3",children:[(0,i.jsxs)("div",{className:"d-none d-md-block",children:[(0,i.jsx)("h2",{children:"Choose Color"}),(0,i.jsxs)("div",{className:"row mb-4",children:[(0,i.jsx)("div",{className:"col-10 py-1",children:(0,i.jsx)("div",{children:(0,i.jsx)(o.Z,{className:"progress-bundle",now:E})})}),(0,i.jsx)("div",{className:"col-2 text-center",children:(0,i.jsxs)("div",{className:"progress-count",children:[S+1," of ",b.length]})})]})]}),(0,i.jsx)("div",{className:"product-options-title m-0 p-0",children:(0,i.jsxs)("h2",{className:"display-4 m-0 p-0",children:[S>0&&(0,i.jsx)("span",{className:"py-5",children:(0,i.jsx)("i",{className:"air ai-chevron-left icon-chev mr-3",onClick:()=>{if(b[S-1].options.length>0){let l=b[S-1].skus.find(e=>parseInt(e.id)===parseInt(L[S-1].sku_id));if(l.option_detail_key1){var e;A(null===(e=b[S-1].options[0])||void 0===e?void 0:e.values.find(e=>e.value===l.option_detail_key1))}}T(e=>e-1),Z(e=>e-D)}})}),null===(p=b[S])||void 0===p?void 0:p.title]})}),(null===(h=b[S])||void 0===h?void 0:h.options.length)>0&&(0,i.jsxs)("div",{className:"product-options-variants",children:[(0,i.jsx)("span",{className:"label",children:"Color"}),(0,i.jsxs)("div",{className:"variant-dropdown-selector p-0 m-0",children:[(0,i.jsx)(r.L,{id:"dropdown-variant",title:null==F?void 0:F.title,menuClassName:"fadeInUp",className:"dropdown-variant",toggleClassName:"p-0",chevronIcon:!0,children:null===(N=b[S])||void 0===N?void 0:null===(g=N.options[0])||void 0===g?void 0:g.values.map((e,l)=>(0,i.jsx)(c.Z.Item,{onClick:()=>handleSelectColor(e),className:"".concat(F.value===e.value&&"active"),children:e.title},l))}),(0,i.jsx)("p",{className:"w-100 color-sub p-0 m-0",children:"This shade is best used for medium complexion"})]})]}),(0,i.jsx)("div",{className:"variants-bundle-colors mt-2",children:b&&(null===(x=b[S])||void 0===x?void 0:x.options)&&(null===(j=b[S])||void 0===j?void 0:j.options.length)>0&&(null===(f=b[S])||void 0===f?void 0:f.options[0].values.map((e,l)=>(0,i.jsx)("div",{className:"".concat(e.value===F.value&&"active"),onClick:()=>handleSelectColor(e),children:(0,i.jsx)("span",{className:"",style:{backgroundColor:"#".concat(e.color)},children:e.value===F.value&&(0,i.jsx)("i",{className:"ail ai-check"})})},l)))}),M?(0,i.jsx)(d.z,{className:"w-100 mt-4 mb-0 ".concat(R&&"loading"),variant:"primary",onClick:()=>{w?(G(!0),I(P,()=>{G(!1),B(!0)})):O("notify-me-bundle")},loader:!0,children:V?(0,i.jsx)("i",{className:"air ai-check"}):"Notify Me When Available"}):(0,i.jsx)(d.z,{className:"w-100 mt-4 mb-0 ".concat(y&&"loading"),variant:"secondary",onClick:S===b.length-1?()=>{var e,l;let s=[];if((null===(e=b[S])||void 0===e?void 0:e.options.length)>0){let e=b[S].skus.find(e=>e.option_detail_key1===F.value).id;Y([...L,{product_id:parseInt(b[S].id),sku_id:parseInt(e)}]),s=[...L,{product_id:parseInt(b[S].id),sku_id:parseInt(e)}]}else{let e=null===(l=b[S])||void 0===l?void 0:l.skus[0].id;e&&(Y([...L,{product_id:parseInt(b[S].id),sku_id:parseInt(e)}]),s=[...L,{product_id:parseInt(b[S].id),sku_id:parseInt(e)}])}k(s,"mutate")}:()=>{var e,l,s,i,a,n,t,o;if((null===(e=b[S])||void 0===e?void 0:e.options.length)>0){let e=null===(s=b[S])||void 0===s?void 0:s.skus.find(e=>e.option_detail_key1===F.value).id,l=L.find(e=>{var l;return e.product_id===parseInt(null===(l=b[S])||void 0===l?void 0:l.id)});if(l){let s=[];
1L.forEach(i=>{i.product_id===l.product_id?s.push({product_id:i.product_id,sku_id:parseInt(e)}):s.push(i)}),Y(s)}else Y([...L,{product_id:parseInt(null===(i=b[S])||void 0===i?void 0:i.id),sku_id:parseInt(e)}])}else{let e=null===(a=b[S])||void 0===a?void 0:a.skus[0].id;Y([...L,{product_id:parseInt(null===(n=b[S])||void 0===n?void 0:n.id),sku_id:parseInt(e)}])}(null===(l=b[S+1])||void 0===l?void 0:l.options.length)>0&&A(null===(o=b[S+1])||void 0===o?void 0:null===(t=o.options[0])||void 0===t?void 0:t.values[0]),T(e=>e+1),Z(e=>e+D)},loader:!0,children:S===b.length-1?"ADD TO BAG":"CONTINUE"})]})}),(0,i.jsx)(m.u,{id:"notify-me-bundle",isShowing:q,hide:()=>O(null),overlay:!0,className:"modal-sm",title:"Remind me when product is back in stock",children:(0,i.jsx)(u.Z,{skuId:"1",setModal:O,skus:[]})})]})})}},1536:function(e,l,s){s.d(l,{G5:function(){return isArrayEmpty},He:function(){return isYoutubeThumbnail},Io:function(){return getYoutubeThumbnailImage},cn:function(){return cn},fL:function(){return getDiscount},fm:function(){return capitalizeFirstLetter},oB:function(){return currencyFormatter},qS:function(){return getYoutubeId}});var i=s(90512),a=s(98388);let currencyFormatter=(e,l)=>{let s=new Intl.NumberFormat(e).format(l);return"ID"===e?"Rp".concat(s):"".concat(s)},getDiscount=(e,l)=>"-".concat(Math.round((e-l)/e*100),"%"),getYoutubeId=e=>(null==e?void 0:e.includes("watch?v="))?null==e?void 0:e.split("watch?v=")[1]:null==e?void 0:e.substring((null==e?void 0:e.lastIndexOf("/"))+1),getYoutubeThumbnailImage=e=>"https://img.youtube.com/vi/".concat(e,"/hqdefault.jpg"),isYoutubeThumbnail=e=>!!e.includes("youtube.com"),isArrayEmpty=e=>(null==e?void 0:e.length)==0,capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),cn=function(){for(var e=arguments.length,l=Array(e),s=0;s<e;s++)l[s]=arguments[s];return(0,a.m6)((0,i.W)(l))}}}]);
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.