"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[16],{136:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisruptorCard=function({disruptor:e}){var t;return(0,i.jsxs)("div",{class:l.default.card,style:{color:e.text_color},children:[(0,i.jsx)(d,{media:e.media}),(0,i.jsx)("div",{class:l.default.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,i.jsx)("div",{class:l.default.body,dangerouslySetInnerHTML:{__html:null!==(t=e.body_text)&&void 0!==t?t:""}}),(0,i.jsx)(s,{disruptor:e})]})};const i=r(0),o=r(3),l=a(r(40)),n=r(4);function d({media:e}){var t;const r=null===(t=(0,n.convertImageMedia)(e))||void 0===t?void 0:t.url;if(r){const e={"background-image":`url(${r});`};return(0,i.jsx)("div",{class:l.default.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,i.jsx)("div",{class:l.default.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)(o.Fragment,{})}function s({disruptor:e}){var t;return e.cta_url?(0,i.jsx)("a",{href:e.cta_url,children:null!==(t=e.cta_label)&&void 0!==t?t:"Shop Now"}):(0,i.jsx)(o.Fragment,{})}},46:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductCard=function({product:e,sharedStateStore:t,collectionHandle:r,replaceStateEnabled:a}){return(null==e?void 0:e.handle)?"type"in(o=e)&&"disruptor"===o.type?(0,i.jsx)(f.DisruptorCard,{disruptor:e}):(0,i.jsx)(x,{product:e,sharedStateStore:t,collectionHandle:r,replaceStateEnabled:a}):null;var o};const i=r(0),o=a(r(19)),l=r(2),n=r(5),d=r(29),s=r(15),c=r(16),u=r(23),p=r(1),h=r(49),f=r(136),m=r(191);function x({product:e,sharedStateStore:t,collectionHandle:r,replaceStateEnabled:a}){const{getHexForOptionColor:f,findProductVariantWithOption:x,EXCLUDE_TAGS:g,product_image_height:v,product_image_width:_,disable_color_swatches:P,showVendor:j}=t((e=>({getHexForOptionColor:e.getHexForOptionColor,findProductVariantWithOption:e.findProductVariantWithOption,EXCLUDE_TAGS:e.config.exclude_tags,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}))),b=e.options.find((e=>"Color"===e.name)),{priceText:S,showCompareAtPrice:C,isOnSale:O,compareAtPriceRange:y}=function(e){const t=(0,m.getCompareAtPrice)(e);if(e.priceTextOverride)return{priceText:e.priceTextOverride,showCompareAtPrice:!0,isOnSale:!0,compareAtPriceRange:t};const{minPrice:r,maxPrice:a}=(0,m.getPriceRange)(p.getAssignment,e);return{priceText:r!==a?`From $${(0,c.formatPrice)(r)}`:`$${(0,c.formatPrice)(r)}`,showCompareAtPrice:t.maxPrice&&t.maxPrice>r,isOnSale:t.maxPrice&&rt.variantId===e.defaultVariantId)),[I,A]=(0,l.useState)(null!=w?w:e.variants[0]),V=(0,s.getImagesForVariant)(e.imageMap,I)[0],T=(0,h.useProductUrl)(e,I);if(!V)return null;const F=(0,l.useMemo)((()=>{var t,r;return g&&(null==g?void 0:g.length)>0?e.tags.find((e=>!(null==g?void 0:g.includes(e)))):(null===(t=e.promoInfo)||void 0===t?void 0:t.badgeOverride)?e.promoInfo.badgeOverride:(null===(r=e.promoInfo)||void 0===r?void 0:r.badgeLabel)?e.promoInfo.badgeLabel:I.oos&&!I.preorderVariant?"Sold Out":I.compareAtPrice&&parseFloat(I.price){a&&(e.preventDefault(),location.replace(T))},class:o.default.link,"data-orly-type":r,"data-orly-handle":e.handle,children:[(0,i.jsx)("div",{className:o.default.heroImageContainer,children:(0,i.jsx)(n.LazyImage,{src:V.src,initialWidth:300,cssClass:o.default.heroImage,alt:`${e.title}: ${V.model}`,height:v,width:_})}),(0,i.jsxs)("div",{class:o.default.textWrapper,children:[j&&(0,i.jsx)("div",{class:o.default.vendor,children:e.vendor}),(0,i.jsx)("div",{class:o.default.title,children:H}),M&&(0,i.jsx)("div",{class:o.default.subtitle,children:M}),(0,i.jsxs)("div",{class:o.default.price,children:[C&&y.maxPrice&&(0,i.jsxs)("span",{class:o.default.originalPrice,children:["$",(0,c.formatPrice)(y.maxPrice)]}),(0,i.jsx)("span",{class:O?o.default.salePrice:"",children:S})]})]})]}),(0,i.jsx)("div",{class:o.default.colorSwatchContainer,children:!P&&b&&(0,i.jsx)(d.ProductOption,{useSharedState:t,product:e,small:!0,maxItems:12,hideLabel:!0,option:b,getHexForOptionColor:f,selectedVariant:I,findProductVariantWithOption:t=>x(t,e,w),setSelectedVariantId:t=>{const r=e.variants.find((e=>e.variantId===t));r&&A(r)}})})]})}}}]);