(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4493],{72163:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/diamonds",function(){return o(51562)}])},77761:function(e,t,o){"use strict";o.d(t,{Z:function(){return k}});var n=o(20567),i=o(14932),l=o(35944),a=o(85619),r=o(94790),s=o(82616),d=o(4920),c=o(74172),p=o(4391),u=o(79334),v=o(14104),m=o(4327),g=o(5152),h=o.n(g),f=o(41664),b=o.n(f),Z=o(45697),y=o.n(Z),x=o(44012),_=(0,o(54490).vU)({viewDiamond:{id:"pages.diamonds.components.diamondDisplay.viewDiamond",defaultMessage:"View diamond",description:"label of the view diamond button in the diamond display"},addToJewellery:{id:"components.addToJewellery.label",defaultMessage:"Add to {category}",description:"Label of the add to jewellery button component"}});let C=h()(()=>o.e(5660).then(o.bind(o,45660)),{loadableGenerated:{webpack:()=>[45660]},ssr:!1}),w=e=>{var t,o,g,h,f,Z,y,w,k,P,M,S,O,F,T;let{addToOptions:j,name:B,price:D,sticky:X,id:R,image:I,video:L,details:G,preview:N,onClick:A,diamond:H}=e,{currency:W}=(0,c.g)(),{selectedSetting:E,selectStone:z}=(0,r.x)(),U=(null==G?void 0:G.reduce((e,t)=>(0,i._)((0,n._)({},e),{[t.key]:t}),{}))||{};return(0,l.BX)(u.Z,(0,i._)((0,n._)({position:"relative"},N?{}:{sx:{'&:has(:hover), &:has(button[aria-expanded="true"])':{"> .inner":{borderColor:"grey.300"},".item-button":{opacity:1,visibility:"visible",borderColor:"grey.300"}}}}),{children:[(0,l.BX)(u.Z,(0,i._)((0,n._)({className:"inner",position:"relative",display:"flex",flexDirection:"column",border:e=>"1px solid ".concat(e.palette.grey[100]),p:3},X?{position:"sticky",top:200}:{},N?{}:{component:b(),href:"/start-with-a-diamond/?did=".concat(R),onClick:A,prefetch:!1,sx:e=>({color:"grayGreen.900",textDecoration:"none",[e.breakpoints.up("sm")]:{height:"100%",transition:e.transitions.create("border-color",{duration:e.transitions.duration.shortest})}})}),{children:[!I&&!L&&(0,l.tZ)(u.Z,{sx:{aspectRatio:"1/1"},bgcolor:"grayGreen.50",width:"100%",color:"common.white",display:"flex",alignItems:"center",justifyContent:"center",children:(0,l.tZ)(p.Z,{sx:{fontSize:"175px"}})}),L&&(0,l.tZ)(C,{autoplay:!0,certificateNumber:null===(o=U.certificate_number)||void 0===o?void 0:null===(t=o.values)||void 0===t?void 0:t.at(0)}),I&&!L&&(0,l.tZ)(u.Z,{sx:{aspectRatio:"1/1"},children:(0,l.tZ)(d.Z,{src:I,alt:B,layout:"responsive",objectFit:"cover"})}),(0,l.tZ)(v.Z,{variant:"h6",color:"grayGreen.900",component:"span",display:"block",my:3,children:B}),(0,l.BX)(v.Z,{variant:"bodyMedium",mb:"auto",children:[null===(h=U.stone_quality)||void 0===h?void 0:null===(g=h.values)||void 0===g?void 0:g.join(", ")," ",null===(f=U.stone_quality)||void 0===f?void 0:f.label," |"," ",null===(y=U.stone_color)||void 0===y?void 0:null===(Z=y.values)||void 0===Z?void 0:Z.join(", ")," ",null===(w=U.stone_color)||void 0===w?void 0:w.label," |"," ",(null===(P=U.stone_cut)||void 0===P?void 0:null===(k=P.values)||void 0===k?void 0:k.join(", "))!=="-"&&"".concat(null===(S=U.stone_cut)||void 0===S?void 0:null===(M=S.values)||void 0===M?void 0:M.join(", ")," ").concat(null===(O=U.stone_cut)||void 0===O?void 0:O.label," | "),null===(T=U.stone_lab)||void 0===T?void 0:null===(F=T.values)||void 0===F?void 0:F.join(", ")]}),(0,l.tZ)(u.Z,{mt:3,children:(0,l.tZ)(v.Z,{variant:"h6",component:"span",color:"grayGreen.900",children:(0,l.tZ)(s.Z,{value:D,currency:W})})}),N&&(0,l.BX)(l.HY,{children:[(0,l.tZ)(m.Z,{variant:"contained",color:"secondary",fullWidth:!0,component:b(),href:"/start-with-a-diamond/?did=".concat(R),onClick:A,prefetch:!1,sx:{mt:4,mb:1.5},children:(0,l.tZ)(x.Z,(0,n._)({},_.viewDiamond))}),!E&&(0,l.tZ)(a.Z,{color:"grey",variant:"outlined",diamondId:R,diamond:H,fullWidth:!0,options:j}),E&&(0,l.tZ)(m.Z,{href:E.slug,onClick:()=>{var e;z((0,i._)((0,n._)({},H),{image:null==H?void 0:null===(e=H.media)||void 0===e?void 0:e.filter(e=>{let{type:t}=e;return"image"===t}).at(0).src}))},variant:"outlined",color:"grey",fullWidth:!0,component:b(),sx:{mb:1.5,textAlign:"center"},children:(0,l.tZ)(x.Z,(0,i._)((0,n._)({},_.addToJewellery),{values:{category:null==E?void 0:E.categoryLabel}}))})]})]})),!N&&(0,l.BX)(u.Z,{display:"flex",flexDirection:"column",gap:1,pb:3,px:3,zIndex:2,bgcolor:"common.white",border:e=>"1px solid ".concat(e.palette.grey[100]),borderTop:"0",sx:e=>({[e.breakpoints.up("sm")]:{position:"absolute",top:"calc(100% - 1px)",left:0,right:0,opacity:0,visibility:"hidden",transition:e.transitions.create(["border-color"],{duration:e.transitions.duration.shortest})}}),className:"item-button",children:[(0,l.tZ)(m.Z,{variant:"contained",color:"secondary",fullWidth:!0,component:b(),href:"/start-with-a-diamond/?did=".concat(R),onClick:A,prefetch:!1,children:(0,l.tZ)(x.Z,(0,n._)({},_.viewDiamond))}),!E&&(0,l.tZ)(a.Z,{color:"grey",variant:"outlined",diamondId:R,diamond:H,fullWidth:!0,options:j}),E&&(0,l.tZ)(m.Z,{href:E.slug,onClick:()=>{var e;z((0,i._)((0,n._)({},H),{image:null==H?void 0:null===(e=H.media)||void 0===e?void 0:e.filter(e=>{let{type:t}=e;return"image"===t}).at(0).src}))},variant:"outlined",color:"grey",fullWidth:!0,component:b(),sx:{mb:1.5,textAlign:"center"},children:(0,l.tZ)(x.Z,(0,i._)((0,n._)({},_.addToJewellery),{values:{category:null==E?void 0:E.categoryLabel}}))})]})]}))};w.propTypes={addToOptions:y().arrayOf(y().shape({key:y().string,label:y().string,href:y().string})),name:y().string,shape:y().string,carat:y().number,cut:y().string,color:y().string,quality:y().string,report:y().string,price:y().number,sticky:y().bool,id:y().string,image:y().string,video:y().string,details:y().arrayOf(y().shape({label:y().string,key:y().string})),diamond:y().shape({lab:y().string,certificatePdf:y().string,price:y().number,priceIncVat:y().number,media:y().arrayOf(y().shape({type:y().oneOf(["video","image"]),src:y().string,srcWeb:y().string})),details:y().arrayOf(y().shape({key:y().string,label:y().string,values:y().arrayOf(y().oneOfType([y().string,y().number]))}))}),preview:y().bool,onClick:y().func},w.defaultProps={addToOptions:[],name:void 0,shape:void 0,carat:void 0,cut:void 0,color:void 0,quality:void 0,report:void 0,price:void 0,sticky:void 0,id:void 0,image:void 0,video:void 0,details:void 0,diamond:void 0,preview:!1,onClick:void 0};var k=w},51292:function(e,t,o){"use strict";o.d(t,{Z:function(){return h}});var n=o(20567),i=o(14932),l=o(47702),a=o(35944),r=o(89646),s=o(14104),d=o(39085),c=o(45697),p=o.n(c),u=o(77366),v=o(79334);let m=(0,u.Z)(v.Z,{target:"eh0wo5m0"})("position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:",e=>e.theme.spacing(2)," ",e=>e.theme.spacing(2.5)," ",e=>e.theme.spacing(2)," ",e=>e.theme.spacing(2),";border-bottom:1px solid ",e=>e.theme.palette.grayGreen["100"],";background-color:",e=>e.theme.palette.background.paper,";z-index:1;"),g=e=>{var{title:t,onClose:o}=e,c=(0,l._)(e,["title","onClose"]);return(0,a.BX)(m,(0,i._)((0,n._)({},c),{children:[t&&(0,a.tZ)(s.Z,{variant:"bodyExtraLarge",fontWeight:"bold",children:t}),(0,a.tZ)(d.Z,{color:"grayGreen",onClick:o,sx:{ml:"auto",mr:-1},children:(0,a.tZ)(r.Z,{})})]}))};g.propTypes={onClose:p().func.isRequired,title:p().node},g.defaultProps={title:void 0};var h=g},4391:function(e,t,o){"use strict";var n=o(20567),i=o(14932),l=o(35944),a=o(62689);t.Z=e=>(0,l.tZ)(a.Z,(0,i._)((0,n._)({},e),{children:(0,l.tZ)("path",{d:"M11.7 19.6c-.2 0-.3 0-.4-.2L3.1 9.8a.4.4 0 0 1 0-.5l3.2-3.9.3-.1h10l.4.1 3.2 4c.1 0 .1.3 0 .4L12 19.4l-.3.2Z"})}))},51562:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSG:function(){return tn},default:function(){return ti}});var n=o(20567),i=o(14932),l=o(35944),a=o(84103),r=o(58883),s=o(79334),d=o(82884),c=o(41752),p=o(45697),u=o.n(p),v=o(67294),m=o(86896),g=o(77761),h=o(27563),f=o(14104),b=()=>(0,l.BX)(s.Z,{position:"relative",display:"flex",flexDirection:"column",border:e=>"1px solid ".concat(e.palette.grey[100]),p:3,sx:{color:"grayGreen.900",textDecoration:"none"},children:[(0,l.tZ)(h.Z,{sx:{aspectRatio:"1/1",width:"initial",height:"initial"},variant:"rectangular"}),(0,l.tZ)(f.Z,{variant:"h6",component:"span",display:"block",my:3,children:(0,l.tZ)(h.Z,{variant:"text",width:"66%"})}),(0,l.tZ)(f.Z,{variant:"bodyMedium",mb:"auto",children:(0,l.tZ)(h.Z,{variant:"text",width:"75%"})}),(0,l.tZ)(s.Z,{mt:3,children:(0,l.tZ)(f.Z,{variant:"h6",component:"span",children:(0,l.tZ)(h.Z,{variant:"text",width:"33%"})})})]}),Z=o(54490),y=(0,Z.vU)({rowsPerPage:{id:"common.rowsPerPage",defaultMessage:"Rows per page:",description:"Common label for rows per page"},paginationDisplay:{id:"common.paginationDisplay",defaultMessage:"{from}–{to} of {count}",description:"Common label for pagination display"}});let x=e=>{let{diamonds:t,pagination:o,isLoading:n,addToOptions:i}=e,a=(0,m.Z)(),r=(0,v.useRef)(null);return(0,l.BX)(l.HY,{children:[(0,l.BX)(s.Z,{ref:r,display:"grid",gridTemplateColumns:{xs:"repeat(1, 1fr)",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(4, 1fr)"},gap:"16px",children:[n&&(null==t?void 0:t.length)===0&&(0,c.Z)(25).map(e=>(0,l.tZ)(b,{},e)),t.map(e=>(0,l.tZ)(g.Z,{id:null==e?void 0:e.id,diamond:e,image:null==e?void 0:e.image,price:null==e?void 0:e.priceIncVat,name:null==e?void 0:e.name,details:null==e?void 0:e.details,addToOptions:i},null==e?void 0:e.id))]}),(0,l.tZ)(d.Z,{labelRowsPerPage:a.formatMessage(y.rowsPerPage),labelDisplayedRows:e=>{let{from:t,to:o,count:n}=e;return a.formatMessage(y.paginationDisplay,{from:a.formatNumber(t),to:a.formatNumber(o),count:a.formatNumber(n)})},onRowsPerPageChange:null==o?void 0:o.onRowsPerPageChange,rowsPerPageOptions:null==o?void 0:o.rowsPerPageOptions,component:"div",count:null==o?void 0:o.count,rowsPerPage:o.rowsPerPage,page:o.page,onPageChange:(e,t)=>{window.scrollTo({top:r.current.offsetTop-240,behavior:"smooth"}),null==o||o.onPageChange(e,t)}})]})};x.propTypes={addToOptions:u().arrayOf(u().shape({key:u().string,label:u().string,href:u().string})),diamonds:u().arrayOf(u().object),isLoading:u().bool,pagination:u().shape({page:u().number,rowsPerPage:u().number,count:u().number,onPageChange:u().func,onRowsPerPageChange:u().func,rowsPerPageOptions:u().arrayOf(u().shape({label:u().string,value:u().string}))})},x.defaultProps={addToOptions:[],diamonds:[],isLoading:!1,pagination:{}};var _=o(47702),C=o(94790),w=o(51292),k=o(51648),P=o(58346),M=o(89646),S=o(88327),O=o(4327),F=o(55643),T=o(39085),j=o(97322),B=o(44012),D=o(66686),X=o(82616),R=o(4920),I=o(74172),L=o(62162),G=o(66971),N=o(17082),A=o(72775),H=o(76196),W=o(24469),E=o(53583),z=o(90589),U=(0,Z.vU)({title:{id:"pages.diamonds.filters.components.removeSettingDialog.title",defaultMessage:"Remove selected setting",description:"title of the remove selected setting dialog"},description:{id:"pages.diamonds.filters.components.removeSettingDialog.description",defaultMessage:"The setting you have selected can only be used for a certain shape and an specific carat range. To change these filters you need to remove the selected setting. Once you have selected your diamond you can choose a different setting in which the diamond will fit.",description:"title of the remove selected setting dialog"},close:{id:"actions.close",defaultMessage:"Close",description:"Common label for the close action"},cancel:{id:"actions.cancel",defaultMessage:"Cancel",description:"Common label for the cancel action"},remove:{id:"actions.remove",defaultMessage:"Remove",description:"common label for the remove action"}});let V=e=>{let{content:t,open:o,onClose:i}=e,a=(0,m.Z)(),{vatRate:r,currency:d}=(0,I.g)(),{selectedSetting:c,removeSetting:p}=(0,C.x)();return(0,l.BX)(L.Z,{fullWidth:!0,maxWidth:"sm",open:o,onlose:i,children:[(0,l.BX)(G.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[null==t?void 0:t.title,(0,l.tZ)(T.Z,{"aria-label":a.formatMessage(U.close),onClick:i,edge:"end",children:(0,l.tZ)(M.Z,{})})]}),(0,l.BX)(N.Z,{children:[(0,l.tZ)(A.Z,{children:(0,l.tZ)(z.v,{field:null==t?void 0:t.text})}),(0,l.BX)(H.Z,{sx:{display:"flex",alignItems:"flex-start",gap:2,p:2,mt:3},children:[(0,l.tZ)(R.Z,{src:null==c?void 0:c.image,width:40,height:40,objectFit:"cover"}),(0,l.BX)(s.Z,{display:"flex",flexDirection:"column",gap:.5,flex:1,children:[(0,l.tZ)(f.Z,{variant:"bodyLarge",fontWeight:500,color:"grayGreen.900",children:null==c?void 0:c.name}),(0,l.BX)(s.Z,{display:"flex",alignItems:"baseline",gap:2,children:[(0,l.tZ)(f.Z,{variant:"bodyMedium",fontWeight:500,mr:"auto",sx:{whiteSpace:"nowrap"},children:(0,l.tZ)(X.Z,{value:((null==c?void 0:c.price)||0)*(1+r/100),currency:d})}),(0,l.tZ)(W.Z,{variant:"bodyMedium",sx:{fontFamily:"inherit"},onClick:()=>{p(),i()},component:"button",children:(0,l.tZ)(B.Z,(0,n._)({},U.remove))})]})]})]})]}),(0,l.tZ)(E.Z,{children:(0,l.tZ)(O.Z,{variant:"outlined",color:"grey",onClick:i,children:(0,l.tZ)(B.Z,(0,n._)({},U.cancel))})})]})};V.propTypes={open:u().bool,onClose:u().func,content:u().shape({title:u().string,text:u().arrayOf(u().object)})},V.defaultProps={open:!1,onClose:void 0,content:void 0};let Y=e=>{let{index:t}=e;return(0,l.BX)(l.HY,{children:[(0,l.tZ)(h.Z,{sx:{display:{md:"none"},height:50},variant:"rectangular"}),(0,l.BX)(s.Z,{sx:{display:{xs:"none",md:"grid"},gridTemplateColumns:"minmax(160px, min-content) 1fr"},gap:3,children:[(0,l.tZ)(f.Z,{children:(0,l.tZ)(h.Z,{variant:"text",sx:{width:"66%"}})}),0===t&&(0,l.tZ)(s.Z,{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(64px, 1fr))",columnGap:1,rowGap:.5,children:(0,c.Z)(10).map(e=>(0,l.BX)(s.Z,{display:"flex",flexDirection:"column",alignItems:"center",gap:.5,py:1,px:.5,children:[(0,l.tZ)(h.Z,{variant:"circular",sx:{width:32,height:32}}),(0,l.tZ)(f.Z,{variant:"bodyMedium",children:(0,l.tZ)(h.Z,{variant:"text",width:48})})]},e))}),[1,4].includes(t)&&(0,l.BX)(s.Z,{children:[(0,l.tZ)(h.Z,{width:"100%",variant:"rounded"}),(0,l.BX)(s.Z,{display:"flex",justifyContent:"space-between",mt:2,children:[(0,l.tZ)(h.Z,{width:"116px",height:35,variant:"rectangular"}),(0,l.tZ)(h.Z,{width:"116px",height:35,variant:"rectangular"})]})]}),![0,1,4].includes(t)&&(0,l.BX)(s.Z,{children:[(0,l.tZ)(h.Z,{width:"100%",variant:"rounded"}),(0,l.tZ)(s.Z,{display:"flex",justifyContent:"space-between",mt:2,children:(0,c.Z)(5).map(e=>(0,l.tZ)(f.Z,{children:(0,l.tZ)(h.Z,{variant:"text",sx:{width:"2.5ch"}})},e))})]})]})]})};Y.propTypes={index:u().number},Y.defaultProps={index:0};var q=o(40596),J=o(76507);let Q=e=>{let{options:t,value:o,onChange:n}=e,i=e=>(t,o)=>{n(o?e:null)};return(0,l.tZ)(s.Z,{display:"flex",flexWrap:"wrap",alignSelf:"flex-start",children:(t||[]).filter(e=>e.available).map(e=>(0,l.tZ)(q.Z,{control:(0,l.tZ)(J.Z,{checked:o===(null==e?void 0:e.value),onChange:i(e.value),value:e.value}),label:e.label},e.value))})};Q.propTypes={options:u().arrayOf(u().object),onChange:u().func,value:u().string},Q.defaultProps={options:[],onChange:void 0,value:void 0};var $=o(90512);let K=e=>{let{disabled:t,options:o,value:a,onChange:r,onDisabledClick:d}=e,c=e=>()=>{r(e===a?null:e)};return(0,l.tZ)(s.Z,(0,i._)((0,n._)({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(64px, 1fr))",columnGap:1,rowGap:.5},t?{onClick:d}:{}),{children:(o||[]).filter(e=>e.available).map(e=>(0,l.BX)(T.Z,{size:"small",sx:{gap:.5,flexDirection:"column",justifyContent:"flex-start",py:1,px:.5,borderRadius:"3px",fontSize:14,"&:hover":{backgroundColor:"primary.300"},"&.active":{backgroundColor:"primary.900",color:"common.white"},img:{transition:e=>e.transitions.create("filter")},"&:not(.active) img":{filter:"invert(1)"},"&:disabled:not(.active) img":{opacity:.2}},className:(0,$.Z)({active:(null==e?void 0:e.value)===a}),onClick:c(null==e?void 0:e.value),disabled:t,children:[(0,l.tZ)(R.Z,{src:e.img,alt:null==e?void 0:e.label,width:32,height:32}),null==e?void 0:e.label]},e.value))}))};K.propTypes={disabled:u().bool,options:u().arrayOf(u().object),onChange:u().func,onDisabledClick:u().func,value:u().string},K.defaultProps={disabled:!1,options:[],onChange:void 0,onDisabledClick:void 0,value:void 0};var ee=o(79896),et=o(26800),eo=o(32982),en=o(89996),ei=o(57333);let el=(0,v.forwardRef)((e,t)=>{let{onChange:o}=e,a=(0,_._)(e,["onChange"]);return(0,l.tZ)(ei.h3,(0,i._)((0,n._)({},a),{getInputRef:t,onValueChange:t=>{o({target:{name:e.name,value:t.value}})},thousandSeparator:!0,valueIsNumericString:!0}))});el.propTypes={name:u().string.isRequired,onChange:u().func.isRequired};let ea={EUR:"€",GBP:"\xa3",USD:"$"},er=Math.exp,es=e=>Math.log(e)>0?Math.log(e):0,ed=e=>{var t;let{options:o,componentProps:a,value:r,onChange:d,vatRate:c,currency:p}=e,u=(0,v.useId)(),m=a||{},{step:g}=m,h=(0,_._)(m,["step"]),f=(0,v.useCallback)(e=>e/(1+c/100),[c]),b=(0,v.useCallback)(e=>e?Number(e*(1+c/100)).toFixed(0):e,[c]),[Z,y]=((null==o?void 0:null===(t=o.at(0))||void 0===t?void 0:t.options)||[]).map(e=>{var t,o;return null==e?void 0:null===(o=e.values)||void 0===o?void 0:null===(t=o.at(0))||void 0===t?void 0:t.value}),[x,C]=[Math.floor(b(Z)),Math.ceil(b(y))],[w,k]=(0,v.useState)(x),[P,M]=(0,v.useState)(C),[S,O]=(0,v.useState)([x,C]),F=e=>{d(e.map(e=>f(e)))},T=()=>{P>C||""===P||w<x||""===w?(k(""===w||w<x?x:w),M(""===P||P>C?C:P),O([""===w||w<x?x:w,""===P||P>C?C:P]),F([""===w||w<x?x:w,""===P||P>C?C:P])):w>P?(O([P,w]),M(w),k(P),F([P,w])):(O([w,P]),F([w,P]))};return(0,v.useEffect)(()=>{var e,t;let o=[b(null===(e=(0,en.Z)(r||[],"option","min"))||void 0===e?void 0:e.value)||x,b(null===(t=(0,en.Z)(r||[],"option","max"))||void 0===t?void 0:t.value)||C];O(o),k(o[0]),M(o[1])},[C,x,r,b]),(0,l.BX)(s.Z,{px:1,children:[(0,l.tZ)(et.ZP,(0,i._)((0,n._)({},h),{valueLabelFormat:b,value:S.map(e=>es(e)),onChange:(e,t)=>{O(t.map(e=>er(e))),k(parseInt(er(t[0]),10)),M(parseInt(er(t[1]),10))},onChangeCommitted:()=>{d(S.map(e=>f(e)))},min:es(Math.floor(x)),max:es(Math.ceil(C)),step:(es(C)-es(x))/C,slotProps:{thumb:{sx:{width:14,height:14,backgroundColor:"currentColor","&::before":{width:6,height:6,backgroundColor:"common.white",boxShadow:"none"}}},rail:{sx:{height:6,backgroundColor:"grayGreen.400"}},track:{sx:{backgroundColor:"primary.800",borderColor:"primary.800"}}}})),(0,l.BX)(s.Z,{display:"grid",justifyContent:"space-between",gridTemplateColumns:"repeat(2, minmax(min-content, 140px))",gap:5,children:[(0,l.tZ)(ee.Z,{size:"extraSmall",name:"".concat(u,"-min"),value:w,onChange:e=>{k(()=>""===e.target.value?"":e.target.value)},onBlur:T,inputProps:{min:x,max:P,step:g},inputComponent:el,startAdornment:(0,l.tZ)(eo.Z,{position:"start",children:ea[p]})}),(0,l.tZ)(ee.Z,{size:"extraSmall",name:"".concat(u,"-max"),value:P,onChange:e=>{M(()=>""===e.target.value?"":e.target.value)},onBlur:T,inputProps:{min:w,max:C,step:g},inputComponent:el,startAdornment:(0,l.tZ)(eo.Z,{position:"start",children:ea[p]})})]})]})};ed.propTypes={currency:u().string,onChange:u().func,options:u().arrayOf(u().object),value:u().arrayOf(u().shape({option:u().string,value:u().oneOfType([u().string,u().number])})),componentProps:u().shape({valueFormat:u().func,valueLabelFormat:u().func}),vatRate:u().number},ed.defaultProps={currency:void 0,onChange:void 0,options:[],value:[],componentProps:{},vatRate:void 0};let ec=Math.exp,ep=e=>Math.log(e)>0?Math.log(e):0,eu=e=>{var t;let{disabled:o,options:a,componentProps:r,value:d,onChange:c,onDisabledClick:p}=e,u=r||{},{valueFormat:m=e=>e,valueLabelFormat:g=e=>e,step:h}=u,f=(0,_._)(u,["valueFormat","valueLabelFormat","step"]),[b,Z]=((null==a?void 0:null===(t=a.at(0))||void 0===t?void 0:t.options)||[]).map(e=>{var t,o,n;return"function"==typeof m?m(null==e?void 0:null===(t=e.values)||void 0===t?void 0:t.at(0).value):null==e?void 0:null===(n=e.values)||void 0===n?void 0:null===(o=n.at(0))||void 0===o?void 0:o.value}),[y,x]=(0,v.useState)(b),[C,w]=(0,v.useState)(Z),[k,P]=(0,v.useState)([b,Z]),M=e=>{c(e.map(e=>g(e)))},S=()=>{C>Z||""===C||y<b||""===y?(x(""===y||y<b?b:y),w(""===C||C>Z?Z:C),P([""===y||y<b?b:y,""===C||C>Z?Z:C]),M([""===y||y<b?b:y,""===C||C>Z?Z:C])):y>C?(P([C,y]),w(y),x(C),M([C,y])):(P([y,C]),M([y,C]))};return(0,v.useEffect)(()=>{var e,t;let o=[m(null===(e=(0,en.Z)(d||[],"option","min"))||void 0===e?void 0:e.value)||b,m(null===(t=(0,en.Z)(d||[],"option","max"))||void 0===t?void 0:t.value)||Z];P(o),x(o[0]),w(o[1])},[Z,b,d,m]),(0,l.BX)(s.Z,(0,i._)((0,n._)({px:1},o?{onClick:p}:{}),{children:[(0,l.tZ)(et.ZP,(0,i._)((0,n._)({},f),{valueLabelFormat:g,value:k.map(e=>ep(e)),onChange:(e,t)=>{P(t.map(e=>ec(e))),x(ec(t[0])),w(ec(t[1]))},onChangeCommitted:()=>{c(k.map(e=>g(e)))},min:ep(Math.floor(b)),max:ep(Math.ceil(Z)),step:(ep(Z)-ep(b))/1e3,slotProps:{thumb:{sx:{width:14,height:14,backgroundColor:"currentColor","&::before":{width:6,height:6,backgroundColor:"common.white",boxShadow:"none"}}},rail:{sx:{height:6,backgroundColor:"grayGreen.400"}},track:{sx:{backgroundColor:o?"primary.400":"primary.800",borderColor:o?"primary.400":"primary.800"}}},disabled:o})),(0,l.BX)(s.Z,{display:"grid",justifyContent:"space-between",gridTemplateColumns:"120px 120px",children:[(0,l.tZ)(ee.Z,{size:"extraSmall",type:"number",value:""===y?"":g(y),onChange:e=>{x(()=>""===e.target.value?"":m(e.target.value))},onBlur:S,inputProps:{min:g(b),max:g(C),step:h},sx:{maxWidth:120},disabled:o}),(0,l.tZ)(ee.Z,{size:"extraSmall",type:"number",value:""===C?"":g(C),onChange:e=>{w(()=>""===e.target.value?"":m(e.target.value))},onBlur:S,inputProps:{min:g(y),max:g(Z),step:h},sx:{maxWidth:120},disabled:o})]})]}))};eu.propTypes={disabled:u().bool,onChange:u().func,onDisabledClick:u().func,options:u().arrayOf(u().object),value:u().arrayOf(u().shape({option:u().string,value:u().oneOfType([u().string,u().number])})),componentProps:u().shape({valueFormat:u().func,valueLabelFormat:u().func})},eu.defaultProps={disabled:!1,onChange:void 0,onDisabledClick:void 0,options:[],value:[],componentProps:{valueFormat:e=>e,valueLabelFormat:e=>e}};let ev=e=>{let{children:t,totalOptions:o,"data-index":a}=e;return(0,l.tZ)(s.Z,{position:"absolute",top:30,"data-index":a,sx:e=>(0,i._)((0,n._)({color:"grayGreen.900"},e.typography.bodyMedium),{top:28,left:"".concat(100/o*(a+1)-100/o/2,"%"),transform:"translateX(-50%)"}),children:t})};ev.propTypes={children:u().node,"data-index":u().number,totalOptions:u().number},ev.defaultProps={children:void 0,"data-index":0,totalOptions:0};let em=e=>t=>{var o;return null===(o=e.at(t))||void 0===o?void 0:o.label},eg=e=>e.reduce((e,t,o)=>[...e,{label:t.label,value:o+1}],[]),eh=e=>{let{options:t,onChange:o,value:n}=e,[i,a]=(0,v.useState)([0,(null==t?void 0:t.length)||1]);return(0,v.useEffect)(()=>{let e=t.findIndex(e=>{var t;return e.value===(null==n?void 0:null===(t=n.at(0))||void 0===t?void 0:t.value)}),o=t.findIndex(e=>{var t;return e.value===(null==n?void 0:null===(t=n.at(-1))||void 0===t?void 0:t.value)});a([e>=0?e:0,o>=0?o+1:(null==t?void 0:t.length)||1])},[n,t]),(0,l.tZ)(s.Z,{px:1,children:(0,l.tZ)(et.ZP,{value:i,onChange:(e,t,o)=>{Array.isArray(t)&&(0===o?a([Math.min(t[0],i[1]-1),i[1]]):a([i[0],Math.max(t[1],i[0]+1)]))},onChangeCommitted:()=>{"function"==typeof o&&o(i)},min:0,max:null==t?void 0:t.length,getAriaValueText:em(t),marks:eg(t),disableSwap:!0,slotProps:{thumb:{sx:{width:14,height:14,backgroundColor:"currentColor",pointerEvents:"all !important","&::before":{width:6,height:6,backgroundColor:"common.white",boxShadow:"none"}}},rail:{sx:{height:6,backgroundColor:"grayGreen.400"}},track:{sx:{backgroundColor:"primary.800",borderColor:"primary.800"}},mark:{sx:{['&[data-index="'.concat(((null==t?void 0:t.length)||1)-1,'"]')]:{display:"none"},top:"50%",width:2,height:6,transform:"translateY(-50%)",borderRadius:0,opacity:1}},markLabel:{totalOptions:null==t?void 0:t.length}},slots:{markLabel:ev}})})};eh.propTypes={onChange:u().func,options:u().arrayOf(u().object),value:u().arrayOf(u().object)},eh.defaultProps={onChange:void 0,options:[],value:[]};let ef=e=>{var t,o,a,r,d;let{disabled:c,type:p,option:u,values:v,label:m,description:g,componentProps:h,handleOpenFilterDescription:b,hasFilterContent:Z,onFilter:y,onMobileFilter:x,selectedFilters:_,onDisabledClick:C,vatRate:w,isMobile:k,currency:M}=e,S=_.find(e=>{let{option:t}=e;return t===u});return(0,l.BX)(l.HY,{children:[!k&&(0,l.tZ)(O.Z,{sx:(0,n._)({display:{md:"none"}},S?{boxShadow:"inset 0 0 0 1px #000",fontWeight:700}:{}),variant:"outlined",color:"black",onClick:c?C:()=>x({type:p,option:u,values:v,label:m,description:g,componentProps:h,handleOpenFilterDescription:b,onFilter:y,selectedFilters:_,vatRate:w}),children:m}),(0,l.BX)(s.Z,(0,i._)((0,n._)({},k?{}:{display:{xs:"none",md:"grid"},gridTemplateColumns:"minmax(160px, min-content) 1fr"}),{gap:3,children:[!k&&(0,l.BX)(s.Z,{display:"flex",alignItems:"center",alignSelf:"flex-start",children:[(0,l.tZ)(f.Z,{sx:{whiteSpace:"nowrap"},children:m}),Z&&(0,l.tZ)(T.Z,{size:"small",onClick:b({type:p,option:u,values:v,label:m,description:g}),children:(0,l.tZ)(P.Z,{})})]}),"icons"===p&&(0,l.tZ)(K,{options:v,filter:u,selectedFilters:_,componentProps:h,onChange:y(u),value:null===(t=_.find(e=>{let{option:t}=e;return t===u}))||void 0===t?void 0:t.value,disabled:c,onDisabledClick:C}),"segments"===p&&(0,l.tZ)(eh,{options:v,filter:u,selectedFilters:_,componentProps:h,onChange:y(u),value:null===(o=_.find(e=>{let{option:t}=e;return t===u}))||void 0===o?void 0:o.selected,disabled:c,onDisabledClick:C}),"range"===p&&!(null==u?void 0:u.includes("stone_price"))&&(0,l.tZ)(eu,{options:v,filter:u,selectedFilters:_,componentProps:h,onChange:y(u),value:null===(a=_.find(e=>{let{option:t}=e;return t===u}))||void 0===a?void 0:a.selected,disabled:c,onDisabledClick:C}),"range"===p&&(null==u?void 0:u.includes("stone_price"))&&(0,l.tZ)(ed,{options:v,filter:u,selectedFilters:_,componentProps:h,vatRate:w,currency:M,onChange:y(u),value:null===(r=_.find(e=>{let{option:t}=e;return t===u}))||void 0===r?void 0:r.selected,disabled:c,onDisabledClick:C}),"checkbox"===p&&(0,l.tZ)(Q,{options:v,filter:u,selectedFilters:_,componentProps:h,onChange:y(u),value:null===(d=_.find(e=>{let{option:t}=e;return t===u}))||void 0===d?void 0:d.value,disabled:c,onDisabledClick:C})]}))]})};ef.propTypes={currency:u().string,disabled:u().bool,type:u().oneOf(["icons","segments","range","checkbox"]),option:u().string,values:u().arrayOf(u().shape({label:u().string,options:u().arrayOf(u().shape({label:u().string,option:u().string,values:u().arrayOf(u().shape({value:u().string,label:u().string}))})),value:u().oneOfType([u().string,u().number])})),label:u().string,description:u().string,componentProps:u().shape({valueFormat:u().func,valueLabelFormat:u().func,step:u().number}),handleOpenFilterDescription:u().func,hasFilterContent:u().bool,onDisabledClick:u().func,onFilter:u().func,selectedFilters:u().arrayOf(u().shape({option:u().string,value:u().string})),vatRate:u().number,onMobileFilter:u().func,isMobile:u().bool},ef.defaultProps={currency:void 0,disabled:!1,type:void 0,option:void 0,values:[],label:void 0,description:void 0,componentProps:{},handleOpenFilterDescription:void 0,hasFilterContent:!1,onDisabledClick:void 0,onFilter:void 0,selectedFilters:void 0,vatRate:void 0,onMobileFilter:void 0,isMobile:!1};var eb=(0,Z.vU)({moreFilters:{id:"pages.diamonds.filters.moreFilters",defaultMessage:"More filters",description:"label of the collapse button for filters to show more on the diamonds page"},lessFilters:{id:"pages.diamonds.filters.lessFilters",defaultMessage:"Less filters",description:"label of the collapse button for filters to show less on the diamonds page"},resetFilters:{id:"pages.diamonds.filters.resetFilters",defaultMessage:"Reset filters",description:"label of the reset filters button on the diamonds page"},close:{id:"actions.close",defaultMessage:"Close",description:"Common label for the close action"},showResults:{id:"actions.showResults",defaultMessage:"Show results",description:"Common label for the show results action"}}),eZ=o(33803),ey=o(39019);let ex=e=>{let{children:t,className:o,"data-index":a,style:r,markLabelActive:d,"aria-hidden":c}=e;return(0,l.tZ)(s.Z,{position:"absolute",top:30,"data-index":a,sx:e=>(0,n._)((0,i._)((0,n._)({color:"grayGreen.900"},e.typography.bodyMedium),{top:28,left:r.left,transform:"translateX(-50%)"}),d?{fontWeight:700,"&::after":{content:'""',position:"absolute",top:"calc(100% + 2px)",left:"50%",borderRight:"10px solid transparent",borderBottom:"16px solid ".concat(e.palette.primary[900]),borderLeft:"10px solid transparent",transform:"translateX(-50%)"}}:{}),"aria-hidden":c,className:o,children:t})};ex.propTypes={children:u().node,className:u().string,"data-index":u().number,style:u().shape({left:u().string}),markLabelActive:u().bool,"aria-hidden":u().bool},ex.defaultProps={children:void 0,className:void 0,"data-index":0,style:{},markLabelActive:!1,"aria-hidden":!0};let e_=e=>t=>{var o;return null===(o=e.at(t))||void 0===o?void 0:o.label},eC=e=>e.reduce((e,t,o)=>[...e,{label:t.label,value:o}],[]),ew=e=>{let{options:t,onChange:o}=e,[n,i]=(0,v.useState)(0);return(0,l.tZ)(s.Z,{px:1,children:(0,l.tZ)(et.ZP,{value:n,onChange:(e,t)=>{i(t)},onChangeCommitted:()=>{"function"==typeof o&&o(t.at(n))},min:0,max:((null==t?void 0:t.length)||1)-1,getAriaValueText:e_(t),marks:eC(t),disableSwap:!0,track:!1,slotProps:{thumb:{sx:{width:14,height:14,backgroundColor:"currentColor",pointerEvents:"all !important","&::before":{width:6,height:6,backgroundColor:"common.white",boxShadow:"none"}}},rail:{sx:{height:6,backgroundColor:"primary.800",opacity:1}},track:{sx:{backgroundColor:"primary.800",borderColor:"primary.800"}},mark:{sx:{['&[data-index="'.concat(((null==t?void 0:t.length)||1)-1,'"], &[data-index="0"]')]:{display:"none"},top:"50%",width:2,height:6,transform:"translateY(-50%)",borderRadius:0,opacity:1,backgroundColor:"common.white"}},markLabel:{totalOptions:null==t?void 0:t.length}},slots:{markLabel:ex}})})};ew.propTypes={onChange:u().func,options:u().arrayOf(u().object)},ew.defaultProps={onChange:void 0,options:[]};let ek={paragraph:e=>{let{children:t}=e;return(0,l.tZ)(f.Z,{paragraph:!0,variant:"bodyMedium",children:t})}},eP=e=>{let{options:t,descriptions:o}=e,[i,a]=(0,v.useState)(t.at(0)),r=o.some(e=>{let{image:t}=e;return D.BH(t)}),{description:d,image:c}=o.find(e=>{let{key:t}=e;return t===(null==i?void 0:i.value)})||{};return(0,l.BX)(l.HY,{children:[r&&(0,l.tZ)(s.Z,{display:"flex",justifyContent:"center",height:"188px",mb:2,children:D.BH(c)&&(0,l.tZ)(R.Z,(0,n._)({src:ey.D(c)},(null==c?void 0:c.dimensions)||{}))}),(0,l.tZ)(s.Z,{px:{sm:4},pb:1.5,children:(0,l.tZ)(ew,{options:t,onChange:e=>{a(e)}})}),(0,l.BX)(s.Z,{bgcolor:"primary.900",color:"common.white",p:3,children:[(0,l.tZ)(f.Z,{variant:"bodyLarge",fontWeight:700,children:null==i?void 0:i.label}),(0,l.tZ)(z.v,{field:d,components:ek})]})]})};eP.propTypes={options:u().arrayOf(u().object),descriptions:u().arrayOf(u().object)},eP.defaultProps={options:[],descriptions:[]};let eM=e=>{let{onClose:t,open:o,title:i,description:a,image:r,options:s,optionDescriptions:d,type:c}=e,p=(0,m.Z)();return(0,l.BX)(L.Z,{open:o,onClose:t,children:[(0,l.BX)(G.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[i,(0,l.tZ)(T.Z,{"aria-label":p.formatMessage(eb.close),onClick:t,edge:"end",children:(0,l.tZ)(M.Z,{})})]}),(0,l.BX)(N.Z,{children:[(0,l.tZ)(z.v,{field:a}),D.BH(r)&&(0,l.tZ)(R.Z,(0,n._)({src:ey.D(r)},r.dimensions)),"options"===c&&(0,l.tZ)(eP,{options:s,descriptions:d}),"range"===c&&(0,l.tZ)(l.HY,{children:"range slider"})]})]})};eM.propTypes={onClose:u().func,open:u().bool,title:u().string,description:u().arrayOf(u().object),image:eZ.Z,options:u().arrayOf(u().object),optionDescriptions:u().arrayOf(u().object),type:u().string},eM.defaultProps={onClose:void 0,open:!1,title:void 0,description:void 0,image:void 0,options:[],optionDescriptions:[],type:void 0};let eS=e=>{var t,o,a,r;let{currency:d,filters:p,filterContent:u,loading:g,selectedFilters:h,resetFilters:f,onFilter:b,vatRate:Z,removeSettingContent:y}=e,x=(0,m.Z)(),{selectedSetting:X}=(0,C.x)(),[R,I]=(0,v.useState)(!1),[L,G]=(0,v.useState)(null),[N,A]=(0,v.useState)(!1),[H,W]=(0,v.useState)(null),[E,z]=(0,v.useState)(!1),[U,q]=(0,v.useState)(!1),J=u.find(e=>{var t;let{primary:o}=e;return o.key===(null==L?void 0:null===(t=L.option)||void 0===t?void 0:t.replace(/_eur|_usd|_gbp/,""))}),Q=e=>()=>{G(e),A(!0)},$=e=>{W(e),z(!0)},K=()=>{z(!1)},ee=()=>{q(!0)};return(0,l.BX)(l.HY,{children:[(0,l.BX)(s.Z,{position:"relative",children:[(0,l.BX)(s.Z,{display:"grid",gridAutoRows:"max-content",pt:5,borderTop:e=>"1px solid ".concat(e.palette.grayGreen[100]),sx:e=>({gridTemplateColumns:"repeat(3, 1fr)",gap:1,[e.breakpoints.up("md")]:{gridTemplateColumns:"repeat(2, 1fr)",columnGap:6,rowGap:4,"&::after":{position:"absolute",top:0,content:'""',backgroundColor:"grayGreen.100",width:"1px",bottom:0,left:"50%",transform:"translateX(-50%)"}}}),children:[g&&0===p.length&&(0,c.Z)(6).map(e=>(0,l.tZ)(Y,{index:e},e)),(p||[]).slice(0,6).map(e=>{let{type:t,option:o,values:a,label:r,description:s,componentProps:c}=e,p=a;if("stone_carat"===o&&X){let{minCarat:e,maxCarat:t}=X||{},o={min:parseInt(e,10)/1e4,max:parseInt(t,10)/1e4},l=a.at(0).options.map(e=>{var{option:t,values:l}=e,a=(0,_._)(e,["option","values"]);let r=parseFloat(null==l?void 0:l.at(0).value);return"min"===t&&parseFloat(null==l?void 0:l.at(0).value)<o[t]&&(r=o[t]),"max"===t&&parseFloat(null==l?void 0:l.at(0).value)>o[t]&&(r=o[t]),(0,i._)((0,n._)({},a),{option:t,values:[{value:r.toFixed(4).toString(),label:r.toFixed(4).toString()}]})});p=[(0,i._)((0,n._)({},null==p?void 0:p.at(0)),{options:l})]}return(0,l.tZ)(ef,{selectedFilters:h,componentProps:c,onFilter:b,type:t,values:p,option:o,description:s,handleOpenFilterDescription:Q,hasFilterContent:(0,j.Z)(u.find(e=>{let{primary:t}=e;return t.key===(null==o?void 0:o.replace(/_eur|_usd|_gbp/,""))})),label:r,vatRate:Z,onMobileFilter:$,currency:d,disabled:X&&["stone_shape"].includes(o),onDisabledClick:ee},o)})]}),(0,l.tZ)(S.Z,{in:R,children:(0,l.tZ)(s.Z,{display:"grid",gridAutoRows:"max-content",sx:e=>({gridTemplateColumns:"repeat(3, 1fr)",gap:1,paddingTop:1,[e.breakpoints.up("md")]:{gridTemplateColumns:"repeat(2, 1fr)",columnGap:6,rowGap:4,paddingTop:4,"&::after":{position:"absolute",top:0,content:'""',backgroundColor:"grayGreen.100",width:"1px",bottom:0,left:"50%",transform:"translateX(-50%)"}}}),children:(p||[]).slice(6).map(e=>{let{type:t,option:o,values:n,label:i,description:a,componentProps:r}=e;return(0,l.tZ)(ef,{selectedFilters:h,componentProps:r,onFilter:b,type:t,values:n,option:o,description:a,hasFilterContent:(0,j.Z)(u.find(e=>{let{primary:t}=e;return t.key===(null==o?void 0:o.replace(/_eur|_usd|_gbp/,""))})),handleOpenFilterDescription:Q,label:i,vatRate:Z,onMobileFilter:$,currency:d,disabled:X&&["stone_shape","stone_carat"].includes(o),onDisabledClick:ee},o)})})}),(0,l.BX)(s.Z,{display:{xs:"flex",md:"grid"},flexDirection:"column",gridTemplateColumns:{md:"repeat(3, minmax(max-content, 1fr))"},gridTemplateAreas:{md:"'. more reset'"},justifyContent:"space-between",mt:5,mb:9,borderTop:e=>"1px solid ".concat(e.palette.grayGreen[100]),children:[(0,l.tZ)(O.Z,{variant:"contained",color:"primary",sx:{gridArea:"more",placeSelf:"center",borderTopRightRadius:0,borderTopLeftRadius:0},endIcon:(0,l.tZ)(k.Z,{sx:{transform:"".concat(R?"rotate(180deg)":"none"),transition:e=>e.transitions.create("transform",{duration:e.transitions.duration.shortest})}}),onClick:()=>I(e=>!e),children:R?x.formatMessage(eb.lessFilters):x.formatMessage(eb.moreFilters)}),(0,l.tZ)(O.Z,{variant:"text",color:"black",sx:{gridArea:"reset",placeSelf:{md:"flex-end"}},startIcon:(0,l.tZ)(M.Z,{}),onClick:f,children:(0,l.tZ)(B.Z,(0,n._)({},eb.resetFilters))})]})]}),(0,l.tZ)(eM,{open:N,onClose:()=>{A(!1)},title:D.Nn(null==J?void 0:null===(t=J.primary)||void 0===t?void 0:t.title)?null==J?void 0:null===(o=J.primary)||void 0===o?void 0:o.title:null==L?void 0:L.label,description:null==J?void 0:null===(a=J.primary)||void 0===a?void 0:a.description,image:null==J?void 0:null===(r=J.primary)||void 0===r?void 0:r.image,optionDescriptions:null==J?void 0:J.items,options:null==L?void 0:L.values,type:null==J?void 0:J.variation}),(0,l.BX)(F.ZP,{open:E,anchor:"bottom",onClose:K,sx:{".MuiPaper-root":{borderTopRightRadius:8,borderTopLeftRadius:8}},ModalProps:{onTransitionExited:()=>W(null)},children:[(0,l.tZ)(w.Z,{onClose:K,title:(0,l.BX)(l.HY,{children:[null==H?void 0:H.label," ",(0,j.Z)(u.find(e=>{var t;let{primary:o}=e;return o.key===(null==H?void 0:null===(t=H.option)||void 0===t?void 0:t.replace(/_eur|_usd|_gbp/,""))}))&&(0,l.tZ)(T.Z,{size:"small",onClick:Q({type:null==H?void 0:H.type,option:null==H?void 0:H.option,values:null==H?void 0:H.values,label:null==H?void 0:H.label,description:null==H?void 0:H.description}),children:(0,l.tZ)(P.Z,{})})]})}),(0,l.BX)(s.Z,{p:3,display:"flex",flexDirection:"column",gap:6,children:[(0,l.tZ)(ef,(0,i._)((0,n._)({},H),{selectedFilters:h,onFilter:b,vatRate:Z,isMobile:!0,currency:d,disabled:X&&["stone_shape","stone_carat"].includes(null==H?void 0:H.option),onDisabledClick:ee})),(0,l.tZ)(O.Z,{variant:"contained",color:"primary",sx:{alignSelf:"center"},onClick:K,children:(0,l.tZ)(B.Z,(0,n._)({},eb.showResults))})]})]}),(0,l.tZ)(V,{open:U,onClose:()=>{q(!1)},content:y})]})};eS.propTypes={currency:u().string,filters:u().arrayOf(u().object),filterContent:u().arrayOf(u().object),loading:u().bool,resetFilters:u().func,selectedFilters:u().array,onFilter:u().func,vatRate:u().number,removeSettingContent:u().shape({title:u().string,text:u().arrayOf(u().object)})},eS.defaultProps={currency:void 0,filters:[],filterContent:[],loading:!1,resetFilters:void 0,selectedFilters:[],onFilter:void 0,vatRate:void 0,removeSettingContent:void 0};var eO=o(82797),eF=o(54115),eT=(0,Z.vU)({label:{id:"common.sortBy",defaultMessage:"Sort by",description:"common label for sort by"},sortOptionAscending:{id:"common.sortOptionAscending",defaultMessage:"{option} ascending",description:"common label for sort option ascending"},sortOptionDescending:{id:"common.sortOptionDescending",defaultMessage:"{option} descending",description:"common label for sort option descending"},defaultSortingLabel:{id:"common.default",defaultMessage:"Default",description:"common label for default"}});let ej=e=>{let{options:t,onSort:o,activeSort:a,sx:r}=e,[d,c]=(0,v.useState)(Object.entries(a).flatMap(e=>e).join("-"));return(0,v.useEffect)(()=>{c(Object.entries(a).flatMap(e=>e).join("-"))},[a]),(0,l.BX)(s.Z,{display:"flex",alignItems:"center",gap:1,sx:r,children:[(0,l.tZ)(f.Z,{variant:"bodyMedium",children:(0,l.tZ)(B.Z,(0,n._)({},eT.label))}),(0,l.tZ)(eO.Z,{value:d,onChange:e=>{c(e.target.value);let[t,n]=e.target.value.split("-");o(t)(n||null)},size:"small",sx:{fontSize:14,".MuiInputBase-input":{pr:"32px !important"}},children:t.map(e=>[(0,l.tZ)(eF.Z,{value:"".concat(e.option,"-asc"),children:(0,l.tZ)(B.Z,(0,i._)((0,n._)({},eT.sortOptionAscending),{values:{option:e.label}}))},e.option),(0,l.tZ)(eF.Z,{value:"".concat(e.option,"-desc"),children:(0,l.tZ)(B.Z,(0,i._)((0,n._)({},eT.sortOptionDescending),{values:{option:e.label}}))},e.option)])})]})};ej.propTypes={options:u().arrayOf(u().object),onSort:u().func,activeSort:u().objectOf(u().oneOf(["asc","desc"])),sx:u().object},ej.defaultProps={options:[],onSort:void 0,activeSort:{},sx:void 0};let eB=(e,t)=>"boolean"==typeof t?t:!e;var eD=e=>(0,v.useReducer)(eB,e),eX=(0,Z.vU)({title:{id:"pages.diamonds.components.typeFilter.title",defaultMessage:"Search for Diamonds",description:"title of the type filter for the diamonds overview"}});let eR=e=>{var t,o,a,r;let{onFilter:d,option:c,value:p,loading:u,filterContent:v}=e,[m,g]=eD(!1),{option:b,label:Z,values:y=[]}=c||{},x=(e,t)=>()=>{d(e)(t)};return(0,l.BX)(l.HY,{children:[(0,l.BX)(s.Z,{pt:4,pb:6,children:[(0,l.BX)(s.Z,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,mb:2,children:[(0,l.tZ)(f.Z,{variant:"h4",component:"h2",align:"center",children:(0,l.tZ)(B.Z,(0,n._)({},eX.title))}),(0,l.tZ)(T.Z,{sx:{ml:{md:-2}},onClick:()=>g(!0),children:(0,l.tZ)(P.Z,{})})]}),(0,l.BX)(s.Z,{display:"flex",gap:{xs:1,md:3},alignItems:"center",justifyContent:"center",flexWrap:"wrap",children:[u&&(null==y?void 0:y.length)===0&&(0,l.BX)(l.HY,{children:[(0,l.tZ)(h.Z,{variant:"rectangular",sx:{width:{xs:93,md:160},height:50}}),(0,l.tZ)(h.Z,{variant:"rectangular",sx:{width:{xs:118,md:160},height:50}}),(0,l.tZ)(h.Z,{variant:"rectangular",sx:{width:{xs:109,md:160},height:50}})]}),y.map(e=>{let{label:t,value:o}=e;return(0,l.tZ)(O.Z,(0,i._)((0,n._)({},o===p?{variant:"contained",color:"primary"}:{variant:"outlined",color:"grey"}),{sx:{minWidth:{sm:160}},onClick:x(b,o),children:t}),o)})]})]}),(0,l.tZ)(eM,{open:m,onClose:()=>g(!1),title:D.Nn(null==v?void 0:null===(t=v.primary)||void 0===t?void 0:t.title)?null==v?void 0:null===(o=v.primary)||void 0===o?void 0:o.title:Z,description:null==v?void 0:null===(a=v.primary)||void 0===a?void 0:a.description,image:null==v?void 0:null===(r=v.primary)||void 0===r?void 0:r.image,optionDescriptions:null==v?void 0:v.items,options:y,type:null==v?void 0:v.variation})]})};eR.propTypes={onFilter:u().func,option:u().object,value:u().string,loading:u().bool,filterContent:u().object},eR.defaultProps={onFilter:void 0,option:void 0,value:void 0,loading:void 0,filterContent:void 0};var eI=o(87901),eL=o(63184),eG=o(5605),eN=o(75864),eA=o(29539),eH=o(11163),eW=o(69857),eE=o.n(eW),ez=o(27981),eU=(e,t)=>{let{vatRate:o}=t;return e.map(e=>{var t,l;return(0,i._)((0,n._)({},e,((null==e?void 0:e.details)||[]).reduce((e,t)=>{let{key:o,values:l}=t;return(0,i._)((0,n._)({},e),{["detail_".concat(o)]:l.join(", ")})},{})),{name:e.name,priceIncVat:e.price*(1+o/100),price:e.price,image:null==e?void 0:null===(l=e.media)||void 0===l?void 0:null===(t=l.find(e=>"image"===e.type))||void 0===t?void 0:t.src})})};let eV={stone_carat:{valueFormat:e=>Math.round(100*e),valueLabelFormat:e=>parseInt(e,10)/100,step:.01},stone_price:{valueFormat:e=>Math.round(100*e),valueLabelFormat:e=>parseInt(e,10)/100,step:.01},stone_depth:{valueFormat:e=>Math.round(100*e),valueLabelFormat:e=>parseInt(e,10)/100,step:.01},stone_table:{valueFormat:e=>Math.round(100*e),valueLabelFormat:e=>parseInt(e,10)/100,step:.01},price_per_carat:{valueFormat:e=>Math.round(100*e),valueLabelFormat:e=>parseInt(e,10)/100,step:.01},length_width_ratio:{valueFormat:e=>Math.round(100*e),valueLabelFormat:e=>parseInt(e,10)/100,step:.01}};var eY=e=>e.map(e=>{var t,o,l,a;let r=(0,i._)((0,n._)({},e),{description:null===(o=(null==e?void 0:e.values)||[])||void 0===o?void 0:null===(t=o.at(0))||void 0===t?void 0:t.group_description});return(null===(a=e.values)||void 0===a?void 0:null===(l=a.at(0))||void 0===l?void 0:l.value)==="slider"?(0,i._)((0,n._)({},r),{type:"range",componentProps:eV[e.option]||void 0}):["stone_color","stone_cut","stone_polish","stone_quality","stone_symmetry","stone_fluorescence"].includes(null==e?void 0:e.option)?(0,i._)((0,n._)({},r),{type:"segments",componentProps:eV[e.option]||void 0}):["stone_shape"].includes(null==e?void 0:e.option)?(0,i._)((0,n._)({},r),{type:"icons",componentProps:eV[e.option]||void 0}):(0,i._)((0,n._)({},r),{type:"checkbox",componentProps:eV[e.option]||void 0})}),eq=e=>{let t=new URLSearchParams;return e.map(e=>{var o,n;return"multiple"===e.value&&(null===(o=e.selected)||void 0===o?void 0:o.some(e=>{let{option:t}=e;return"min"===t}))?t.set(e.option,e.selected.sort((e,t)=>"min"===e.option?-1:"min"===t.option?1:e.option.localeCompare(t.option)).map(e=>{let{value:t}=e;return t}).join("-")):"multiple"===e.value&&(null===(n=e.selected)||void 0===n?void 0:n.every(e=>{let{option:t}=e;return"value"===t}))?t.set(e.option,e.selected.map(e=>{let{value:t}=e;return t}).join(",")):t.set(e.option,e.value)}),t.toString()},eJ=(e,t)=>{let o=((null==e?void 0:e.values)||[]).find(e=>(null==e?void 0:e.value)===t);if((null==e?void 0:e.option)==="current_page")return{option:null==e?void 0:e.option,option_label:"Page nr",value:t,label:t,selected:[]};if((null==e?void 0:e.type)==="range")return{option:null==e?void 0:e.option,option_label:null==e?void 0:e.label,value:"multiple",label:"multiple",selected:[{option:"min",option_label:"Min price",value:t[0].toString(),label:t[0]},{option:"max",option_label:"Max price",value:t[1].toString(),label:t[1]}]};if((null==e?void 0:e.type)==="segments"){var n;let o=(null===(n=e.values)||void 0===n?void 0:n.slice(Number(null==t?void 0:t.at(0)),Number(null==t?void 0:t.at(1)))).map(e=>({option:"value",option_label:"value",value:null==e?void 0:e.value,label:null==e?void 0:e.label}));return{option:null==e?void 0:e.option,option_label:null==e?void 0:e.label,value:"multiple",label:"multiple",selected:o}}return{option:null==e?void 0:e.option,option_label:null==e?void 0:e.label,value:null==o?void 0:o.value,label:null==o?void 0:o.label,selected:[]}},eQ=e=>e.reduce((e,t)=>(0,i._)((0,n._)({},e),{[t.option]:t.value}),{});let e$=(0,eL.Z)(ez.v);var eK=e=>{var t,o,l,a;let{locale:r,currency:s,priceGroup:d,enabled:c,defaultFilters:p,defaultSort:u}=e,m=(0,eH.useRouter)(),{selectedSetting:g}=(0,C.x)(),[h,f]=(0,v.useState)(),[b,Z]=(0,v.useState)(!0),[y,x]=(0,v.useState)([]),[_,w]=(0,v.useState)([]),k=(0,v.useMemo)(()=>({["stone_price_".concat(s.toLowerCase())]:"asc"}),[s]),[P,M]=(0,v.useState)(k),[S,O]=(0,v.useState)([]),[F,T]=(0,v.useState)(null),[j,B]=(0,v.useState)({count:(null==h?void 0:h.length)||0,page:0,rowsPerPage:24,rowsPerPageOptions:[{value:"24",label:"24"},{value:"48",label:"48"},{value:"72",label:"72"},{value:"96",label:"96"}]}),D=null===(t=eE().localeSpecificationMapping[r])||void 0===t?void 0:t.toUpperCase(),{setLastUsedDiamondFilters:X}=(0,C.x)(),R=(0,eG.Z)(p),I=(0,eG.Z)(u),L=(0,eG.Z)(m),G=g?[{option:"stone_carat",value:"multiple",selected:[{option:"min",value:parseInt(null==g?void 0:g.minCarat,10)/1e4},{option:"max",value:parseInt(null==g?void 0:g.maxCarat,10)/1e4}]},{option:"stone_shape",value:null==g?void 0:g.stoneShape}]:[],N=("undefined"!=typeof document?(0,eA.Z)("".concat(ez.ap,"_").concat(null==r?void 0:r.toLowerCase())):void 0)||s,A=("undefined"!=typeof document?(0,eA.Z)("".concat(ez.bI,"_").concat(null==r?void 0:r.toLowerCase())):void 0)||(null==r?void 0:null===(a=r.split("-"))||void 0===a?void 0:null===(l=a.reverse())||void 0===l?void 0:null===(o=l.at(0))||void 0===o?void 0:o.toUpperCase()),H=(0,eN.default)(A),W=(0,v.useCallback)(async e=>{Z(!0);try{var t,o,n,i,l,a,r,s,c,p,u,v;let{data:m}=await e$.getDiamonds({locale:D,currency:N,priceGroup:d},e),g=null===(t=(null==m?void 0:m.options)||[])||void 0===t?void 0:t.filter(e=>{let{option:t}=e;return!["page_limit","current_page","page_total"].includes(t)}),h=null===(o=(null==m?void 0:m.options)||[])||void 0===o?void 0:o.filter(e=>{let{option:t}=e;return["page_limit","current_page","page_total"].includes(t)}),b=eU((null==m?void 0:m.result)||[],{vatRate:H}),y=eQ(null==m?void 0:m.sort);f(b),T(b[0]),x(eY(g||[])||[]),w(eY(h||[])||[]),O(null==m?void 0:m.selected),M(Object.keys(y).length>0?y:k),B({count:parseInt(null==m?void 0:null===(l=m.options)||void 0===l?void 0:null===(i=l.find(e=>{let{option:t}=e;return"page_total"===t}))||void 0===i?void 0:null===(n=i.values)||void 0===n?void 0:n.at(0).value,10),rowsPerPage:parseInt(null==m?void 0:null===(r=m.selected)||void 0===r?void 0:null===(a=r.find(e=>{let{option:t}=e;return"page_limit"===t}))||void 0===a?void 0:a.value,10),rowsPerPageOptions:null==m?void 0:null===(c=m.options)||void 0===c?void 0:null===(s=c.find(e=>{let{option:t}=e;return"page_limit"===t}))||void 0===s?void 0:s.values,page:((null==m?void 0:null===(u=m.selected)||void 0===u?void 0:null===(p=u.find(e=>{let{option:t}=e;return"current_page"===t}))||void 0===p?void 0:p.value)||1)-1});let _=L(),C=new URLSearchParams(eq(null==m?void 0:m.selected));C.set("sort",Object.entries(y).flatMap(e=>e).join("|")),_.replace("".concat(null===(v=_.asPath.split("?"))||void 0===v?void 0:v.at(0),"?").concat(C.toString()),null,{shallow:!0}),X(C),Z(!1)}catch(e){console.log(e),(null==e?void 0:e.name)!=="AbortError"&&Z(!1)}},[D,N,k,L,d,X,H]),E=e=>async t=>{let o=[...y,..._],n=eJ(null==o?void 0:o.find(t=>{let{option:o}=t;return o===e}),t),i=[e];"current_page"!==e&&i.push("current_page");let l=[..."stone_type"===e?G:S.filter(e=>!i.includes(null==e?void 0:e.option)),...t?[n]:[]];O(l),await W({method:"POST",body:JSON.stringify({selected:[...l,...G,..."current_page"!==e?[eJ(null==o?void 0:o.find(e=>{let{option:t}=e;return"current_page"===t}),1)]:[]],sort:Object.keys(P||{}).map(e=>({option:e,value:P[e]}))})})},z=async()=>{let e=S.filter(e=>{let{option:t}=e;return["stone_type"].includes(t)});O([...e,...G]),await W({method:"POST",body:JSON.stringify({selected:[...e,...G],sort:Object.keys(P||{}).map(e=>({option:e,value:P[e]}))})})},U=async e=>{await E("page_limit")(e.target.value)};return(0,v.useEffect)(()=>{if(c){let e=R(),t=I();W((null==e?void 0:e.length)>0?{method:"POST",body:JSON.stringify({selected:[...e],sort:Object.keys(t||{}).map(e=>({option:e,value:t[e]}))})}:void 0)}},[g,W,c,R,I]),{data:h,filters:y,loading:b,refine:E,selectedFilters:S,resetFilters:z,selectedDiamond:F,setSelectedDiamond:T,sort:P,handleSort:e=>async t=>{let o=null==P?void 0:P[e],n=t;if(!["asc","desc",null].includes(n))switch(o){case"desc":n="asc";break;case void 0:n="desc";break;default:n=void 0}let i=n?{[e]:n}:{};M(i),await W({method:"POST",body:JSON.stringify({selected:S,sort:Object.keys(i||{}).map(e=>({option:e,value:i[e]}))})})},vatRate:H,currency:N,pagination:(0,i._)((0,n._)({},j),{onPageChange:(e,t)=>{E("current_page")(t+1)},onRowsPerPageChange:U})}},e0=o(62689),e1=e=>(0,l.tZ)(e0.Z,(0,i._)((0,n._)({},e),{children:(0,l.tZ)("path",{d:"M4.62 4H2.66a.66.66 0 0 0-.47.19.63.63 0 0 0-.19.45v1.92c0 .17.07.33.2.45.12.12.28.19.46.19h1.96c.18 0 .34-.07.47-.19a.64.64 0 0 0 .19-.45V4.64a.63.63 0 0 0-.2-.45.66.66 0 0 0-.46-.19Zm0 6.4H2.66a.66.66 0 0 0-.47.19.63.63 0 0 0-.19.45v1.92c0 .17.07.33.2.45.12.12.28.19.46.19h1.96c.18 0 .34-.07.47-.19a.64.64 0 0 0 .19-.45v-1.92a.63.63 0 0 0-.2-.45.66.66 0 0 0-.46-.19Zm0 6.4H2.66a.66.66 0 0 0-.47.19.63.63 0 0 0-.19.45v1.92c0 .17.07.33.2.45.12.12.28.19.46.19h1.96c.18 0 .34-.07.47-.19a.64.64 0 0 0 .19-.45v-1.92a.63.63 0 0 0-.2-.45.66.66 0 0 0-.46-.19Zm17.05.96H7.9a.33.33 0 0 0-.23.1.32.32 0 0 0-.1.22v.64a.33.33 0 0 0 .33.32h13.77c.09 0 .17-.03.23-.1.07-.05.1-.14.1-.22v-.64a.32.32 0 0 0-.1-.23.33.33 0 0 0-.23-.09Zm0-12.8H7.9a.33.33 0 0 0-.23.1.32.32 0 0 0-.1.22v.64a.33.33 0 0 0 .33.32h13.77c.09 0 .17-.03.23-.1.07-.05.1-.14.1-.22v-.64a.32.32 0 0 0-.1-.23.33.33 0 0 0-.23-.09Zm0 6.4H7.9a.33.33 0 0 0-.23.1.32.32 0 0 0-.1.22v.64a.33.33 0 0 0 .33.32h13.77c.09 0 .17-.03.23-.1.07-.05.1-.14.1-.22v-.64a.32.32 0 0 0-.1-.23.33.33 0 0 0-.23-.09Z"})})),e3=e=>(0,l.tZ)(e0.Z,(0,i._)((0,n._)({},e),{children:(0,l.tZ)("path",{d:"M10.86 9.19a1.7 1.7 0 0 1-1.72 1.69H5.71A1.7 1.7 0 0 1 4 9.18V5.82c0-.93.77-1.68 1.71-1.68h3.43c.95 0 1.72.75 1.72 1.68V9.2Zm0 9a1.7 1.7 0 0 1-1.72 1.68H5.71A1.7 1.7 0 0 1 4 18.2v-3.4c0-.93.77-1.69 1.71-1.69h3.43c.95 0 1.72.76 1.72 1.7v3.37ZM13.14 5.8c0-.93.77-1.68 1.72-1.68h3.43c.94 0 1.71.75 1.71 1.68v3.4a1.7 1.7 0 0 1-1.71 1.69h-3.43a1.7 1.7 0 0 1-1.72-1.7V5.82ZM20 18.2a1.7 1.7 0 0 1-1.71 1.68h-3.43a1.7 1.7 0 0 1-1.72-1.68v-3.4c0-.93.77-1.69 1.72-1.69h3.43c.94 0 1.71.76 1.71 1.7v3.37Z"})})),e6=o(76665),e2=o(92217),e4=o(45084),e7=o(5152),e9=o.n(e7);let e5={paragraph:e=>{let{children:t}=e;return(0,l.tZ)(f.Z,{variant:"bodyLarge",children:t})}},e8=e9()(()=>Promise.all([o.e(8910),o.e(2787)]).then(o.bind(o,32787)),{loadableGenerated:{webpack:()=>[32787]},ssr:!1}),te=e=>Object.keys(e).filter(e=>"sort"!==e).map(t=>e[t].includes("-")?{option:t,value:"multiple",selected:e[t].split("-").map((e,t)=>({option:0===t?"min":"max",value:e}))}:e[t].includes(",")?{option:t,value:"multiple",selected:e[t].split(",").map(e=>({option:"value",value:e}))}:{option:t,value:e[t]}),tt=e=>{var t,o,n,i;let[l,a]=(null===(i=e||{})||void 0===i?void 0:null===(t=i[null===(n=Object.keys(e))||void 0===n?void 0:null===(o=n.filter(e=>"sort"===e))||void 0===o?void 0:o.at(0)])||void 0===t?void 0:t.split("|"))||[];return l&&a?{[l]:a}:null},to=e=>{var t;let{addToOptions:o,title:d,text:c,layoutData:p,filterContent:u,blockedFilterTitle:g,blockedFilterContent:b}=e,Z=(0,m.Z)(),{properties:y}=p||{},{currency:_,shopId:C,priceGroup:w}=y||{},[k,P]=(0,v.useState)("grid"),{locale:M,query:S,isReady:F}=(0,eH.useRouter)(),{data:T,filters:D,sort:X,handleSort:R,pagination:I,selectedFilters:L,resetFilters:G,refine:N,selectedDiamond:A,setSelectedDiamond:H,loading:W,vatRate:E,currency:U}=eK({locale:M,currency:_,shopId:C,priceGroup:w,defaultFilters:te(S),defaultSort:tt(S),enabled:F}),V=(0,v.useMemo)(()=>[{key:"table",icon:(0,l.tZ)(e1,{}),label:Z.formatMessage({id:"pages.diamonds.components.table.views.list",defaultMessage:"List",description:"label of the list view option for the diamonds table"})},{key:"grid",icon:(0,l.tZ)(e3,{}),label:Z.formatMessage({id:"pages.diamonds.components.table.views.visual",defaultMessage:"Grid",description:"label of the visual view option for the diamonds table"})}],[Z]),Y=[{label:Z.formatMessage({id:"pages.diamonds.table.columns.quickView",defaultMessage:"Quick view",description:"label for the Quick view column on the diamonds page"}),key:"media",type:"media",sx:{pr:0,whiteSpace:"nowrap"},disableSort:!0},{label:Z.formatMessage({id:"pages.diamonds.table.columns.shape",defaultMessage:"Shape",description:"label for the shape column on the diamonds page"}),key:"detail_stone_shape",option:"stone_shape",type:"string",disableSort:!0},{label:Z.formatMessage({id:"pages.diamonds.table.columns.price",defaultMessage:"Price",description:"label for the price column on the diamonds page"}),key:"priceIncVat",option:"stone_price_".concat(U.toLowerCase()),type:"price"},{label:Z.formatMessage({id:"pages.diamonds.table.columns.carat",defaultMessage:"Carat",description:"label for the carat column on the diamonds page"}),key:"detail_stone_carat",option:"stone_carat",type:"float"},{label:Z.formatMessage({id:"pages.diamonds.table.columns.cut",defaultMessage:"Cut",description:"label for the cut column on the diamonds page"}),key:"detail_stone_cut",option:"stone_cut",type:"string",disableSort:!0},{label:Z.formatMessage({id:"pages.diamonds.table.columns.color",defaultMessage:"Color",description:"label for the color column on the diamonds page"}),key:"detail_stone_color",option:"stone_color",type:"string",disableSort:!0},{label:Z.formatMessage({id:"pages.diamonds.table.columns.clarity",defaultMessage:"Clarity",description:"label for the clarity column on the diamonds page"}),key:"detail_stone_quality",option:"stone_quality",type:"string",disableSort:!0},{label:Z.formatMessage({id:"pages.diamonds.table.columns.lab",defaultMessage:"Report",description:"label for the lab column on the diamonds page"}),key:"detail_stone_lab",option:"stone_lab",type:"string",disableSort:!0}];return(0,l.BX)(e6.Z,{sx:{py:4},children:[(0,l.tZ)(r.Z,{items:[{label:"Home",url:"/",fullUrl:eW.localeDomains[ez.WE[M]],key:"home"},{label:d,key:"diamonds"}]}),(0,l.tZ)(a.Z,{currentStep:"stone"}),(0,l.tZ)(f.Z,{variant:"h3",component:"h1",align:"center",my:3,children:d}),(0,l.tZ)(e2.ZP,{container:!0,spacing:4,justifyContent:"center",sx:{textAlign:"center"},children:(0,l.tZ)(e2.ZP,{item:!0,xs:12,lg:10,children:(0,l.tZ)(z.v,{field:c,components:e5})})}),(0,l.tZ)(e4.Z,{sx:{mt:5,borderColor:"grayGreen.100"}}),(0,l.tZ)(eR,{onFilter:N,option:(0,en.Z)(D,"option","stone_type"),value:null===(t=(L||[]).find(e=>{let{option:t}=e;return"stone_type"===t}))||void 0===t?void 0:t.value,loading:W,filterContent:u.find(e=>{let{primary:t}=e;return"stone_type"===t.key})}),(0,l.tZ)(eS,{filters:D.filter(e=>!["stone_type"].includes(e.option)),resetFilters:G,selectedFilters:L,onFilter:N,loading:W,vatRate:E,currency:U,filterContent:u,removeSettingContent:{title:g,text:b}}),(0,l.BX)(s.Z,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.5,mb:2,children:[(0,l.BX)(s.Z,{display:"flex",alignItems:"center",gap:1.5,children:["grid"===k&&(0,l.BX)(l.HY,{children:[(0,l.tZ)(ej,{options:Y.filter(e=>{let{disableSort:t}=e;return!t}),activeSort:X||{["stone_price_".concat(U.toLowerCase())]:"asc"},onSort:R}),(0,l.tZ)(e4.Z,{orientation:"vertical",flexItem:!0,sx:{my:1}})]}),(0,l.tZ)(f.Z,{variant:"bodyMedium",mr:"auto",children:(0,l.tZ)(B.Z,{id:"pages.diamonds.resultsDisplay",defaultMessage:"{count} Diamonds",values:{count:W&&!(0,j.Z)(I.count)?(0,l.tZ)(h.Z,{variant:"text",width:"5ch",sx:{display:"inline-block"}}):Z.formatNumber(null==I?void 0:I.count)}})})]}),(0,l.tZ)(s.Z,{display:"flex",alignItems:"center",gap:1.5,ml:"auto",children:V.map(e=>{let{key:t,icon:o,label:a}=e;return(0,l.tZ)(O.Z,(0,i._)((0,n._)({size:"small"},t===k?{variant:"contained",color:"primary"}:{color:"black"}),{onClick:()=>P(t),endIcon:o,children:a}),t)})})]}),"grid"===k&&(0,l.tZ)(x,{diamonds:T,pagination:I,isLoading:W,addToOptions:o}),"table"===k&&(0,l.tZ)(e8,{diamonds:T,selectedDiamond:A,setSelectedDiamond:H,columns:Y,sort:X,onSort:R,pagination:I,isLoading:W,addToOptions:o})]})};to.getLayout=eI.G,to.propTypes={title:u().string,text:u().arrayOf(u().object),filterContent:u().arrayOf(u().object),layoutData:u().shape({properties:u().shape({currency:u().string,shopId:u().number,priceGroup:u().string})}),addToOptions:u().arrayOf(u().shape({key:u().string,label:u().string,href:u().string})),blockedFilterTitle:u().string,blockedFilterContent:u().arrayOf(u().object)},to.defaultProps={addToOptions:[],title:void 0,text:void 0,layoutData:{},filterContent:[],blockedFilterTitle:void 0,blockedFilterContent:void 0};var tn=!0,ti=to},33803:function(e,t,o){"use strict";var n=o(45697),i=o.n(n);let l=i().shape({url:i().string,dimension:i().shape({width:i().number,height:i().number}),alt:i().string,copyright:i().string});t.Z=l},89996:function(e,t){"use strict";t.Z=(e,t,o)=>e.find(e=>e[t]===o)}},function(e){e.O(0,[1664,4469,4513,2962,9821,1821,7563,2797,794,765,7901,5359,2888,9774,179],function(){return e(e.s=72163)}),_N_E=e.O()}]);