"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[17],{67:(e,r,a)=>{a.d(r,{a:()=>O});var t=a(0),i=a(23),l=a(2),n=a(5),o=a(107),s=a(3),c=a(38),d=a(26),u=a(9),p=a(25),m=a(31),h=a(4),x=a(39),v=a(68),g=a(6);function f({disruptor:e}){return"bite_disruptor"===e.type?(0,t.jsx)(y,{disruptor:e}):(0,t.jsx)(_,{disruptor:e})}function y({disruptor:e}){return e.biteHtml?(0,t.jsx)("div",{style:{display:"grid"},dangerouslySetInnerHTML:{__html:e.biteHtml}}):(0,t.jsx)(h.Fragment,{})}function _({disruptor:e}){var r;return(0,t.jsxs)("div",{class:x.a.card,style:{color:e.text_color},children:[(0,t.jsx)(b,{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)(P,{disruptor:e})]})}function b({media:e}){var r,a;return"image"===e.type&&e.url?(0,t.jsx)(n.a,{src:(0,g.b)(e.url),alt:null!==(r=e.altText)&&void 0!==r?r:"",initialWidth:null!==(a=e.width)&&void 0!==a?a:400,cssClass:x.a.media}):"video"===e.type&&e.sources.length>0?(0,t.jsx)("div",{class:x.a.media,children:(0,t.jsx)(v.a,{sources:e.sources,className:x.a.mediaVideo})}):(0,t.jsx)(h.Fragment,{})}const j={primary:x.a.cta_primary,secondary:x.a.cta_secondary,tertiary:x.a.cta_tertiary};function P({disruptor:e}){var r;if(!e.cta_url||!e.cta_label||!e.cta_style)return(0,t.jsx)(h.Fragment,{});const a=null!==(r=j[e.cta_style])&&void 0!==r?r:x.a.cta_primary;return(0,t.jsx)("a",{href:e.cta_url,class:`${x.a.cta} ${a}`,children:e.cta_label})}var S=a(111),T=a(112),w=a(122),A=a(98),C=a(37);const I=300;function O({product:e,collectionHandle:r,replaceStateEnabled:a}){return(null==e?void 0:e.handle)?!("type"in(i=e))||"disruptor"!==i.type&&"bite_disruptor"!==i.type?(0,t.jsx)(H,{product:e,collectionHandle:r,replaceStateEnabled:a}):(0,t.jsx)(f,{disruptor:e}):null;var i}function H({product:e,collectionHandle:r,replaceStateEnabled:a}){var h;const{getHexForOptionColor:x,findProductVariantWithOption:v,EXCLUDE_TAGS:g,promo_prefix_tag:f,product_image_height:y,product_image_width:_,disable_color_swatches:b,showVendor:j,cardPriceDisplay:P,soldOutBadgeText:O,onSaleBadgeText:H}=(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}))),V=e.options.find((e=>"Color"===e.name)),{pricePrefix:$,priceText:F,showCompareAtPrice:D,onSaleDataAttribute:M,compareAtPriceText:N,priceClassName:L,ssrStyle:W}=function(e,r){var a;const t=(0,l.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:n,ssrStylesByHandle:o}=(0,A.a)(t),s=(null===(a=i[t[0]])||void 0===a?void 0:a.currency)||"USD",c=(0,C.b)({currency:s});return(0,l.useMemo)((()=>{var a;if(e.priceTextOverride)return{priceText:e.priceTextOverride,pricePrefix:"",showCompareAtPrice:!1,onSaleDataAttribute:{},compareAtPriceText:void 0,priceClassName:n[e.handle]||"",ssrStyle:o[e.handle]};const l=[];for(const e of t){const r=i[e];if(null==r?void 0:r.variants)for(const e of r.variants)l.push({priceAmount:e.price.amount,compareAmount:null===(a=e.compareAtPrice)||void 0===a?void 0:a.amount})}if(l.length>0&&l.some((e=>null!=e.priceAmount))){const a=l.map((e=>e.priceAmount)).filter((e=>null!=e)),t=l.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,w.a)(x);let g;return x&&null!=d&&(g=c(d)),{pricePrefix:m,priceText:h,showCompareAtPrice:x,onSaleDataAttribute:v,compareAtPriceText:g,priceClassName:n[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)),[E,k]=(0,l.useState)(null!=B?B:e.variants[0]),R=(0,d.a)(e.imageMap,E)[0],U=(0,m.b)(e,E);if(!R)return null;const z=(0,l.useMemo)((()=>{var r,a,t;return g&&(null==g?void 0:g.length)>0?null!==(r=E.badge)&&void 0!==r?r:e.badge:E.oos&&!E.preorderVariant?O||null:E.compareAtPrice&&parseFloat(E.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)(n.a,{src:R.src,initialWidth:I,cssClass:i.a.heroImage,alt:`${G}: ${R.model}`,height:y,width:_,fullSizeWidth:q})]}),(0,t.jsxs)("div",{class:i.a.textWrapper,children:[j&&(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:L,style:W,children:(0,t.jsxs)("span",{children:[D&&N&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{class:i.a.originalPrice,children:N})," "]}),$&&(0,t.jsx)("span",{children:$}),(0,t.jsx)("span",Object.assign({},M,{children:F}))]})})}),(0,t.jsx)(T.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:!b&&V&&(0,t.jsx)(c.a,{product:e,small:!0,maxItems:12,hideLabel:!0,option:V,getHexForOptionColor:x,selectedVariant:E,findProductVariantWithOption:r=>v(r,e,B),setSelectedVariantId:r=>{const a=e.variants.find((e=>e.variantId===r));a&&k(a)}})})]})}},68:(e,r,a)=>{a.d(r,{a:()=>l});var t=a(0),i=a(2);function l({sources:e,className:r,preload:a="metadata"}){const l=(0,i.useRef)(null);return(0,i.useEffect)((()=>{l.current&&l.current.load()}),[e]),(0,t.jsx)("video",{ref:l,class:r,preload:a,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,children:e.map((e=>(0,t.jsx)("source",{src:e.url,type:e.mimeType,width:e.width,height:e.height},e.url)))})}},111:(e,r,a)=>{a.d(r,{a:()=>l});var t=a(2),i=a(10);function l(){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])}}}]);