!function(e){var t={};function r(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(a,o,function(t){return e[t]}.bind(null,o));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}([function(e,t){e.exports=React},function(e,t){e.exports=Classnames},function(e,t,r){e.exports={containerInline:"lojahr-product-summary-images-2-x-containerInline",imageContainer:"lojahr-product-summary-images-2-x-imageContainer",container:"lojahr-product-summary-images-2-x-container",containerSmall:"lojahr-product-summary-images-2-x-containerSmall",containerInlinePrice:"lojahr-product-summary-images-2-x-containerInlinePrice",information:"lojahr-product-summary-images-2-x-information",element:"lojahr-product-summary-images-2-x-element",image:"lojahr-product-summary-images-2-x-image",buyButtonContainer:"lojahr-product-summary-images-2-x-buyButtonContainer",buyButton:"lojahr-product-summary-images-2-x-buyButton",description:"lojahr-product-summary-images-2-x-description",quantityStepperContainer:"lojahr-product-summary-images-2-x-quantityStepperContainer",imageInline:"lojahr-product-summary-images-2-x-imageInline",isHidden:"lojahr-product-summary-images-2-x-isHidden",containerNormal:"lojahr-product-summary-images-2-x-containerNormal",nameContainer:"lojahr-product-summary-images-2-x-nameContainer",clearLink:"lojahr-product-summary-images-2-x-clearLink",aspectRatio:"lojahr-product-summary-images-2-x-aspectRatio",priceContainer:"lojahr-product-summary-images-2-x-priceContainer",SKUSelectorContainer:"lojahr-product-summary-images-2-x-SKUSelectorContainer",attachmentListContainer:"lojahr-product-summary-images-2-x-attachmentListContainer",attachmentItemContainer:"lojahr-product-summary-images-2-x-attachmentItemContainer",imageNormal:"lojahr-product-summary-images-2-x-imageNormal",addToListBtn:"lojahr-product-summary-images-2-x-addToListBtn",imagePlaceholder:"lojahr-product-summary-images-2-x-imagePlaceholder",attachmentChildrenContainer:"lojahr-product-summary-images-2-x-attachmentChildrenContainer",imageStackContainer:"lojahr-product-summary-images-2-x-imageStackContainer",hoverEffect:"lojahr-product-summary-images-2-x-hoverEffect",hoverImage:"lojahr-product-summary-images-2-x-hoverImage",mainImageHovered:"lojahr-product-summary-images-2-x-mainImageHovered",priceSpinner:"lojahr-product-summary-images-2-x-priceSpinner",spin:"lojahr-product-summary-images-2-x-spin",customImageStack:"lojahr-product-summary-images-2-x-customImageStack",customArrowLeft:"lojahr-product-summary-images-2-x-customArrowLeft",customArrowRight:"lojahr-product-summary-images-2-x-customArrowRight",customDots:"lojahr-product-summary-images-2-x-customDots",customDot:"lojahr-product-summary-images-2-x-customDot",customDotActive:"lojahr-product-summary-images-2-x-customDotActive"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPublicPath=t.register=void 0;var a="__RENDER_8_RUNTIME__",o="__RENDER_8_COMPONENTS__",i=!("undefined"==typeof window||!window.document);i&&!window.global&&(window.global=window),window[o]=window[o]||{},t.register=function(e,t,r,i,n){var c="".concat(r,"/").concat(n),l="".concat(i,"/").concat(n),u=function(){return function(e,t){try{var r=e();return r.__esModule?r.default:r.default||r}catch(e){throw new Error("An error happened while requiring the app ".concat(t,", please check your app's code.\\n").concat(e.stack))}}(e,c)};if(window[a]&&window[a].registerComponent){var m=!!window.__RENDER_LAZY__;window[a].registerComponent(t,m?u:u(),r,n,m)}else{var s=u();window[a]&&window[a].withHMR?window[o][c]=window[o][l]=window[a].withHMR(t,s):window[o][c]=window[o][l]=s}return{}},t.getPublicPath=function(e){var t=window.__hostname__,r="/_v/public/assets/v1/published/";return i&&window.__RUNTIME__&&(t=__RUNTIME__.assetServerPublishedHost||window.location.hostname,r=__RUNTIME__.assetServerPublishedPath||"/_v/public/assets/v1/published/"),"https://"+t+r+"".concat(e,"/public/react/")}},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/useDevice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/CollectionBadges"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/DiscountBadge"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValues"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},function(e,t,r){"use strict";r.r(t),function(e){var t=r(3);r.p=Object(t.getPublicPath)("lojahr.product-summary-images@2.85.8");var a=Object(t.register)((function(){return r(13)}),e,"lojahr.product-summary-images@2.85.8","lojahr.product-summary-images@2.x","ProductSummaryImage");a.renderHotReload,a.setupHMR}.call(this,r(12)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r0?{cleanUrl:i[0],vParam:n}:{cleanUrl:e}}(e),o=a.vParam,i=a.cleanUrl;return o?"".concat(i,"-").concat(t,"-").concat(r,"?v=").concat(o):"".concat(i,"-").concat(t,"-").concat(r)}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){"number"==typeof t&&(t=Math.min(t,3e3)),"number"==typeof r&&(r=Math.min(r,4e3));var a=N(e,t,r),o=a.includes("?")?"&":"?";return"".concat(a).concat(o,"width=").concat(t,"&height=").concat(r,"&aspect=true")}}var R=function(e,t,r,a){var o,n=t,c="auto";return a&&"auto"!==a?(c=t*(null!==(o=function(e){if(!e)return null;if("string"==typeof e){if("auto"===e)return null;var t=e.split(":");if(2!==t.length)return null;var r=i(t,2),a=r[0],o=r[1],n=parseFloat(o)/parseFloat(a);return"number"!=typeof n||Number.isNaN(n)?null:n}return"number"==typeof e?e:null}(a))&&void 0!==o?o:1),n>r&&(c/=n/r,n=r),c>r&&(n/=c/r,c=r),n=Math.round(n),c=Math.round(c)):n=Math.min(r,n),I(e,n,c)},O=E.a.useProductSummary,k=["image","imageWrapper","imageContainer","product","imagePlaceholder","mainImageHovered","videoWrapper","video","customImageStack","customArrowLeft","customArrowRight","customDots","customDot","customDotActive"];function M(e){var t=e.src,r=e.width,a=e.height,o=e.dpi,i=e.aspectRatio;return r||a?I(t,r*o,a*o):i?R(t,300,500,i):t}function L(e){var t=e.images,r=e.hoverImage,a=e.hoverImageLabel,o=null!=r?r:{},i=o.criteria,n=void 0===i?"label":i,c=o.label,l=void 0===c?a:c,u=o.labelMatchCriteria,m=void 0===u?"exact":u,s=o.index;return"label"===n?A(t,l,m):"index"===n?function(e,t){return null==t||Number.isNaN(t)?null:e[t]}(t,s):null}function D(e){var t=e.width,r=e.height,a=e.aspectRatio,o=e.maxHeight;return t||r?{width:"100%",height:r,objectFit:"contain",maxHeight:"unset",maxWidth:t}:a||o?{width:"100%",height:"100%",objectFit:"contain",maxHeight:null!=o?o:"unset"}:void 0}function H(e){var t=e.showCollections,r=e.productClusters,a=e.children;if(!t||!r||0===r.length)return c.a.createElement(c.a.Fragment,null,a);var o=r.map((function(e){return e.name}));return c.a.createElement(u.a,{collectionBadgesText:o},a)}function T(e){var t=e.showBadge,r=e.commertialOffer,a=e.badgeText,o=e.children;return t?c.a.createElement(s.a,{listPrice:r.ListPrice,sellingPrice:r.Price,label:a},o):c.a.createElement(c.a.Fragment,null,o)}function A(e,t,r){return t?"contains"===r?e.find((function(e){var r=e.imageLabel;return null==r?void 0:r.includes(t)})):e.find((function(e){return e.imageLabel===t})):null}function B(e){var t=e.src,r=e.width,a=e.height,o=e.onError,i=e.alt,n=e.className,l=e.aspectRatio,u=e.maxHeight,m=e.fetchpriority,s=void 0===m?"auto":m,d=g()().isMobile?2:1;return c.a.createElement("img",{src:M({src:t,width:r,height:a,dpi:d,aspectRatio:l}),style:D({width:r,height:a,aspectRatio:l,maxHeight:u}),loading:"high"===s?"eager":"lazy",alt:i,className:n,onError:o,fetchpriority:s})}function U(e){var t,r,a,o,l,u,m,s,d,h,v,y,w,_,E=e.showBadge,j=void 0===E||E,S=e.badgeText,N=e.displayMode,I=void 0===N?"normal":N,R=e.mainImageLabel,M=void 0===R?"":R,D=e.hoverImageLabel,U=void 0===D?"":D,F=e.hoverImage,W=e.showCollections,X=void 0!==W&&W,q=e.placeholder,z=e.width,K=e.height,V=e.aspectRatio,Z=e.maxHeight,Y=e.classes,$=e.fetchpriority,G=void 0===$?"byPosition":$,J=O(),Q=J.product,ee=J.position,te=b()(k,{classes:Y}).handles,re=i(Object(n.useState)(!1),2),ae=re[0],oe=re[1],ie=function(){return oe(!0)},ne=g()().isMobile,ce=null!==(t=x()())&&void 0!==t?t:{},le=ce.skuSelector,ue=(le=void 0===le?{}:le).selectedImageVariationSKU,me=null!=Q?Q:{},se=me.productClusters,de=me.productName,pe=null==Q?void 0:Q.sku,he=f()({widthProp:z,heightProp:K,aspectRatioProp:V,maxHeightProp:Z}),ge=he.widthProp,ve=he.heightProp,fe=he.aspectRatioProp,ye=he.maxHeightProp,be=p()(P.a.imageContainer,te.imageWrapper,"inline"!==I&&"db w-100 center"),we=null!==(r=null==pe?void 0:pe.images)&&void 0!==r?r:[],xe=L({images:we,hoverImage:F,hoverImageLabel:U}),_e=null!==(m=null===(u=null===(l=null===(o=null===(a=null==ce?void 0:ce.product)||void 0===a?void 0:a.properties)||void 0===o?void 0:o.find((function(e){return"VĂ­deo"===(null==e?void 0:e.name)})))||void 0===l?void 0:l.values)||void 0===u?void 0:u[0])&&void 0!==m?m:null;_e&&(null==_e?void 0:_e.length)<=5&&(_e=null);var Ee=[parseFloat(null!==(s=null!=ge?ge:ve)&&void 0!==s?s:0),parseFloat(null!==(d=null!=ve?ve:ge)&&void 0!==d?d:0)],Ce=Ee[0],je=Ee[1],Pe=p()(P.a.imageStackContainer,!ne&&!_e&&P.a.hoverEffect),Se=p()("dib relative",te.imageContainer,Pe),Ne=null!==(v=null===(h=null==pe?void 0:pe.image)||void 0===h?void 0:h.imageUrl)&&void 0!==v?v:"";if(!q&&(!Ne||ae))return c.a.createElement("div",{className:be},c.a.createElement("div",{className:Se},c.a.createElement(C,{cssHandle:te.imagePlaceholder})));var Ie=te.videoWrapper;if(null==ue&&M){var Re="string"==typeof M?A(we,M):A(we,M.label,M.labelMatchCriteria);Re&&(Ne=Re.imageUrl)}var Oe=p()("inline"===I?P.a.imageInline:P.a.imageNormal),ke=null!==(_=null===(w=null===(y=Q.sku)||void 0===y?void 0:y.seller)||void 0===w?void 0:w.commertialOffer)&&void 0!==_?_:{},Me=p()(Oe,te.image,Boolean(xe)&&te.mainImageHovered),Le=we.length>1&&!_e,De=i(Object(n.useState)(0),2),He=De[0],Te=De[1],Ae=i(Object(n.useState)(!1),2),Be=Ae[0],Ue=Ae[1],Fe=we.length,We=function(){Ue(!0),Te((function(e){return e+1=0?e-1:e}))},qe=Object(n.useRef)(null),ze=function(e){qe.current=e.touches[0].clientX},Ke=function(e){if(null!==qe.current){var t=qe.current-e.changedTouches[0].clientX;Math.abs(t)>40&&(Ue(!0),t>0&&He0&&(Xe(),e.stopPropagation())),qe.current=null}},Ve=i(Object(n.useState)(!1),2),Ze=Ve[0],Ye=Ve[1];Object(n.useEffect)((function(){Ye(!0)}),[]);var $e,Ge,Je;return c.a.createElement("div",{className:be},c.a.createElement(H,{showCollections:X,productClusters:se},c.a.createElement(T,{showBadge:j,commertialOffer:ke,badgeText:S},c.a.createElement("div",{className:"".concat(Se," ").concat(_e?Ie:void 0)},_e?c.a.createElement("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"".concat(Me," ").concat(te.video),style:{aspectRatio:fe,width:"100%",objectFit:"contain",maxHeight:"unset"}},c.a.createElement("source",{src:_e,type:"video/mp4"})):Le?c.a.createElement("div",{className:te.customImageStack,style:{touchAction:"pan-y pinch-zoom",overscrollBehaviorX:"contain",WebkitOverflowScrolling:"touch"},onTouchStart:ze,onTouchMove:function(e){if(ne&&null!==qe.current){var t=e.touches[0].clientX,r=qe.current-t;He===Fe-1&&r>0||0===He&&r<0||e.stopPropagation()}},onTouchEnd:Ke},c.a.createElement("div",{style:{display:"flex",transform:"translateX(-".concat(100*He,"%)"),transition:"transform 0.3s ease",width:"100%"},onTouchStart:ze,onTouchEnd:Ke},we.map((function(e,t){return c.a.createElement("div",{key:"slide-".concat(t),style:{minWidth:"100%",touchAction:"pan-y pinch-zoom"}},function(e,t,r){return r?e===t||e===t-1||e===t+1:e===t}(t,He,Be)?c.a.createElement(B,{src:e.imageUrl,width:Ce,height:je,aspectRatio:fe,maxHeight:ye,alt:"".concat(de," ").concat(t+1),className:Me,onError:ie,fetchpriority:"byPosition"===G?(r=ne,a=ee,o=t,i=(null!=a?a:0)+1,(r?i<=3:i<=5)&&0===o?"high":"low"):G}):c.a.createElement("div",{style:{width:"100%",height:"100%"}}));var r,a,o,i}))),!ne&&Fe>1&&c.a.createElement(c.a.Fragment,null,c.a.createElement("button",{type:"button",style:{visibility:Ze?"visible":"hidden",position:"absolute",top:"50%"},onClick:function(e){e.preventDefault(),e.stopPropagation(),Ue(!0),Xe()},disabled:0===He,className:te.customArrowLeft},c.a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.a.createElement("path",{d:"M11 1L4 8L11 15",stroke:"currentColor","stroke-width":"1","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}))),c.a.createElement("button",{type:"button",style:{visibility:Ze?"visible":"hidden",position:"absolute",top:"50%"},onClick:function(e){e.preventDefault(),e.stopPropagation(),Ue(!0),We()},disabled:He===Fe-1,className:te.customArrowRight},c.a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.a.createElement("path",{d:"M5 15L12 8L5 1",stroke:"currentColor","stroke-width":"1","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})))),ne&&Fe>1&&c.a.createElement("div",{className:te.customDots,style:{visibility:Ze?"visible":"hidden",position:"absolute",bottom:"0.5rem"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},we.map((function(e,t){return c.a.createElement("button",{key:"slide-".concat(t),type:"button",className:"".concat(te.customDot," ").concat(t===He?te.customDotActive:""),onClick:function(e){e.preventDefault(),e.stopPropagation(),Ue(!0),Te(t)},"aria-label":"Imagem ".concat(t+1)})})))):c.a.createElement(B,{src:Ne,width:Ce,height:je,aspectRatio:fe,maxHeight:ye,alt:de,className:Me,onError:ie,fetchpriority:"byPosition"===G?($e=ne,Ge=ee,Je=(null!=Ge?Ge:0)+1,$e?Je<=3?"high":"low":Je<=5?"high":"low"):G})))))}U.schema={title:"admin/editor.productSummaryImage.title",description:"admin/editor.productSummaryImage.description",type:"object",properties:{showBadge:{type:"boolean",title:"admin/editor.productSummary.showBadge.title",default:!0,isLayout:!0},showCollections:{type:"boolean",title:"admin/editor.productSummary.showCollections.title",default:!1,isLayout:!0},displayMode:{title:"admin/editor.productSummary.displayMode.title",type:"string",enum:["normal","inline"],default:"normal",isLayout:!0},hoverImageLabel:{title:"admin/editor.productSummaryImage.hoverImageLabel.title",description:"admin/editor.productSummaryImage.hoverImageLabel.description",type:"string",default:"",isLayout:!1},hoverImage:{type:"object",properties:{criteria:{title:"admin/editor.productSummaryImage.hoverImage.criteria.title",enum:["index","label"]}},dependencies:{criteria:{oneOf:[{properties:{criteria:{enum:["index"]},index:{title:"admin/editor.productSummaryImage.hoverImage.criteria.index",type:"number"}}},{properties:{criteria:{enum:["label"]},label:{title:"admin/editor.productSummaryImage.hoverImage.criteria.label",type:"string"},labelMatchCriteria:{title:"admin/editor.productSummaryImage.hoverImage.criteria.matchCriteria",widget:{"ui:widget":"radio"},type:"string",enum:["exact","contains"],default:"exact"}}}]}}},fetchpriority:{title:"admin/editor.productSummaryImage.fetchpriority.title",enum:["high","low","auto","byPosition"],enumNames:["admin/editor.productSummaryImage.fetchpriority.high","admin/editor.productSummaryImage.fetchpriority.low","admin/editor.productSummaryImage.fetchpriority.auto","admin/editor.productSummaryImage.fetchpriority.byPosition"],widget:{"ui:widget":"radio"},default:"byPosition"}}};t.default=U}]);