"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[15],{66:(e,r,a)=>{a.d(r,{a:()=>T});var t=a(0),i=a(22),n=a(2),l=a(5),o=a(104),s=a(3),c=a(37),d=a(25),u=a(9),p=a(24),m=a(30),h=a(4),x=a(38),v=a(6);function g({disruptor:e}){var r;return(0,t.jsxs)("div",{class:x.a.card,style:{color:e.text_color},children:[(0,t.jsx)(f,{media:e.media}),(0,t.jsx)("div",{class:x.a.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,t.jsx)("div",{class:x.a.body,dangerouslySetInnerHTML:{__html:null!==(r=e.body_text)&&void 0!==r?r:""}}),(0,t.jsx)(b,{disruptor:e})]})}function f({media:e}){var r;const a=null===(r=(0,v.a)(e))||void 0===r?void 0:r.url;if(a){const e={"background-image":`url(${a});`};return(0,t.jsx)("div",{class:x.a.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,t.jsx)("div",{class:x.a.media,children:(0,t.jsx)("video",{loop:!0,autoplay:!0,playsinline:!0,muted:!0,children:e.sources.map((e=>(0,t.jsx)("source",{src:e.url,type:e.mimeType})))})}):(0,t.jsx)(h.Fragment,{})}function b({disruptor:e}){var r;return e.cta_url?(0,t.jsx)("a",{href:e.cta_url,children:null!==(r=e.cta_label)&&void 0!==r?r:"Shop Now"}):(0,t.jsx)(h.Fragment,{})}var j=a(108),P=a(109),_=a(119),y=a(96),S=a(36);const A=300;function T({product:e,collectionHandle:r,replaceStateEnabled:a}){return(null==e?void 0:e.handle)?"type"in(i=e)&&"disruptor"===i.type?(0,t.jsx)(g,{disruptor:e}):(0,t.jsx)(w,{product:e,collectionHandle:r,replaceStateEnabled:a}):null;var i}function w({product:e,collectionHandle:r,replaceStateEnabled:a}){var h;const{getHexForOptionColor:x,findProductVariantWithOption:v,EXCLUDE_TAGS:g,promo_prefix_tag:f,product_image_height:b,product_image_width:T,disable_color_swatches:w,showVendor:C,cardPriceDisplay:O,soldOutBadgeText:I,onSaleBadgeText:V}=(0,s.c)((e=>({getHexForOptionColor:e.getHexForOptionColor,findProductVariantWithOption:e.findProductVariantWithOption,EXCLUDE_TAGS:e.config.exclude_tags,promo_prefix_tag:e.config.promo_prefix_tag,product_image_width:e.config.product_image_width,product_image_height:e.config.product_image_height,disable_color_swatches:e.config.disable_color_swatches,showVendor:e.showVendor,cardPriceDisplay:e.cardPriceDisplay,soldOutBadgeText:e.soldOutBadgeText,onSaleBadgeText:e.onSaleBadgeText}))),$=e.options.find((e=>"Color"===e.name)),{pricePrefix:F,priceText:H,showCompareAtPrice:D,onSaleDataAttribute:M,compareAtPriceText:N,priceClassName:B,ssrStyle:L}=function(e,r){var a;const t=(0,n.useMemo)((()=>{if(!e.combinedKey)return[e.handle];const r=[e.handle,...new Set(e.variants.map((e=>{var r;return null===(r=e.selectedOptions)||void 0===r?void 0:r.childProductHandle})).filter((e=>!!e)))];return r}),[e.handle,e.combinedKey,e.variants]),{data:i,classNamesByHandle:l,ssrStylesByHandle:o}=(0,y.a)(t),s=(null===(a=i[t[0]])||void 0===a?void 0:a.currency)||"USD",c=(0,S.b)({currency:s});return(0,n.useMemo)((()=>{var a;if(e.priceTextOverride)return{priceText:e.priceTextOverride,pricePrefix:"",showCompareAtPrice:!1,onSaleDataAttribute:{},compareAtPriceText:void 0,priceClassName:l[e.handle]||"",ssrStyle:o[e.handle]};const n=[];for(const e of t){const r=i[e];if(null==r?void 0:r.variants)for(const e of r.variants)n.push({priceAmount:e.price.amount,compareAmount:null===(a=e.compareAtPrice)||void 0===a?void 0:a.amount})}if(n.length>0&&n.some((e=>null!=e.priceAmount))){const a=n.map((e=>e.priceAmount)).filter((e=>null!=e)),t=n.map((e=>e.compareAmount)).filter((e=>null!=e)),i=a.length>0?Math.min(...a):void 0,s=a.length>0?Math.max(...a):void 0,d=t.length>0?Math.max(...t):void 0,u=null!=i&&null!=s&&i!==s,p="range"===r&&u,m=p?"":u?"From ":"",h=p&&null!=i&&null!=s?`${c(i)} – ${c(s)}`:null!=i?c(i):"",x=null!=d&&null!=i&&d>i,v=(0,_.a)(x);let g;return x&&null!=d&&(g=c(d)),{pricePrefix:m,priceText:h,showCompareAtPrice:x,onSaleDataAttribute:v,compareAtPriceText:g,priceClassName:l[e.handle]||"",ssrStyle:o[e.handle]}}const{minPrice:s,maxPrice:d}=e.priceRange,p=e.compareAtRange,m="number"==typeof d&&s!==d,h="range"===r&&m,x=h?"":m?"From ":"",v=h?`$${(0,u.c)(s)} – $${(0,u.c)("number"==typeof d?d:s)}`:`$${(0,u.c)(s)}`,g=p.maxPrice&&p.maxPrice>s,f=p.maxPrice&&sr.variantId===e.defaultVariantId)),[k,E]=(0,n.useState)(null!=W?W:e.variants[0]),R=(0,d.a)(e.imageMap,k)[0],U=(0,m.b)(e,k);if(!R)return null;const z=(0,n.useMemo)((()=>{var r,a,t;return g&&(null==g?void 0:g.length)>0?null!==(r=k.badge)&&void 0!==r?r:e.badge:k.oos&&!k.preorderVariant?I||null:k.compareAtPrice&&parseFloat(k.price){a&&(e.preventDefault(),location.replace(U))},class:i.a.link,"data-orly-type":r,"data-orly-handle":e.handle,children:[(0,t.jsxs)("div",{className:i.a.heroImageContainer,children:[z&&(0,t.jsx)("div",{class:i.a.bestSeller,"data-badge":z,children:z}),(0,t.jsx)(l.a,{src:R.src,initialWidth:A,cssClass:i.a.heroImage,alt:`${G}: ${R.model}`,height:b,width:T,fullSizeWidth:q})]}),(0,t.jsxs)("div",{class:i.a.textWrapper,children:[C&&(0,t.jsx)("div",{class:i.a.vendor,children:e.vendor}),(0,t.jsx)("div",{class:i.a.title,children:K}),X&&(0,t.jsx)("div",{class:i.a.subtitle,children:X}),(0,t.jsx)("div",{class:i.a.price,children:(0,t.jsx)("span",{class:B,style:L,children:(0,t.jsxs)("span",{children:[D&&N&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{class:i.a.originalPrice,children:N})," "]}),F&&(0,t.jsx)("span",{children:F}),(0,t.jsx)("span",Object.assign({},M,{children:H}))]})})}),(0,t.jsx)(P.a,{reviewCount:e.reviewCount,reviewRating:e.reviewRating}),f&&e.plpPromoText&&(0,t.jsx)("div",{class:i.a.plpPromoText,children:e.plpPromoText})]})]}),(0,t.jsx)("div",{class:i.a.colorSwatchContainer,children:!w&&$&&(0,t.jsx)(c.a,{product:e,small:!0,maxItems:12,hideLabel:!0,option:$,getHexForOptionColor:x,selectedVariant:k,findProductVariantWithOption:r=>v(r,e,W),setSelectedVariantId:r=>{const a=e.variants.find((e=>e.variantId===r));a&&E(a)}})})]})}},108:(e,r,a)=>{a.d(r,{a:()=>n});var t=a(2),i=a(10);function n(){const e=(0,i.h)("maxFullSizeWidth","1200","300")();return(0,t.useMemo)((()=>{if(!e)return 1200;try{const r=parseInt(e);if(Number.isNaN(r))return;return r}catch(e){return}}),[e])}}}]);