1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[332],{25698:(l,e,t)=>{"use strict";t.r(e),t.d(e,{__N_SSP:()=>P,default:()=>z});var s=t(37876),a=t(46572),n=t(96715),i=t(69193),r=t(87109),o=t(27888),c=t(48230),u=t.n(c),d=t(89130),m=t(89099),x=t(14232);let v=l=>{let{slider:e}=l,{locale:t}=(0,m.useRouter)(),a="".concat("ar"===t?null==e?void 0:e["img-ar"]:null==e?void 0:e["img-en"]);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"overflow-hidden h-80 sm:h-[697px]",children:(0,s.jsx)(d.A,{src:a,className:"size-full object-fill",loading:"eager",alt:""})}),(0,s.jsx)("div",{className:"absolute top-0 left-0 z-50 w-full h-full",children:(0,s.jsxs)("div",{className:"text-white text-lg sm:text-xl flex flex-col gap-2 sm:gap-4 justify-center h-full ms-5 sm:ms-10",children:[(0,s.jsx)("span",{children:"ar"===t?null==e?void 0:e["subtitle-ar"]:null==e?void 0:e["subtitle-en"]}),(0,s.jsx)("h1",{className:"text-xl sm:text-3xl font-bold text-primary",children:"ar"===t?null==e?void 0:e["title-ar"]:null==e?void 0:e["title-en"]}),(0,s.jsx)("span",{children:"ar"===t?null==e?void 0:e["desc-ar"]:null==e?void 0:e["desc-en"]})]})})]})},p=l=>{var e,t,a,n,c,m,x,p,f,j,g,b,w,N,y;let{data:k,locale:_,isMobile:A}=l,C=null==k||null==(t=k.sliders)||null==(e=t.value)?void 0:e.filter(l=>null==l?void 0:l.active),S=null==k||null==(a=k.banners)?void 0:a.value.filter(l=>null==l?void 0:l.active),B=l=>{let e=null==l?void 0:l["".concat(A?"mobile-":"","img-").concat(_)];return e&&e.startsWith("http")?e:"".concat("https://media.backcomfort.com.sa/media","/json/").concat(e)};return(0,s.jsxs)("section",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,s.jsx)(o.RC,{modules:[r.Ij,r.dK],autoplay:{delay:4e3,disableOnInteraction:!1},pagination:{clickable:!0},dir:"en"===_?"ltr":"rtl",className:"w-full banner-swiper",loop:!0,children:null==C?void 0:C.map((l,e)=>(0,s.jsx)(o.qr,{children:(0,s.jsx)(v,{slider:l})},e))},_),(0,s.jsxs)("div",{className:"flex gap-2 overflow-x-auto sm:gap-4 red-scroll pb-1 sm:grid sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 sm:gap-4 max-[640px]:max-w-96 sm:flex-col",children:[(0,s.jsxs)(u(),{href:(0,i.u)(null==S||null==(n=S.at(0))?void 0:n.url,null==S||null==(c=S.at(0))?void 0:c.type),className:"relative group w-full",children:[(0,s.jsx)(d.A,{src:B(null==S?void 0:S.at(0)),className:"object-fill w-full max-sm:min-w-40 h-full max-sm:min-h-40 max-sm:max-h-40 md:min-h-[456px]",loading:"eager",alt:""}),(0,s.jsx)(h,{subtitle:null==S||null==(m=S.at(0))?void 0:m["title-".concat(_)]})]}),(0,s.jsxs)(u(),{href:(0,i.u)(null==S||null==(x=S.at(1))?void 0:x.url,null==S||null==(p=S.at(1))?void 0:p.type),className:"relative group w-full",children:[(0,s.jsx)(d.A,{src:B(null==S?void 0:S.at(1)),className:"object-fill w-full max-sm:min-w-40 h-auto max-sm:min-h-40 max-sm:max-h-40 md:max-h-[216px]",loading:"eager",alt:""}),(0,s.jsx)(h,{subtitle:null==S||null==(f=S.at(1))?void 0:f["title-".concat(_)]})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 sm:gap-4 max-[640px]:max-w-96 sm:flex-col",children:[(0,s.jsxs)(u(),{href:(0,i.u)(null==S||null==(j=S.at(2))?void 0:j.url,null==S||null==(g=S.at(2))?void 0:g.type),className:"group relative w-full",children:[(0,s.jsx)(d.A,{src:B(null==S?void 0:S.at(2)),className:"object-fill w-full max-sm:min-w-40 h-auto max-sm:min-h-40 max-sm:max-h-40 md:min-h-[233px]",loading:"eager",alt:""}),(0,s.jsx)(h,{subtitle:null==S||null==(b=S.at(2))?void 0:b["title-".concat(_)]})]}),(0,s.jsxs)(u(),{href:(0,i.u)(null==S||null==(w=S.at(3))?void 0:w.url,null==S||null==(N=S.at(3))?void 0:N.type),className:"relative group w-full",children:[(0,s.jsx)(d.A,{src:B(null==S?void 0:S.at(3)),className:"object-fill w-full max-sm:min-w-40 h-auto max-sm:min-h-40 max-sm:max-h-40 md:min-h-[440px]",loading:"eager",alt:""}),(0,s.jsx)(h,{subtitle:null==S||null==(y=S.at(3))?void 0:y["title-".concat(_)]})]})]})]})]})},h=l=>{let{title:e="",subtitle:t="",description:a=""}=l;return(0,s.jsx)("div",{className:"absolute top-0 left-0 z-50 w-full h-full transition-all duration-500 bg-black opacity-0 group-hover:opacity-100 bg-opacity-60",children:(0,s.jsxs)("div",{className:"flex flex-col justify-center h-full gap-1 text-sm text-white sm:text-lg sm:gap-2 ms-2 sm:ms-10",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("h1",{className:"text-lg font-bold md:text-xl text-primary",children:e}),(0,s.jsx)("span",{children:a})]})})};var f=t(90924);let j=l=>{var e;let{data:t,locale:a}=l,[n,i]=(0,x.useState)({}),c="ar"===a?"title-ar"in t?t["title-ar"]:"":"title-en"in t?t["title-en"]:"",m=null==t||null==(e=t.value)?void 0:e.filter(l=>null==l?void 0:l.active);return(null==t?void 0:t.active)&&(null==m?void 0:m.length)>0&&(0,s.jsxs)("section",{className:"mx-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3 sm:mb-4",children:[(0,s.jsx)("span",{className:"text-lg sm:text-xl font-extrabold",children:c}),(0,s.jsx)(f.A,{swiper:n,locale:a})]}),(0,s.jsx)(o.RC,{dir:"en"===a?"ltr":"rtl",onInit:l=>i(l),modules:[r.Ij],autoplay:{delay:3e3,disableOnInteraction:!1},breakpoints:{320:{spaceBetween:5,slidesPerView:3.5},640:{spaceBetween:20,slidesPerView:5},769:{spaceBetween:20,slidesPerView:7},1024:{spaceBetween:20,slidesPerView:9}},children:null==m?void 0:m.map((l,e)=>(null==l?void 0:l.active)&&(0,s.jsx)(o.qr,{children:(0,s.jsx)(u(),{href:l.url||"/",children:(0,s.jsx)(d.A,{src:l["img-"+a],className:"object-contain w-full h-20 border sm:h-28 p-3",alt:l["title-"+a]||"Brand"})})},e))},a)]})};var g=t(93080);let b=l=>{var e;let{data:t,locale:a}=l,n=null==t||null==(e=t.value)?void 0:e.filter(l=>null==l?void 0:l.active),{push:r}=(0,m.useRouter)();return(null==t?void 0:t.active)&&(null==n?void 0:n.length)>0&&(0,s.jsx)("section",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:null==n?void 0:n.map((l,e)=>(0,s.jsx)("div",{className:"cursor-pointer",children:(0,s.jsxs)(u(),{href:(0,i.u)(null==l?void 0:l.url,null==l?void 0:l.type),className:"mt-3 mb-0.5 sm:mb-1 space-y-4 text-lg sm:text-xl font-semibold",children:[(0,s.jsx)(d.A,{onClick:()=>r((0,i.u)(null==l?void 0:l.url,null==l?void 0:l.type)),src:l["img-"+a],className:"object-cover w-full h-auto rounded-md min-h-56 sm:min-h-80 curs
1or-pointer",alt:"Img !"}),(0,s.jsx)("h2",{children:l["title-"+a]||""}),(0,s.jsx)("p",{className:"text-xs max-sm:leading-5 text-zinc-400 sm:text-sm font-[500]",children:l["desc-"+a]||""})]})},e))})};var w=t(57018);let N=l=>{var e;let{data:t,onChangeTab:a}=l,{locale:n}=(0,m.useRouter)(),[i,r]=(0,x.useState)(null==t||null==(e=t[0])?void 0:e.id);return(0,s.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto sm:gap-4",children:null==t?void 0:t.map((l,e)=>(0,s.jsx)("button",{onClick:()=>{r(null==l?void 0:l.id),a(null==l?void 0:l.id)},className:"py-2 font-semibold ".concat(i===(null==l?void 0:l.id)?"text-white bg-red-600 border-red-600":""," border rounded-sm min-w-32 max-sm:text-sm"),children:l["title-"+n]},e))})};var y=t(56396);let k=l=>{let{t:e,counter:t}=l,[a,n]=(0,x.useState)((0,y.a2)(null==t?void 0:t["date-to"]));return(0,x.useEffect)(()=>{let l=setTimeout(()=>{n((0,y.a2)(null==t?void 0:t["date-to"]))},1e3);return()=>clearTimeout(l)}),(0,s.jsx)(s.Fragment,{children:a.isCountDown&&(0,s.jsxs)("div",{className:"items-center gap-2 flex max-sm:text-xs",children:[(0,s.jsxs)("span",{className:"px-4 max-sm:px-2 py-1 border border-red-600 rounded-md",children:[a.days," ",e("Days")]}),(0,s.jsx)("span",{className:"text-xl text-red-600",children:":"}),(0,s.jsxs)("span",{className:"px-4 max-sm:px-2 py-1 border border-red-600 rounded-md",children:[a.hours," ",e("Hours")]}),(0,s.jsx)("span",{className:"text-xl text-red-600",children:":"}),(0,s.jsxs)("span",{className:"px-4 max-sm:px-2 py-1 border border-red-600 rounded-md",children:[a.minutes," ",e("Minutes")]})]})})};var _=t(38248),A=t(34333),C=t(34308),S=t(91535);let B=l=>{let e=Number(null==l?void 0:l.quantity)||0,t=Number(null==l?void 0:l.back_orders)||0,s=(null==l?void 0:l.is_in_stock)===!0||(null==l?void 0:l.stock_status)==="in_stock";return e>0||t>0||s},R=function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return l.map(l=>{var e;return Array.isArray(null==l?void 0:l._configurables)?{...l,_configurables:null==(e=l._configurables)?void 0:e.filter(B)}:l}).filter(l=>{var e;return Array.isArray(null==l?void 0:l._configurables)?(null==(e=l._configurables)?void 0:e.length)>0:B(l)})},E=l=>{var e,t,a,n,i;let{t:r,locale:o,isSwiper:c,isMulti:u,data:d}=l,[m,v]=(0,x.useState)({}),[p,h]=(0,x.useState)(""),{handshake:j}=(0,_.getCookies)(),{trigger:g,data:b}=(0,A.A)("/tab/".concat(p,"/").concat(o),(l,e)=>{let{arg:t}=e;return(0,C.vu)(j,t,"most viewed","DESC",12,0,!1)},{populateCache:!0}),{cache:B}=(0,S.iX)();(0,x.useEffect)(()=>{let l=B.get("/tab/".concat(p,"/").concat(o));p&&!l&&g(p)},[p,g,B,o]);let E=(0,x.useMemo)(()=>{var l,e,t,s,a,n,i,r,c,u,m,x,v,h;let f=null==d||null==(l=d.value)?void 0:l.filter(l=>null==l?void 0:l.active),j=B.get("/tab/".concat(p,"/").concat(o));return R((null==j||null==(a=j.data)||null==(s=a.data)||null==(t=s.data)||null==(e=t.products)?void 0:e.length)>0?null==j||null==(r=j.data)||null==(i=r.data)||null==(n=i.data)?void 0:n.products:(null==b||null==(m=b.data)||null==(u=m.data)||null==(c=u.products)?void 0:c.length)>0?null==b||null==(v=b.data)||null==(x=v.data)?void 0:x.products:(null==f||null==(h=f.at(0))?void 0:h.products)||[])},[null==d?void 0:d.value,null==b||null==(t=b.data)||null==(e=t.data)?void 0:e.products,B,p,o]);return(null==d?void 0:d.active)&&(null==d||null==(a=d.value)?void 0:a.length)>0&&(0,s.jsxs)("section",{className:"mx-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3 sm:mb-4 ".concat(u?"flex-wrap gap-4":""),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,s.jsx)("span",{className:"text-lg font-extrabold sm:text-xl",children:"ar"===o?null==d?void 0:d["title-ar"]:null==d?void 0:d["title-en"]}),(null==d?void 0:d.counter)&&(null==(n=(0,y.a2)(null==d||null==(i=d.counter)?void 0:i["date-to"]))?void 0:n.isCountDown)?(0,s.jsx)(k,{t:r,counter:null==d?void 0:d.counter}):null]}),(0,s.jsxs)("div",{className:"flex gap-4 overflow-x-auto",children:[u&&(0,s.jsx)(N,{onChangeTab:l=>h(l),data:null==d?void 0:d.value}),c&&(0,s.jsx)(f.A,{swiper:m,locale:o})]})]}),(0,s.jsx)(w.A,{products:E,set_swiper:v})]})},I=l=>{var e;let{data:t,locale:a}=l,n=null==t||null==(e=t.value)?void 0:e.filter(l=>null==l?void 0:l.active);return(null==t?void 0:t.active)&&(null==n?void 0:n.length)>0&&(0,s.jsx)("section",{className:"flex items-center justify-center gap-1 sm:gap-4",children:null==n?void 0:n.map((l,e)=>{var t;let n=(null==(t=l["img-"+a])?void 0:t.includes("https://"))?l["img-"+a]:"".concat("https://media.backcomfort.com.sa/media","/json/").concat(l["img-"+a]),r
1=(null==n?void 0:n.includes("banner-4-"))?null==n?void 0:n.replace(".jpg",".png"):n;return(0,s.jsx)(u(),{href:(0,i.u)(null==l?void 0:l.url,null==l?void 0:l.type),className:"h-full w-auto relative overflow-hidden rounded-md",children:(0,s.jsx)(d.A,{src:r,loading:"lazy",className:"object-cover w-full h-auto transition-all duration-300 rounded-md cursor-pointer hover:scale-105",alt:l["title-"+a]||"Banner"})},e)})})};var P=!0;let z=l=>{let{home:e,isMobile:t}=l,{locale:i,push:r}=(0,m.useRouter)(),{t:o}=(0,a.Bd)("home");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.A,{title:"en"===i?"Home":"Ø§ÙØ±ÙÙÙØ³ÙØ©"}),(0,s.jsx)("section",{className:"*:my-3 *:sm:my-8 subMainSize",children:(null==e?void 0:e.length)?e.map(l=>(null==l?void 0:l.active)?((l,e,t,a,n,i)=>{switch(l){case"first-section":return(0,s.jsx)("section",{className:"mx-auto ",children:(0,s.jsx)(p,{data:e,locale:a,isMobile:i})},null==e?void 0:e.position);case"categories":return(0,s.jsx)(g.A,{data:e},null==e?void 0:e.position);case"products-list":case"today-offers":var r,o;return(0,s.jsx)(E,{isMulti:(null==e||null==(r=e.value)?void 0:r.length)>1,isSwiper:(null==e||null==(o=e.value)?void 0:o.length)>=1,data:e,locale:a,t,sectionType:l},null==e?void 0:e.position);case"brands":return(0,s.jsx)(j,{data:e,locale:a,t},null==e?void 0:e.position);case"two-banners":return(0,s.jsx)("section",{className:"mx-auto ",children:(0,s.jsx)(I,{data:e,locale:a,push:n})},null==e?void 0:e.position);case"gifts":return(0,s.jsx)("section",{className:"mx-auto ",children:(0,s.jsx)(b,{data:e,locale:a})},null==e?void 0:e.position);default:return null}})(l.key,l,o,i,r,t):null):null})]})}},42936:(l,e,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(25698)}])},57018:(l,e,t)=>{"use strict";t.d(e,{A:()=>o});var s=t(37876),a=t(56029),n=t(78579),i=t(89099),r=t(27888);let o=l=>{let{set_swiper:e,products:t}=l,{locale:o}=(0,i.useRouter)(),{screenWidth:c}=(0,n.A)(),u=c<600;return(0,s.jsx)(r.RC,{dir:"en"===o?"ltr":"rtl",onInit:l=>e(l),autoplay:{delay:2500,disableOnInteraction:!1},loop:!0,spaceBetween:u?3:16,slidesPerView:u?2.5:c<=768?3.5:5,className:"h-full w-[".concat(c,"px]"),children:t.map(l=>{var e;return(0,s.jsx)(r.qr,{className:"sm:max-w-[230px]",children:(0,s.jsx)(a.A,{product:l})},"object"==typeof(null==l?void 0:l.sku)?null==l||null==(e=l.sku)?void 0:e.at(0):null==l?void 0:l.sku)})},o)}},77328:(l,e,t)=>{l.exports=t(29269)},96715:(l,e,t)=>{"use strict";t.d(e,{A:()=>r});var s=t(37876),a=t(77328),n=t.n(a),i=t(89099);t(14232);let r=l=>{var e,t,a,r,o,c,u,d;let{title:m,description:x,image:v=null}=l,p={ar:{backcomfort:"با٠ÙÙ ÙÙØ±Øª",title:"تسÙ٠٠٠با٠ÙÙ ÙÙØ±Øª",desc:"تسÙ٠٠٠با٠ÙÙ ÙÙØ±Øª Ø§ÙØ´Ø±ÙØ© Ø§ÙØ±Ø§Ø¦Ø¯Ø© Ù٠عاÙÙ ÙØ±Ø§Ø³Ù Ø§ÙØ±Ø§ØØ© ÙØ§ÙØ§Ø³ØªØ±Ø®Ø§Ø¡Ø ÙØ±Ø§Ø³Ù اÙÙ Ø³Ø§Ø¬Ø ÙØ±Ø§Ø³Ù Ø§ÙØ¨Ø± ÙØ§ÙرØÙØ§ØªØ ÙØ±Ø§Ø³Ù اÙÙ ÙØªØ¨Ø Ø§ÙØ¶Ù ٠راتب اÙÙÙÙ ÙÙ ÙØªØ¬Ø§Øª اÙÙÙØ§ÙØ© Ø§ÙØ¨Ø¯ÙÙØ© ÙÙ ÙØªØ¬Ø§Øª Ø§ÙØ§Ø·ÙاÙ."},en:{backcomfort:"Back Comfort",title:"Shop from Back Comfort",desc:"Shop from Back Comfort, The leader in the world of recliners and relaxation chairs, massage chairs, outdoor chairs, office chairs, the best sleeping mattresses, fitness, and children's products."}},{locale:h,asPath:f}=(0,i.useRouter)(),j=v||"".concat("https://www.backcomfort.com.sa","/backcomfort.webp"),g="".concat("https://www.backcomfort.com.sa").concat("ar"===h?"":"/en").concat("/"===f?"":f);return(0,s.jsxs)(n(),{children:[(0,s.jsx)("title",{children:m?"".concat(m," | ").concat(null==(e=p[h])?void 0:e.backcomfort):null==(t=p[h])?void 0:t.title}),(0,s.jsx)("link",{rel:"canonical",href:"".concat("https://www.backcomfort.com.sa").concat("en"===h?"/en":"").concat(f)}),(0,s.jsx)("meta",{name:"title",content:m||(null==(a=p[h])?void 0:a.title)}),(0,s.jsx)("meta",{name:"description",content:x||(null==(r=p[h])?void 0:r.desc)}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{property:"og:url",content:g||"https://www.backcomfort.com.sa"}),(0,s.jsx)("meta",{property:"og:title",content:m||(null==(o=p[h])?void 0:o.title)}),(0,s.jsx)("meta",{property:"og:description",content:x||(null==(c=p[h])?void 0:c.desc)}),(0,s.jsx)("meta",{property:"og:image",content:j}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,s.jsx)("meta",{property:"twitter:url",content:g||"https://www.backcomfort.com.sa"}),(0,s.jsx)("meta",{property:"twitter:title",content:m||(null==(u=p[h])?void 0:u.title)}),(0,s.jsx)("meta",{property:"twitter:description",content:x||(null==(d=p[h])?void 0:d.desc)}),(0,s.jsx)("meta",{property:"twitter:image",content:j})]})}}},l=>{l.O(0,[636,593,792],()=>l(l.s=42936)),_N_E=l.O()}]); 2//# sourceMappingURL=index-3aa36c7ffb2758bd.js.map
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.