1import{j as e,r as ze}from"./components-CQjgnEwW.js";import{S as De}from"./sponsored-DHsxZAJ3.js";import{R as T,b as $,a1 as K,aT as Ge,aU as Oe,aV as Ve,aW as qe,T as W,D as Ie,F as U,aO as Je,aX as Ze,ao as Xe,Z as pe,aB as Ye,k as H,x as b,v as te,aY as Ke,z as ne,d as xe,ak as Qe,aZ as et,a_ as oe,a$ as le,b0 as ce,c as Ne,u as ke,E as Fe,b1 as de,M as O,S as tt,$ as at}from"./index-DrxQwwWu.js";import{c as $e,R as Q,o as ue,C as st,g as nt,D as rt,f as _e,b as it,a as Ae,e as Be,A as L,h as ee,s as M,j as Le,r as he,i as ot}from"./Annotation-YMbTzLxs.js";import{s as G}from"./product.module-BtyKcVAS.js";import{r as y}from"./utils-Bdy3dx0D.js";import{f as lt,g as P,u as me}from"./swr-DhJzmMik.js";import{A as J,b as ct}from"./ErrorLayout-B7TkZSS3.js";import{i as dt,c as ut,d as ht,e as pt,S as mt,I as gt,C as ft,b as xt,a as _t,L as yt}from"./SubHeadingElement-DIgAgZ9v.js";import{L as Pe}from"./SearchForm-DXMn3162.js";import{u as bt}from"./useInView-DGBDNTJ5.js";const jt="_bnaContainer_1rnny_1",vt="_bnaBeforeContainer_1rnny_11",Ct="_bnaInputRange_1rnny_21",St="_bnaSliderHandleContainer_1rnny_32",wt="_bnaVertical_1rnny_46",E={bnaContainer:jt,bnaBeforeContainer:vt,bnaInputRange:Ct,bnaSliderHandleContainer:St,bnaVertical:wt};function It({orientation:t="horizontal",beforeImage:a,afterImage:n,onChange:s,displayWidth:i,initialOffset:o=50}){const c=(u,g)=>g.type==="change"?{rangeValue:g.payload}:u,[{rangeValue:l},h]=y.useReducer(c,{rangeValue:o}),p=u=>{h({type:"change",payload:Number(u.target.value)}),s&&s(u)};return e.jsxs("div",{className:$(E.bnaContainer,t==="vertical"?E.bnaVertical:E.bnaHorizontal),children:[t==="vertical"?e.jsx("div",{className:E.bnaBeforeContainer,style:{height:`${l}%`},children:e.jsx(T,{...a,displayWidth:i})}):e.jsx("div",{className:E.bnaBeforeContainer,style:{width:`${l}%`},children:e.jsx("div",{style:{width:`${100+(100-l)/l*100}%`},children:e.jsx(T,{...a,displayWidth:i})})}),e.jsx(T,{...n,displayWidth:i}),e.jsx("input",{type:"range",min:0,max:100,step:.1,value:l,name:"slider",onChange:p,className:E.bnaInputRange}),e.jsx("div",{className:E.bnaSliderHandleContainer,style:t==="vertical"?{top:`${l}%`}:{left:`${l}%`},children:e.jsx("svg",{fill:"#333",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M24,12l-5.7-5.7V11c-3.7,0-9,0-12.6,0V6.3L0,12l5.8,5.7V13c3.6,0,8.9,0,12.5,0v4.7L24,12z"})})})]})}const Nt="_statusBar_ft96i_1",kt="_actionBar_ft96i_10",Ft="_shareButton_ft96i_18",$t="_shareAction_ft96i_22",ae={statusBar:Nt,actionBar:kt,shareButton:Ft,shareAction:$t},At="_floatCricle_1h6gb_1",Bt="_floatCricleOpen_1h6gb_6",ye={floatCricle:At,floatCricleOpen:Bt},Lt=[{icon:e.jsx(Ge,{width:"36",height:"36"}),name:"Facebook",baseUrl:"https://www.facebook.com/sharer/sharer.php?u="},{icon:e.jsx(Oe,{width:"36",height:"36"}),name:"X",baseUrl:"https://x.com/intent/tweet?url="},{icon:e.jsx(Ve,{width:"36",height:"36"}),name:"Whatsapp",baseUrl:"https://api.whatsapp.com/send?text="},{icon:e.jsx(qe,{width:"36",height:"36"}),name:"Pinterest",baseUrl:"http://pinterest.com/pin/create/button/?url="}];function Pt({url:t,open:a,media:n=["Facebook","X","Whatsapp"]}){return e.jsx(y.Fragment,{children:Lt.filter(({name:s})=>n.includes(s)).map(({icon:s,baseUrl:i},o)=>e.jsx("div",{className:$(ye.floatCricle,a&&ye.floatCricleOpen),children:e.jsx("a",{href:`${i}${encodeURIComponent(t)}`,target:"_blank",rel:"noopener","data-layout-position":"socialshareicon",children:e.jsx(K,{children:s})})},o))})}const{Pagination:Tt}=W;function ge({caption:t,pageinationLabel:a,shareIcon:n,onFullScreen:s,fullScreenIcon:i,shareUrl:o,shareMedia:c}){const[l,h]=y.useState(!1),p=()=>{h(g=>!g)},u=e.jsx("div",{className:ae.shareAction,style:{visibility:l?"visible":"hidden"},children:e.jsx(Pt,{url:o,open:l,media:c})});return e.jsxs("div",{className:ae.statusBar,children:[t,e.jsxs("div",{className:ae.actionBar,children:[e.jsx(Tt,{size:"small",children:a}),e.jsxs("div",{className:ae.shareButton,children:[e.jsx("button",{onClick:p,children:e.jsx(K,{children:n})}),u]}),e.jsx("button",{onClick:s,children:e.jsx(K,{children:i})})]})]})}
1const Ht="_promoBox_mj38c_1",Mt="_boxShadow_mj38c_68",Rt="_heading_mj38c_72",Et="_divider_mj38c_81",Ut="_cta_mj38c_91",Z={promoBox:Ht,boxShadow:Mt,heading:Rt,divider:Et,cta:Ut},{Heading:Wt}=W,{SubHeading2:zt,SubHeading4:Dt}=Wt;function Gt({label:t,title:a,ctaLabel:n,ctaUrl:s,children:i}){return e.jsxs("div",{className:$(Z.promoBox,Z.boxShadow),children:[e.jsxs("div",{className:Z.heading,children:[t&&e.jsx(Dt,{children:t}),e.jsx(zt,{children:a}),e.jsx("div",{className:Z.divider,children:e.jsx(Ie,{size:"sm"})})]}),i,n&&s&&e.jsx("div",{className:Z.cta,children:e.jsx(U,{variant:"primary",href:s,children:n})})]})}function Te(t,a,n=3){let s=0;return t?.reduce((i,o,c)=>(i.push({...o,position:c+1}),(c+1)%a==0&&s<n&&(i.push({type:"ads",...o}),s++),i),[])}const Ot="_container_1i9kx_1",Vt="_carouselWrapper_1i9kx_7",qt="_embeddedgalleryContainer_1i9kx_12",Jt="_embeddedgalleryItemContainer_1i9kx_25",Zt="_next_1i9kx_41",Xt="_prev_1i9kx_42",Yt="_actionBar_1i9kx_71",Kt="_navigation_1i9kx_80",Qt="_hidden_1i9kx_85",A={container:Ot,carouselWrapper:Vt,embeddedgalleryContainer:qt,embeddedgalleryItemContainer:Jt,next:Zt,prev:Xt,actionBar:Yt,navigation:Kt,hidden:Qt};function ea({items:t,srcWidth:a,srcHeight:n,leftIcon:s,rightIcon:i,Imu:o,ImuInsertAt:c=2,actionbar:l,slidePosition:h,shareMedia:p,onSlideChange:u=()=>{},onSlideClick:g=()=>{},errorSrc:x}){const r=Te(t,c),m=r.findIndex(S=>S.position===h),{next:j,prev:f,position:d,hasReachedEnd:v,hasSlideMoved:_,refPassthrough:w,TouchHandlers:I,goto:N}=$e(r.length,1),[R,z]=y.useState(!1),k=S=>S.currentTarget.closest("[data-gallery-id]")?.getAttribute("data-gallery-id")??"";y.useEffect(()=>{r[d]?.type==="ads"?z(!0):z(!1)},[r,d]),y.useEffect(()=>{m>0&&N(m)},[m,N]);const D=e.jsxs("div",{className:A.navigation,children:[_&&e.jsx("button",{className:A.prev,onClick:S=>{f(),u(d-1,"prev",k(S))},children:e.jsx(K,{children:s})}),!v&&e.jsx("button",{className:A.next,onClick:S=>{j(),u(d+1,"next",k(S))},children:e.jsx(K,{children:i})})]});return e.jsxs("div",{className:A.container,children:[e.jsx("div",{className:$(R&&A.hidden),children:r[d]?.title}),e.jsxs("div",{className:A.carouselWrapper,children:[e.jsx("div",{className:A.embeddedgalleryContainer,style:{aspectRatio:a/n},...I,ref:w,children:r?.map((S,fe)=>e.jsx("div",{className:A.embeddedgalleryItemContainer,style:{aspectRatio:a/n},onClick:We=>{g(d,"click",k(We))},children:S.type==="ads"?e.jsx(y.Fragment,{children:o}):e.jsxs(e.Fragment,{children:[S.image&&e.jsx(T,{...S.image,errorSrc:x,fill:"contain",displayWidth:a}),S.videoUrl&&e.jsx("div",{style:{width:S.videoUrl.includes("instagram")||S.videoUrl.includes("tiktok")||S.videoUrl.includes("youtube.com/shorts")?"fit-content":"calc(100% - 100px)"},children:e.jsx(Q,{src:S.videoUrl,loading:"lazy"})})]})},fe))}),D]}),e.jsx("div",{className:$(A.actionBar,R&&A.hidden),children:e.jsx(ge,{caption:r[d]?.caption,pageinationLabel:`${r[d]?.position??""}/${t.length}`,shareIcon:l.shareIcon,onFullScreen:()=>l.onFullScreen(r[d]?.position||0,"click"),fullScreenIcon:l.fullScreenIcon,shareUrl:r[d]?.shareUrl&&r[d]?.position?`${r[d].shareUrl}&eslide=${r[d].position}`:"",shareMedia:p})}),e.jsxs("div",{className:$(R&&A.hidden),children:[r[d]?.description,r[d]?.appendedGalleryItem]})]})}const ta="_embeddedImageContainer_114ga_1",re={embeddedImageContainer:ta};function aa({heading:t,caption:a,actionBar:n,crop:s,errorSrc:i}){return e.jsxs("div",{className:re.embeddedImageContainer,children:[t,e.jsx("button",{onClick:n.onFullScreenImage,children:e.jsx(T,{...s,loading:"lazy",errorSrc:i,displayWidth:655})}),e.jsxs("div",{className:re.statusBar,children:[a&&e.jsx("div",{children:a}),e.jsx("div",{className:re.actionBar,children:e.jsx(ge,{caption:n.caption,pageinationLabel:n.pageinationLabel,shareIcon:n.shareIcon,onFullScreen:n.onFullScreen,onFullScreenImage:n.onFullScreenImage,fullScreenIcon:n.fullScreenIcon,shareUrl:n.shareUrl,shareMedia:n.shareMedia})})]})]})}const sa="_lightbox_1hvrv_3",na="_closeButton_1hvrv_19",ra="_embeddedgalleryContainer_1hvrv_49",ia="_embeddedgalleryItemContainer_1hvrv_56",oa="_next_1hvrv_73",la="_prev_1hvrv_74",ca="_videoWrapper_1hvrv_103",da="_lightBoxNavigation_1hvrv_118",ua="_descriptionContainer_1hvrv_122",ha="_paginationLabel_1hvrv_147",B={lightbox:sa,closeButton:na,embeddedgalleryContainer:ra,embeddedgalleryItemContainer:ia,next:oa,prev:la,videoWrapper:ca,lightBoxNavigation:da,descriptionContainer:ua,paginationLabel:ha},{Body:pa,Pagination:ma}=W;function ga({isOpen:t,items:a,ImuInsertAt:n=2,gotoItem:s,toggle:i,onSlideChange:o=()=>{},onSlideClick:c=()=>{}}){const l=Te(a,n),{next:h,prev:p,refPassthrough:u,position:g,goto:x,TouchHandlers:r}=$e(l.length,1,!1),[m,j]=y.useState(!1);y.useEffect(()=>{l[g]?.type==="ads"?j(!0):j(!1)},[l,g]),y.useEffect(()=>{x(l.findIndex(_=>_.position===s))},[s,t]),y.useEffect(()=>{const _=w=>{w.key==="Escape"&&(w.preventDefault(),t&&i())};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[t,i]);const f=e.jsxs(e.Fragment,{children:[g>0&&e.jsx("button",{className:B.prev,onClick:()=>{p(),o(g-1,"prev")},children:e.jsx(J,{direction:"left",size:54})}),g<l.length-1&&e.jsx("button",{className:B.next,onClick:()=>{h(),o(g+1,"next")},children:e.jsx(J,{direction:"right",size:54})})]}),d=`${l[g]?.position??"1"}/${a.length}`,v=l[g]?.targetUrl?e.jsx("a",{href:l[g]?.targetUrl,children:l[g]?.caption}):l[g]?.caption;return e.jsxs("div",{style:{display:t?"block":"none"},children:[e.jsx("div",{className:B.lightbox,children:e.jsxs("div",{className:B.lightboxContent,onClick:_=>_.stopPropagation(),children:[e.jsx("button",{onClick:()=>{i()},className:B.closeButton,children:e.jsx(Je,{size:33})}),e.jsx("div",{style:{width:window.innerWidth},className:B.embeddedgalleryContainer,...r,ref:u,children:l?.map((_,w)=>e.jsx("div",{className:B.embeddedgalleryItemContainer,onClick:()=>{c(g,"click")},children:e.jsx("div",{className:B.videoWrapper,children:_.type==="ads"?e.jsx(Ze,{}):_.videoUrl?e.jsx(Q,{src:_.videoUrl,loading:"lazy"}):e.jsx(Xe,{src:_.image?.src||"",alt:_.alt,width:"100%",height:"100%",objectFit:"contain"})})},w))}),e.jsx("div",{className:B.lightBoxNavigation,children:f})]})}),e.jsxs("div",{className:B.descriptionContainer,style:{visibility:m?"hidden":"visible"},children:[e.jsx(ma,{size:"large",children:e.jsx("span",{className:B.paginationLabel,children:d})}),e.jsx(pa,{children:v})]})]})}const fa="_container_91bjk_1",xa="_detailed_91bjk_35",_a="_image_91bjk_76",ya="_content_91bjk_107",ba="_header_91bjk_114",ja="_name_91bjk_138",va="_price_9
11bjk_164",Ca="_savings_91bjk_171",Sa="_discountblock_91bjk_178",wa="_original_91bjk_183",Ia="_discount_91bjk_178",Na="_discountLabel_91bjk_191",ka="_deals_91bjk_202",Fa="_reviews_91bjk_232",$a="_pros_91bjk_255",Aa="_cons_91bjk_268",Ba="_readmore_91bjk_294",La="_credit_91bjk_304",C={container:fa,detailed:xa,image:_a,content:ya,header:ba,name:ja,price:va,savings:Ca,discountblock:Sa,original:wa,discount:Ia,discountLabel:Na,deals:ka,reviews:Fa,pros:$a,cons:Aa,readmore:Ba,credit:La},Pa=e.jsx("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.27317 13L12.3251 16.3766L17.7277 9.62333M13.0004 22.4545C11.7589 22.4545 10.5294 22.21 9.38235 21.7348C8.23527 21.2597 7.19301 20.5633 6.31507 19.6853C5.43713 18.8074 4.74072 17.7651 4.26558 16.6181C3.79045 15.471 3.5459 14.2415 3.5459 13C3.5459 11.7584 3.79045 10.5289 4.26558 9.38186C4.74072 8.23478 5.43713 7.19252 6.31507 6.31458C7.19301 5.43665 8.23527 4.74023 9.38235 4.26509C10.5294 3.78996 11.7589 3.54541 13.0004 3.54541C15.5079 3.54541 17.9127 4.54151 19.6858 6.31458C21.4589 8.08765 22.455 10.4925 22.455 13C22.455 15.5075 21.4589 17.9123 19.6858 19.6853C17.9127 21.4584 15.5079 22.4545 13.0004 22.4545Z",stroke:"#578AA4",strokeWidth:"2"})}),Ta=e.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M13.0004 22.4545C11.7589 22.4545 10.5294 22.21 9.38235 21.7348C8.23527 21.2597 7.19301 20.5633 6.31507 19.6853C5.43713 18.8074 4.74072 17.7651 4.26558 16.6181C3.79045 15.471 3.5459 14.2415 3.5459 13C3.5459 11.7584 3.79045 10.5289 4.26558 9.38186C4.74072 8.23478 5.43713 7.19252 6.31507 6.31458C7.19301 5.43665 8.23527 4.74023 9.38235 4.26509C10.5294 3.78996 11.7589 3.54541 13.0004 3.54541C15.5079 3.54541 17.9127 4.54151 19.6858 6.31458C21.4589 8.08765 22.455 10.4925 22.455 13C22.455 15.5075 21.4589 17.9123 19.6858 19.6853C17.9127 21.4584 15.5079 22.4545 13.0004 22.4545Z",stroke:"#F37053",strokeWidth:"2"}),e.jsx("path",{d:"M10 16L13 13L16 16M16 10L12.9994 13L10 10",stroke:"#F37053",strokeWidth:"2",strokeLinecap:"square"})]});function He({id:t,name:a,header:n,image:s,dealsSource:i,detailed:o=!1,pros:c,cons:l,discount:h,hidePriceInButton:p,showBestPrice:u}){return e.jsxs("div",{className:$(C.container,o&&C.detailed),children:[e.jsx("a",{id:o?`product-${t}`:void 0,href:o?void 0:`#product-${t}`,onClick:o?void 0:ue,className:$(C.image,o&&C.detailed),children:s&&e.jsx(T,{...s,fill:"contain",fillPosition:"center top",fillAspectRatio:1,displayWidth:o?270:165})}),e.jsx("div",{className:C.content,children:o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:C.header,children:n}),e.jsx("div",{className:C.name,children:a})]}):e.jsxs("a",{href:`#product-${t}`,onClick:ue,children:[e.jsx("div",{className:C.header,children:n}),e.jsx("div",{className:C.name,children:a}),e.jsx("div",{className:C.readmore,children:"Read more"})]})}),o&&e.jsx("div",{className:C.price,children:u?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:C.savings,children:i[0]?.discountPrice}),e.jsxs("div",{className:C.discountblock,children:[e.jsx("p",{className:C.original,children:i[0]?.original}),e.jsx("p",{className:C.discount,children:i[0]?.discount&&`${i[0]?.discount} OFF`})]})]}):h&&e.jsx("div",{className:C.discountLabel,children:h})}),e.jsx("div",{className:C.deals,children:i.map((g,x)=>e.jsxs(U,{variant:"secondary",href:g.url,rel:"nofollow",target:"_blank",children:[!p&&`${g.discountPrice||"Shop"} at `,g.name]},x))}),s?.credit&&o&&e.jsx("div",{className:C.credit,children:s.credit}),o&&e.jsxs("div",{className:C.reviews,children:[c&&c.length!==0&&e.jsxs("div",{className:C.pros,children:[e.jsxs("p",{children:[e.jsx("span",{children:Pa})," PROS"]}),e.jsx("ul",{children:c.map((g,x)=>e.jsx("li",{children:g},x))})]}),l&&l.length!==0&&e.jsxs("div",{className:C.cons,children:[e.jsxs("p",{children:[e.jsx("span",{children:Ta})," CONS"]}),e.jsx("ul",{children:l.map((g,x)=>e.jsx("li",{children:g},x))})]})]})]})}const Ha="_relatedArticle_zkaop_1",Ma="_itemContainer_zkaop_20",Ra="_imageContainer_zkaop_63",Ea="_textContainer_zkaop_71",Ua="_headerText_zkaop_113",Wa="_teaser_zkaop_129",V={relatedArticle:Ha,itemContainer:Ma,imageContainer:Ra,textContainer:Ea,headerText:Ua,teaser:Wa},za=({url:t,title:a,image:n,displayImage:s,imageErrorSrc:i,hasRelatedPrefix:o})=>{const c=n?.crops?.landscape||n?.crops?.original,l=s&&c&&e.jsx("span",{className:V.imageContainer,children:e.jsx(T,{...c,displayWidth:225,errorSrc:i})});return e.jsxs("a",{href:t,className:V.itemContainer,children:[l,e.jsxs("span",{className:V.textContainer,children:[o&&e.jsx("b",{children:"Related: "}),a]})]})},{Heading:Da}=W,Ga=({stories:t,displayImage:a=!0,hasRelatedPrefix:n=!0,asLatestTeaser:s=!1,cardLayout:i,headerText:o,headerTextZH:c,htmlAnchor:l,imageErrorSrc:h})=>{const p=u=>i?e.jsx(st,{...u,variant:i.defaultVariant,mobileUpVariant:i.mobileUp.defaultVariant,sections:u.sections??[],path:u.url,image:{crops:u.image?.crops??{},alt:u.title},CustomHeadingElement:"div"}):s?e.jsx("div",{className:V.teaser,children:e.jsx(Pe,{...u,mode:"landscape",sections:u.sections??[],path:u.url,image:{crops:{landscape:u.image?.crops?.portrait},alt:u.title},CustomHeadingElement:"div"})}):e.jsx(za,{...u,displayImage:a,hasRelatedPrefix:n,imageErrorSrc:h});return e.jsxs("div",{className:V.relatedArticle,id:l,children:[o&&e.jsx("div",{className:V.headerText,children:c?e.jsx(Da.SubHeading3,{nameZH:c,children:o}):o}),t.map((u,g)=>e.jsx(p,{...u},g))]})},Oa="_title_lwxdk_1",Va="_expanded_lwxdk_22",qa="_list_lwxdk_28",Ja="_listItem_lwxdk_71",Za="_link_lwxdk_85",X={title:Oa,expanded:Va,list:qa,listItem:Ja,link:Za};function Xa({title:t,items:a,initiallyExpanded:n=!0,prenumbered:s}){const[i,o]=y.useState(n);return e.jsxs("section",{className:$(i&&X.expanded),children:[e.jsxs("button",{className:X.title,onClick:()=>o(!i),children:[e.jsx(pe,{children:t}),e.jsx(J,{size:18,direction:"down"})]}),e.jsx("ol",{className:X.list,children:a.map((c,l)=>e.jsx("li",{className:X.listItem,children:e.jsxs("a",{className:X.link,href:c.href,onClick:ue,children:[s?"":`${l+1}. `,c.label]})},l))})]})}const Ya=t=>`https://players.brightcove.net/${Ye.accountId}/default_default/index.html?videoId=${t.additionalFields.brightcoveId?.value}
1`,Ka=t=>{const a=t.additionalFields.youtubeId?.value;return a?.match(/^https?:\/\//)?a:`https://www.youtube.com/embed/${a}?enablejsapi=1`},Qa=t=>{if(t?.type==="embed")return t.additionalFields.uri?.value;if(t?.type==="brightcove_video")return Ya(t);if(t?.type==="youtube_video")return Ka(t)};function es(t){if(!t)return;let a;try{a=JSON.parse(t)}catch(h){console.error("Failed to parse dynamic iframe value"),console.error(h);return}if(!nt(a)){console.error("Invalid dynamic iframe value");return}const n=h=>{if(h){if(!h.includes("/")){const g=Number(h.trim());return isNaN(g)||g<=0?void 0:g}const[p,u]=h.split("/").map(Number);return u===0||typeof p!="number"||isNaN(p)||typeof u!="number"||isNaN(u)?void 0:p/u}},s=a.data.find(h=>h.name==="src")?.value;if(!s)return;const i=a.data.find(h=>h.name==="tag")?.value,o=a.data.find(h=>h.name==="data-aspectRatio")?.value,c=a.data.find(h=>h.name==="data-mobile-aspectRatio")?.value,l=a.data.find(h=>h.name==="padding-bottom")?.value;return{src:s,title:i,forceAspectRatio:n(c),mobileUp:{forceAspectRatio:n(o)},paddingBottom:l}}function ts(t){return!!t&&Object.prototype.hasOwnProperty.call(t,"id")}const Me=new rt(async t=>{const a=await lt(`/_plat/api/product?id=${t.join(",")}`);return a?.results?t.map(n=>a.results?.find(s=>s.id===n&&ts(s))):t.map(()=>null)},{maxBatchSize:10}),Re=(t,a)=>t.map(s=>{const i=a&&a.find(o=>o.asin===s.dynamicPricing);return{...s,...i&&{original:_e(i.originalPrice),discount:it(i.discountPercentage)?.toString(),discountPrice:_e(i.discountPrice)},url:P(s.url)}});function as({element:t,allElements:a}){const[n,s]=y.useState(!1),i=a.filter(x=>x.relation?.type==="product").map(x=>x.relation?.id),{data:o,isLoading:c}=H(i,x=>Me.loadMany(x).then(r=>r.map(m=>m instanceof Error?null:m))),l=o?.flatMap(x=>x?.dealsSource.map(r=>r.dynamicPricing)).filter(x=>x),{data:h}=H(l,()=>l&&Ae.loadMany(l).then(Be)),p=t.additionalFields.items_per_page?.value||!1,u=p&&o?.length&&o.length>p,g=()=>{s(!n)};return e.jsx(y.Fragment,{children:!c&&e.jsx("div",{className:G.bodyContainer,children:e.jsxs("div",{className:G.indexContainer,children:[e.jsx("h2",{className:G.indexTitle,children:t.additionalFields.title?.value}),e.jsx("div",{className:G.indexItemContainer,children:o?.map((x,r)=>p&&r>p-1&&!n?null:e.jsx("div",{className:G.indexItem,children:x&&e.jsx(He,{...x,cons:void 0,pros:void 0,discount:"",dealsSource:Re(x.dealsSource,h),hidePriceInButton:b.productContent?.hidePriceInButton})},r))}),u&&e.jsxs("button",{onClick:()=>{g()},style:{height:"54px"},children:[n?"SHOW LESS":"SHOW MORE",e.jsx(J,{direction:n?"up":"down",size:16.71,strokeWidth:1})]})]})})})}function ss(t){const{data:a,isLoading:n}=H(t.element.relation?.id,c=>Me.load(c)),s=a?.dealsSource.map(c=>c.dynamicPricing).filter(Boolean),{data:i}=H(s?.length?s:null,async c=>Ae.loadMany(c).then(Be)),o=c=>{if(!(b.productContent?.hideProsCons||!c))return c.map((l,h)=>e.jsx(L,{element:l},h))};return!n&&a&&e.jsx("div",{className:G.detailsContainer,children:e.jsx(He,{...a,dealsSource:Re(a.dealsSource,i),pros:o(a.pros),cons:o(a.cons),detailed:!0,hidePriceInButton:b.productContent?.hidePriceInButton,showBestPrice:b.productContent?.showBestPrice})})}const ns=({element:t,bodyMaxWidth:a})=>{const n=t.children?.find(l=>l.type==="image_compare_before"),s=t.children?.find(l=>l.type==="image_compare_after");if(!n||!s)return null;const i=ee(n.relation,"original"),o=ee(s.relation,"original");if(!i||!o){console.error("Image Compare Pictures Missing"),console.log(n,s);return}const c=n.additionalFields;return e.jsx(It,{orientation:c.orientation?.value==="Vertical"?"vertical":"horizontal",beforeImage:i,afterImage:o,displayWidth:a,initialOffset:c.offsetPercentage?.value!==void 0?+c.offsetPercentage.value:void 0})};function rs({element:t,variant:a,bodyMaxWidth:n}){const s=ee(t.relation,"original");return e.jsx(U,{variant:a,"data-event-label":"image",href:P(t.additionalFields.destinationUrl?.value??""),target:"_blank",children:s?e.jsx(T,{...s,displayWidth:n,errorSrc:te.landscape.src,loading:"lazy"}):"Go"})}function is({element:t,variant:a,bodyMaxWidth:n}){if(t.type==="shop_button"){const s=t.additionalFields,i=s.textToDisplay?.value??s.name?.value;return e.jsx("div",{children:e.jsx(U,{variant:a,"data-event-label":i,href:P(s.destinationUrl?.value??s.websiteLink?.value??""),target:"_blank",children:i})})}return t.children?.map((s,i)=>{if(s.type==="call_to_action_image")return e.jsx(rs,{element:s,variant:a,bodyMaxWidth:n},i);if(s.type==="call_to_action_text"){const o=s.additionalFields,c=o.textToDisplay?.value??o.name?.value;return e.jsx("span",{className:M.buttonInlineWrapper,children:e.jsx(U,{variant:a,"data-event-label":c,href:P(o.destinationUrl?.value??o.websiteLink?.value??""),target:"_blank",children:c})},i)}return null})}const os="_filteredStoryWidget_12xqt_1",ls="_filteredStoryColumn_12xqt_24",cs="_filteredStoryNews_12xqt_35",ds="_filterStorySectionName_12xqt_53",us="_filteredStoryViewMore_12xqt_80",q={filteredStoryWidget:os,filteredStoryColumn:ls,filteredStoryNews:cs,filterStorySectionName:ds,filteredStoryViewMore:us};function hs(t){if(!t)return null;try{return JSON.parse(t)}catch(a){return console.error("Error parsing JSON",{value:t},a),null}}const ps=(t,a)=>{let n="blogStory,featureStory,galleryStory,reviewStory,techNews,videoStory",s=15;a==="articles"&&(n="blogStory,featureStory,galleryStory,reviewStory",s=8),a==="news"&&(n="techNews",s=8),a==="products"&&(n="productsStory",s=6);const{data:i}=H(`/_plat/api/teaser/latest?${[t&&`tags=${encodeURIComponent(t)}`,n&&`storyTypes=${encodeURIComponent(n)}`,`size=${s}
1`].filter(Boolean).join("&")}`);return i?.results?i.results:null},ms=({children:t})=>{const a=[],n=[];return t.forEach(s=>{if(s.type==="filtered_listing_info"){const o=(hs(s.additionalFields.filteredListingType?.value||null)?.tagID||"").replace(Ke.tagIdPrefix,""),c=s.additionalFields.contentWidgetContentType?.value||"allarticles",l=s.additionalFields.contentWidgetCaption?.value,h=ps(o,c),p={type:c,caption:l||"",stories:h||[],url:c==="news"?`/tag/${o}/news`:`/tag/${o}`};s.additionalFields.columnID?.value===2?n.push(p):a.push(p)}}),e.jsxs("div",{className:q.filteredStoryWidget,children:[be(a,q.filteredStoryColumn),be(n,q.filteredStoryColumn)]})},be=(t,a)=>t.length<1?null:e.jsx("div",{className:a,children:t.map((n,s)=>n.stories&&n.stories.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:q.filterStorySectionName,children:n.caption}),n.stories.map((i,o)=>n.type==="news"?e.jsx("a",{href:i.path,className:q.filteredStoryNews,children:i.title},o):e.jsx(Pe,{...i,mode:"landscape",portraitImageWidth:xe.portraitImageWidth,landscapeImageWidth:xe.landscapeImageWidth,placeholders:te,displayPublishDate:ne.publishDate,mobileMode:ne.mobileMode,CustomHeadingElement:"h2",dateAfter:ne.dateAfter},o)),n.url&&e.jsx("div",{className:q.filteredStoryViewMore,children:e.jsx("a",{href:n.url,children:"» View more"})})]},s))}),Ee=({gotoItem:t,isOpen:a,close:n,elements:s,ImuInsertAt:i=2})=>{if(!s.length||!a)return null;const o=["gallery_items_image","gallery_items_custom_html"],c=s.filter(p=>o.includes(p.type)).map(p=>{const u=Le([p].concat(p.children||[])),x=p.children?.find(j=>j.type==="embed")?.additionalFields.uri?.value,r=()=>{const j={srcWidth:0,srcHeight:0};return x&&(x.includes("youtube.com/shorts/")||x.includes("instagram")?(j.srcWidth=4,j.srcHeight=5):x.includes("tiktok")?(j.srcWidth=0,j.srcHeight=0):(j.srcWidth=16,j.srcHeight=9)),j},m=p.type==="gallery_items_image"?ee(p.relation,"original"):void 0;return{caption:u?.title?.value||"",targetUrl:u?.targetUrl?.value,videoUrl:x,image:m,shareUrl:"",alt:m?.alt||"",...r()}}),l=(p,u)=>{window.postMessage(`lightbox-change=${p}`),window.postMessage({gallery:{action:u,slide:p}})},h=(p,u)=>{window.postMessage({gallery:{action:u,slide:p}})};return ze.createPortal(e.jsx(ga,{items:c,gotoItem:t,isOpen:a,toggle:n,ImuInsertAt:i,onSlideChange:l,onSlideClick:h}),document.body)};function Ue({ids:t,htmlAnchor:a}){const{data:n}=H(`/_plat/api/teaser/by_id?ids=${t.join(",")}`);if(!n)return null;const s=n.results?.map(i=>{const{id:o,title:c,path:l,image:h,description:p,sections:u}=i;return{id:o||"",title:c,url:ct(l,Qe.story?.related||et),image:h,description:p,sections:u}}).sort((i,o)=>t.indexOf(i.id)-t.indexOf(o.id));return s?.length?e.jsx(Ga,{stories:s,displayImage:!0,headerText:b.relatedArticle?.headerText,headerTextZH:b.relatedArticle?.headerTextZH,hasRelatedPrefix:b.relatedArticle?.hasRelatedPrefix,imageErrorSrc:te.landscape.src,htmlAnchor:a,asLatestTeaser:b.relatedArticle?.asLatestTeaser,cardLayout:b.relatedArticle?.cardLayout}):null}const je=({info:t})=>{const a=t?.additionalFields.title?.value;return a?e.jsx(oe,{children:t.additionalFields.targetUrl?.value?e.jsx("a",{href:P(t.additionalFields.targetUrl.value),className:M.externalLinks,rel:"noopener nofollow noreferrer",target:"_blank",children:a}):a}):null},{Body:gs,Disclaimer:ve}=W,Ce=y.forwardRef(function({info:a,responsiveIframe:n,currentItem:s,total:i,fullScreen:o,fullScreenImage:c,path:l},h){const p=a?.type==="gallery_items_image"?a.relation:void 0,u=ee(p,"original"),g=`${s}${b.gallery?.paginationSeparator}${i}`,x=(r,m)=>m&&r&&!m.startsWith(r)&&`${r}${m}`||m;return e.jsxs("div",{className:M.galleryImage,ref:h,children:[n?e.jsxs("div",{className:M.embeddedHtmlContainer,children:[e.jsx(je,{info:a}),n,e.jsx(ge,{caption:e.jsx(ve,{children:x(b.caption?.prefix,a?.additionalFields.credit?.value)}),pageinationLabel:g,onFullScreen:o,onFullScreenImage:c,fullScreenIcon:ce,shareIcon:le,shareUrl:a?.additionalFields.targetUrl?.value??"/",shareMedia:b.gallery?.galleryItemShareMedia})]}):u?e.jsx(aa,{crop:u,errorSrc:te.landscape.src,heading:e.jsx(je,{info:a}),actionBar:{caption:e.jsx(ve,{children:x(b.caption?.prefix,a?.additionalFields.credit?.value||p?.fields.credit)}),pageinationLabel:g,onFullScreen:o,onFullScreenImage:c,fullScreenIcon:ce,shareIcon:le,shareUrl:`${Ne.address}${l}?slide=${s}`,shareMedia:b.gallery?.galleryItemShareMedia}},s):null,a?.additionalFields.description?.value&&e.jsx(gs,{children:e.jsx(L,{element:a.additionalFields.description})})]})}),fs=({element:{children:t},path:a,startcount:n=0})=>{const[s,i]=ke(!1),[o,c]=y.useState(0);Fe(s);const l=y.useRef(null),[h]=me(),p=Number.parseInt(h.get("slide")??"");if(y.useEffect(()=>{l.current&&l.current.scrollIntoView({behavior:"auto",block:"start"})},[p]),!t)return null;let u=1,g=1,x=[],r=O.galleryInsertMax;const m=O.galleryInsertPos,j=t.filter(d=>d.type==="gallery_items_image"||d.type==="gallery_items_custom_html").length;function f(d,v){c(d),i(),v=="image"?window.postMessage(`lightbox-open-image=${d}`):window.postMessage(`lightbox-open=${d}`)}return e.jsxs(y.Fragment,{children:[t.map((d,v)=>{const _=[];let w=!1;if(d.type==="gallery_items_custom_html"){if(!d.children)return null;const I=g++,N=d.children.find(k=>k.type==="gallery_items_custom_html_info"),z=d.children.find(k=>k.type==="embed")?.additionalFields.uri?.value?.replace(/"/g,"")||"";_.push(e.jsx(Ce,{info:N,responsiveIframe:e.jsx(Q,{title:N?.additionalFields.description?.value??"",src:z,embedPathAmends:{"www.instagram.com":"captioned/"},loading:"lazy"}),currentItem:u++,total:j,fullScreen:()=>{f(I,"click")},path:P(a),ref:p===v+1?l:null},v)),w=!0}else if(d.type==="gallery_items_image"){const I=g++;_.push(e.jsx(Ce,{info:d,currentItem:u++,total:j,fullScreen:()=>{f(I,"click")},fullScreenImage:()=>{f(I,"image")},path:P(a),ref:p===v+1?l:null},v)),w=!0}else if(d.type==="call_to_action"||d.type==="shop_button"){const N=(d.type==="call_to_action"&&d.children?d.children[0]:d).additionalFields;_.push(e.jsx("div",{className:M.buttonInlineWrapper,children:e.jsx(U,{variant:b.buttonVariant||"secondary",href:P(N.destinationUrl?.value??N.websiteLink?.value??"#"),target:"_blank",children:N.textToDisplay?.value??N.name?.value})},v))}else d.type==="relation"&&d.relation?.id?(x.push(d.relation.id),t[v+1]?.type!=="relation"&&(_.push(e.jsx(Ue,{ids:x},v)),x=[])):console.error(`[Gallery] Unhandled gallery_item ${d.type}`,d);if(w){const I=u-2+n;I>0&&I%m==0&&r>0&&(r-=1,_.splice(-1,0,e.jsx(de,{},"ad-1")))}return _}),e.jsx(Ee,{isOpen:s,elements:t,gotoItem:o,close:i})]})},xs="_nested_1lq60_1",_s={nested:xs},ys=({children:t})=>e.jsx("div",{className:_s.nested,children:t}
1),bs="_productSpecsContainer_19wcf_1",js="_productSpecsTable_19wcf_13",vs="_productSpecsTableHeader_19wcf_78",Cs="_productSpecsCaption_19wcf_84",Ss="_productSpecScrollable_19wcf_89",Y={productSpecsContainer:bs,productSpecsTable:js,productSpecsTableHeader:vs,productSpecsCaption:Cs,productSpecScrollable:Ss},ws=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"65",viewBox:"0 0 64 65",fill:"none",children:e.jsx("path",{d:"M19 59.334L44.9615 32.334L19 5.33398",stroke:"black",strokeWidth:"2",strokeLinecap:"round"})});function Is({productSpecs:t,caption:a,hideProductNames:n}){const s=()=>{const l=b.productStorySpecifications||{},h=[];if(!n){const p=t?.map(u=>u.name)||[];h.push(["",...p])}return Object.entries(l).forEach(([p,u])=>{const g=t?.map(x=>x.specs?.find(r=>r.key===p)?.value||"")||[];g.some(Boolean)&&h.push([u,...g])}),h},i=(l,h)=>!n&&l===0||h===0,o=s(),{Heading:c}=W;return e.jsxs("div",{className:Y.productSpecsContainer,children:[ws,e.jsxs("div",{className:Y.productSpecScrollable,children:[e.jsx("div",{className:Y.productSpecsCaption,children:a}),e.jsx("table",{className:Y.productSpecsTable,children:e.jsx("tbody",{children:o.map((l,h)=>e.jsx("tr",{className:$(!n&&h===0&&Y.productSpecsTableHeader),children:l.map((p,u)=>i(h,u)?e.jsx("th",{children:e.jsx(c.SubHeading2,{children:p})},u):e.jsx("td",{children:p},u))},h))})})]})]})}const Ns=({ids:t,element:a})=>{const{data:n,isLoading:s}=H(t?`/_plat/api/teaser/by_id?ids=${t}`:null);if(!n?.results||!a||n.results.length===0)return null;const i=a.map(c=>c.type==="product_comparison_info"&&c.additionalFields.caption?.value||"").join(" "),o=n.results.map(c=>({name:c.title,specs:c.specification}));return!s&&e.jsx(Is,{caption:i,hideProductNames:!1,productSpecs:o})};function ks({element:t}){const a=t.children?.find(o=>o.type==="promo_box_info")?.additionalFields,n=a?.promoBoxLabelName?.value?.trim().toLowerCase(),i=(n?Object.entries(b.promoBox?.variants??{}).find(([o])=>o.trim().toLowerCase()===n)?.[1]:void 0)??Gt;return e.jsx(i,{label:a?.promoBoxLabelName?.value,title:a?.promoBoxHeading?.value,ctaLabel:a?.ctaLabel?.value,ctaUrl:a?.ctaURL?.value,children:t.children?.filter(o=>o.type==="paragraph").map((o,c)=>e.jsx(pe,{children:e.jsx(L,{element:o})},c))})}const Fs=({galleryItem:t,buttonVariant:a})=>{if(t.type==="call_to_action"||t.type==="shop_button"){const s=(t.type==="call_to_action"&&t.children?t.children[0]:t).additionalFields;return e.jsx("span",{className:M.buttonInlineWrapper,children:e.jsx(U,{variant:a||"secondary",href:P(s.destinationUrl?.value??s.websiteLink?.value??""),target:"_blank",children:s.textToDisplay?.value??s.name?.value})})}return null},$s=({description:t})=>e.jsx("div",{className:M.embedDescription,children:e.jsx(pe,{children:e.jsx(L,{element:t})})}),As="_embeddedGalleryHeading_g3ela_1",Bs="_embeddedGalleryCaption_g3ela_17",se={embeddedGalleryHeading:As,embeddedGalleryCaption:Bs},Ls=({title:t,targetUrl:a})=>a?e.jsx("div",{className:se.embeddedGalleryHeading,children:e.jsx(oe,{children:t&&(a.value?e.jsx("a",{href:P(a.value),
1className:M.externalLinks,rel:"noopener nofollow noreferrer",target:"_blank",children:e.jsx(L,{element:t})}):e.jsx(L,{element:t}))})}):e.jsx("div",{className:se.embeddedGalleryHeading,children:e.jsx(oe,{children:t&&e.jsx(L,{element:t})})}),Ps=t=>t?.type==="gallery_items_custom_html",Ts=t=>t?.type==="gallery_items_image",Hs=({elements:t,id:a,path:n})=>{const[s,i]=ke(!1),[o,c]=y.useState(0);Fe(s);const l=y.useRef(null),[h]=me(),p=h.get("egallery"),u=Number.parseInt(h.get("eslide")??""),g=t.bodyElements[0]?.children?.reduce((f,d,v,_)=>{const w=Ps(d)?d:void 0,I=Ts(d)?d:void 0,N=w||I,R=_.length>v+2?_[v+1]:null;if(!N)return f;const z=w&&w.children?.find(S=>S.type==="embed")?.additionalFields.uri?.value,k=I&&he(I,"original"),D=Le(w&&w.children?w.children:[N]);return[...f,{title:e.jsx(Ls,{title:D?.title,targetUrl:D?.targetUrl}),description:D?.description?.value?e.jsx($s,{description:D.description}):null,alt:k&&k.alt||"",caption:e.jsx("div",{className:se.embeddedGalleryCaption,children:k&&k.credit}),videoUrl:z,image:k||void 0,shareUrl:`${Ne.address}${n}?egallery=${a}`,appendedGalleryItem:R&&e.jsx(Fs,{galleryItem:R,buttonVariant:b.buttonVariant})}]},[]);y.useEffect(()=>{l.current&&p&&p===a&&l.current.scrollIntoView({behavior:"auto",block:"start"})},[p,a]),y.useEffect(()=>{j(a)});function x(f){c(f),i(),window.postMessage(`lightbox-open=${f}`)}const r=(f,d,v)=>{window.postMessage({embeddedgallery:{action:d,slide:f,target:v}})},m=(f,d,v)=>{window.postMessage({embeddedgallery:{action:d,slide:f,target:v}})},j=f=>{window.postMessage(`embeddedgallery-load=${f}`)};return!g||g.length===0?null:e.jsxs("div",{ref:l,"data-gallery-id":a,className:se.embeddedGalleryContainer,children:[e.jsx(ea,{items:g,leftIcon:b.embeddedGallery?.leftIcon||e.jsx(J,{size:54,direction:"left"}),rightIcon:b.embeddedGallery?.rightIcon||e.jsx(J,{size:54}),srcWidth:655,srcHeight:425,actionbar:{onFullScreen:x,fullScreenIcon:ce,shareIcon:le},Imu:"",ImuInsertAt:999,slidePosition:p===a&&u?u:1,shareMedia:b.gallery?.galleryItemShareMedia,onSlideChange:r,onSlideClick:m,errorSrc:te.landscape.src}),t.bodyElements[0]?.children&&e.jsx(Ee,{isOpen:s,elements:t.bodyElements[0].children,gotoItem:o,close:i,ImuInsertAt:999})]})},Ms=({id:t,path:a})=>{const{data:n}=H(`/_plat/api/story/elements_by_id?ids=${t}`);return n?.results?e.jsx(Hs,{elements:n.results,id:t,path:a}):null},Rs=({id:t,path:a})=>{const n=y.useRef(null),[s]=me(),i=s.get("egallery"),{ref:o,inView:c}=bt({triggerOnce:!0,threshold:.1}),l=y.useCallback(h=>{n.current=h,o(h)},[o]);return e.jsx("div",{ref:l,children:(c||i===t)&&e.jsx(Ms,{id:t,path:a})})},Es=t=>!!t&&Object.prototype.hasOwnProperty.call(t,"id");function Us({elements:t}){if(t.type!=="grouped_relation")return null;const a=t.children?.map(s=>s.type==="relation"&&Es(s.relation)&&s.relation.id||"").filter(s=>s);if(!a?.length)return null;const n=t.additionalFields.htmlAnchor?.value;return e.jsx(Ue,{ids:a,htmlAnchor:n})}const Ws="_tableOverflow_ag6jz_1",zs="_tableStyles_ag6jz_5",Ds="_cellStyles_ag6jz_9",Gs="_fontBold_ag6jz_14",Os="_tableHeadRow_ag6jz_18",Vs="_tableBodyRow_ag6jz_22",F={tableOverflow:Ws,tableStyles:zs,cellStyles:Ds,fontBold:Gs,tableHeadRow:Os,tableBodyRow:Vs};function qs(t){return t.replace(/[&<>'"]/g,a=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[a]||"")}function Js(t,a=[]){const s=[...["b","u"],...a],i=[];return qs(t).replace(/<(\/?)([\w]+)(.*?)>/g,(o,c,l,h)=>{if(l=l.toLowerCase(),s.includes(l))if(c){if(i.length&&i[i.length-1]===l)return i.pop(),`</${l}>`}else{if(i.push(l),l==="img"){const p=/src="(.*?)"/.exec(h),u=/width="(.*?)"/.exec(h),g=/height="(.*?)"/.exec(h),x=p?p[1]:"",r=u?u[1]:"",m=g?g[1]:"";return i.pop(),`<${l} src="${x}" width="${r}" height="${m}" />`}if(l==="a"){const p=/href="(.*?)"/.exec(h),u=p?p[1]:"";return`<${l} href="${u}" target="_blank">`}return`<${l}>`}return""})}const ie=({bodyData:t,hasColHeader:a,useHTML:n,additionalAllowedTags:s})=>e.jsx("tbody",{children:t.map((i,o)=>e.jsx("tr",{className:F.tableBodyRow,children:i.map((c,l)=>{const h=a&&l===0?"th":"td";return e.jsx(h,{className:$(F.cellStyles,h==="th"&&F.fontBold),children:n?e.jsx("div",{dangerouslySetInnerHTML:{__html:Js(c,s)}}):c},l)})},o))}),Zs=({rowData:t})=>e.jsx("thead",{children:e.jsx("tr",{className:F.tableHeadRow,children:t.map((a,n)=>e.jsx("th",{className:$(F.cellStyles,F.fontBold),children:a},n))})}),Xs=(t,a)=>{const n=/"https?:\/\/cue1.cue-(?:staging|prd).sphnet.com.sg:8080\/webservice\/escenic\/content\/(\d+?)"/;return t.map(s=>Array.isArray(s)?s.map(i=>
1{if(typeof i!="string")return i;const o=i.match(n);if(o&&o[1]&&a.has(o[1])){const c=a.get(o[1])?.src;if(c)return i.replace(n,`"${c}"`)}return i}):s)},Ys=({element:t,tableImages:a})=>{const n=t.additionalFields.tableeditor?.value,s=t.additionalFields.rowheader?.value,i=t.additionalFields.columnheader?.value;if(!n)return;const o=JSON.parse(n);if(o[0]){if(b.htmlInTableBody&&!i&&!s){const c=["p","li","ul","a","img"],l=Xs(o,a);return e.jsx("div",{className:F.tableOverflow,children:e.jsx("table",{className:F.tableStyles,children:e.jsx(ie,{bodyData:l,hasColHeader:i,useHTML:!0,additionalAllowedTags:c})})})}return i&&!s?e.jsx("div",{className:F.tableOverflow,children:e.jsx("table",{className:F.tableStyles,children:e.jsx(ie,{bodyData:o,hasColHeader:i})})}):e.jsx("div",{className:F.tableOverflow,children:e.jsxs("table",{className:F.tableStyles,children:[e.jsx(Zs,{rowData:o[0]}),e.jsx(ie,{bodyData:o.slice(1),hasColHeader:i})]})})}},{Body:Se}=W,we=t=>t.type==="nested_elements"&&t.children&&t.children.filter(a=>a.type==="image"&&a.additionalFields.htmlAnchor?.value==="x-table-html-image").length>0,Ks=({elements:t,path:a,bodyMaxWidth:n,excludeAds:s=!1})=>{let i=0,o=O.paragraphInsertMax;const c=O.paragraphInsertPos,l=O.galleryInsertPos,h=O.paragraphMinLength;let p=0,u=0;const g=t.filter(r=>we(r)),x=new Map;return g.forEach(r=>r.children?.forEach(m=>{m.type==="image"&&m.additionalFields.htmlAnchor?.value==="x-table-html-image"&&m.relation?.id&&x.set(m.relation.id,he(m,"original"))})),x.size>0&&(t=t.filter(r=>!we(r))),e.jsx(e.Fragment,{children:t.map((r,m,j)=>{if(r.type==="paragraph"){let f;const d=r.additionalFields.htmlAnchor?.value;return h===void 0?(f=i>0&&i%c==0&&o>0,f&&o--):(f=p>=c&&o>0,f&&(o--,p=0,u=0),u+=(r.value??"").length,u>=h&&(p++,u=0)),i++,e.jsxs(y.Fragment,{children:[!s&&f&&e.jsx(de,{}),e.jsx(Se,{id:d,children:e.jsx(L,{element:r})})]},m)}if(dt(r)){if(ut(r)){const f=ht(j);return e.jsx(Xa,{title:e.jsx(L,{element:r.additionalFields.subhead||r}),items:f.map(d=>({label:e.jsx(L,{element:d.additionalFields.subhead||d}),href:`#${pt(d)}`})),prenumbered:f[0]?.additionalFields.subhead?.value.startsWith("1. ")},m)}return e.jsx(mt,{element:r},m)}if(r.type==="image"){let f=!1;return h!==void 0&&(f=p>=c&&o>0,f&&(o--,p=0,u=0)),e.jsxs(y.Fragment,{children:[!s&&f&&e.jsx(de,{}),e.jsx(gt,{element:r,bodyMaxWidth:n})]},m)}if(r.type==="image_compare")return e.jsx(ns,{element:r,bodyMaxWidth:n},m);if(r.type==="embed")return e.jsx(ft,{element:r},m);if(r.type==="gallery_items"){let f=0;i>=c&&(f=i%c==0?2:1);const d=r.children?.length||0;return i+=d-d%l,e.jsx(fs,{element:r,path:a,startcount:f},m)}if(r.type==="pull_quote")return e.jsx(xt,{label:r.additionalFields.quoteLabel?.value,title:r.additionalFields.quote&&e.jsx(L,{element:r.additionalFields.quote}),description:r.additionalFields.quotee?.value,quoteSvg:b.quote?.svg,quoteSvgBtm:b.quote?.svgBtm},m);if(r.type==="sponsorship_box"){const f=r.children?.find(_=>_.type==="sponsorship_box_info"),d=r.children?.find(_=>_.type==="image"),v=ot(d)?he(d,"original"):void 0;return e.jsx(tt,{title:f?.additionalFields.title?.value,description:f?.additionalFields.description?.value,image:v,ctaUrl:f?.additionalFields.cta_url?.value,ctaText:f?.additionalFields.cta_text?.value,showCtaIcon:b.sponsorshipBox?.showCtaIcon},m)}if(r.type==="relation"&&r.relation?.type==="embeddedGallery"&&r.relation.id)return e.jsx(Rs,{id:r.relation.id,path:a},m);if(r.type==="grouped_relation")return e.jsx(Us,{elements:r},m);if(r.type==="column_images")return e.jsx(_t,{element:r,bodyMaxWidth:n},m);if(r.type==="table")return e.jsx(Ys,{element:r,tableImages:x},m);if(r.type==="call_to_action"||r.type==="shop_button")return e.jsx(is,{element:r,variant:b.buttonVariant||"secondary",bodyMaxWidth:n},m);if(r.type==="affiliate_declaration"){const f=r.children?.find(d=>d.type==="affiliate_declaration_info");return!!f?.additionalFields.declaration?.value&&e.jsx(Se,{children:e.jsx("b",{children:f.additionalFields.text?.value||at.text})},m)}if(r.type==="list_bulleted"||r.type==="list_numbered")return e.jsx(yt,{element:r},m);if(r.type==="youtube_video"||r.type==="brightcove_video"){const f=r.additionalFields.title?.value||"",d=Qa(r);return!!d&&e.jsx(Q,{title:f,src:d,loading:"lazy"},m)}if(r.type==="promo_box")return e.jsx(ks,{element:r},m);if(r.type==="product_listing")return e.jsx(as,{element:r,allElements:j},m);if(r.type==="relation"&&r.relation?.type==="product"&&r.relation.id)return e.jsx(ss,{element:r},m);if(r.type==="horizontal_row")return e.jsx(Ie,{variant:"story"},m);if(r.type==="dynamic_iframe_wrapper"){const f=es(r.additionalFields.dynamicIframe?.value);return f&&e.jsx(Q,{...f},m)}if(r.type==="nested_elements"&&r.children)return e.jsx(ys,{children:e.jsx(Ks,{path:a,elements:r.children,bodyMaxWidth:n,excludeAds:!0})},m);if(r.type==="product_comparison_widget"&&r.children){const f=r.children.filter(d=>d.type==="relation"&&d.relation?.type==="productStory"&&d.relation.id).map(d=>d.relation?.id).join(",");return e.jsx(Ns,{ids:f,element:r.children},m)}return r.type==="filtered_listing_widget"&&r.children?e.jsx(ms,{children:r.children},m):De?e.jsxs("details",{children:[e.jsx("summary",{children:e.jsxs("code",{children:["Unimplemented block ",r.type]})}),e.jsx("pre",{style:{overflow:"auto"},children:JSON.stringify(r,null,2)})]},m):null})})};export{Is as P,Ks as S,Qa as g}; 2//# sourceMappingURL=Storyline-DzuBNKHs.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.