"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[15],{66:(e,r,a)=>{a.d(r,{a:()=>w});var t=a(0),i=a(22),n=a(2),l=a(5),o=a(104),c=a(3),s=a(35),d=a(25),u=a(9),p=a(24),m=a(30),h=a(4),x=a(36),v=a(6);function f({disruptor:e}){var r;return(0,t.jsxs)("div",{class:x.a.card,style:{color:e.text_color},children:[(0,t.jsx)(g,{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 g({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 P=a(108),j=a(109),_=a(52),y=a(97),S=a(39);const A=300;function w({product:e,collectionHandle:r,replaceStateEnabled:a}){return(null==e?void 0:e.handle)?"type"in(i=e)&&"disruptor"===i.type?(0,t.jsx)(f,{disruptor:e}):(0,t.jsx)(C,{product:e,collectionHandle:r,replaceStateEnabled:a}):null;var i}function C({product:e,collectionHandle:r,replaceStateEnabled:a}){var h;const{getHexForOptionColor:x,findProductVariantWithOption:v,EXCLUDE_TAGS:f,promo_prefix_tag:g,product_image_height:b,product_image_width:w,disable_color_swatches:C,showVendor:T,cardPriceDisplay:$}=(0,c.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}))),O=e.options.find((e=>"Color"===e.name)),{pricePrefix:I,priceText:V,showCompareAtPrice:F,onSaleDataAttribute:H,compareAtPriceText:D,priceClassName:M,ssrStyle:N}=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),c=(null===(a=i[t[0]])||void 0===a?void 0:a.currency)||"USD",s=(0,S.b)({currency:c});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,c=a.length>0?Math.max(...a):void 0,d=t.length>0?Math.max(...t):void 0,u=null!=i&&null!=c&&i!==c,p="range"===r&&u,m=p?"":u?"From ":"",h=p&&null!=i&&null!=c?`${s(i)} – ${s(c)}`:null!=i?s(i):"",x=null!=d&&null!=i&&d>i,v=(0,_.a)(x);let f;return x&&null!=d&&(f=s(d)),{pricePrefix:m,priceText:h,showCompareAtPrice:x,onSaleDataAttribute:v,compareAtPriceText:f,priceClassName:l[e.handle]||"",ssrStyle:o[e.handle]}}const{minPrice:c,maxPrice:d}=e.priceRange,p=e.compareAtRange,m="number"==typeof d&&c!==d,h="range"===r&&m,x=h?"":m?"From ":"",v=h?`$${(0,u.c)(c)} – $${(0,u.c)("number"==typeof d?d:c)}`:`$${(0,u.c)(c)}`,f=p.maxPrice&&p.maxPrice>c,g=p.maxPrice&&cr.variantId===e.defaultVariantId)),[W,k]=(0,n.useState)(null!=L?L:e.variants[0]),E=(0,d.a)(e.imageMap,W)[0],R=(0,m.b)(e,W);if(!E)return null;const U=(0,n.useMemo)((()=>{var r,a,t;return f&&(null==f?void 0:f.length)>0?null!==(r=W.badge)&&void 0!==r?r:e.badge:W.oos&&!W.preorderVariant?g?"":"Sold Out":W.compareAtPrice&&parseFloat(W.price){a&&(e.preventDefault(),location.replace(R))},class:i.a.link,"data-orly-type":r,"data-orly-handle":e.handle,children:[(0,t.jsxs)("div",{className:i.a.heroImageContainer,children:[U&&(0,t.jsx)("div",{class:i.a.bestSeller,"data-badge":U,children:U}),(0,t.jsx)(l.a,{src:E.src,initialWidth:A,cssClass:i.a.heroImage,alt:`${z}: ${E.model}`,height:b,width:w,fullSizeWidth:K})]}),(0,t.jsxs)("div",{class:i.a.textWrapper,children:[T&&(0,t.jsx)("div",{class:i.a.vendor,children:e.vendor}),(0,t.jsx)("div",{class:i.a.title,children:B}),G&&(0,t.jsx)("div",{class:i.a.subtitle,children:G}),(0,t.jsx)("div",{class:i.a.price,children:(0,t.jsx)("span",{class:M,style:N,children:(0,t.jsxs)("span",{children:[F&&D&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{class:i.a.originalPrice,children:D})," "]}),I&&(0,t.jsx)("span",{children:I}),(0,t.jsx)("span",Object.assign({},H,{children:V}))]})})}),(0,t.jsx)(j.a,{reviewCount:e.reviewCount,reviewRating:e.reviewRating}),g&&e.plpPromoText&&(0,t.jsx)("div",{class:i.a.plpPromoText,children:e.plpPromoText})]})]}),(0,t.jsx)("div",{class:i.a.colorSwatchContainer,children:!C&&O&&(0,t.jsx)(s.a,{product:e,small:!0,maxItems:12,hideLabel:!0,option:O,getHexForOptionColor:x,selectedVariant:W,findProductVariantWithOption:r=>v(r,e,L),setSelectedVariantId:r=>{const a=e.variants.find((e=>e.variantId===r));a&&k(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])}}}]);