"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[15],{59:(e,r,a)=>{a.d(r,{a:()=>P});var i=a(0),t=a(21),o=a(2),n=a(5),l=a(4),s=a(34),c=a(25),d=a(10),p=a(22),u=a(39),h=a(3),m=a(31),x=a(6);function g({disruptor:e}){var r;return(0,i.jsxs)("div",{class:m.a.card,style:{color:e.text_color},children:[(0,i.jsx)(v,{media:e.media}),(0,i.jsx)("div",{class:m.a.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,i.jsx)("div",{class:m.a.body,dangerouslySetInnerHTML:{__html:null!==(r=e.body_text)&&void 0!==r?r:""}}),(0,i.jsx)(f,{disruptor:e})]})}function v({media:e}){var r;const a=null===(r=(0,x.a)(e))||void 0===r?void 0:r.url;if(a){const e={"background-image":`url(${a});`};return(0,i.jsx)("div",{class:m.a.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,i.jsx)("div",{class:m.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)(h.Fragment,{})}function f({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)(h.Fragment,{})}var _=a(95),b=a(96),j=a(46);function P({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)(w,{product:e,collectionHandle:r,replaceStateEnabled:a}):null;var t}function w({product:e,collectionHandle:r,replaceStateEnabled:a}){const{getHexForOptionColor:h,findProductVariantWithOption:m,EXCLUDE_TAGS:x,promo_prefix_tag:g,product_image_height:v,product_image_width:f,disable_color_swatches:P,showVendor:w}=(0,l.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}))),S=e.options.find((e=>"Color"===e.name)),{pricePrefix:C,priceText:y,showCompareAtPrice:A,onSaleDataAttribute:I,compareAtPriceRange:O}=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,d.c)(a)}`,n=r.maxPrice&&r.maxPrice>a,l=r.maxPrice&&ar.variantId===e.defaultVariantId)),[V,F]=(0,o.useState)(null!=T?T:e.variants[0]),H=(0,c.a)(e.imageMap,V)[0],W=(0,u.b)(e,V);if(!H)return null;const k=(0,o.useMemo)((()=>{var r,a,i;return x&&(null==x?void 0:x.length)>0?null!==(r=V.badge)&&void 0!==r?r:e.badge:V.oos&&!V.preorderVariant?g?"":"Sold Out":V.compareAtPrice&&parseFloat(V.price){a&&(e.preventDefault(),location.replace(W))},class:t.a.link,"data-orly-type":r,"data-orly-handle":e.handle,children:[(0,i.jsxs)("div",{className:t.a.heroImageContainer,children:[k&&(0,i.jsx)("div",{class:t.a.bestSeller,children:k}),(0,i.jsx)(n.a,{src:H.src,initialWidth:300,cssClass:t.a.heroImage,alt:`${e.title}: ${H.model}`,height:v,width:f,fullSizeWidth:R})]}),(0,i.jsxs)("div",{class:t.a.textWrapper,children:[w&&(0,i.jsx)("div",{class:t.a.vendor,children:e.vendor}),(0,i.jsx)("div",{class:t.a.title,children:E}),L&&(0,i.jsx)("div",{class:t.a.subtitle,children:L}),(0,i.jsxs)("div",{class:t.a.price,children:[A&&O.maxPrice&&(0,i.jsxs)("span",{class:t.a.originalPrice,children:["$",(0,d.c)(O.maxPrice)]}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:C}),(0,i.jsx)("span",Object.assign({},I,{children:y}))]})]}),(0,i.jsx)(b.a,{reviewCount:e.reviewCount,reviewRating:e.reviewRating}),g&&e.plpPromoText&&(0,i.jsx)("div",{class:t.a.plpPromoText,children:e.plpPromoText})]})]}),(0,i.jsx)("div",{class:t.a.colorSwatchContainer,children:!P&&S&&(0,i.jsx)(s.a,{product:e,small:!0,maxItems:12,hideLabel:!0,option:S,getHexForOptionColor:h,selectedVariant:V,findProductVariantWithOption:r=>m(r,e,T),setSelectedVariantId:r=>{const a=e.variants.find((e=>e.variantId===r));a&&F(a)}})})]})}},95:(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}}),[])}}}]);