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