"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[16],{64:(e,r,a)=>{a.d(r,{a:()=>w});var i=a(0),t=a(22),o=a(2),n=a(5),l=a(101),s=a(3),c=a(37),d=a(27),p=a(10),u=a(25),h=a(33),m=a(4),x=a(34),v=a(6);function g({disruptor:e}){var r;return(0,i.jsxs)("div",{class:x.a.card,style:{color:e.text_color},children:[(0,i.jsx)(f,{media:e.media}),(0,i.jsx)("div",{class:x.a.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,i.jsx)("div",{class:x.a.body,dangerouslySetInnerHTML:{__html:null!==(r=e.body_text)&&void 0!==r?r:""}}),(0,i.jsx)(_,{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,i.jsx)("div",{class:x.a.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,i.jsx)("div",{class:x.a.media,children:(0,i.jsx)("video",{loop:!0,autoplay:!0,playsinline:!0,muted:!0,children:e.sources.map((e=>(0,i.jsx)("source",{src:e.url,type:e.mimeType})))})}):(0,i.jsx)(m.Fragment,{})}function _({disruptor:e}){var r;return e.cta_url?(0,i.jsx)("a",{href:e.cta_url,children:null!==(r=e.cta_label)&&void 0!==r?r:"Shop Now"}):(0,i.jsx)(m.Fragment,{})}var b=a(105),j=a(106),P=a(50);function w({product:e,collectionHandle:r,replaceStateEnabled:a}){return(null==e?void 0:e.handle)?"type"in(t=e)&&"disruptor"===t.type?(0,i.jsx)(g,{disruptor:e}):(0,i.jsx)(S,{product:e,collectionHandle:r,replaceStateEnabled:a}):null;var t}function S({product:e,collectionHandle:r,replaceStateEnabled:a}){var m;const{getHexForOptionColor:x,findProductVariantWithOption:v,EXCLUDE_TAGS:g,promo_prefix_tag:f,product_image_height:_,product_image_width:w,disable_color_swatches:S,showVendor:C}=(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}))),y=e.options.find((e=>"Color"===e.name)),{pricePrefix:A,priceText:I,showCompareAtPrice:O,onSaleDataAttribute:T,compareAtPriceRange:V}=function(e){const r=e.compareAtRange;if(e.priceTextOverride)return{priceText:e.priceTextOverride,showCompareAtPrice:!1,onSaleDataAttribute:{},compareAtPriceRange:r};const{minPrice:a,maxPrice:i}=e.priceRange,t=a!==i?"From ":"",o=`$${(0,p.c)(a)}`,n=r.maxPrice&&r.maxPrice>a,l=r.maxPrice&&ar.variantId===e.defaultVariantId)),[H,L]=(0,o.useState)(null!=F?F:e.variants[0]),W=(0,d.a)(e.imageMap,H)[0],k=(0,h.b)(e,H);if(!W)return null;const E=(0,o.useMemo)((()=>{var r,a,i;return g&&(null==g?void 0:g.length)>0?null!==(r=H.badge)&&void 0!==r?r:e.badge:H.oos&&!H.preorderVariant?f?"":"Sold Out":H.compareAtPrice&&parseFloat(H.price){a&&(e.preventDefault(),location.replace(k))},class:t.a.link,"data-orly-type":r,"data-orly-handle":e.handle,children:[(0,i.jsxs)("div",{className:t.a.heroImageContainer,children:[E&&(0,i.jsx)("div",{class:t.a.bestSeller,"data-badge":E,children:E}),(0,i.jsx)(n.a,{src:W.src,initialWidth:300,cssClass:t.a.heroImage,alt:`${R}: ${W.model}`,height:_,width:w,fullSizeWidth:M})]}),(0,i.jsxs)("div",{class:t.a.textWrapper,children:[C&&(0,i.jsx)("div",{class:t.a.vendor,children:e.vendor}),(0,i.jsx)("div",{class:t.a.title,children:D}),$&&(0,i.jsx)("div",{class:t.a.subtitle,children:$}),(0,i.jsxs)("div",{class:t.a.price,children:[O&&V.maxPrice&&(0,i.jsxs)("span",{class:t.a.originalPrice,children:["$",(0,p.c)(V.maxPrice)]}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:A}),(0,i.jsx)("span",Object.assign({},T,{children:I}))]})]}),(0,i.jsx)(j.a,{reviewCount:e.reviewCount,reviewRating:e.reviewRating}),f&&e.plpPromoText&&(0,i.jsx)("div",{class:t.a.plpPromoText,children:e.plpPromoText})]})]}),(0,i.jsx)("div",{class:t.a.colorSwatchContainer,children:!S&&y&&(0,i.jsx)(c.a,{product:e,small:!0,maxItems:12,hideLabel:!0,option:y,getHexForOptionColor:x,selectedVariant:H,findProductVariantWithOption:r=>v(r,e,F),setSelectedVariantId:r=>{const a=e.variants.find((e=>e.variantId===r));a&&L(a)}})})]})}},105:(e,r,a)=>{a.d(r,{a:()=>o});var i=a(1),t=a(2);function o(){return(0,t.useMemo)((()=>{const e=(0,i.getAssignment)("maxFullSizeWidth");if(e)try{const r=parseInt(e);if(Number.isNaN(r))return;return r}catch(e){return}}),[])}}}]);