mk-sdk-git 1.1.98 → 1.1.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mk-core.js +1 -1
- package/dist/mk-sdk.js +1 -1
- package/package.json +1 -1
- package/src/tryon/automount.js +23 -1
- package/src/tryon/bridge.js +2 -1
package/dist/mk-core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var mn=Object.defineProperty;var C=(t,e)=>{for(var r in e)mn(t,r,{get:e[r],enumerable:!0})};var Ut={collectorUrl:"https://api-collector.mk3dlabs.com",appUrl:"https://mkfashion.mk3dlabs.com/visualizer",apiUrl:"https://mkfashion-new-api.mk3dlabs.com"},hn={},et=null;function Ft(){if(et)return et;let t=null;try{t=document.currentScript||document.querySelector("script[data-mk-project]")||document.querySelector('script[src*="mk-sdk"]')||document.querySelector('script[src*="mk-pixel"]')}catch(i){}let e=i=>{try{return t&&t.getAttribute(i)}catch(a){return null}},r=e("data-mk-project")||e("data-mk-client")||window.__MK&&(window.__MK.projectId||window.__MK.clientSlug)||null,n=e("data-mk-product")||window.__MK&&window.__MK.product||"mk-fashion",o=e("data-mk-collector")||window.__MK&&window.__MK.collectorUrl||hn.collectorUrl||Ut.collectorUrl;return et={projectId:r,product:n,collectorUrl:o,appUrl:window.__MK&&window.__MK.appUrl||Ut.appUrl,apiUrl:window.__MK&&window.__MK.apiUrl||Ut.apiUrl,debug:!!(e("data-mk-debug")!==null||window.__MK&&window.__MK.debug||/[?&]mkdebug\b/.test(location.search)),observe:!!(window.__MK&&window.__MK.observe),forceButton:!!(window.__MK&&window.__MK.forceButton),anchor:window.__MK&&window.__MK.anchor||null,anchors:window.__MK&&window.__MK.anchors||null,cards:window.__MK&&window.__MK.cards||null,modalWidth:window.__MK&&window.__MK.modalWidth||null,modalHeight:window.__MK&&window.__MK.modalHeight||null,cartRedirect:!(window.__MK&&window.__MK.cartRedirect===!1),cartBehavior:window.__MK&&window.__MK.cartBehavior||null,cartOpenSelector:window.__MK&&window.__MK.cartOpenSelector||null,autoTrack:e("data-mk-no-autotrack")===null,batchIntervalMs:window.__MK&&window.__MK.batchIntervalMs||8e3,batchMaxSize:window.__MK&&window.__MK.batchMaxSize||20,engagementIntervalMs:15e3},et}function g(){return et||Ft()}function y(...t){let e=g();e&&e.debug&&typeof console!="undefined"&&console.log("[mk-sdk]",...t)}var Ne="_mk_vid",qe="_mk_sid",rt=null,nt=null;function ht(){return typeof crypto!="undefined"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function yt(){if(rt)return rt;try{let t=localStorage.getItem(Ne);return t||(t="v_"+ht(),localStorage.setItem(Ne,t)),rt=t,t}catch(t){return rt="v_"+ht(),rt}}function De(){if(nt)return nt;try{let t=sessionStorage.getItem(qe);return t||(t="s_"+ht(),sessionStorage.setItem(qe,t)),nt=t,t}catch(t){return nt="s_"+ht(),nt}}var $=[],ze=!1;function Kt(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619)>>>0;return(e>>>0)/4294967296}function yn(){let t=typeof navigator!="undefined"&&navigator.userAgent||"";return/iPad|Tablet|PlayBook|Silk/i.test(t)||/Android/i.test(t)&&!/Mobile/i.test(t)?"tablet":/Mobi|Android|iPhone|iPod|Windows Phone|BlackBerry/i.test(t)?"mobile":"desktop"}function gn(){try{return localStorage.getItem("_mk_seen")?!0:(localStorage.setItem("_mk_seen",String(Date.now())),!1)}catch(t){return!1}}function wn(t,e){let r=t.product||"mk-fashion";return r==="ambos"||r===(e||"mk-fashion")}function xn(t,e){let r=t.targeting||{};return!(Array.isArray(r.device)&&r.device.length&&r.device.indexOf(e.device)<0||r.audience==="new"&&e.returning||r.audience==="returning"&&!e.returning)}function bn(t,e){let r=t.traffic==null?100:Number(t.traffic);return r>=100?!0:r<=0?!1:Kt(e+"|"+t.id+"|t")*100<r}function _n(t,e){let r=(t.variants||[]).filter(a=>a&&a.key),n=r.reduce((a,c)=>a+(Number(c.weight)||0),0);if(n<=0)return null;let o=Kt(e+"|"+t.id)*n,i=0;for(let a=0;a<r.length;a++)if(i+=Number(r[a].weight)||0,o<i)return r[a];return r[r.length-1]}function vn(t,e,r){let n="mk_exp_"+e+"_"+t.id,o=c=>(t.variants||[]).filter(l=>l&&l.key===c)[0]||null,i=null;try{i=localStorage.getItem(n)}catch(c){}if(i&&o(i))return o(i);let a=_n(t,r);if(a)try{localStorage.setItem(n,a.key)}catch(c){}return a}function gt(t,e,r){if(ze)return;ze=!0;let n=t&&Array.isArray(t.experiments)?t.experiments:[];if(!n.length)return;let o=yt(),i={device:yn(),returning:gn()},a=n.filter(u=>u&&u.status==="running"&&wn(u,r)&&xn(u,i)&&bn(u,o));if(!a.length){y("[A/B] "+n.length+" experimento(s) configurado(s); nenhum eleg\xEDvel p/ este visitante (status/targeting/tr\xE1fego/produto)");return}let c=a.filter(u=>u.coexist==="exclusive"),l;if(c.length){let u=Math.min(c.length-1,Math.floor(Kt(o+"|excl")*c.length));l=[c[u]]}else l=a;for(let u=0;u<l.length;u++){let s=l[u],d=vn(s,e||"",o);d&&$.push({exp:s.id,var:d.key,control:!!d.control,overrides:d.overrides||{}})}$.length&&y("[A/B] variante(s) ativa(s):",$t())}function Ue(){return $.map(t=>({exp:t.exp,var:t.var}))}function $t(){return $.map(t=>({exp:t.exp,variant:t.var,control:t.control,holdout:!!(t.overrides&&t.overrides.holdout)}))}function Fe(){try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);r&&(r.indexOf("mk_exp_")===0||r==="_mk_vid"||r==="_mk_seen")&&t.push(r)}t.forEach(e=>{try{localStorage.removeItem(e)}catch(r){}}),y("[A/B] reset \u2014 "+t.length+" chave(s) apagada(s); recarregando p/ re-sortear")}catch(t){}try{typeof location!="undefined"&&location.reload&&location.reload()}catch(t){}}function ot(){let t={holdout:!1,tryOnButton:null,modalWidth:null,modalHeight:null};for(let e=0;e<$.length;e++){let r=$[e];if(r.control)continue;let n=r.overrides||{};n.holdout&&(t.holdout=!0),n.tryOnButton&&(t.tryOnButton=n.tryOnButton),n.modalWidth&&(t.modalWidth=n.modalWidth),n.modalHeight&&(t.modalHeight=n.modalHeight)}return t}var Ke=[/email/i,/e-?mail/i,/cpf/i,/cnpj/i,/phone/i,/telefone/i,/celular/i,/address/i,/endereco/i,/cep/i,/zip/i,/card/i,/cartao/i,/cvv/i,/password/i,/senha/i,/token/i,/\bnome\b/i,/fullname/i,/firstname/i,/lastname/i,/sobrenome/i,/birth/i,/nascimento/i,/rg\b/i],$e={imageUrl:1,image:1,thumbnail:1,photo:1,imageBase64:1,src:1},Ht=2e3;function He(t){for(let e=0;e<Ke.length;e++)if(Ke[e].test(t))return!0;return!1}function Vt(t){if(!t||typeof t!="object"||Array.isArray(t))return typeof t=="string"&&t.length>Ht?t.slice(0,200)+"...[truncated "+t.length+"B]":t;let e={};for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||He(r))continue;let n=t[r];if($e[r]){e[r+"Present"]=!!n;continue}if(typeof n=="string"&&n.length>Ht){e[r]=n.slice(0,200)+"...[truncated "+n.length+"B]";continue}if(n&&typeof n=="object"&&!Array.isArray(n)){e[r]=Cn(n);continue}e[r]=n}return e}function Cn(t){let e={};for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||He(r))continue;let n=t[r];if($e[r]){e[r+"Present"]=!!n;continue}if(typeof n=="string"&&n.length>Ht){e[r]=n.slice(0,200)+"...[truncated]";continue}e[r]=n}return e}var wt=[],Wt=null,V=null,Gt="1.1.98",kn=["off","pdp_tryon","pdp","all","tryon_engaged"],it,Jt=null,J="unknown",W=[],H=null;function We(){let t=g();return"mk_engaged_"+(t&&t.projectId||"")}function Xt(){if(H!==null)return H;try{H=localStorage.getItem(We())==="1"}catch(t){H=!1}return H}function Yt(){if(!Xt()){H=!0;try{localStorage.setItem(We(),"1")}catch(t){}xt(!1)}}var Sn=/^purchase$/;function Je(t,e){if(it===void 0)return"hold";if(it==="off")return"drop";if(it==="all"||e&&Sn.test(e))return"collect";switch(it){case"pdp":return t==="pdp"?"collect":"drop";case"tryon_engaged":if(Xt())return"collect";case"pdp_tryon":return t!=="pdp"?"drop":J==="available"?"collect":J==="unavailable"?"drop":"hold";default:return"collect"}}function xt(t){if(!W.length)return;let e=[];for(let r of W){let n=Je(r._pt,r.name);n==="collect"?Ye(r.name,r.params,r.ts):n==="hold"&&!t&&e.push(r)}W=e}function Zt(t){it=kn.indexOf(t)>=0?t:"all",xt(!1)}function Ge(t){J=t==="available"?"available":"unavailable",xt(!1)}function Xe(t){xt(!0),V=t,Jt=t&&t.pageType||null,J="unknown"}function m(t,e,r){if(!g().projectId){(m._pre=m._pre||[]).push({name:t,params:e,ts:r||Date.now()}),m._pre.length>50&&m._pre.shift();return}if(m._pre&&m._pre.length){let o=m._pre;m._pre=[];for(let i of o)Ve(i.name,i.params,i.ts)}Ve(t,e,r)}function Ve(t,e,r){let n=Je(Jt,t);if(Tn(t,e,n),n==="collect"){Ye(t,e,r);return}if(n==="drop"){y("descartado (escopo)",t);return}W.push({name:t,params:e,ts:r||Date.now(),_pt:Jt}),W.length>300&&W.shift()}function Tn(t,e,r){if(g().observe)try{window.postMessage({__mkpixel:!0,event:{name:"page_"+Ze(t),params:Vt(e||{})},site:V?{pageType:V.pageType,platform:V.platform,url:V.url}:null,gate:r},"*")}catch(o){}}function Ye(t,e,r){let n=g(),o=Vt(e||{}),i="page_"+Ze(t);if(wt.push({name:i,ts:r||Date.now(),params:o}),y("queued",t,o),wt.length>=n.batchMaxSize){B();return}Wt||(Wt=setTimeout(()=>{Wt=null,B()},n.batchIntervalMs))}function Ze(t){if(typeof t!="string"||!t)return"unknown";let e=t.replace(/^on/,"");return e=e.replace(/[A-Z]/g,(r,n)=>(n>0?"_":"")+r.toLowerCase()),e.indexOf("page_")===0&&(e=e.slice(5)),e}function B(t){if(wt.length===0)return;let e=g();if(!e.projectId||!e.collectorUrl)return;let r=wt.splice(0,50),n=J==="available"?!0:J==="unavailable"?!1:void 0,o=Ue(),i=JSON.stringify({product:e.product||void 0,sdkVersion:Gt,experiments:o.length?o:void 0,visitorId:yt(),sessionId:De(),engaged:Xt()||void 0,tryonAvailable:n,events:r,site:V||void 0}),a=e.collectorUrl+"/v1/track";try{fetch(a,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json","X-MK-Project-Id":e.projectId},body:i}).catch(()=>{})}catch(c){try{navigator.sendBeacon&&navigator.sendBeacon(a+"?projectId="+encodeURIComponent(e.projectId),new Blob([i],{type:"text/plain"}))}catch(l){}}}function Qe(){try{window.addEventListener("pagehide",()=>B(!0)),window.addEventListener("beforeunload",()=>B(!0)),document.addEventListener("visibilitychange",()=>{document.hidden&&B(!0)})}catch(t){}}function I(t){let e=[];try{let r=document.querySelectorAll('script[type="application/ld+json"]');for(let n of r){let o;try{o=JSON.parse(n.textContent)}catch(a){continue}let i=[];Array.isArray(o)?i.push(...o):o["@graph"]?i.push(...o["@graph"]):i.push(o);for(let a of i){if(!a||!a["@type"])continue;let c=Array.isArray(a["@type"])?a["@type"]:[a["@type"]];(!t||t.some(l=>c.includes(l)))&&e.push(a)}}}catch(r){}return e}var tr=["off","pdp_tryon","pdp","all","tryon_engaged"],An="all",En=30*60*1e3,N=null;function G(){if(N)return N;let t=g();return!t.projectId||!t.apiUrl?(N=Promise.resolve(null),N):(N=fetch(t.apiUrl+"/projects/"+t.projectId).then(e=>{if(!e.ok)throw new Error("http "+e.status);return e.json()}).then(e=>e&&e.project||e||null).catch(()=>(N=null,null)),N)}function er(t){let e=t&&t.analytic&&t.analytic.scope;return tr.indexOf(e)>=0?e:An}var rr=t=>"mk_scope_"+t;function nr(t){try{let e=localStorage.getItem(rr(t));if(!e)return null;let r=JSON.parse(e);return!r||typeof r.exp!="number"||r.exp<Date.now()?null:tr.indexOf(r.scope)>=0?r.scope:null}catch(e){return null}}function or(t,e){try{localStorage.setItem(rr(t),JSON.stringify({scope:e,exp:Date.now()+En}))}catch(r){}}var ee={};C(ee,{addToCart:()=>Fn,detect:()=>qn,getCartSummary:()=>zn,id:()=>Bn,openCartDrawer:()=>Kn,resolveSku:()=>Dn,skipRedirect:()=>Nn});var _t={};C(_t,{addToCart:()=>Rn,detect:()=>Ln,getCartSummary:()=>te,id:()=>In,openCartDrawer:()=>On,resolveSku:()=>Qt});var In="shopify";function Ln(){return!!(window.Shopify||window.ShopifyAnalytics)}function Qt(){let t=window;return t.ShopifyAnalytics&&t.ShopifyAnalytics.meta&&t.ShopifyAnalytics.meta.product?{value:String(t.ShopifyAnalytics.meta.product.id),source:"shopify"}:null}var bt=t=>String(t==null?"":t).trim().toLowerCase();async function Rn({size:t,color:e,sku:r,quantity:n}){let o=(location.pathname.split("/products/")[1]||"").split(/[?#]/)[0];if(!o)throw new Error("shopify: sem handle de produto na URL (n\xE3o \xE9 PDP?)");let a=(await fetch("/products/"+o+".js").then(p=>p.json())).variants||[],c=p=>[p.option1,p.option2,p.option3].concat(String(p.title||"").split("/")).map(bt).filter(Boolean),l=(p,v)=>c(p).indexOf(bt(v))>=0,u=p=>(!t||l(p,t))&&(!e||l(p,e)),s=null;if((t||e)&&(s=a.find(p=>u(p)&&p.available)||a.find(u)),!s&&r&&(s=a.find(p=>bt(p.sku)===bt(r))),s||(s=a.find(p=>p.available)||a[0]),!s)throw new Error("shopify: variante n\xE3o encontrada");let d=ir(),f=null;if(d&&typeof d.getSectionsToRender=="function")try{f=d.getSectionsToRender().map(p=>({id:p.id,selector:p.selector||"#"+p.id})).filter(p=>p.id)}catch(p){}let h={items:[{id:s.id,quantity:n||1}]};f&&f.length&&(h.sections=f.map(p=>p.id).join(","),h.sections_url=location.pathname);let w=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(!w.ok)throw new Error("shopify: /cart/add.js HTTP "+w.status);let b=await w.json().catch(()=>({}));return d&&f&&b.sections&&Mn(d,f,b.sections),{platform:"shopify",variantId:s.id,size:s.title,sku:s.sku||null}}function ir(){return document.querySelector("cart-drawer, cart-notification")}function Mn(t,e,r){for(let n of e){let o=r[n.id];if(o)try{let i=null;if(typeof t.getSectionInnerHTML=="function")i=t.getSectionInnerHTML(o,n.selector);else{let c=new DOMParser().parseFromString(o,"text/html").querySelector(n.selector);i=c?c.innerHTML:null}let a=document.querySelector(n.selector);a&&i!=null&&(a.innerHTML=i)}catch(i){}}}async function te(){try{let t=await fetch("/cart.js",{headers:{Accept:"application/json"}}).then(e=>e.json());return{value:(Number(t.total_price)||0)/100,itemCount:Number(t.item_count)||0,currency:t.currency||null}}catch(t){return null}}var Pn=["[data-cart-drawer-toggle]",'[data-action="open-cart-drawer"]','[data-action="open-cart"]',".js-cart-drawer-open",".js-drawer-open-cart",".cart-drawer-toggle",".js-cart-toggle",'[aria-controls="CartDrawer"]','[aria-controls="cart-drawer"]',"#cart-icon-bubble","#lk-cart-icon",".header__cart",".site-header__cart",".cart-link",".header-cart",'a[href="/cart"]','a[href$="/cart"]'];function jn(t){try{let e=t.getBoundingClientRect();return e.width>0&&e.height>0&&getComputedStyle(t).visibility!=="hidden"}catch(e){return!1}}function On(){let t=ir();if(t&&typeof t.open=="function")return setTimeout(()=>{try{t.open()}catch(r){}},200),!0;let e=null;for(let r of Pn)try{if(e=[...document.querySelectorAll(r)].find(jn),e)break}catch(n){}return e?(setTimeout(()=>{try{e.click()}catch(r){}},300),!0):!1}var Bn="zerezes",Nn=!0;function qn(){try{if(!(window.Shopify||window.ShopifyAnalytics))return!1;let t=window.Shopify&&window.Shopify.shop||"";return/(^|\.)zerezes\./i.test(location.hostname)||/cs-zerezes/i.test(t)}catch(t){return!1}}var Dn=Qt,zn=te;function Un(){let t=[...document.querySelectorAll(".lens-selection__button, [data-has-lens-basket]")];return t.find(e=>{let r=e.getBoundingClientRect();return r.width>0&&r.height>0})||t[0]||null}async function Fn(){let t=Un();if(!t)throw new Error("zerezes: bot\xE3o de sele\xE7\xE3o de lentes n\xE3o encontrado");try{window.postMessage({source:"mkfashion-app",action:"close_request"},"*")}catch(e){}return setTimeout(()=>{try{t.click()}catch(e){}},250),{platform:"zerezes",nativeFlow:"lens-selection"}}function Kn(){return!0}var ne={};C(ne,{addToCart:()=>Wn,detect:()=>Hn,getCartSummary:()=>Jn,id:()=>$n,resolveSku:()=>Vn});var $n="hybris";function Hn(){return!!(window.ACC&&window.ACC.config)}function Vn(){let t=(location.pathname||"").match(/\/p\/([^/?#]+)/);return t&&t[1]?{value:decodeURIComponent(t[1]),source:"hybris/url"}:null}var ar=t=>String(t==null?"":t).trim().toLowerCase();async function Wn({size:t,quantity:e}){let r=[...document.querySelectorAll('.js-product-select-size, a[data-code], [class*="select-size"]')].filter(h=>h.getAttribute&&h.getAttribute("data-code")),n=t?r.find(h=>ar(h.textContent)===ar(t)):null;n||(n=r.find(h=>h.offsetParent!==null)||r[0]);let o=n&&n.getAttribute("data-code");if(!o)throw new Error("hybris: variante (data-code) n\xE3o encontrada");let i=document.getElementById("product--add-to-cart-form")||document.querySelector('form[action*="/cart/add"]'),a=i&&i.querySelector('[name="CSRFToken"]'),c=a&&a.value,l=i&&i.getAttribute("action")||"/cart/add";if(!c)throw new Error("hybris: CSRFToken n\xE3o encontrado");let u=new URLSearchParams;u.set("productCodePost",o),u.set("qty",String(e||1)),u.set("CSRFToken",c);let s=await fetch(l,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},body:u.toString()});if(!s.ok)throw new Error("hybris: "+l+" HTTP "+s.status);let d=null,f=null;try{let h=await s.clone().json(),w=h&&h.cartData;w&&(d=re(w.total!=null?w.total:w.totalPrice),f=w.totalUnitCount!=null?Number(w.totalUnitCount):Array.isArray(w.products)?w.products.length:null)}catch(h){}return{platform:"hybris",productCode:o,size:n.textContent.trim(),cartValue:d,itemCount:f,currency:"BRL"}}function re(t){if(t==null||t==="")return null;if(typeof t=="number")return Number.isFinite(t)?t:null;let e=String(t).replace(/[^\d.,]/g,"");if(!e)return null;let r=e.indexOf(",")>e.indexOf(".")?parseFloat(e.replace(/\./g,"").replace(",",".")):parseFloat(e.replace(/,/g,""));return Number.isFinite(r)?r:null}async function Jn(){try{let t=await fetch("/cart/async?nocache="+Date.now(),{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(a=>a.ok?a.text():"");if(!t)return null;let e=new DOMParser().parseFromString(t,"text/html"),r=e.querySelector(".minicart-total .price")||e.querySelector(".floating-cart--cart-total"),n=r?re(r.textContent):null,o=e.querySelector(".mini-badge"),i=o?parseInt(o.textContent,10)||0:null;return n==null&&i==null?null:{value:n,itemCount:i,currency:"BRL"}}catch(t){}try{let t=[".minicart-total .price",".js-cart-total",".cart-total",".total-price",".grand-total"];for(let e of t){let r=document.querySelector(e),n=r&&re(r.textContent);if(n)return{value:n,itemCount:null,currency:"BRL"}}}catch(t){}return null}var ie={};C(ie,{addToCart:()=>Zn,addToCartBatch:()=>Qn,detect:()=>Xn,getCartSummary:()=>to,getFsCartStore:()=>Ct,id:()=>Gn,openCartDrawer:()=>Yn,resolveSku:()=>oe});var Gn="vtex";function Xn(){return!!(window.vtex||window.vtexjs||window.vtxctx||window.skuJson_0||window.__RUNTIME__||window.vtexaf||document.querySelector('link[href*="vtexassets"], script[src*="vtexassets"], link[href*="vteximg"], script[src*="vteximg"], img[src*="vteximg"]'))}function oe(){let t=window;if(t.vtxctx&&t.vtxctx.skus&&t.vtxctx.skus[0])return{value:String(t.vtxctx.skus[0]),source:"vtex/vtxctx"};if(t.skuJson_0&&t.skuJson_0.skus&&t.skuJson_0.skus[0])return{value:String(t.skuJson_0.skus[0].sku),source:"vtex/skuJson"};try{let e=document.querySelector('meta[property="product:sku"]'),r=e&&(e.getAttribute("content")||"").trim();if(r)return{value:String(r),source:"vtex/og-sku"}}catch(e){}return null}var vt=t=>String(t==null?"":t).trim().toLowerCase(),T;function Ct(){if(T!==void 0)return T;T=null;try{let t=Object.keys(window).find(o=>/^webpackChunk/.test(o));if(!t||!window[t]||typeof window[t].push!="function")return T;let e=null;try{window[t].push([["mk-cart-"+Math.random().toString(36).slice(2)],{},o=>{e=o}])}catch(o){}if(!e||!e.m)return T;let r=null;for(let o in e.m)try{let i=e.m[o].toString();if(i.indexOf("cart-storage")>=0&&i.indexOf("addToCart")>=0&&i.indexOf("toggleCart")>=0){r=o;break}}catch(i){}if(r==null)return T;let n=e(r);for(let o in n)try{let i=n[o];if(typeof i=="function"&&typeof i.getState=="function"){let a=i.getState();if(a&&typeof a.addToCart=="function"&&Array.isArray(a.items)){T=i;break}}}catch(i){}}catch(t){T=null}return T}function cr(t){try{let e=t&&t.totalizers||[];if(!e.length)return null;let r=e.reduce((n,o)=>n+(Number(o&&o.value)||0),0);return r>0?r/100:null}catch(e){return null}}async function lr(t,e){let r=Ct();if(!r)return null;let n=(Array.isArray(t)?t:[t]).map(l=>String(l)).filter(Boolean);if(!n.length||typeof r.getState().addToCart!="function")return null;let i=!1;for(let l=0;l<n.length;l++){let u=l===n.length-1;try{await r.getState().addToCart({id:n[l],seller:"1"},"mk-tryon",e||1,u),i=!0}catch(s){}}if(!i)return null;let a=r.getState(),c=(a.items||[]).reduce((l,u)=>l+(Number(u&&u.quantity)||1),0);return{platform:"vtex",skuId:n.join(","),itemCount:c||null,cartValue:cr(a),currency:a.currencyCode||"BRL",drawerHandled:!0}}function Yn(){try{let e=Ct();if(e){let r=e.getState();if(r&&r.cartOpen)return!0;if(typeof e.setState=="function")return e.setState({cartOpen:!0}),!0;if(r&&typeof r.toggleCart=="function")return r.toggleCart(),!0}}catch(e){}let t=['[data-testid="cart-toggle"]','button[aria-label="Abrir carrinho de compras"]','[class*="minicart" i] button','button[class*="minicart" i]','[class*="miniCart" i] button',".vtexsc-cart",".fn-minicart","#header-cart",'[class*="cartIcon" i]','[aria-label*="carrinho" i]','[aria-label*="sacola" i]','[data-testid*="cart" i] button'];for(let e of t)try{let r=document.querySelector(e);if(r)return r.click(),!0}catch(r){}return!1}async function sr(t,e){let r=Array.isArray(t)?t:[t],n=r.map(d=>({id:parseInt(d,10),quantity:e||1,seller:"1"})).filter(d=>Number.isFinite(d.id));if(!n.length)throw new Error("vtex: nenhum skuId v\xE1lido");let o=location.origin,i=await fetch(o+"/api/checkout/pub/orderForm",{headers:{accept:"application/json"},credentials:"include"}).then(d=>d.json()),a=i&&i.orderFormId;if(!a)throw new Error("vtex: orderFormId indispon\xEDvel");let c=await fetch(o+"/api/checkout/pub/orderForm/"+encodeURIComponent(a)+"/items",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"include",body:JSON.stringify({orderItems:n})}).then(d=>d.json()),l=c&&typeof c.value=="number"?c.value/100:null,u=Array.isArray(c&&c.items)?c.items.reduce((d,f)=>d+(Number(f.quantity)||1),0):null,s=c&&c.storePreferencesData&&c.storePreferencesData.currencyCode||"BRL";return{platform:"vtex",skuId:r.map(String).join(","),cartValue:l,itemCount:u,currency:s}}async function Zn(t){t=t||{};let{size:e,sku:r,quantity:n}=t,o=window.skuJson_0&&window.skuJson_0.skus||[];if(o.length&&window.vtexjs&&window.vtexjs.checkout&&window.vtexjs.checkout.addToCart){let l=s=>vt(s.skuname)===vt(e)||s.dimensions&&Object.values(s.dimensions).some(d=>vt(d)===vt(e)),u=e?o.find(s=>l(s)&&s.available)||o.find(l):null;if(u||(u=o.find(s=>s.available)||o[0]),!u)throw new Error("vtex: variante n\xE3o encontrada");return await window.vtexjs.checkout.addToCart([{id:parseInt(u.sku,10),quantity:n||1,seller:"1"}]),{platform:"vtex",skuId:u.sku,size:u.skuname||e}}let i=oe(),a=r||i&&i.value||null;if(!a)throw new Error("vtex: skuId n\xE3o resolvido (IO)");let c=await lr(a,n);return c||sr(a,n)}async function Qn(t){let e=(t||[]).map(n=>n&&(n.sku||(oe()||{}).value)).filter(Boolean);if(!e.length)throw new Error("vtex: nenhum skuId pro batch");let r=await lr(e,1);return r?Object.assign({count:e.length},r):window.skuJson_0&&window.vtexjs&&window.vtexjs.checkout&&window.vtexjs.checkout.addToCart?(await window.vtexjs.checkout.addToCart(e.map(n=>({id:parseInt(n,10),quantity:1,seller:"1"}))),{platform:"vtex",count:e.length}):sr(e,1)}async function to(){try{let t=Ct();if(t){let e=t.getState(),r=cr(e),n=(e.items||[]).reduce((o,i)=>o+(Number(i&&i.quantity)||1),0);if(r!=null||n)return{value:r,itemCount:n,currency:e.currencyCode||"BRL"}}}catch(t){}try{let t=window.vtexjs&&window.vtexjs.checkout&&window.vtexjs.checkout.orderForm;if(t&&typeof t.value=="number"){let e=t.storePreferencesData&&t.storePreferencesData.currencyCode||"BRL",r=(t.items||[]).reduce((n,o)=>n+(Number(o.quantity)||1),0);return{value:t.value/100,itemCount:r,currency:e}}}catch(t){}try{let t=await fetch(location.origin+"/api/checkout/pub/orderForm",{headers:{accept:"application/json"},credentials:"include"}).then(e=>e.json());if(t&&typeof t.value=="number"){let e=(t.items||[]).reduce((r,n)=>r+(Number(n.quantity)||1),0);return{value:t.value/100,itemCount:e,currency:t.storePreferencesData&&t.storePreferencesData.currencyCode||"BRL"}}}catch(t){}return null}var ae={};C(ae,{addToCart:()=>io,detect:()=>no,getCartSummary:()=>co,id:()=>eo,openCartDrawer:()=>ao,resolveSku:()=>oo,skipRedirect:()=>ro});var eo="nuvemshop",ro=!0;function no(){return!!(window.LS&&(window.LS.cart||window.LS.addToCart))}function oo(){try{let t=window.LS,e=t&&t.variants||[],r=document.querySelector('[name="variant_id"]'),n=r&&r.value?e.find(o=>String(o.id)===String(r.value)):null;if(n||(n=e.find(o=>o.available!==!1&&o.sku)||e.find(o=>o.sku)||e[0]),n&&n.sku)return{value:String(n.sku),source:"nuvemshop/variant"};if(t&&t.product&&t.product.sku)return{value:String(t.product.sku),source:"nuvemshop/product"}}catch(t){}return null}var kt=t=>String(t==null?"":t).trim().toLowerCase();async function io({size:t,quantity:e,productId:r}){if(r&&!document.getElementById("product_form")){let c=String(r).replace(/["\\]/g,""),l=document.querySelector('[data-product-id="'+c+'"]'),u=l&&l.querySelector("form[action]"),s=u&&u.getAttribute("action")||"/comprar/",d=window.LS;if(d&&typeof d.addToCartEnhanced=="function")try{let w=document.createElement("form");w.setAttribute("action",s),w.setAttribute("method","post");let b=document.createElement("input");return b.type="hidden",b.name="add_to_cart",b.value=c,w.appendChild(b),document.body.appendChild(w),d.addToCartEnhanced(w),setTimeout(()=>{try{w.remove()}catch(p){}},3e3),{platform:"nuvemshop",productId:c,via:"gallery-enhanced"}}catch(w){}let f=!1,h=null;try{let b=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},body:"add_to_cart="+encodeURIComponent(c)+"&quantity="+(e||1)})).json().catch(()=>({}));f=!!b.success,h=b.error_code||null}catch(w){}return{platform:"nuvemshop",productId:c,via:"gallery",added:f,reason:h}}let n=document.getElementById("product_form")||document.querySelector('.js-product-form, form[action*="/comprar"]');if(!n)throw new Error("nuvemshop: #product_form n\xE3o encontrado");t&&n.querySelectorAll('select[name^="variation"]').forEach(c=>{let l=[...c.options].find(u=>kt(u.textContent).includes(kt(t))||kt(u.value)===kt(t));l&&(c.value=l.value,c.dispatchEvent(new Event("change",{bubbles:!0})))});let o=n.querySelector('[name="quantity"]');o&&e&&(o.value=String(e)),await new Promise(c=>setTimeout(c,400));let i=n.querySelector(".js-addtocart")||document.querySelector(".js-addtocart");return i?i.click():typeof n.requestSubmit=="function"?n.requestSubmit():n.submit(),await new Promise(c=>setTimeout(c,1200)),{platform:"nuvemshop",variantId:(n.querySelector('[name="variant_id"]')||{}).value||null}}function ao(){try{if([...document.querySelectorAll('#ajax-cart-details, .modal-cart, [class*="cart-modal" i], [class*="modal-cart" i]')].find(o=>{try{return o.getBoundingClientRect().width>0&&getComputedStyle(o).display!=="none"}catch(i){return!1}}))return!0;let r=[...document.querySelectorAll('[data-toggle="#modal-cart"], [data-toggle*="cart" i], #ajax-cart a.js-modal-open, .cart-summary a.js-modal-open, .js-toggle-cart')],n=r.find(o=>{let i=o.getBoundingClientRect();return i.width>0&&i.height>0})||r[0];if(n)return setTimeout(()=>{try{n.click()}catch(o){}},300),!0;if(window.LS&&typeof window.LS.toggleCart=="function")return setTimeout(()=>{try{window.LS.toggleCart()}catch(o){}},300),!0}catch(t){}return!1}function co(){try{let t=window.LS,e=t&&t.cart;if(!e)return null;let r=t.currency&&t.currency.code||"BRL",n=Array.isArray(e.items)?e.items.reduce((i,a)=>i+(Number(a.quantity)||1),0):Number(e.items)||0,o=e.subtotal!=null?Number(e.subtotal):null;return{value:o!=null?o/100:null,itemCount:n,currency:r}}catch(t){return null}}var ce={};C(ce,{addToCart:()=>po,detect:()=>uo,getCartSummary:()=>mo,id:()=>lo,openCartDrawer:()=>yo,resolveSku:()=>fo,skipRedirect:()=>so});var lo="wake",so=!0;function uo(){return!!(window.StorefrontClient||typeof window.addOrCreateCheckout=="function"||typeof window.addToCartClick=="function")}function fo(){try{let t=document.querySelector('input[name="product-id"], [data-product-id]'),e=t?t.value||t.getAttribute("data-product-id"):null;if(e)return{value:String(e).trim(),source:"wake/product-id"};let r=(location.pathname||"").match(/-(\d+)\/?(?:[?#]|$)/);if(r)return{value:r[1],source:"wake/url"}}catch(t){}return null}var ur=t=>String(t==null?"":t).trim().toLowerCase();async function po({size:t,quantity:e}){if(t){let i=[...document.querySelectorAll("input[attribute-value]")].find(a=>ur(a.getAttribute("attribute-value"))===ur(t));if(i){try{i.checked=!0}catch(a){}try{typeof window.selectAttribute=="function"?window.selectAttribute(i):i.click()}catch(a){}await new Promise(a=>setTimeout(a,600))}}let r=document.querySelector('[name="product-variant-id"]'),n=r&&r.value;if(!n)throw new Error("wake: product-variant-id n\xE3o encontrado");if(typeof window.addOrCreateCheckout!="function")throw new Error("wake: addOrCreateCheckout indispon\xEDvel");if(!await window.addOrCreateCheckout([{productVariantId:Number(n),quantity:e||1,customization:[]}]))throw new Error("wake: addOrCreateCheckout retornou false");return{platform:"wake",productVariantId:n,size:t||null}}function dr(t){if(t==null)return null;let e=String(t).match(/([\d.]+,\d{2}|\d+(?:\.\d{2})?)/),r=(e?e[1]:String(t)).replace(/[^\d.,]/g,"");if(!r)return null;let n=r.indexOf(",")>r.indexOf(".")?parseFloat(r.replace(/\./g,"").replace(",",".")):parseFloat(r.replace(/,/g,""));return Number.isFinite(n)&&n>0?n:null}async function mo(){try{let t=()=>{let o=document.querySelector(".mc-subtotal__value")||document.querySelector(".mc-subtotal");return o?dr(o.textContent):null},e=t();if(e==null&&typeof window.loadMiniCart=="function"){try{window.loadMiniCart()}catch(o){}await new Promise(o=>setTimeout(o,700)),e=t()}e==null&&(e=ho());let r=document.querySelector('.mc-products__count, [class*="mc-"][class*="count" i], [class*="minicart" i] [class*="count" i]'),n=r&&parseInt(String(r.textContent||"").replace(/\D/g,""),10)||null;if(e!=null)return{value:e,itemCount:n,currency:"BRL"}}catch(t){}return null}function ho(){try{let t=document.querySelector('[class*="mini-cart" i], .mini-cart')||document;for(let e of t.querySelectorAll("div,span,p,li,strong,b")){if(e.children.length>2)continue;let r=(e.textContent||"").replace(/\s+/g," ").trim();if(!(!/R\$/.test(r)||/frete|faltam|gr[aá]tis|desconto|economi/i.test(r))&&/^(sub)?total\b/i.test(r)){let n=dr(r);if(n)return n}}}catch(t){}return null}function yo(){if(typeof window.setCartDivVisibility!="function")return!1;try{typeof window.loadMiniCart=="function"&&window.loadMiniCart()}catch(t){}return setTimeout(()=>{try{let t=document.querySelector('[class*="mini-cart" i], .mini-cart');if(t&&t.getBoundingClientRect().width>0)return;window.setCartDivVisibility()}catch(t){}},350),!0}var ue={};C(ue,{addToCart:()=>_o,cartUrl:()=>xo,detect:()=>bo,getCartSummary:()=>vo,id:()=>go,openCartDrawer:()=>Co,skipRedirect:()=>wo});var le="/api/v2/front",se={"Content-Type":"application/json",Accept:"application/json","App-Token":"wapstore"},fr=t=>String(t==null?"":t).trim().toLowerCase(),go="wapstore",wo=!0,xo="/checkout/carrinho";function bo(){try{if(document.querySelector('script[src*="/tema/"][src*="/dist/assets/"]')||/(?:^|;\s*)produto\/visitado=/.test(document.cookie))return!0}catch(t){}return!1}function pr(t){if(!t||typeof t!="object")return null;let e=t.subtotal&&t.subtotal.valor;return e==null?null:{value:e,itemCount:t.quantidadeItens!=null?t.quantidadeItens:null,currency:"BRL"}}async function _o({size:t,quantity:e}){let r=await fetch(le+"/url/product/detail?url="+encodeURIComponent(location.pathname),{headers:se}).then(f=>f.json()),n=(r&&(r.produto||r.data||r)||{}).conteudo||{},o=n.atributos&&n.atributos.simples&&n.atributos.simples.valores||[];if(!o.length)throw new Error("wapstore: sem variante de compra (atributos.simples)");let i=t?o.find(f=>fr(f.label)===fr(t)):null;i=i||o.find(f=>f.selecionado)||o.find(f=>(f.estoque||0)>0)||o[0];let a=i&&i.carrinho;if(!a||!a.itens||!a.itens.length)throw new Error("wapstore: variante sem payload de carrinho");let c=a.itens.map(f=>Object.assign({},f,{quantidade:String(e||f.quantidade||1)})),l=await fetch(le+"/checkout/cart",{method:"POST",headers:se,body:JSON.stringify({itens:c,tipo:a.tipo||"produto"})});if(!l.ok)throw new Error("wapstore: add HTTP "+l.status);let u=await l.json().catch(()=>({})),s=pr(u),d={platform:"wapstore",idProduto:c[0]&&c[0].idProduto,size:i&&i.label||null};return s&&(d.cartValue=s.value,d.itemCount=s.itemCount,d.currency=s.currency),d}async function vo(){try{let t=await fetch(le+"/checkout/cart",{headers:se}).then(e=>e.json());return pr(t)}catch(t){}return null}function Co(){try{let t=document.querySelector(".common-sheet.side-cart, .side-cart");if(t&&t.getBoundingClientRect().width>0)return!0;let e=document.querySelector('.button-cart, [class*="button-cart"]');if(e)return e.click(),!0}catch(t){}return!1}var de={};C(de,{addToCart:()=>Ro,detect:()=>Ao,getCartSummary:()=>Mo,id:()=>ko,openCartDrawer:()=>Po,resolveSku:()=>Eo,skipRedirect:()=>So});var mr=t=>String(t==null?"":t).trim().toLowerCase(),ko="linx",So=!0;function To(t){if(t==null)return null;let e=String(t).match(/([\d.]+,\d{2}|\d+(?:\.\d{2})?)/),r=(e?e[1]:String(t)).replace(/[^\d.,]/g,"");if(!r)return null;let n=r.indexOf(",")>r.indexOf(".")?parseFloat(r.replace(/\./g,"").replace(",",".")):parseFloat(r.replace(/,/g,""));return Number.isFinite(n)&&n>0?n:null}function Ao(){return typeof window.carrinhoLateral=="function"&&typeof window.addToCart=="function"}function Eo(){try{let t=(location.pathname.match(/-p(\d+)\/?(?:[?#]|$)/)||[])[1];if(t)return{value:t,source:"linx/url-pid"};let e=(String(document.body.className||"").match(/context-product-(\d+)/)||[])[1];if(e)return{value:e,source:"linx/context"}}catch(t){}return null}function Io(){let t=[...document.querySelectorAll('.add-to-cart, [data-action="add-to-cart"]')];return t.find(e=>{let r=e.getBoundingClientRect();return r.width>0&&r.height>0})||t[0]||null}function Lo(t){if(t==null||t==="")return!1;let e=mr(t),r=e.replace(/\D/g,""),n=[...document.querySelectorAll('input[type="radio"]')].filter(i=>/aro|tamanho|grade|numera|size|variant/i.test(i.name||i.id||"")),o=n.find(i=>mr(i.value)===e)||(r?n.find(i=>String(i.value).replace(/\D/g,"")===r):null);if(!o)return!1;try{o.checked||(o.checked=!0),(o.labels&&o.labels[0]||null||o).click(),o.dispatchEvent(new Event("change",{bubbles:!0}))}catch(i){}return!0}async function Ro(t){t=t||{};let e=Io();if(!e)throw new Error("linx: bot\xE3o .add-to-cart n\xE3o encontrado");return t.size!=null&&t.size!==""&&(Lo(t.size),await new Promise(r=>setTimeout(r,1100))),e.click(),await new Promise(r=>setTimeout(r,1400)),{platform:"linx"}}function Mo(){try{let t=document.querySelector("#mini-cart");if(!t)return null;let e=null;for(let n of t.querySelectorAll("div,span,p,li,strong,b,td")){if(n.children.length>2)continue;let o=(n.textContent||"").replace(/\s+/g," ").trim();if(/^(sub)?total\b/i.test(o)&&/R\$/.test(o)&&(e=To(o),e))break}if(e==null)return null;let r=(t.textContent||"").match(/cont[ée]m\s+(\d+)\s+ite/i);return{value:e,itemCount:r?parseInt(r[1],10):null,currency:"BRL"}}catch(t){}return null}function Po(){try{let e=typeof window.carrinhoLateral=="function"?window.carrinhoLateral():null;if(e&&typeof e.openCart=="function"){try{typeof e.fetchHTML=="function"&&e.fetchHTML()}catch(r){}return setTimeout(()=>{try{e.openCart()}catch(r){}},400),!0}}catch(e){}let t=document.querySelector("#mini-cart");if(t){try{t.classList.add("open")}catch(e){}return!0}return!1}var pe={};C(pe,{addToCart:()=>q,detect:()=>Oo,id:()=>jo,resolveSku:()=>fe});var jo="generic";function Oo(){return!0}function fe(){let t=I(["Product"]);if(t[0]){let e=t[0],r=e.sku||e.mpn||e.gtin13||e.productID;if(r)return{value:String(r),source:"jsonld"}}try{let e=document.querySelector('[itemprop="sku"]');if(e){let r=e.getAttribute("content")||(e.textContent||"").trim();if(r)return{value:String(r),source:"microdata"}}}catch(e){}try{let e=window.konfidencyData;if(e&&e.product&&e.product.variants&&e.product.variants[0])return{value:String(e.product.variants[0]),source:"konfidency"}}catch(e){}return null}var Bo=/(adicionar\s*(à|a|ao)?\s*(sacola|carrinho|cesta|bolsa))|adicionar ao carrinho|add to (cart|bag)|comprar agora/i,No=/continuar|como comprar|lista|desejos|favorito/i;async function q(){let t=document.querySelectorAll("button,[role=button],input[type=submit]");for(let e of t){let r=(e.textContent||e.value||"").replace(/\s+/g," ").trim();if(r&&r.length<40&&Bo.test(r)&&!No.test(r))try{return e.click(),{platform:"native-click",clicked:r}}catch(n){}}return{platform:"none",error:"bot\xE3o de carrinho nativo n\xE3o encontrado"}}var hr=[ee,_t,ne,ie,ae,ce,ue,de],qo=[["woocommerce",()=>!!(window.wc_add_to_cart_params||window.woocommerce_params)],["lojaintegrada",()=>!!window.LojaIntegrada]],me;function D(){if(me)return me;let t=hr.find(e=>{try{return e.detect()}catch(r){return!1}});return t&&(me=t),t||pe}function yr(){let t=hr.find(e=>{try{return e.detect()}catch(r){return!1}});if(t)return t.id;for(let[e,r]of qo)try{if(r())return e}catch(n){}return null}function X(){let t=D();if(t.id!=="generic"&&t.resolveSku){try{let e=t.resolveSku();if(e)return e}catch(e){}if(t.id==="vtex"&&window.__RUNTIME__)return{value:null,source:"vtex/pending"}}return fe()}function gr(t){return t=t||{},{size:t.size||t.selectedSize||t.tamanho||t.aro||t.ringSize||null,color:t.color||t.selectedColor||t.colour||t.cor||null,sku:t.sku||t.identifier||t.selectedIdentifier||null,quantity:t.quantity||1,productId:t.productId||null}}async function wr(t){if(t=t||{},Array.isArray(t.items)&&t.items.length)return Do(t.items);let e=gr(t),r=D();try{let n=r.addToCart?await r.addToCart(e):await q(e);return y("cart: adicionado",n),St(),he(r,n,e.sku),n}catch(n){y('cart: adapter "'+r.id+'" falhou \u2014 fallback clique nativo',n&&n.message);let o=await q(e);return St(),he(r,o,e.sku),o}}async function Do(t){let e=t.map(gr),r=D(),n=null;try{if(r.addToCartBatch)n=await r.addToCartBatch(e);else for(let o of e)try{n=r.addToCart?await r.addToCart(o):await q(o)}catch(i){}}catch(o){y('cart: batch do adapter "'+r.id+'" falhou \u2014 fallback',o&&o.message);for(let i of e)try{n=await q(i)}catch(a){}}return y("cart: "+e.length+" itens adicionados",n),St(),he(r,n,null),n}async function he(t,e,r){try{let n=null;e&&e.cartValue!=null?n={value:e.cartValue,itemCount:e.itemCount!=null?e.itemCount:null,currency:e.currency||null}:t&&t.getCartSummary&&(n=await t.getCartSummary()),n&&n.value!=null&&(n.value>0||(n.itemCount||0)>0)&&m("cart_value",{via:"tryon",value:n.value,itemCount:n.itemCount!=null?n.itemCount:null,currency:n.currency||null,sku:r||null})}catch(n){}}async function ye(){let t=D();if(t&&t.getCartSummary)try{return await t.getCartSummary()}catch(e){}return null}async function xr(t){t=t||{};let e=D(),r={platform:e.id};try{let n=X();r.sku=n&&n.value||null;let o={size:t.size||null,color:t.color||null,sku:r.sku,quantity:t.quantity||1};r.added=e.addToCart?await e.addToCart(o):await q(o),St();try{await ge()}catch(i){}r.cart=await ye(),r.ok=!0}catch(n){r.ok=!1,r.error=n&&n.message||String(n)}return r}function St(){["cart:refresh","cart:updated","cart:build","ajaxProduct:added","product:added-to-cart"].forEach(t=>{try{document.dispatchEvent(new CustomEvent(t))}catch(e){}})}async function ge(t){if(t&&t.drawerHandled)return!1;let e=D(),r=g(),n=null;try{n=await G()}catch(a){}let o=n&&n.template&&n.template.cart||n&&n.cart||{},i=o.afterAdd||o.behavior||r.cartBehavior;if(i||(i=r.cartRedirect===!1?"none":"auto"),i==="none")return!1;if(i==="auto"||i==="drawer"){let a=o.openSelector||r.cartOpenSelector;if(a){let c=document.querySelector(a);if(c)return setTimeout(()=>{try{c.click()}catch(l){}},300),!1}else if(e&&e.openCartDrawer){let c=!1;try{c=e.openCartDrawer()}catch(l){}if(c)return!1}}return!0}function br(){let t=D();if(t&&t.skipRedirect)return;let e=t&&t.cartUrl||"/cart";setTimeout(()=>{try{window.location.href=e}catch(r){}},250)}var zo=/\/(thank[_-]?you|orders?\/|pedido[_-]?(confirmado|realizado|finalizado|sucesso)|sucesso|order[_-]?confirmation|compra[_-]?(finalizada|concluida)|orderplaced|checkout\/[^?#]*success)/i,Uo=/\/(my[_-]?account|minha[_-]?conta|account|conta|customer|cliente|profile|perfil|wishlist|favoritos)(\/|$)/i,Fo=/\/checkout/i,Ko=/\/(cart|carrinho|sacola|bag|comprar)(\/|$|\?|#)/i,_r=/\/(products?|produtos?|p)(\/|$|\?|#)/i,$o=/\/(collections?|categoria|categorias|c|departamento)\//i,Ho=/\/(search|busca|s)(\/|\?)/i;function vr(){try{if(window.__mkPageType)return window.__mkPageType}catch(r){}let t=(location.pathname||"").toLowerCase(),e=Uo.test(t);try{let r=I(),n=0,o=!1,i=!1;for(let a of r){let c=Array.isArray(a["@type"])?a["@type"]:[a["@type"]];if((c.includes("Order")||c.includes("Invoice"))&&!e)return"purchase";c.includes("SearchResultsPage")&&(o=!0),(c.includes("CollectionPage")||c.includes("ItemList"))&&(i=!0),c.includes("Product")&&n++}if(o)return"search";if(i)return"category";if(n===1)return"pdp";if(n>1)return _r.test(t)?"pdp":"category"}catch(r){}return t==="/"||t===""||t==="/home"||t==="/index.html"?"home":zo.test(t)&&!e?"purchase":Fo.test(t)?"checkout":Ko.test(t)?"cart":_r.test(t)?"pdp":$o.test(t)?"category":Ho.test(t)?"search":"other"}function Cr(t){let e=null;try{let r=new URLSearchParams(location.search),n=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],o={};for(let i of n){let a=r.get(i);a&&(o[i.replace("utm_","")]=a)}Object.keys(o).length&&(e=o)}catch(r){}return{url:location.href,pathname:location.pathname,referrer:document.referrer||null,title:document.title||null,pageType:t,utm:e,userAgent:navigator.userAgent,language:navigator.language,viewport:window.innerWidth+"x"+window.innerHeight,platform:Vo()}}function Vo(){return yr()}var we={},Wo=null,at=0,kr=!1;function Sr(t){kr||(kr=!0,Tr(t),Jo(),Go(),Xo(),Yo(),Zo(t))}function Tr(t){we={};let e=vr(),r=Cr(e);if(Xe(r),m("view",{url:location.href,pathname:location.pathname,referrer:document.referrer||null,title:document.title||null,pageType:e}),typeof t=="function")try{t(e,r)}catch(n){}}function Jo(){if(!document.body)return;let t={A:1,BUTTON:1,INPUT:1,SELECT:1,TEXTAREA:1},e=0;document.body.addEventListener("click",r=>{try{let n=Date.now();if(n-e<100)return;e=n;let o=r.target;for(let c=0;c<5&&o&&o!==document.body&&!(t[o.tagName]||o.getAttribute&&o.getAttribute("role")==="button");c++)o=o.parentElement;if(!o||!t[o.tagName]&&!(o.getAttribute&&o.getAttribute("role")==="button"))return;let i={tag:o.tagName},a=o.tagName==="INPUT"||o.tagName==="TEXTAREA"?o.value:o.textContent;i.text=(a||"").replace(/\s+/g," ").trim().substring(0,100),o.href&&(i.href=String(o.href).substring(0,500)),o.id&&(i.id=o.id),o.className&&typeof o.className=="string"&&(i.classes=o.className.trim().substring(0,200)),m("click",i)}catch(n){}},{capture:!0,passive:!0})}function Go(){let t=[25,50,75,100],e=null,r=()=>{try{let n=window.scrollY||document.documentElement.scrollTop||0,o=Math.max(document.body&&document.body.scrollHeight||0,document.documentElement&&document.documentElement.scrollHeight||0);if(o<=0)return;let i=Math.min(100,Math.floor((n+window.innerHeight)/o*100));for(let a of t)i>=a&&!we[a]&&(we[a]=!0,m("scroll_depth",{depth:a}))}catch(n){}};r(),window.addEventListener("scroll",()=>{e||(e=setTimeout(()=>{e=null,r()},250))},{passive:!0})}function Xo(){document.body&&document.body.addEventListener("submit",t=>{try{let e=t.target;if(!e||e.tagName!=="FORM"||e.querySelector('input[type="password"], input[name*="card"], input[name*="cpf"]'))return;let r="other",n=(e.className||"").toLowerCase(),o=(e.action||"").toLowerCase();e.querySelector('input[type="search"], input[name="q"], input[name="s"]')?r="search":/newsletter|subscribe|mailchimp/.test(n+o)?r="newsletter":/contact|contato/.test(n+o)&&(r="contact"),m("form_submit",{form_id:e.id||"",form_type:r})}catch(e){}},{capture:!0})}function Yo(){let t=g();at=Date.now(),Wo=setInterval(()=>{if(document.hidden)return;let e=Date.now(),r=Math.round((e-at)/1e3);at=e,r>0&&r<60&&m("engagement",{url:location.pathname,dwellSec:r})},t.engagementIntervalMs),document.addEventListener("visibilitychange",()=>{if(document.hidden){let e=Math.round((Date.now()-at)/1e3);e>0&&e<600&&m("engagement",{url:location.pathname,dwellSec:e})}at=Date.now()})}function Zo(t){let e=location.href,r=()=>{location.href!==e&&(e=location.href,Tr(t))};try{let n=history.pushState,o=history.replaceState;history.pushState=function(){n.apply(this,arguments),setTimeout(r,0)},history.replaceState=function(){o.apply(this,arguments),setTimeout(r,0)},window.addEventListener("popstate",r),window.addEventListener("hashchange",r)}catch(n){}}function be(){let t=X(),e=I(["Product"]);if(e.length>0){let o=e[0],i=Array.isArray(o.offers)?o.offers[0]:o.offers;return{sku:t?t.value:o.sku||o.mpn||o.gtin13||o.productID||null,skuSource:t?t.source:null,name:typeof o.name=="string"?o.name:null,price:i&&parseFloat(i.price||i.lowPrice)||null||Ar(),currency:i?i.priceCurrency:null,brand:o.brand?typeof o.brand=="string"?o.brand:o.brand.name:null,category:o.category||null}}let r=o=>{let i=document.querySelector('meta[property="og:'+o+'"], meta[property="product:'+o+'"]');return i?i.getAttribute("content"):null},n=o=>{let i=document.querySelector('[itemprop="'+o+'"]');return i?i.getAttribute("content")||(i.textContent||"").trim():null};if(t||r("type")==="product"||r("price:amount")||n("name")){let o=n("price")||r("price:amount"),i=o&&parseFloat(String(o).replace(",","."))||null;return{sku:t?t.value:null,skuSource:t?t.source:null,name:n("name")||r("title")||document.title||null,price:(i&&i>0?i:null)||Ar(),currency:n("priceCurrency")||r("price:currency")||null,brand:n("brand")||null,category:null}}return null}function Ar(){try{let t=window.dataLayer;if(!Array.isArray(t))return null;for(let e=t.length-1;e>=0;e--){let r=t[e];if(!r||typeof r!="object")continue;let n=r.ecommerce||r,o=n&&n.items||null,i=n&&n.detail&&n.detail.products||n&&n.products||r.products||null,a=Array.isArray(o)&&o[0]&&o[0].price||Array.isArray(i)&&i[0]&&i[0].price||null,c=xe(a!=null?String(a):"");if(c)return c}}catch(t){}return null}function L(){try{let t=location.pathname+location.search,e=t.match(/order[_-]?confirmation\/([\w-]+)/i)||t.match(/[?&]order[_-]?id=([\w-]+)/i)||t.match(/\/orders?\/([\w-]{4,})/i)||t.match(/pedido[_-]?(?:confirmado|realizado|finalizado)?\/([\w-]+)/i);return e?e[1]:null}catch(t){return null}}function Tt(){let t=I(["Order","Invoice"]);if(t.length>0){let o=t[0],i=o.totalPaymentDue?parseFloat(o.totalPaymentDue.price):parseFloat(o.price||o.total);return{orderId:o.orderNumber||o.confirmationNumber||o.identifier||L(),revenue:Number.isFinite(i)?i:null,currency:o.totalPaymentDue&&o.totalPaymentDue.priceCurrency||o.priceCurrency||null,source:"jsonld"}}try{let o=window.Shopify&&window.Shopify.checkout;if(o&&o.total_price!=null){let i=parseFloat(o.total_price);return{orderId:(o.order_id!=null?String(o.order_id):null)||o.token||L(),revenue:Number.isFinite(i)?i:null,currency:o.currency||null,itemCount:Array.isArray(o.line_items)?o.line_items.length:null,source:"shopify"}}}catch(o){}try{let o=window.LS&&window.LS.order;if(o&&o.total!=null){let i=Number(o.total),a=window.LS.currency&&window.LS.currency.code||"BRL";return{orderId:String(o.number||o.id||L()||""),revenue:Number.isFinite(i)?i/100:null,currency:a,source:"nuvemshop"}}}catch(o){}try{if(Array.isArray(window.dataLayer))for(let o=window.dataLayer.length-1;o>=0;o--){let i=window.dataLayer[o],a=i&&i.ecommerce||i&&i.ecommerce_data&&i.ecommerce_data.ecommerce;if(a&&(i.event==="purchase"||a.purchase||a.transaction_id)){let c=a.purchase&&a.purchase.actionField,l=parseFloat(c&&(c.revenue||c.value)||a.value||a.revenue);return{orderId:c&&(c.id||c.transaction_id)||a.transaction_id||a.transactionId||L(),revenue:Number.isFinite(l)?l:null,currency:a.currency||a.currencyCode||c&&c.currency||null,itemCount:(a.purchase&&a.purchase.products||a.items||a.products||[]).length||null,source:"datalayer"}}}}catch(o){}let e=document.querySelector('meta[property="order:total"], meta[name="order-total"]');if(e&&e.content)return{orderId:L(),revenue:parseFloat(e.content)||null,source:"meta"};let r=Qo();if(r)return r;let n=L();return n?{orderId:n,revenue:null,source:"url"}:null}function Qo(){try{let t=document.querySelector(".orderTotalPrice");if(t){let r=String(t.value||t.getAttribute("value")||t.textContent||"").trim(),n=r.split(/\s+/),o=xe(n.length>1?n[n.length-1]:r);if(o)return{orderId:Er(),revenue:o,currency:(n.length>1?n[0]:null)||null,source:"dom"}}let e=[".order-total","#order-total",".total-price",".order__total","[data-order-total]",".summary-total",".grand-total"];for(let r of e){let n=document.querySelector(r);if(n){let o=xe(n.value||n.textContent);if(o)return{orderId:Er(),revenue:o,source:"dom"}}}return null}catch(t){return null}}function Er(){try{let t=document.querySelector(".orderID");if(t&&(t.value||t.getAttribute("value")))return t.value||t.getAttribute("value");let r=(document.body.innerText||"").match(/(?:pedido|order|n[º°o]\.?)\s*#?\s*([A-Z0-9-]{4,})/i);return r?r[1]:null}catch(t){return null}}function xe(t){if(!t)return null;let e=String(t).replace(/[^\d.,]/g,"");if(!e)return null;let r;e.indexOf(",")>e.indexOf(".")?r=e.replace(/\./g,"").replace(",","."):r=e.replace(/,/g,"");let n=parseFloat(r);return Number.isFinite(n)&&n>0?n:null}function Ir(){let t=I(["ItemList","CollectionPage"]);if(t.length===0)return null;let e=t[0],r=e.itemListElement||e.mainEntity&&e.mainEntity.itemListElement||[],n=[];for(let o of r.slice(0,50)){let i=o.item||o;i&&(i.sku||i.productID||i.name)&&n.push(i.sku||i.productID||i.name)}return n.length>0?{count:n.length,skus:n.slice(0,20)}:null}var Et=!1,At=[/\b(adicionar|adic\.?|colocar|incluir|jogar)\b.{0,30}\b(carrinho|sacola|sacolinha|bag)\b/i,/\bcomprar\b(?!\s+(em|por|sem))/i,/\bcomprar\s*$/i,/^add\s+to\s+(cart|bag)\b/i,/^buy\s+(now|it|this)\b/i,/^(sacolinha|carrinho|sacola)$/i],ti=[/^finalizar(\s+(compra|pedido|pagamento))?\b/i,/^(fechar|confirmar)\s+(compra|pedido|pagamento)\b/i,/^pagar(\s+(agora|pedido))?\b/i,/^(complete|place)\s+(purchase|order)\b/i,/^checkout$/i];function ct(t,e){for(let r=0;r<t.length;r++)if(t[r].test(e))return!0;return!1}function Pr(t){switch(t){case"pdp":{let e=be();m("view_item",e||{sku:null});break}case"category":case"search":{let e=Ir();m("view_item_list",e||{count:0});break}case"cart":ye().then(e=>m("view_cart",e&&e.value!=null?{value:e.value,itemCount:e.itemCount,currency:e.currency}:{})).catch(()=>m("view_cart",{}));break;case"checkout":m("begin_checkout",{});break;case"purchase":ei();break}}var Lr=500,Rr=30;function ei(){let t=!1,e=0,r=(o,i)=>{t||(t=!0,jr(o,i))};try{window.addEventListener("pagehide",()=>r(Tt(),!0),{once:!0})}catch(o){}let n=()=>{if(t)return;let o=Tt();if(o&&o.revenue!=null)return r(o);if(e++>=Rr)return y("purchase: receita n\xE3o apareceu em "+Lr*Rr+"ms \u2014 emitindo sem valor"),r(o);setTimeout(n,Lr)};n()}function jr(t,e){if(!Et){if(t&&!t.orderId&&(t.orderId=L()),t&&t.orderId){let r="_mk_purch_"+t.orderId;try{if(sessionStorage.getItem(r)){y("purchase j\xE1 contado",t.orderId);return}sessionStorage.setItem(r,"1")}catch(n){}}if(Et=!0,m("purchase",t||{revenue:null,_note:"no_order_data_extracted"}),y("purchase emitido",t),e)try{B(!0)}catch(r){}}}var Mr=!1;function Or(){if(Mr)return;Mr=!0;let t=r=>{try{if(!r||typeof r!="object")return!1;let n=r.ecommerce||r.ecommerce_data&&r.ecommerce_data.ecommerce;return n?r.event==="purchase"||r.event==="transaction"||!!n.purchase||n.transaction_id!=null:!1}catch(n){return!1}},e=r=>{Et||!t(r)||setTimeout(()=>{if(!Et)try{jr(Tt(),!0)}catch(n){}},0)};try{let r=window.dataLayer=window.dataLayer||[];for(let o=0;o<r.length;o++)e(r[o]);let n=r.push;r.push=function(){let o=n.apply(this,arguments);try{for(let i=0;i<arguments.length;i++)e(arguments[i])}catch(i){}return o}}catch(r){}}function Br(){if(!document.body)return;let t=0;document.body.addEventListener("click",e=>{try{let r=Date.now();if(r-t<150)return;let n=e.target;for(let c=0;c<5&&n&&n!==document.body&&!(n.tagName==="BUTTON"||n.tagName==="A"||n.getAttribute&&n.getAttribute("role")==="button");c++)n=n.parentElement;if(!n)return;let o=n.tagName!=="A",i=(n.textContent||"").replace(/\s+/g," ").trim();if(!i||i.length>80)return;let a=!1;if((ct([At[0]],i)||o&&ct([At[1]],i)||o&&ct([At[2]],i)||ct(At.slice(3),i))&&(a=!0),a){t=r;let c=be();m("add_to_cart",{via:"click",buttonText:i,sku:c?c.sku:null,price:c?c.price:null});return}o&&ct(ti,i)&&(t=r,m("begin_checkout",{via:"click",buttonText:i}))}catch(r){}},{capture:!0,passive:!0})}var It={};C(It,{available:()=>ii,id:()=>ri,iframeSrc:()=>oi,modalSize:()=>ni,onMounted:()=>ai});var ri="mk-fashion",ni={width:430,height:800};function oi(t,e){let r=encodeURIComponent(e).replace(/\./g,"%2E");return g().appUrl+"/"+t+"/"+r}async function ii(t,e){let r=g().apiUrl+"/availability/"+t+"?sku="+encodeURIComponent(e),n=await fetch(r);if(!n.ok)throw new Error("availability HTTP "+n.status);return n.json()}function ai(){}var _e={};C(_e,{available:()=>pi,closeButton:()=>ui,id:()=>ci,iframeSrc:()=>fi,modalSize:()=>li,modalSizeMobile:()=>si,onMounted:()=>yi});var ci="mk-makeup",li={width:"80vw",height:"80vh"},si={width:"100vw",height:"100dvh"},ui=!0;function di(){return window.__MK&&window.__MK.pulpoarUrl||"https://plugin.pulpoar.com/vto"}function fi(t,e){let r=window.__MK&&window.__MK.pulpoarIframeUrl;if(r){let o=String(r);return e!=null&&/\{sku\}|\{identifier\}/.test(o)&&(o=o.replace(/\{sku\}|\{identifier\}/g,encodeURIComponent(e))),o}let n=window.__MK&&window.__MK.pulpoarProjectKey||t;return di()+"/"+encodeURIComponent(n)}async function pi(t,e){let r=window.__MK&&window.__MK.pulpoarProjectKey||t;if(!r)return{available:!0};let n=await qr(e)||e;if(!n)return{available:!0};try{let i=String(g().collectorUrl||"").replace(/\/+$/,"")+"/v1/makeup/availability/"+encodeURIComponent(r)+"?slug="+encodeURIComponent(n);t&&(i+="&projectId="+encodeURIComponent(t));let a=await fetch(i).then(c=>c.json());return y("pulpoar availability",a),{available:!(a&&(a.available===!1||a.projectActive===!1))}}catch(o){return y("pulpoar availability erro",o&&o.message),{available:!0}}}var mi="https://cdn.jsdelivr.net/npm/@pulpoar/plugin-sdk@latest/dist/index.iife.js",Lt=null;function hi(){return window.pulpoar?Promise.resolve(window.pulpoar):Lt||(Lt=new Promise(t=>{try{let e=document.createElement("script");e.src=mi,e.async=!0,e.onload=()=>t(window.pulpoar||null),e.onerror=()=>t(null),(document.head||document.documentElement).appendChild(e)}catch(e){t(null)}}),Lt)}async function qr(t){try{if(window.Shopify||window.ShopifyAnalytics){let e=(location.pathname.split("/products/")[1]||"").split(/[?#]/)[0];if(e){let r=window.ShopifyAnalytics&&window.ShopifyAnalytics.meta,n=new URLSearchParams(location.search).get("variant")||r&&r.selectedVariantId,i=(await fetch("/products/"+e+".js").then(l=>l.json())).variants||[],a=n?i.find(l=>String(l.id)===String(n)):null;if(a&&a.sku)return a.sku;let c=i.find(l=>l.available)||i[0];if(c&&c.sku)return c.sku}}}catch(e){}return t||null}function Nr(t){return!t||typeof t!="object"?{quantity:1}:{sku:t.sku||t.slug||t.key||t.variant_key||t.barcode||null,color:t.color||t.shade||t.colorName||null,size:t.size||null,quantity:1}}function yi(t,e){hi().then(async r=>{if(!r){y("pulpoar: SDK n\xE3o carregou");return}let n=await qr(e.identifier);if(y("pulpoar variante p/ cat\xE1logo",n),n)try{r.applyVariantsWithCatalog([String(n)],o=>{e.track("product_loaded",{via:"makeup",applied:Array.isArray(o)?o.length:0})})}catch(o){y("pulpoar applyVariantsWithCatalog falhou",o&&o.message)}try{r.onReady(()=>e.fire("onReady",{}))}catch(o){}try{r.onAddToCart(o=>{let i=(Array.isArray(o)?o:[o]).filter(a=>a&&typeof a=="object");if(y("pulpoar onAddToCart",i.length+" item(s)",i),i.length<=1){e.handleAddToCart(i.length?Nr(i[0]):{quantity:1},"makeup");return}e.handleAddToCart({items:i.map(Nr)},"makeup")})}catch(o){}try{r.onGoToProduct(o=>e.fire("onGoToProduct",o))}catch(o){}})}var gi={"mk-fashion":It,"mk-makeup":_e};function Rt(t){return gi[t]||It}var E=null,A=null,Pt=!1,jt=!1,M=null,Dr={},ve=null,Mt=0,S={onReady:null,onClose:null,onAddToCart:null,onProductLoaded:null,onError:null,onInteraction:null,onGenerationComplete:null},wi={gregory:"698c7e791d3129430f15dddd"};function Ur(t){return t?wi[String(t).toLowerCase()]||t:null}async function z(t,e){let r=Ur(t),n=String(e||"").trim();return Rt(g().product).available(r,n)}async function Fr(t,e){e||(e=t,t="698c7e791d3129430f15dddd");try{return(await z(t,e)).available===!0}catch(r){return!1}}async function lt(t){if(t=t||{},Pt)return;let e=Ur(t.projectId||t.projectid||t.store),r=String(t.identifier||t.sku||"").trim();if(!e||!r){console.error("[mk-sdk] open: projectId e identifier obrigatorios");return}let n=e+":"+r;if(Dr[n]!==!0){try{if(!(await z(e,r)).available){alert("Produto nao disponivel para prova virtual.");return}}catch(u){alert("Produto nao encontrado ou indisponivel.");return}Dr[n]=!0}let o=Rt(g().product),a=(window.innerWidth||0)<=768&&o.modalSizeMobile||o.modalSize||{width:430,height:800},c=g(),l=ot();M={projectId:e,identifier:r,width:t.width||l.modalWidth||c.modalWidth||a.width,height:t.height||l.modalHeight||c.modalHeight||a.height},jt=!1,Hr(),xi(M),Pt=!0,Mt=Date.now(),m("modal_opened",{projectId:e,identifier:r})}function Ot(){if(!Pt)return;let t=jt;if(jt=!1,bi(),Pt=!1,R("onClose"),m("modal_closed",{projectId:M&&M.projectId,identifier:M&&M.identifier}),t)try{br()}catch(e){}}function Kr(t){try{tn().forEach(e=>{t?(e.dataset.mkPrevDisplay===void 0&&(e.dataset.mkPrevDisplay=e.style.display),e.style.display="none"):(e.style.display=e.dataset.mkPrevDisplay||"",delete e.dataset.mkPrevDisplay)})}catch(e){}}function xi(t){E=document.createElement("div"),E.style.cssText="position:fixed;inset:0;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:2147483647;",Kr(!0);let e=document.createElement("div"),r=typeof t.width=="number"?t.width+"px":t.width,n=typeof t.height=="number"?t.height+"px":t.height,o=String(t.width).indexOf("100v")>=0;e.style.cssText="position:relative;width:"+r+";height:"+n+";max-width:100vw;max-height:100dvh;border-radius:"+(o?"0":"12px")+";overflow:hidden;background:#fff;",A=document.createElement("iframe");let i=Rt(g().product);if(A.src=i.iframeSrc(t.projectId,t.identifier),A.style.cssText="width:100%;height:100%;border:none;",A.setAttribute("allow","camera *; microphone *"),A.setAttribute("allowfullscreen","true"),e.appendChild(A),i.closeButton){let a=document.createElement("button");a.setAttribute("aria-label","Fechar"),a.setAttribute("type","button"),a.innerHTML='<svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true"><path d="M1.6 1.6l10.8 10.8M12.4 1.6L1.6 12.4" stroke="#111" stroke-width="2" stroke-linecap="round"/></svg>',a.style.cssText="position:absolute;top:8px;right:8px;z-index:2;width:32px;height:32px;padding:0;border:none;border-radius:50%;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 5px rgba(0,0,0,.3);",a.addEventListener("click",()=>{try{Ot()}catch(c){}}),e.appendChild(a)}E.appendChild(e),document.body.appendChild(E);try{i.onMounted(A,{projectId:t.projectId,identifier:t.identifier,handleAddToCart:Vr,track:m,fire:R})}catch(a){y("launcher.onMounted falhou",a&&a.message)}y("try-on modal aberto",A.src)}function bi(){E&&E.parentNode&&E.parentNode.removeChild(E),E=null,A=null,Kr(!1)}var zr=!1;function $r(){Hr()}function Hr(){zr||(zr=!0,window.addEventListener("message",t=>{let e=t.data;if(!e||e.source!=="mkfashion-app")return;let r=e.action,n=e.data||{};switch(r){case"close_request":Ot();break;case"ready":R("onReady",n);break;case"product_loaded":R("onProductLoaded",n),m("product_loaded",Ce(n));break;case"interaction":{R("onInteraction",n),n&&n.method&&(ve=n.method),m(_i(n),Ce(n));break}case"add_to_cart":Vr(n,"tryon");break;case"generation_start":Mt=Date.now();break;case"generation_complete":R("onGenerationComplete",n),m("generation_complete",{method:n.method||ve||"unknown",durationMs:Mt?Date.now()-Mt:null,success:n.success!==!1,imageUrlPresent:!!n.imageUrl});break;case"generation_error":R("onError",n),m("generation_error",{method:ve||"unknown",error:n&&n.error});break}}))}function Vr(t,e){if(m("add_to_cart",Object.assign({via:e||"tryon"},Ce(t))),typeof S.onAddToCart=="function"){R("onAddToCart",t);return}let r=Object.assign({productId:M&&M.identifier},t);wr(r).then(n=>ge(n)).then(n=>{jt=!!n}).catch(()=>{})}function _i(t){return t&&t.action,"interaction"}function Ce(t){if(!t||typeof t!="object")return t;let e={};for(let r in t){if(r==="imageUrl"||r==="image"||r==="product"){r==="product"&&t[r]?(e.productSku=t[r].sku||null,e.productName=t[r].name||null):e[r+"Present"]=!!t[r];continue}e[r]=t[r]}return e}function R(t,e){if(typeof S[t]=="function")try{S[t](e)}catch(r){console.error("[mk-sdk]",r)}}function Wr(t){S.onReady=t}function Jr(t){S.onClose=t}function Gr(t){S.onAddToCart=t}function Xr(t){S.onProductLoaded=t}function Yr(t){S.onError=t}function Zr(t){S.onInteraction=t}function Qr(t){S.onGenerationComplete=t}var Ci=767,ki=1024,Si=/(adicionar\s*(à|a|ao)?\s*(sacola|carrinho|cesta|bolsa))|adicionar ao carrinho|add to (cart|bag)|comprar agora|^comprar$|finalizar compra|eu quero/i,Ti=/continuar|como comprar|lista|desejos|favorito|looks|cupom/i;function ke(t){try{let e=t.getBoundingClientRect();if(e.width<=0||e.height<=0)return!1;let r=getComputedStyle(t);return r.display!=="none"&&r.visibility!=="hidden"&&r.opacity!=="0"}catch(e){return!1}}function Ai(t){if(!t)return!1;try{let e=document.querySelector(t);return!!e&&ke(e)}catch(e){return!1}}function Ei(t){return(t.tagName==="INPUT"?t.value||"":t.textContent||"").replace(/\s+/g," ").trim()}function Ii(t){if(!t||typeof t!="object"||t.selector)return t;let e=!1;if(["mobile","tablet","desktop"].forEach(n=>{let o=t[n];o&&o.mkAnchor===1&&o.anchor&&typeof o.anchor=="object"&&(e=!0)}),!e)return t;let r={};return["mobile","tablet","desktop"].forEach(n=>{let o=t[n];if(o){if(o.selector){r[n]=o;return}if(o.mkAnchor===1&&o.anchor&&typeof o.anchor=="object"){let i=o.anchor[n]||o.anchor.desktop||o.anchor.mobile||o.anchor.tablet;i&&i.selector&&(r[n]=i)}}}),["bpMobile","bpTablet","breakpoint"].forEach(n=>{t[n]!=null&&(r[n]=t[n])}),r}function st(t){if(!t||typeof t!="object")return null;if(t=Ii(t),t.selector)return t;let e=[["mobile",t.mobile],["tablet",t.tablet],["desktop",t.desktop]].filter(l=>l[1]&&l[1].selector);if(e.length===0)return null;if(e.length===1)return e[0][1];let r=e.filter(([,l])=>Ai(l.selector));if(r.length===1)return r[0][1];let n=window.innerWidth||1024,o=Number(t.bpMobile)||Number(t.breakpoint)||Ci,i=Number(t.bpTablet)||ki,a=l=>(e.find(u=>u[0]===l)||[])[1],c=n<=o?["mobile","tablet","desktop"]:n<=i?["tablet","desktop","mobile"]:["desktop","tablet","mobile"];for(let l of c){let u=a(l);if(u)return u}return e[0][1]}function Bt(t){let e=st(t);if(e&&e.selector)try{let r=document.querySelector(e.selector);if(r&&ke(r))return{el:r,position:e.position||"afterend",mode:e.mode||"flow",style:e.style||"",align:e.align||"top-left",selector:e.selector}}catch(r){}return null}function en(){let t=g(),e=Bt(t&&t.anchor);if(e)return e;let r=document.querySelectorAll('button, [role="button"], a.btn, a.button, input[type="submit"], input[type="button"]');for(let n of r){let o=Ei(n);if(!(!o||o.length>40)&&!Ti.test(o)&&Si.test(o)&&ke(n))return{el:n,position:"afterend",mode:"flow",style:"",selector:null}}return null}var _="'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",Se={none:"0",sm:"4px",md:"8px",pill:"9999px"},Te={none:"0",sm:"4px",md:"8px",lg:"16px"},Li='<svg viewBox="0 0 17.5263 20.6862" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block;width:100%;height:100%"><g><path d="M8.49995 12.1862C10.1568 12.1862 11.5 10.8431 11.5 9.18622C11.5 7.52936 10.1568 6.18622 8.49995 6.18622C6.8431 6.18622 5.49995 7.52936 5.49995 9.18622C5.49995 10.8431 6.8431 12.1862 8.49995 12.1862Z" stroke="currentColor" shape-rendering="crispEdges"/><path d="M0.5 9.11152C0.5 6.56953 0.5 5.29894 1.1099 4.38664C1.375 3.9902 1.71424 3.65088 2.10821 3.38809C2.6945 2.9958 3.42899 2.85564 4.55351 2.80588C5.09013 2.80588 5.55183 2.39949 5.65687 1.87284C5.73715 1.48708 5.94572 1.14138 6.24735 0.894155C6.54898 0.646934 6.92516 0.51336 7.31231 0.516006H9.9734C10.7779 0.516006 11.4709 1.08412 11.6288 1.87284C11.7339 2.39949 12.1956 2.80588 12.7322 2.80588C13.8559 2.85564 12.9129 4.67413 13.5 5.06559C13.8949 5.32932 15.1484 3.80355 15.5 4.02647C16.1099 4.93876 16.7857 6.56953 16.7857 9.11152C16.7857 11.6535 16.7857 12.9233 16.1758 13.8364C15.9107 14.2328 15.5715 14.5722 15.1775 14.835C14.2647 15.4445 12.9936 15.4445 10.4522 15.4445H6.83351C4.29213 15.4445 3.02103 15.4445 2.10821 14.835C1.71446 14.5718 1.3755 14.2322 1.11071 13.8356C0.933802 13.5672 0.803519 13.2698 0.725557 12.9564" stroke="currentColor" stroke-linecap="round"/><path d="M12.676 0.607931C12.9446 -0.178095 14.0307 -0.2019 14.3491 0.536515L14.3761 0.60838L14.7385 1.66839C14.8216 1.91149 14.9559 2.13395 15.1322 2.32076C15.3086 2.50757 15.5229 2.65439 15.7608 2.75131L15.8583 2.78769L16.9183 3.14971C17.7044 3.41831 17.7282 4.50437 16.9902 4.82283L16.9183 4.84978L15.8583 5.21225C15.6151 5.29526 15.3926 5.42947 15.2057 5.60582C15.0188 5.78218 14.8719 5.99657 14.7749 6.23453L14.7385 6.33155L14.3765 7.39201C14.1079 8.17803 13.0219 8.20184 12.7039 7.46387L12.676 7.39201L12.314 6.332C12.231 6.08881 12.0968 5.86627 11.9204 5.67938C11.744 5.49249 11.5297 5.3456 11.2917 5.24863L11.1947 5.21225L10.1347 4.85022C9.34817 4.58163 9.32437 3.49557 10.0628 3.17756L10.1347 3.14971L11.1947 2.78769C11.4378 2.70462 11.6602 2.57039 11.847 2.39404C12.0339 2.21769 12.1807 2.00333 12.2776 1.76541L12.314 1.66839L12.676 0.607931Z" fill="currentColor"/></g></svg>',nn='<svg viewBox="0 0 11.6122 12.7248" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block;width:12px;height:12px"><path d="M4.09055 2.01133C4.43939 0.9905 5.84989 0.959583 6.26347 1.91858L6.29847 2.01192L6.76922 3.38858C6.8771 3.7043 7.05144 3.99321 7.28047 4.23583C7.5095 4.47845 7.7879 4.66912 8.09689 4.795L8.22347 4.84225L9.60014 5.31242C10.621 5.66125 10.6519 7.07175 9.69347 7.48533L9.60014 7.52033L8.22347 7.99108C7.90764 8.09889 7.61862 8.2732 7.3759 8.50223C7.13318 8.73127 6.94241 9.0097 6.81647 9.31875L6.76922 9.44475L6.29905 10.822C5.95022 11.8428 4.53972 11.8737 4.12672 10.9153L4.09055 10.822L3.62039 9.44533C3.51258 9.12951 3.33827 8.84048 3.10924 8.59776C2.8802 8.35504 2.60177 8.16427 2.29272 8.03833L2.16672 7.99108L0.790054 7.52092C-0.231363 7.17208 -0.26228 5.76158 0.69672 5.34858L0.790054 5.31242L2.16672 4.84225C2.48244 4.73437 2.77135 4.56003 3.01397 4.331C3.25658 4.10197 3.44726 3.82357 3.57314 3.51458L3.62039 3.38858L4.09055 2.01133ZM9.86147 0C9.9706 0 10.0775 0.0306123 10.1701 0.0883584C10.2627 0.146104 10.3373 0.228668 10.3853 0.326667L10.4133 0.394917L10.6175 0.993417L11.2166 1.19758C11.3259 1.23474 11.4218 1.30353 11.492 1.39523C11.5623 1.48693 11.6037 1.59741 11.611 1.71268C11.6184 1.82795 11.5914 1.94281 11.5334 2.04271C11.4755 2.14261 11.3891 2.22305 11.2854 2.27383L11.2166 2.30183L10.6181 2.506L10.4139 3.10508C10.3767 3.21442 10.3078 3.31024 10.2161 3.38041C10.1244 3.45058 10.0139 3.49194 9.89859 3.49925C9.78333 3.50656 9.66849 3.47949 9.56863 3.42147C9.46876 3.36345 9.38837 3.27709 9.33764 3.17333L9.30964 3.10508L9.10547 2.50658L8.50639 2.30242C8.39702 2.26526 8.30115 2.19647 8.23092 2.10477C8.16069 2.01307 8.11926 1.90259 8.11189 1.78732C8.10452 1.67205 8.13153 1.55719 8.18951 1.45729C8.24749 1.35739 8.33381 1.27695 8.43755 1.22617L8.50639 1.19817L9.10489 0.994L9.30905 0.394917C9.34839 0.279665 9.42281 0.179613 9.52187 0.108791C9.62094 0.0379686 9.73969 -0.0000730808 9.86147 0Z" fill="currentColor"/></svg>';function x(t,e={}){let r=document.createElement(t);if(e.style&&(r.style.cssText=e.style),e.text!=null&&(r.textContent=e.text),e.html!=null&&(r.innerHTML=e.html),e.attrs)for(let n in e.attrs)r.setAttribute(n,e.attrs[n]);if(e.on)for(let n in e.on)r.addEventListener(n,e.on[n]);if(e.children)for(let n of e.children)n&&r.appendChild(n);return r}function on(t){return x("span",{style:`width:12px;height:12px;display:inline-flex;align-items:center;justify-content:center;color:${t};flex-shrink:0;`,html:nn})}var Nt=t=>'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" style="display:block;width:100%;height:100%">'+t+"</svg>",rn={camera:Li,sparkle:nn.replace("width:12px;height:12px","width:100%;height:100%"),shirt:Nt('<path d="M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z"/>'),face:Nt('<path d="M3 7V5a2 2 0 0 1 2-2h2"/><path d="M17 3h2a2 2 0 0 1 2 2v2"/><path d="M21 17v2a2 2 0 0 1-2 2h-2"/><path d="M7 21H5a2 2 0 0 1-2-2v-2"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><path d="M9 9h.01"/><path d="M15 9h.01"/>'),glasses:Nt('<circle cx="6" cy="15" r="4"/><circle cx="18" cy="15" r="4"/><path d="M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2"/><path d="M2.5 13 5 7c.7-1.3 1.4-2 3-2"/><path d="M21.5 13 19 7c-.7-1.3-1.5-2-3-2"/>'),wand:Nt('<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"/><path d="m14 7 3 3"/><path d="M5 6v4"/><path d="M19 14v4"/><path d="M10 2v2"/><path d="M7 8H3"/><path d="M21 16h-4"/><path d="M11 3H9"/>')};function P(t,e,r){let n=Number(r)>0?Number(r):24;return x("span",{style:`width:${n}px;height:${n}px;padding:2px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;color:${e};flex-shrink:0;`,html:rn[t]||rn.camera})}function Y(t){return t.borderWidth>0&&t.borderColor?`${t.borderWidth}px solid ${t.borderColor}`:"none"}function Z(){if(!document.getElementById("mk-jakarta-font"))try{document.head.appendChild(x("link",{attrs:{id:"mk-jakarta-font",rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700&display=swap"}}))}catch(t){}}function Ri(t){return t.subtext?x("span",{style:`display:flex;align-items:center;justify-content:center;padding:4px;background:${t.badgeBgColor};font-family:${_};font-weight:700;font-size:16px;text-transform:uppercase;color:${t.badgeTextColor};line-height:1;white-space:nowrap;`,text:t.subtext}):null}function an(t,e){Z();let r=x("span",{style:"display:inline-flex;align-items:center;gap:4px;",children:[P(t.icon,t.textColor,t.iconSize),x("span",{text:t.text,style:`font-family:${_};font-weight:700;font-size:inherit;text-transform:uppercase;letter-spacing:2px;color:${t.textColor};white-space:nowrap;text-align:center;line-height:1;`})]});return x("button",{attrs:{type:"button"},style:`display:flex;align-items:center;justify-content:center;gap:8px;padding:8px;width:100%;max-width:238px;box-sizing:border-box;background:${t.bgColor};border:${Y(t)};border-radius:${t.borderRadiusPx};font-family:${_};font-size:${t.fontSize}px;cursor:pointer;transition:opacity 0.2s ease;line-height:1;-webkit-appearance:none;appearance:none;`,children:[r,Ri(t)],on:{mouseenter:n=>{n.currentTarget.style.opacity="0.85"},mouseleave:n=>{n.currentTarget.style.opacity="1"},click:n=>{try{n.preventDefault(),n.stopPropagation()}catch(o){}try{e&&e()}catch(o){}}}})}function Pi(t){return t.subtext?x("span",{style:`display:flex;align-items:center;gap:4px;padding:4px;background:${t.badgeBgColor};font-family:${_};font-weight:600;font-size:10px;text-transform:uppercase;color:${t.badgeTextColor};line-height:1;white-space:nowrap;`,children:[on(t.badgeTextColor),x("span",{text:t.subtext})]}):null}function ji(t,e){return x("button",{attrs:{type:"button"},style:`display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px 8px 8px;width:100%;margin-top:auto;box-sizing:border-box;background:${t.bgColor};border:${Y(t)};border-radius:${t.borderRadiusPx};filter:drop-shadow(0 0 6px rgba(0,0,0,0.08));font-family:${_};cursor:pointer;transition:opacity 0.2s ease;line-height:1;-webkit-appearance:none;appearance:none;`,children:[P(t.icon,t.textColor,t.iconSize),x("span",{text:t.text,style:`font-family:${_};font-weight:700;font-size:inherit;color:${t.textColor};white-space:nowrap;line-height:1;`})],on:{mouseenter:r=>{r.currentTarget.style.opacity="0.85"},mouseleave:r=>{r.currentTarget.style.opacity="1"},click:r=>{try{r.preventDefault(),r.stopPropagation()}catch(n){}try{e&&e()}catch(n){}}}})}function cn(t,e){Z();let r=x("div",{style:"display:flex;flex-direction:column;gap:4px;",children:[t.cardTitle&&x("p",{text:t.cardTitle,style:`margin:0;font-family:${_};font-weight:700;font-size:16px;letter-spacing:1px;text-transform:uppercase;color:${t.cardTitleColor};line-height:1.2;`}),t.cardDescription&&x("p",{html:t.cardDescription,style:`margin:0;font-family:${_};font-weight:400;font-size:12px;max-width:177px;line-height:1.2;color:${t.cardTextColor};`})]}),n=x("div",{style:"display:flex;flex-direction:column;justify-content:space-between;gap:16px;flex:1 1 0;min-width:0;",children:[r,t.cardFooter&&x("p",{text:t.cardFooter,style:`margin:0;font-family:${_};font-weight:400;font-size:10px;color:${t.cardTextColor};line-height:1.2;`})]}),o=x("div",{style:"display:flex;flex-direction:column;align-items:flex-end;flex:1 1 0;min-width:0;",children:[Pi(t),ji(t,e)]}),i=x("div",{style:"display:flex;gap:16px;align-items:stretch;width:100%;flex:1;box-sizing:border-box;",children:[n,o]});return x("div",{style:`display:flex;flex-direction:column;align-items:flex-start;padding:12px;width:100%;max-width:402px;min-height:140px;box-sizing:border-box;background:${t.cardBgColor};border-radius:${t.cardBorderRadiusPx};font-family:${_};font-size:${t.fontSize}px;`,children:[i]})}function ln(t,e){let r=Number(t.iconSize)>0?Number(t.iconSize):24;return x("button",{attrs:{type:"button","aria-label":t.text||"Provar virtualmente"},style:`display:inline-flex;align-items:center;justify-content:center;padding:8px;box-sizing:border-box;background:${t.bgColor};border:${Y(t)};border-radius:${t.borderRadiusPx};cursor:pointer;transition:opacity 0.2s ease;line-height:1;-webkit-appearance:none;appearance:none;`,children:[P(t.icon,t.textColor,r)],on:{mouseenter:n=>{n.currentTarget.style.opacity="0.85"},mouseleave:n=>{n.currentTarget.style.opacity="1"},click:n=>{try{n.preventDefault(),n.stopPropagation()}catch(o){}try{e&&e()}catch(o){}}}})}function sn(t,e){Z();let r=x("div",{style:"display:flex;flex-direction:column;gap:8px;width:fit-content;max-width:100%;",children:[x("div",{style:"display:flex;align-items:center;gap:8px;",children:[P(t.icon,t.cardTitleColor,t.iconSize),t.cardTitle&&x("p",{text:t.cardTitle,style:`margin:0;font-family:${_};font-weight:700;font-size:16px;text-transform:uppercase;letter-spacing:1px;color:${t.cardTitleColor};white-space:nowrap;line-height:1.2;`})]}),x("div",{style:`height:3px;width:100%;border-radius:9999px;background:linear-gradient(90deg, ${t.cardAccentFrom}, ${t.cardAccentTo});`})]}),n=t.cardDescription&&x("p",{html:t.cardDescription,style:`margin:0;font-family:${_};font-weight:400;font-size:13px;line-height:1.4;color:${t.cardTextColor};`}),o=x("button",{attrs:{type:"button"},text:t.text,style:`font-family:${_};font-weight:700;font-size:${t.fontSize}px;text-transform:uppercase;letter-spacing:1px;text-decoration:underline;text-underline-offset:4px;color:${t.cardCtaColor};background:transparent;border:none;padding:0;cursor:pointer;text-align:left;line-height:1.2;transition:opacity 0.2s ease;`,on:{mouseenter:i=>{i.currentTarget.style.opacity="0.7"},mouseleave:i=>{i.currentTarget.style.opacity="1"},click:i=>{try{i.preventDefault(),i.stopPropagation()}catch(a){}try{e&&e()}catch(a){}}}});return x("div",{style:`display:flex;flex-direction:column;align-items:flex-start;gap:24px;padding:20px;width:360px;max-width:100%;box-sizing:border-box;background:${t.cardBgColor};border:1px solid ${t.cardBorderColor};border-radius:${t.cardBorderRadiusPx};font-family:${_};`,children:[r,n,o]})}var qi={style:"gregory-black",icon:"camera",text:"Provar Virtualmente",fontSize:14,iconSize:24,subtext:"",bgColor:"#1E1E1E",textColor:"#FFFFFF",badgeBgColor:"#C51A1B",badgeTextColor:"#FFFFFF",borderRadius:"md",borderColor:"#1E1E1E",borderWidth:0,cardTitle:"",cardDescription:"",cardFooter:"",cardBgColor:"#F6F6F6",cardTitleColor:"#1E1E1E",cardTextColor:"#717171",cardBorderRadius:"md",cardCtaColor:"#1E1E1E",cardBorderColor:"#E5E0DA",cardAccentFrom:"#8A5A3C",cardAccentTo:"#E9DACB"};function qt(t){if(!t)return null;let e=Array.isArray(t.anchors)?t.anchors:[];if(t.version===2||t.main)return{version:2,main:t.main||{},anchors:e,cards:t.cards||null};let r=t.desktop||t.tablet||t.mobile||{},n=t.anchor||{};return{version:2,main:Object.assign({},r,{desktop:n.desktop,tablet:n.tablet,mobile:n.mobile,bpMobile:n.bpMobile,bpTablet:n.bpTablet}),anchors:e,cards:t.cards||null}}function ut(t,e){let r={...qi,...t||{}};return r.style==="gregory-card"&&e&&(r.style="gregory-black"),r.borderRadiusPx=Se[r.borderRadius]!=null?Se[r.borderRadius]:"0",r.cardBorderRadiusPx=Te[r.cardBorderRadius]!=null?Te[r.cardBorderRadius]:"0",r.fontSize=Number(r.fontSize)||14,r.iconSize=Number(r.iconSize)||24,r.borderWidth=Number(r.borderWidth)||0,r}var Ae={"gregory-black":an,"gregory-card":cn,"gregory-icon":ln,"card-link":sn},Za=Object.keys(Ae).concat("none");function un(t,e){return t&&t.style==="none"?null:(Ae[t.style]||Ae["gregory-black"])(t,e)}function Di(){return"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]+Math.random().toString(36).slice(2,11)}var U=null,j=[];function tn(){return[U].concat(j).filter(Boolean)}function zi(t,e){let r;try{r=document.createElement("iframe"),r.setAttribute("aria-hidden","true"),r.style.cssText="display:none!important;width:0;height:0;border:0;position:absolute;left:-9999px;",(document.body||document.documentElement).appendChild(r);let n=r.contentWindow&&r.contentWindow.Element&&r.contentWindow.Element.prototype&&r.contentWindow.Element.prototype.attachShadow;if(typeof n=="function"){let o=n.call(t,e);return r.remove(),o}}catch(n){}try{r&&r.remove()}catch(n){}return t.attachShadow(e)}var Ui=/^(transform|transform-origin|margin|margin-(top|right|bottom|left)|align-self|justify-self|place-self|position|inset|top|right|bottom|left|z-index|width|min-width|max-width|height|min-height|max-height|font-size)$/i;function Fi(t){return!t||typeof t!="string"?"":t.split(";").map(e=>e.trim()).filter(Boolean).filter(e=>Ui.test(e.split(":")[0].trim().toLowerCase())).join(";")}var Dt=null,Ee=!1,Ie=0,Le=0,Re=0,Q={},dn=!1,dt=null;function O(){return dt||(dt=G().then(t=>{if(!t)return dt=null,null;try{gt(t,g().projectId,g().product)}catch(e){}return qt(t.template&&t.template.tryOnButton||null)||{__loaded:!0}}).catch(()=>(dt=null,null))),dt}function Ki(){if(dn)return;dn=!0;let t=null;try{window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Dt&&k("pdp")},200)})}catch(e){}}function Pe(t){if(t){if(typeof t.__mkCleanup=="function")try{t.__mkCleanup()}catch(e){}t.parentNode&&t.parentNode.removeChild(t)}}function ft(){Pe(U),j.forEach(Pe),U=null,j=[],Dt=null}var $i={IMG:1,INPUT:1,VIDEO:1,CANVAS:1,EMBED:1,OBJECT:1,IFRAME:1,BR:1,HR:1,SELECT:1,TEXTAREA:1,SVG:1};function Hi(t){switch(t){case"top-center":return"top:0;left:50%;transform:translateX(-50%);";case"top-right":return"top:0;right:0;";case"middle-left":return"top:50%;left:0;transform:translateY(-50%);";case"center":return"top:50%;left:50%;transform:translate(-50%,-50%);";case"middle-right":return"top:50%;right:0;transform:translateY(-50%);";case"bottom-left":return"bottom:0;left:0;";case"bottom-center":return"bottom:0;left:50%;transform:translateX(-50%);";case"bottom-right":return"bottom:0;right:0;";case"top-left":default:return"top:0;left:0;"}}function Vi(t,e,r){let o=!$i[t.tagName]?t:t.parentElement||document.body;try{getComputedStyle(o).position==="static"&&(o.style.position="relative")}catch(s){}if(o===t){e.style.cssText="position:absolute;z-index:2147483000;"+Hi(r),t.appendChild(e);return}e.style.cssText="position:absolute;z-index:2147483000;",o.appendChild(e);let i=()=>{try{let s=t.getBoundingClientRect(),d=o.getBoundingClientRect(),f=e.offsetWidth,h=e.offsetHeight,w=s.top-d.top+o.scrollTop,b=s.left-d.left+o.scrollLeft,p=r||"top-left",v=w,K=b;p.indexOf("bottom")===0?v=w+s.height-h:(p.indexOf("middle")===0||p==="center")&&(v=w+(s.height-h)/2),p.indexOf("right")>=0?K=b+s.width-f:p.indexOf("center")>=0&&(K=b+(s.width-f)/2),e.style.top=v+"px",e.style.left=K+"px"}catch(s){}};i();let a=()=>i();window.addEventListener("resize",a);let c=setTimeout(i,600),l=setTimeout(i,1500),u=null;try{if(t.tagName==="IMG"&&!t.complete&&t.addEventListener("load",i,{once:!0}),typeof ResizeObserver=="function"){u=new ResizeObserver(()=>i());try{u.observe(t)}catch(s){}try{u.observe(o)}catch(s){}}}catch(s){}e.__mkCleanup=()=>{window.removeEventListener("resize",a),clearTimeout(c),clearTimeout(l);try{t.removeEventListener("load",i)}catch(s){}try{u&&u.disconnect()}catch(s){}}}function Wi(t,e,r){e.style.cssText="position:absolute;z-index:100;",document.body.appendChild(e);let n=()=>{try{let l=t.getBoundingClientRect(),u=e.offsetWidth,s=e.offsetHeight,d=r||"top-left",f=l.top+window.scrollY,h=l.left+window.scrollX;d.indexOf("bottom")===0?f=l.bottom+window.scrollY-s:(d.indexOf("middle")===0||d==="center")&&(f=l.top+window.scrollY+(l.height-s)/2),d.indexOf("right")>=0?h=l.right+window.scrollX-u:d.indexOf("center")>=0&&(h=l.left+window.scrollX+(l.width-u)/2),e.style.top=Math.round(f)+"px",e.style.left=Math.round(h)+"px"}catch(l){}};n();let o=()=>n();window.addEventListener("resize",o);let i=setTimeout(n,600),a=setTimeout(n,1500),c=null;try{t.tagName==="IMG"&&!t.complete&&t.addEventListener("load",n,{once:!0});let l=t.querySelector&&t.querySelector("img");if(l&&!l.complete&&l.addEventListener("load",n,{once:!0}),typeof ResizeObserver=="function"){c=new ResizeObserver(()=>n());try{c.observe(t)}catch(u){}}}catch(l){}e.__mkCleanup=()=>{window.removeEventListener("resize",o),clearTimeout(i),clearTimeout(a);try{c&&c.disconnect()}catch(l){}}}function Ji(t,e,r){try{return t.insertAdjacentElement(r||"afterend",e),!0}catch(n){try{return t.parentNode.insertBefore(e,t.nextSibling),!0}catch(o){return!1}}}async function k(t){let e=g(),r=null;if(t!=="pdp"){ft();return}if(!e.projectId)return;if(!e._anchorFromPicker){let s=await O(),d=ot(),f=s&&s.main,h=s&&s.anchors,w=s&&s.cards;if(d&&d.tryOnButton){let p=qt(d.tryOnButton)||{};p.main&&(f=Object.assign({},f||e.anchor||{},p.main),r=f),p.anchors&&(h=p.anchors),p.cards&&(w=p.cards)}f&&(e.anchor=f),h&&(e.anchors=h),w&&(e.cards=w);let b=!!(e.anchor&&(e.anchor.desktop||e.anchor.mobile||e.anchor.tablet||e.anchor.selector));if(!e.forceButton&&!(s&&s.main)&&!b){ft(),s===null&&Ie<3&&(Ie++,setTimeout(()=>k(t),1500));return}Ie=0}if(Ee)return;let n=X(),o=n&&n.value,i=!!e.forceButton,a=s=>s?[s.selector,s.position,s.mode,s.align,s.style].join("~"):"heuristic",c=Array.isArray(e.anchors)?e.anchors:[],l=[o||"demo",a(st(e.anchor))].concat(c.map(s=>a(st(s)))).join("|"),u=U;if(!(u&&Dt===l)){if(u&&ft(),!o&&!i){y("auto-mount: SKU n\xE3o resolvido na PDP"),Le<10&&(Le++,setTimeout(()=>k(t),800));return}if(Le=0,!i&&e.anchor&&st(e.anchor)&&!Bt(e.anchor)&&Re<12){Re++,setTimeout(()=>k(t),600);return}Re=0,Ee=!0;try{let s=i;i||(Q[o]||(Q[o]=z(e.projectId,o).then(p=>!!(p&&p.available)).catch(()=>!1)),s=await Q[o]);try{Ge(s?"available":"unavailable")}catch(p){}if(!s){y("auto-mount: produto sem try-on",o);return}if(ot().holdout){ft(),y("auto-mount: holdout \u2014 bot\xE3o suprimido");return}let d=await O(),f=window.matchMedia("(max-width: 767px)").matches,h=ut(r||d&&d.main||e.anchor||{},f),w=()=>{let p=X(),v=p&&p.value||o||"";Yt(),m("button_clicked",{sku:v,style:h.style}),lt({projectId:e.projectId,identifier:v})},b=en();U=je(b,h,w),j=[];for(let p=0;p<c.length;p++){let v=c[p],K=Bt(v);if(!K)continue;let pn=d&&d.anchors&&d.anchors[p]||v,Be=je(K,ut(pn,f),w);Be&&j.push(Be)}Dt=l,Ki(),y("auto-mount: bot\xE3o",{style:h.style,sku:o,mounted:!!U,extras:j.length,forced:i}),(U||j.length)&&m("button_rendered",{style:h.style,sku:o||null,skuSource:n&&n.source,anchorFound:!!b,position:b?b.position:null,mode:b?b.mode:null,extras:j.length,forced:i})}finally{Ee=!1}}}function je(t,e,r){let n=t&&t.mode||"flow",o=un(e,r);if(!o)return null;let i=document.createElement("div");i.id=Di(),zi(i,{mode:"closed"}).appendChild(o),["click","mousedown","mouseup","pointerdown","pointerup","touchstart"].forEach(l=>{try{i.addEventListener(l,u=>{u.stopPropagation()},!1)}catch(u){}});let c=!1;if(t&&t.el&&t.el.parentNode&&(n==="overlay"?(t.detached?Wi(t.el,i,t.align):Vi(t.el,i,t.align),c=!0):(i.style.cssText="display:contents;",c=Ji(t.el,i,t.position))),c||(i.style.cssText="position:fixed;left:16px;bottom:16px;z-index:2147483000;",document.body.appendChild(i)),t&&t.style){let l=Fi(t.style);if(l){if(n==="overlay"){let u=l.match(/(?:^|;)\s*z-index\s*:\s*([^;]+)/i);if(u)try{i.style.zIndex=u[1].trim()}catch(s){}}try{o.style.cssText+=";"+l}catch(u){}}}return i}function fn(){try{let t=g(),e={anchor:t.anchor,anchors:t.anchors,cards:t.cards,forceButton:t.forceButton},r={},n=i=>({desktop:i,tablet:i,mobile:i}),o=(i,a,c)=>{i=i||{};let l=f=>a===f?c:r[f];t.anchor=l("primary")?n(l("primary")):i.main||null;let u=Array.isArray(i.anchors)?i.anchors:[],s=u.length;Object.keys(r).concat(a?[a]:[]).forEach(f=>{f&&f.indexOf("extra-")===0&&(s=Math.max(s,(parseInt(f.slice(6),10)||0)+1))});let d=[];for(let f=0;f<s;f++){let h=l("extra-"+f);d[f]=h?n(h):u[f]||null}t.anchors=d,t._anchorFromPicker=!0,t.forceButton=!0};window.addEventListener("message",i=>{if(i.source!==window)return;let a=i.data;if(!(!a||!a.__mkCmd)){if(a.__mkCmd==="getButtons"){O().then(c=>{let l=c&&Array.isArray(c.anchors)?c.anchors.length:0;try{window.postMessage({__mkButtons:{extras:l,hasMain:!!(c&&c.main)}},"*")}catch(u){}});return}if(a.__mkCmd==="previewSlot"){O().then(c=>{o(c,a.slot||"primary",a.live),k("pdp")});return}if(a.__mkCmd==="saveSlot"){a.slot&&a.live&&(r[a.slot]=a.live),O().then(c=>{o(c),k("pdp")});return}if(a.__mkCmd==="galleryPreview"){t.cards=a.cards||null,t._anchorFromPicker=!0,t.forceButton=!0,tt(),zt("category");return}if(a.__mkCmd==="applyRecipe"){O().then(c=>{o(c),a.cards!==void 0&&(t.cards=a.cards||null),k("pdp"),t.cards&&(tt(),zt("category"))});return}if(a.__mkCmd==="cancelPreview"){Object.keys(r).length?O().then(c=>{o(c),k("pdp")}):(t.anchor=e.anchor,t.anchors=e.anchors,t.cards=e.cards,t._anchorFromPicker=!1,t.forceButton=e.forceButton,ft(),tt(),k("pdp"));return}}})}catch(t){}}var F=null,pt=null,Oe=null,mt=new Map;function Gi(t,e){try{if(e.skuAttr){let o=e.skuSelector?t.querySelector(e.skuSelector):t,i=o&&o.getAttribute(e.skuAttr);if(i)return String(i).trim()}if(e.skuSelector&&!e.skuAttr){let o=t.querySelector(e.skuSelector),i=o&&(o.getAttribute("content")||o.textContent||"").trim();if(i)return i}let r=t.querySelector(e.linkSelector||"a[href]"),n=r&&r.getAttribute("href");if(n){let o=n.match(/-p(\d+)|[?&]variant=(\d+)|\/produtos?\/([\w-]+)|\/products?\/([\w-]+)|-(\d+)(?:[/?#]|$)/);if(o)return o[1]||o[2]||o[3]||o[4]||o[5]}}catch(r){}return null}async function Xi(t,e,r){if(mt.has(t))return;let n=!!g().forceButton,o=Gi(t,e);if(!o&&!n)return;let i=n;if(i||(Q[o]||(Q[o]=z(g().projectId,o).then(s=>!!(s&&s.available)).catch(()=>!1)),i=await Q[o]),!i||mt.has(t)||!t.isConnected)return;let c={el:e.anchorWithin&&t.querySelector(e.anchorWithin)||t,mode:e.mode||"overlay",align:e.align||"top-left",position:e.position||"afterbegin",style:e.injectStyle||e.style||"",detached:!0},u=je(c,r,()=>{Yt(),m("button_clicked",{sku:o,gallery:!0,style:r.style}),lt({projectId:g().projectId,identifier:o})});u&&(mt.set(t,u),m("button_rendered",{gallery:!0,sku:o,style:r.style}))}function Me(t){try{document.querySelectorAll(t.cardSelector).forEach(e=>{e.__mkCard||(e.__mkCard=!0,F.observe(e))})}catch(e){}}function tt(){if(F){try{F.disconnect()}catch(t){}F=null}if(pt){try{pt.disconnect()}catch(t){}pt=null}clearTimeout(Oe),mt.forEach(t=>Pe(t)),mt.clear()}async function zt(t){let e=g();if(t==="pdp"||t==="cart"||t==="checkout"||t==="purchase"){tt();return}if(!e.projectId)return;let r=await O(),n=e.cards||r&&r.cards||null;if(!n||!n.cardSelector){tt();return}if(F){Me(n);return}if(typeof IntersectionObserver!="function")return;let o=ut(n,window.matchMedia("(max-width: 767px)").matches);if(o.style==="none"){tt();return}F=new IntersectionObserver(i=>{for(let a of i)a.isIntersecting&&(F.unobserve(a.target),Xi(a.target,n,o))},{rootMargin:"300px"}),Me(n);try{pt=new MutationObserver(()=>{clearTimeout(Oe),Oe=setTimeout(()=>Me(n),250)}),pt.observe(document.body,{childList:!0,subtree:!0})}catch(i){}y("auto-mount galeria ativa",{cardSelector:n.cardSelector})}(function(){"use strict";try{let r=function(){try{Qe(),fn(),$r(),e.autoTrack!==!1&&(Sr((o,i)=>{Pr(o,i),k(o),zt(o)}),Br(),Or()),y("mk-sdk iniciado",{projectId:e.projectId,collectorUrl:e.collectorUrl})}catch(o){e.debug&&console.error("[mk-sdk] init erro",o)}},e=Ft();if(e.projectId){let o=nr(e.projectId);o&&Zt(o),G().then(i=>{let a=er(i);Zt(a),or(e.projectId,a),y("escopo de coleta",a);try{gt(i,e.projectId,e.product)}catch(c){}})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r();let n={open:lt,close:Ot,isAvailable:Fr,getAvailability:z,onReady:Wr,onClose:Jr,onAddToCart:Gr,onProductLoaded:Xr,onError:Yr,onInteraction:Zr,onGenerationComplete:Qr,testCart:xr,experiments:$t,resetExperiments:Fe,_version:Gt,_isMkSdk:!0};typeof window!="undefined"&&(window.mk=n)}catch(e){typeof console!="undefined"&&console.error("[mk-sdk] boot fatal",e)}})();})();
|
|
1
|
+
(()=>{var yn=Object.defineProperty;var C=(t,e)=>{for(var r in e)yn(t,r,{get:e[r],enumerable:!0})};var Kt={collectorUrl:"https://api-collector.mk3dlabs.com",appUrl:"https://mkfashion.mk3dlabs.com/visualizer",apiUrl:"https://mkfashion-new-api.mk3dlabs.com"},gn={},et=null;function $t(){if(et)return et;let t=null;try{t=document.currentScript||document.querySelector("script[data-mk-project]")||document.querySelector('script[src*="mk-sdk"]')||document.querySelector('script[src*="mk-pixel"]')}catch(i){}let e=i=>{try{return t&&t.getAttribute(i)}catch(a){return null}},r=e("data-mk-project")||e("data-mk-client")||window.__MK&&(window.__MK.projectId||window.__MK.clientSlug)||null,n=e("data-mk-product")||window.__MK&&window.__MK.product||"mk-fashion",o=e("data-mk-collector")||window.__MK&&window.__MK.collectorUrl||gn.collectorUrl||Kt.collectorUrl;return et={projectId:r,product:n,collectorUrl:o,appUrl:window.__MK&&window.__MK.appUrl||Kt.appUrl,apiUrl:window.__MK&&window.__MK.apiUrl||Kt.apiUrl,debug:!!(e("data-mk-debug")!==null||window.__MK&&window.__MK.debug||/[?&]mkdebug\b/.test(location.search)),observe:!!(window.__MK&&window.__MK.observe),forceButton:!!(window.__MK&&window.__MK.forceButton),anchor:window.__MK&&window.__MK.anchor||null,anchors:window.__MK&&window.__MK.anchors||null,cards:window.__MK&&window.__MK.cards||null,modalWidth:window.__MK&&window.__MK.modalWidth||null,modalHeight:window.__MK&&window.__MK.modalHeight||null,cartRedirect:!(window.__MK&&window.__MK.cartRedirect===!1),cartBehavior:window.__MK&&window.__MK.cartBehavior||null,cartOpenSelector:window.__MK&&window.__MK.cartOpenSelector||null,autoTrack:e("data-mk-no-autotrack")===null,batchIntervalMs:window.__MK&&window.__MK.batchIntervalMs||8e3,batchMaxSize:window.__MK&&window.__MK.batchMaxSize||20,engagementIntervalMs:15e3},et}function g(){return et||$t()}function y(...t){let e=g();e&&e.debug&&typeof console!="undefined"&&console.log("[mk-sdk]",...t)}var De="_mk_vid",ze="_mk_sid",rt=null,nt=null;function gt(){return typeof crypto!="undefined"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function wt(){if(rt)return rt;try{let t=localStorage.getItem(De);return t||(t="v_"+gt(),localStorage.setItem(De,t)),rt=t,t}catch(t){return rt="v_"+gt(),rt}}function Ue(){if(nt)return nt;try{let t=sessionStorage.getItem(ze);return t||(t="s_"+gt(),sessionStorage.setItem(ze,t)),nt=t,t}catch(t){return nt="s_"+gt(),nt}}var H=[],Fe=!1;function Ht(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619)>>>0;return(e>>>0)/4294967296}function wn(){let t=typeof navigator!="undefined"&&navigator.userAgent||"";return/iPad|Tablet|PlayBook|Silk/i.test(t)||/Android/i.test(t)&&!/Mobile/i.test(t)?"tablet":/Mobi|Android|iPhone|iPod|Windows Phone|BlackBerry/i.test(t)?"mobile":"desktop"}function xn(){try{return localStorage.getItem("_mk_seen")?!0:(localStorage.setItem("_mk_seen",String(Date.now())),!1)}catch(t){return!1}}function bn(t,e){let r=t.product||"mk-fashion";return r==="ambos"||r===(e||"mk-fashion")}function _n(t,e){let r=t.targeting||{};return!(Array.isArray(r.device)&&r.device.length&&r.device.indexOf(e.device)<0||r.audience==="new"&&e.returning||r.audience==="returning"&&!e.returning)}function vn(t,e){let r=t.traffic==null?100:Number(t.traffic);return r>=100?!0:r<=0?!1:Ht(e+"|"+t.id+"|t")*100<r}function kn(t,e){let r=(t.variants||[]).filter(a=>a&&a.key),n=r.reduce((a,c)=>a+(Number(c.weight)||0),0);if(n<=0)return null;let o=Ht(e+"|"+t.id)*n,i=0;for(let a=0;a<r.length;a++)if(i+=Number(r[a].weight)||0,o<i)return r[a];return r[r.length-1]}function Cn(t,e,r){let n="mk_exp_"+e+"_"+t.id,o=c=>(t.variants||[]).filter(l=>l&&l.key===c)[0]||null,i=null;try{i=localStorage.getItem(n)}catch(c){}if(i&&o(i))return o(i);let a=kn(t,r);if(a)try{localStorage.setItem(n,a.key)}catch(c){}return a}function xt(t,e,r){if(Fe)return;Fe=!0;let n=t&&Array.isArray(t.experiments)?t.experiments:[];if(!n.length)return;let o=wt(),i={device:wn(),returning:xn()},a=n.filter(u=>u&&u.status==="running"&&bn(u,r)&&_n(u,i)&&vn(u,o));if(!a.length){y("[A/B] "+n.length+" experimento(s) configurado(s); nenhum eleg\xEDvel p/ este visitante (status/targeting/tr\xE1fego/produto)");return}let c=a.filter(u=>u.coexist==="exclusive"),l;if(c.length){let u=Math.min(c.length-1,Math.floor(Ht(o+"|excl")*c.length));l=[c[u]]}else l=a;for(let u=0;u<l.length;u++){let s=l[u],d=Cn(s,e||"",o);d&&H.push({exp:s.id,var:d.key,control:!!d.control,overrides:d.overrides||{}})}H.length&&y("[A/B] variante(s) ativa(s):",Vt())}function Ke(){return H.map(t=>({exp:t.exp,var:t.var}))}function Vt(){return H.map(t=>({exp:t.exp,variant:t.var,control:t.control,holdout:!!(t.overrides&&t.overrides.holdout)}))}function $e(){try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);r&&(r.indexOf("mk_exp_")===0||r==="_mk_vid"||r==="_mk_seen")&&t.push(r)}t.forEach(e=>{try{localStorage.removeItem(e)}catch(r){}}),y("[A/B] reset \u2014 "+t.length+" chave(s) apagada(s); recarregando p/ re-sortear")}catch(t){}try{typeof location!="undefined"&&location.reload&&location.reload()}catch(t){}}function ot(){let t={holdout:!1,tryOnButton:null,modalWidth:null,modalHeight:null};for(let e=0;e<H.length;e++){let r=H[e];if(r.control)continue;let n=r.overrides||{};n.holdout&&(t.holdout=!0),n.tryOnButton&&(t.tryOnButton=n.tryOnButton),n.modalWidth&&(t.modalWidth=n.modalWidth),n.modalHeight&&(t.modalHeight=n.modalHeight)}return t}var He=[/email/i,/e-?mail/i,/cpf/i,/cnpj/i,/phone/i,/telefone/i,/celular/i,/address/i,/endereco/i,/cep/i,/zip/i,/card/i,/cartao/i,/cvv/i,/password/i,/senha/i,/token/i,/\bnome\b/i,/fullname/i,/firstname/i,/lastname/i,/sobrenome/i,/birth/i,/nascimento/i,/rg\b/i],Ve={imageUrl:1,image:1,thumbnail:1,photo:1,imageBase64:1,src:1},Wt=2e3;function We(t){for(let e=0;e<He.length;e++)if(He[e].test(t))return!0;return!1}function Jt(t){if(!t||typeof t!="object"||Array.isArray(t))return typeof t=="string"&&t.length>Wt?t.slice(0,200)+"...[truncated "+t.length+"B]":t;let e={};for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||We(r))continue;let n=t[r];if(Ve[r]){e[r+"Present"]=!!n;continue}if(typeof n=="string"&&n.length>Wt){e[r]=n.slice(0,200)+"...[truncated "+n.length+"B]";continue}if(n&&typeof n=="object"&&!Array.isArray(n)){e[r]=Sn(n);continue}e[r]=n}return e}function Sn(t){let e={};for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||We(r))continue;let n=t[r];if(Ve[r]){e[r+"Present"]=!!n;continue}if(typeof n=="string"&&n.length>Wt){e[r]=n.slice(0,200)+"...[truncated]";continue}e[r]=n}return e}var bt=[],Gt=null,W=null,Yt="1.1.100",Tn=["off","pdp_tryon","pdp","all","tryon_engaged"],it,Xt=null,G="unknown",J=[],V=null;function Ge(){let t=g();return"mk_engaged_"+(t&&t.projectId||"")}function Zt(){if(V!==null)return V;try{V=localStorage.getItem(Ge())==="1"}catch(t){V=!1}return V}function at(){if(!Zt()){V=!0;try{localStorage.setItem(Ge(),"1")}catch(t){}_t(!1)}}var An=/^purchase$/;function Xe(t,e){if(it===void 0)return"hold";if(it==="off")return"drop";if(it==="all"||e&&An.test(e))return"collect";switch(it){case"pdp":return t==="pdp"?"collect":"drop";case"tryon_engaged":if(Zt())return"collect";case"pdp_tryon":return t!=="pdp"?"drop":G==="available"?"collect":G==="unavailable"?"drop":"hold";default:return"collect"}}function _t(t){if(!J.length)return;let e=[];for(let r of J){let n=Xe(r._pt,r.name);n==="collect"?Qe(r.name,r.params,r.ts):n==="hold"&&!t&&e.push(r)}J=e}function Qt(t){it=Tn.indexOf(t)>=0?t:"all",_t(!1)}function Ye(t){G=t==="available"?"available":"unavailable",_t(!1)}function Ze(t){_t(!0),W=t,Xt=t&&t.pageType||null,G="unknown"}function m(t,e,r){if(!g().projectId){(m._pre=m._pre||[]).push({name:t,params:e,ts:r||Date.now()}),m._pre.length>50&&m._pre.shift();return}if(m._pre&&m._pre.length){let o=m._pre;m._pre=[];for(let i of o)Je(i.name,i.params,i.ts)}Je(t,e,r)}function Je(t,e,r){let n=Xe(Xt,t);if(En(t,e,n),n==="collect"){Qe(t,e,r);return}if(n==="drop"){y("descartado (escopo)",t);return}J.push({name:t,params:e,ts:r||Date.now(),_pt:Xt}),J.length>300&&J.shift()}function En(t,e,r){if(g().observe)try{window.postMessage({__mkpixel:!0,event:{name:"page_"+tr(t),params:Jt(e||{})},site:W?{pageType:W.pageType,platform:W.platform,url:W.url}:null,gate:r},"*")}catch(o){}}function Qe(t,e,r){let n=g(),o=Jt(e||{}),i="page_"+tr(t);if(bt.push({name:i,ts:r||Date.now(),params:o}),y("queued",t,o),bt.length>=n.batchMaxSize){B();return}Gt||(Gt=setTimeout(()=>{Gt=null,B()},n.batchIntervalMs))}function tr(t){if(typeof t!="string"||!t)return"unknown";let e=t.replace(/^on/,"");return e=e.replace(/[A-Z]/g,(r,n)=>(n>0?"_":"")+r.toLowerCase()),e.indexOf("page_")===0&&(e=e.slice(5)),e}function B(t){if(bt.length===0)return;let e=g();if(!e.projectId||!e.collectorUrl)return;let r=bt.splice(0,50),n=G==="available"?!0:G==="unavailable"?!1:void 0,o=Ke(),i=JSON.stringify({product:e.product||void 0,sdkVersion:Yt,experiments:o.length?o:void 0,visitorId:wt(),sessionId:Ue(),engaged:Zt()||void 0,tryonAvailable:n,events:r,site:W||void 0}),a=e.collectorUrl+"/v1/track";try{fetch(a,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json","X-MK-Project-Id":e.projectId},body:i}).catch(()=>{})}catch(c){try{navigator.sendBeacon&&navigator.sendBeacon(a+"?projectId="+encodeURIComponent(e.projectId),new Blob([i],{type:"text/plain"}))}catch(l){}}}function er(){try{window.addEventListener("pagehide",()=>B(!0)),window.addEventListener("beforeunload",()=>B(!0)),document.addEventListener("visibilitychange",()=>{document.hidden&&B(!0)})}catch(t){}}function I(t){let e=[];try{let r=document.querySelectorAll('script[type="application/ld+json"]');for(let n of r){let o;try{o=JSON.parse(n.textContent)}catch(a){continue}let i=[];Array.isArray(o)?i.push(...o):o["@graph"]?i.push(...o["@graph"]):i.push(o);for(let a of i){if(!a||!a["@type"])continue;let c=Array.isArray(a["@type"])?a["@type"]:[a["@type"]];(!t||t.some(l=>c.includes(l)))&&e.push(a)}}}catch(r){}return e}var rr=["off","pdp_tryon","pdp","all","tryon_engaged"],In="all",Ln=30*60*1e3,N=null;function X(){if(N)return N;let t=g();return!t.projectId||!t.apiUrl?(N=Promise.resolve(null),N):(N=fetch(t.apiUrl+"/projects/"+t.projectId).then(e=>{if(!e.ok)throw new Error("http "+e.status);return e.json()}).then(e=>e&&e.project||e||null).catch(()=>(N=null,null)),N)}function nr(t){let e=t&&t.analytic&&t.analytic.scope;return rr.indexOf(e)>=0?e:In}var or=t=>"mk_scope_"+t;function ir(t){try{let e=localStorage.getItem(or(t));if(!e)return null;let r=JSON.parse(e);return!r||typeof r.exp!="number"||r.exp<Date.now()?null:rr.indexOf(r.scope)>=0?r.scope:null}catch(e){return null}}function ar(t,e){try{localStorage.setItem(or(t),JSON.stringify({scope:e,exp:Date.now()+Ln}))}catch(r){}}var re={};C(re,{addToCart:()=>$n,detect:()=>zn,getCartSummary:()=>Fn,id:()=>qn,openCartDrawer:()=>Hn,resolveSku:()=>Un,skipRedirect:()=>Dn});var kt={};C(kt,{addToCart:()=>Pn,detect:()=>Mn,getCartSummary:()=>ee,id:()=>Rn,openCartDrawer:()=>Nn,resolveSku:()=>te});var Rn="shopify";function Mn(){return!!(window.Shopify||window.ShopifyAnalytics)}function te(){let t=window;return t.ShopifyAnalytics&&t.ShopifyAnalytics.meta&&t.ShopifyAnalytics.meta.product?{value:String(t.ShopifyAnalytics.meta.product.id),source:"shopify"}:null}var vt=t=>String(t==null?"":t).trim().toLowerCase();async function Pn({size:t,color:e,sku:r,quantity:n}){let o=(location.pathname.split("/products/")[1]||"").split(/[?#]/)[0];if(!o)throw new Error("shopify: sem handle de produto na URL (n\xE3o \xE9 PDP?)");let a=(await fetch("/products/"+o+".js").then(p=>p.json())).variants||[],c=p=>[p.option1,p.option2,p.option3].concat(String(p.title||"").split("/")).map(vt).filter(Boolean),l=(p,k)=>c(p).indexOf(vt(k))>=0,u=p=>(!t||l(p,t))&&(!e||l(p,e)),s=null;if((t||e)&&(s=a.find(p=>u(p)&&p.available)||a.find(u)),!s&&r&&(s=a.find(p=>vt(p.sku)===vt(r))),s||(s=a.find(p=>p.available)||a[0]),!s)throw new Error("shopify: variante n\xE3o encontrada");let d=cr(),f=null;if(d&&typeof d.getSectionsToRender=="function")try{f=d.getSectionsToRender().map(p=>({id:p.id,selector:p.selector||"#"+p.id})).filter(p=>p.id)}catch(p){}let h={items:[{id:s.id,quantity:n||1}]};f&&f.length&&(h.sections=f.map(p=>p.id).join(","),h.sections_url=location.pathname);let w=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(!w.ok)throw new Error("shopify: /cart/add.js HTTP "+w.status);let b=await w.json().catch(()=>({}));return d&&f&&b.sections&&jn(d,f,b.sections),{platform:"shopify",variantId:s.id,size:s.title,sku:s.sku||null}}function cr(){return document.querySelector("cart-drawer, cart-notification")}function jn(t,e,r){for(let n of e){let o=r[n.id];if(o)try{let i=null;if(typeof t.getSectionInnerHTML=="function")i=t.getSectionInnerHTML(o,n.selector);else{let c=new DOMParser().parseFromString(o,"text/html").querySelector(n.selector);i=c?c.innerHTML:null}let a=document.querySelector(n.selector);a&&i!=null&&(a.innerHTML=i)}catch(i){}}}async function ee(){try{let t=await fetch("/cart.js",{headers:{Accept:"application/json"}}).then(e=>e.json());return{value:(Number(t.total_price)||0)/100,itemCount:Number(t.item_count)||0,currency:t.currency||null}}catch(t){return null}}var On=["[data-cart-drawer-toggle]",'[data-action="open-cart-drawer"]','[data-action="open-cart"]',".js-cart-drawer-open",".js-drawer-open-cart",".cart-drawer-toggle",".js-cart-toggle",'[aria-controls="CartDrawer"]','[aria-controls="cart-drawer"]',"#cart-icon-bubble","#lk-cart-icon",".header__cart",".site-header__cart",".cart-link",".header-cart",'a[href="/cart"]','a[href$="/cart"]'];function Bn(t){try{let e=t.getBoundingClientRect();return e.width>0&&e.height>0&&getComputedStyle(t).visibility!=="hidden"}catch(e){return!1}}function Nn(){let t=cr();if(t&&typeof t.open=="function")return setTimeout(()=>{try{t.open()}catch(r){}},200),!0;let e=null;for(let r of On)try{if(e=[...document.querySelectorAll(r)].find(Bn),e)break}catch(n){}return e?(setTimeout(()=>{try{e.click()}catch(r){}},300),!0):!1}var qn="zerezes",Dn=!0;function zn(){try{if(!(window.Shopify||window.ShopifyAnalytics))return!1;let t=window.Shopify&&window.Shopify.shop||"";return/(^|\.)zerezes\./i.test(location.hostname)||/cs-zerezes/i.test(t)}catch(t){return!1}}var Un=te,Fn=ee;function Kn(){let t=[...document.querySelectorAll(".lens-selection__button, [data-has-lens-basket]")];return t.find(e=>{let r=e.getBoundingClientRect();return r.width>0&&r.height>0})||t[0]||null}async function $n(){let t=Kn();if(!t)throw new Error("zerezes: bot\xE3o de sele\xE7\xE3o de lentes n\xE3o encontrado");try{window.postMessage({source:"mkfashion-app",action:"close_request"},"*")}catch(e){}return setTimeout(()=>{try{t.click()}catch(e){}},250),{platform:"zerezes",nativeFlow:"lens-selection"}}function Hn(){return!0}var oe={};C(oe,{addToCart:()=>Gn,detect:()=>Wn,getCartSummary:()=>Xn,id:()=>Vn,resolveSku:()=>Jn});var Vn="hybris";function Wn(){return!!(window.ACC&&window.ACC.config)}function Jn(){let t=(location.pathname||"").match(/\/p\/([^/?#]+)/);return t&&t[1]?{value:decodeURIComponent(t[1]),source:"hybris/url"}:null}var lr=t=>String(t==null?"":t).trim().toLowerCase();async function Gn({size:t,quantity:e}){let r=[...document.querySelectorAll('.js-product-select-size, a[data-code], [class*="select-size"]')].filter(h=>h.getAttribute&&h.getAttribute("data-code")),n=t?r.find(h=>lr(h.textContent)===lr(t)):null;n||(n=r.find(h=>h.offsetParent!==null)||r[0]);let o=n&&n.getAttribute("data-code");if(!o)throw new Error("hybris: variante (data-code) n\xE3o encontrada");let i=document.getElementById("product--add-to-cart-form")||document.querySelector('form[action*="/cart/add"]'),a=i&&i.querySelector('[name="CSRFToken"]'),c=a&&a.value,l=i&&i.getAttribute("action")||"/cart/add";if(!c)throw new Error("hybris: CSRFToken n\xE3o encontrado");let u=new URLSearchParams;u.set("productCodePost",o),u.set("qty",String(e||1)),u.set("CSRFToken",c);let s=await fetch(l,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},body:u.toString()});if(!s.ok)throw new Error("hybris: "+l+" HTTP "+s.status);let d=null,f=null;try{let h=await s.clone().json(),w=h&&h.cartData;w&&(d=ne(w.total!=null?w.total:w.totalPrice),f=w.totalUnitCount!=null?Number(w.totalUnitCount):Array.isArray(w.products)?w.products.length:null)}catch(h){}return{platform:"hybris",productCode:o,size:n.textContent.trim(),cartValue:d,itemCount:f,currency:"BRL"}}function ne(t){if(t==null||t==="")return null;if(typeof t=="number")return Number.isFinite(t)?t:null;let e=String(t).replace(/[^\d.,]/g,"");if(!e)return null;let r=e.indexOf(",")>e.indexOf(".")?parseFloat(e.replace(/\./g,"").replace(",",".")):parseFloat(e.replace(/,/g,""));return Number.isFinite(r)?r:null}async function Xn(){try{let t=await fetch("/cart/async?nocache="+Date.now(),{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(a=>a.ok?a.text():"");if(!t)return null;let e=new DOMParser().parseFromString(t,"text/html"),r=e.querySelector(".minicart-total .price")||e.querySelector(".floating-cart--cart-total"),n=r?ne(r.textContent):null,o=e.querySelector(".mini-badge"),i=o?parseInt(o.textContent,10)||0:null;return n==null&&i==null?null:{value:n,itemCount:i,currency:"BRL"}}catch(t){}try{let t=[".minicart-total .price",".js-cart-total",".cart-total",".total-price",".grand-total"];for(let e of t){let r=document.querySelector(e),n=r&&ne(r.textContent);if(n)return{value:n,itemCount:null,currency:"BRL"}}}catch(t){}return null}var ae={};C(ae,{addToCart:()=>to,addToCartBatch:()=>eo,detect:()=>Zn,getCartSummary:()=>ro,getFsCartStore:()=>St,id:()=>Yn,openCartDrawer:()=>Qn,resolveSku:()=>ie});var Yn="vtex";function Zn(){return!!(window.vtex||window.vtexjs||window.vtxctx||window.skuJson_0||window.__RUNTIME__||window.vtexaf||document.querySelector('link[href*="vtexassets"], script[src*="vtexassets"], link[href*="vteximg"], script[src*="vteximg"], img[src*="vteximg"]'))}function ie(){let t=window;if(t.vtxctx&&t.vtxctx.skus&&t.vtxctx.skus[0])return{value:String(t.vtxctx.skus[0]),source:"vtex/vtxctx"};if(t.skuJson_0&&t.skuJson_0.skus&&t.skuJson_0.skus[0])return{value:String(t.skuJson_0.skus[0].sku),source:"vtex/skuJson"};try{let e=document.querySelector('meta[property="product:sku"]'),r=e&&(e.getAttribute("content")||"").trim();if(r)return{value:String(r),source:"vtex/og-sku"}}catch(e){}return null}var Ct=t=>String(t==null?"":t).trim().toLowerCase(),T;function St(){if(T!==void 0)return T;T=null;try{let t=Object.keys(window).find(o=>/^webpackChunk/.test(o));if(!t||!window[t]||typeof window[t].push!="function")return T;let e=null;try{window[t].push([["mk-cart-"+Math.random().toString(36).slice(2)],{},o=>{e=o}])}catch(o){}if(!e||!e.m)return T;let r=null;for(let o in e.m)try{let i=e.m[o].toString();if(i.indexOf("cart-storage")>=0&&i.indexOf("addToCart")>=0&&i.indexOf("toggleCart")>=0){r=o;break}}catch(i){}if(r==null)return T;let n=e(r);for(let o in n)try{let i=n[o];if(typeof i=="function"&&typeof i.getState=="function"){let a=i.getState();if(a&&typeof a.addToCart=="function"&&Array.isArray(a.items)){T=i;break}}}catch(i){}}catch(t){T=null}return T}function sr(t){try{let e=t&&t.totalizers||[];if(!e.length)return null;let r=e.reduce((n,o)=>n+(Number(o&&o.value)||0),0);return r>0?r/100:null}catch(e){return null}}async function ur(t,e){let r=St();if(!r)return null;let n=(Array.isArray(t)?t:[t]).map(l=>String(l)).filter(Boolean);if(!n.length||typeof r.getState().addToCart!="function")return null;let i=!1;for(let l=0;l<n.length;l++){let u=l===n.length-1;try{await r.getState().addToCart({id:n[l],seller:"1"},"mk-tryon",e||1,u),i=!0}catch(s){}}if(!i)return null;let a=r.getState(),c=(a.items||[]).reduce((l,u)=>l+(Number(u&&u.quantity)||1),0);return{platform:"vtex",skuId:n.join(","),itemCount:c||null,cartValue:sr(a),currency:a.currencyCode||"BRL",drawerHandled:!0}}function Qn(){try{let e=St();if(e){let r=e.getState();if(r&&r.cartOpen)return!0;if(typeof e.setState=="function")return e.setState({cartOpen:!0}),!0;if(r&&typeof r.toggleCart=="function")return r.toggleCart(),!0}}catch(e){}let t=['[data-testid="cart-toggle"]','button[aria-label="Abrir carrinho de compras"]','[class*="minicart" i] button','button[class*="minicart" i]','[class*="miniCart" i] button',".vtexsc-cart",".fn-minicart","#header-cart",'[class*="cartIcon" i]','[aria-label*="carrinho" i]','[aria-label*="sacola" i]','[data-testid*="cart" i] button'];for(let e of t)try{let r=document.querySelector(e);if(r)return r.click(),!0}catch(r){}return!1}async function dr(t,e){let r=Array.isArray(t)?t:[t],n=r.map(d=>({id:parseInt(d,10),quantity:e||1,seller:"1"})).filter(d=>Number.isFinite(d.id));if(!n.length)throw new Error("vtex: nenhum skuId v\xE1lido");let o=location.origin,i=await fetch(o+"/api/checkout/pub/orderForm",{headers:{accept:"application/json"},credentials:"include"}).then(d=>d.json()),a=i&&i.orderFormId;if(!a)throw new Error("vtex: orderFormId indispon\xEDvel");let c=await fetch(o+"/api/checkout/pub/orderForm/"+encodeURIComponent(a)+"/items",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"include",body:JSON.stringify({orderItems:n})}).then(d=>d.json()),l=c&&typeof c.value=="number"?c.value/100:null,u=Array.isArray(c&&c.items)?c.items.reduce((d,f)=>d+(Number(f.quantity)||1),0):null,s=c&&c.storePreferencesData&&c.storePreferencesData.currencyCode||"BRL";return{platform:"vtex",skuId:r.map(String).join(","),cartValue:l,itemCount:u,currency:s}}async function to(t){t=t||{};let{size:e,sku:r,quantity:n}=t,o=window.skuJson_0&&window.skuJson_0.skus||[];if(o.length&&window.vtexjs&&window.vtexjs.checkout&&window.vtexjs.checkout.addToCart){let l=s=>Ct(s.skuname)===Ct(e)||s.dimensions&&Object.values(s.dimensions).some(d=>Ct(d)===Ct(e)),u=e?o.find(s=>l(s)&&s.available)||o.find(l):null;if(u||(u=o.find(s=>s.available)||o[0]),!u)throw new Error("vtex: variante n\xE3o encontrada");return await window.vtexjs.checkout.addToCart([{id:parseInt(u.sku,10),quantity:n||1,seller:"1"}]),{platform:"vtex",skuId:u.sku,size:u.skuname||e}}let i=ie(),a=r||i&&i.value||null;if(!a)throw new Error("vtex: skuId n\xE3o resolvido (IO)");let c=await ur(a,n);return c||dr(a,n)}async function eo(t){let e=(t||[]).map(n=>n&&(n.sku||(ie()||{}).value)).filter(Boolean);if(!e.length)throw new Error("vtex: nenhum skuId pro batch");let r=await ur(e,1);return r?Object.assign({count:e.length},r):window.skuJson_0&&window.vtexjs&&window.vtexjs.checkout&&window.vtexjs.checkout.addToCart?(await window.vtexjs.checkout.addToCart(e.map(n=>({id:parseInt(n,10),quantity:1,seller:"1"}))),{platform:"vtex",count:e.length}):dr(e,1)}async function ro(){try{let t=St();if(t){let e=t.getState(),r=sr(e),n=(e.items||[]).reduce((o,i)=>o+(Number(i&&i.quantity)||1),0);if(r!=null||n)return{value:r,itemCount:n,currency:e.currencyCode||"BRL"}}}catch(t){}try{let t=window.vtexjs&&window.vtexjs.checkout&&window.vtexjs.checkout.orderForm;if(t&&typeof t.value=="number"){let e=t.storePreferencesData&&t.storePreferencesData.currencyCode||"BRL",r=(t.items||[]).reduce((n,o)=>n+(Number(o.quantity)||1),0);return{value:t.value/100,itemCount:r,currency:e}}}catch(t){}try{let t=await fetch(location.origin+"/api/checkout/pub/orderForm",{headers:{accept:"application/json"},credentials:"include"}).then(e=>e.json());if(t&&typeof t.value=="number"){let e=(t.items||[]).reduce((r,n)=>r+(Number(n.quantity)||1),0);return{value:t.value/100,itemCount:e,currency:t.storePreferencesData&&t.storePreferencesData.currencyCode||"BRL"}}}catch(t){}return null}var ce={};C(ce,{addToCart:()=>co,detect:()=>io,getCartSummary:()=>so,id:()=>no,openCartDrawer:()=>lo,resolveSku:()=>ao,skipRedirect:()=>oo});var no="nuvemshop",oo=!0;function io(){return!!(window.LS&&(window.LS.cart||window.LS.addToCart))}function ao(){try{let t=window.LS,e=t&&t.variants||[],r=document.querySelector('[name="variant_id"]'),n=r&&r.value?e.find(o=>String(o.id)===String(r.value)):null;if(n||(n=e.find(o=>o.available!==!1&&o.sku)||e.find(o=>o.sku)||e[0]),n&&n.sku)return{value:String(n.sku),source:"nuvemshop/variant"};if(t&&t.product&&t.product.sku)return{value:String(t.product.sku),source:"nuvemshop/product"}}catch(t){}return null}var Tt=t=>String(t==null?"":t).trim().toLowerCase();async function co({size:t,quantity:e,productId:r}){if(r&&!document.getElementById("product_form")){let c=String(r).replace(/["\\]/g,""),l=document.querySelector('[data-product-id="'+c+'"]'),u=l&&l.querySelector("form[action]"),s=u&&u.getAttribute("action")||"/comprar/",d=window.LS;if(d&&typeof d.addToCartEnhanced=="function")try{let w=document.createElement("form");w.setAttribute("action",s),w.setAttribute("method","post");let b=document.createElement("input");return b.type="hidden",b.name="add_to_cart",b.value=c,w.appendChild(b),document.body.appendChild(w),d.addToCartEnhanced(w),setTimeout(()=>{try{w.remove()}catch(p){}},3e3),{platform:"nuvemshop",productId:c,via:"gallery-enhanced"}}catch(w){}let f=!1,h=null;try{let b=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},body:"add_to_cart="+encodeURIComponent(c)+"&quantity="+(e||1)})).json().catch(()=>({}));f=!!b.success,h=b.error_code||null}catch(w){}return{platform:"nuvemshop",productId:c,via:"gallery",added:f,reason:h}}let n=document.getElementById("product_form")||document.querySelector('.js-product-form, form[action*="/comprar"]');if(!n)throw new Error("nuvemshop: #product_form n\xE3o encontrado");t&&n.querySelectorAll('select[name^="variation"]').forEach(c=>{let l=[...c.options].find(u=>Tt(u.textContent).includes(Tt(t))||Tt(u.value)===Tt(t));l&&(c.value=l.value,c.dispatchEvent(new Event("change",{bubbles:!0})))});let o=n.querySelector('[name="quantity"]');o&&e&&(o.value=String(e)),await new Promise(c=>setTimeout(c,400));let i=n.querySelector(".js-addtocart")||document.querySelector(".js-addtocart");return i?i.click():typeof n.requestSubmit=="function"?n.requestSubmit():n.submit(),await new Promise(c=>setTimeout(c,1200)),{platform:"nuvemshop",variantId:(n.querySelector('[name="variant_id"]')||{}).value||null}}function lo(){try{if([...document.querySelectorAll('#ajax-cart-details, .modal-cart, [class*="cart-modal" i], [class*="modal-cart" i]')].find(o=>{try{return o.getBoundingClientRect().width>0&&getComputedStyle(o).display!=="none"}catch(i){return!1}}))return!0;let r=[...document.querySelectorAll('[data-toggle="#modal-cart"], [data-toggle*="cart" i], #ajax-cart a.js-modal-open, .cart-summary a.js-modal-open, .js-toggle-cart')],n=r.find(o=>{let i=o.getBoundingClientRect();return i.width>0&&i.height>0})||r[0];if(n)return setTimeout(()=>{try{n.click()}catch(o){}},300),!0;if(window.LS&&typeof window.LS.toggleCart=="function")return setTimeout(()=>{try{window.LS.toggleCart()}catch(o){}},300),!0}catch(t){}return!1}function so(){try{let t=window.LS,e=t&&t.cart;if(!e)return null;let r=t.currency&&t.currency.code||"BRL",n=Array.isArray(e.items)?e.items.reduce((i,a)=>i+(Number(a.quantity)||1),0):Number(e.items)||0,o=e.subtotal!=null?Number(e.subtotal):null;return{value:o!=null?o/100:null,itemCount:n,currency:r}}catch(t){return null}}var le={};C(le,{addToCart:()=>ho,detect:()=>po,getCartSummary:()=>yo,id:()=>uo,openCartDrawer:()=>wo,resolveSku:()=>mo,skipRedirect:()=>fo});var uo="wake",fo=!0;function po(){return!!(window.StorefrontClient||typeof window.addOrCreateCheckout=="function"||typeof window.addToCartClick=="function")}function mo(){try{let t=document.querySelector('input[name="product-id"], [data-product-id]'),e=t?t.value||t.getAttribute("data-product-id"):null;if(e)return{value:String(e).trim(),source:"wake/product-id"};let r=(location.pathname||"").match(/-(\d+)\/?(?:[?#]|$)/);if(r)return{value:r[1],source:"wake/url"}}catch(t){}return null}var fr=t=>String(t==null?"":t).trim().toLowerCase();async function ho({size:t,quantity:e}){if(t){let i=[...document.querySelectorAll("input[attribute-value]")].find(a=>fr(a.getAttribute("attribute-value"))===fr(t));if(i){try{i.checked=!0}catch(a){}try{typeof window.selectAttribute=="function"?window.selectAttribute(i):i.click()}catch(a){}await new Promise(a=>setTimeout(a,600))}}let r=document.querySelector('[name="product-variant-id"]'),n=r&&r.value;if(!n)throw new Error("wake: product-variant-id n\xE3o encontrado");if(typeof window.addOrCreateCheckout!="function")throw new Error("wake: addOrCreateCheckout indispon\xEDvel");if(!await window.addOrCreateCheckout([{productVariantId:Number(n),quantity:e||1,customization:[]}]))throw new Error("wake: addOrCreateCheckout retornou false");return{platform:"wake",productVariantId:n,size:t||null}}function pr(t){if(t==null)return null;let e=String(t).match(/([\d.]+,\d{2}|\d+(?:\.\d{2})?)/),r=(e?e[1]:String(t)).replace(/[^\d.,]/g,"");if(!r)return null;let n=r.indexOf(",")>r.indexOf(".")?parseFloat(r.replace(/\./g,"").replace(",",".")):parseFloat(r.replace(/,/g,""));return Number.isFinite(n)&&n>0?n:null}async function yo(){try{let t=()=>{let o=document.querySelector(".mc-subtotal__value")||document.querySelector(".mc-subtotal");return o?pr(o.textContent):null},e=t();if(e==null&&typeof window.loadMiniCart=="function"){try{window.loadMiniCart()}catch(o){}await new Promise(o=>setTimeout(o,700)),e=t()}e==null&&(e=go());let r=document.querySelector('.mc-products__count, [class*="mc-"][class*="count" i], [class*="minicart" i] [class*="count" i]'),n=r&&parseInt(String(r.textContent||"").replace(/\D/g,""),10)||null;if(e!=null)return{value:e,itemCount:n,currency:"BRL"}}catch(t){}return null}function go(){try{let t=document.querySelector('[class*="mini-cart" i], .mini-cart')||document;for(let e of t.querySelectorAll("div,span,p,li,strong,b")){if(e.children.length>2)continue;let r=(e.textContent||"").replace(/\s+/g," ").trim();if(!(!/R\$/.test(r)||/frete|faltam|gr[aá]tis|desconto|economi/i.test(r))&&/^(sub)?total\b/i.test(r)){let n=pr(r);if(n)return n}}}catch(t){}return null}function wo(){if(typeof window.setCartDivVisibility!="function")return!1;try{typeof window.loadMiniCart=="function"&&window.loadMiniCart()}catch(t){}return setTimeout(()=>{try{let t=document.querySelector('[class*="mini-cart" i], .mini-cart');if(t&&t.getBoundingClientRect().width>0)return;window.setCartDivVisibility()}catch(t){}},350),!0}var de={};C(de,{addToCart:()=>ko,cartUrl:()=>_o,detect:()=>vo,getCartSummary:()=>Co,id:()=>xo,openCartDrawer:()=>So,skipRedirect:()=>bo});var se="/api/v2/front",ue={"Content-Type":"application/json",Accept:"application/json","App-Token":"wapstore"},mr=t=>String(t==null?"":t).trim().toLowerCase(),xo="wapstore",bo=!0,_o="/checkout/carrinho";function vo(){try{if(document.querySelector('script[src*="/tema/"][src*="/dist/assets/"]')||/(?:^|;\s*)produto\/visitado=/.test(document.cookie))return!0}catch(t){}return!1}function hr(t){if(!t||typeof t!="object")return null;let e=t.subtotal&&t.subtotal.valor;return e==null?null:{value:e,itemCount:t.quantidadeItens!=null?t.quantidadeItens:null,currency:"BRL"}}async function ko({size:t,quantity:e}){let r=await fetch(se+"/url/product/detail?url="+encodeURIComponent(location.pathname),{headers:ue}).then(f=>f.json()),n=(r&&(r.produto||r.data||r)||{}).conteudo||{},o=n.atributos&&n.atributos.simples&&n.atributos.simples.valores||[];if(!o.length)throw new Error("wapstore: sem variante de compra (atributos.simples)");let i=t?o.find(f=>mr(f.label)===mr(t)):null;i=i||o.find(f=>f.selecionado)||o.find(f=>(f.estoque||0)>0)||o[0];let a=i&&i.carrinho;if(!a||!a.itens||!a.itens.length)throw new Error("wapstore: variante sem payload de carrinho");let c=a.itens.map(f=>Object.assign({},f,{quantidade:String(e||f.quantidade||1)})),l=await fetch(se+"/checkout/cart",{method:"POST",headers:ue,body:JSON.stringify({itens:c,tipo:a.tipo||"produto"})});if(!l.ok)throw new Error("wapstore: add HTTP "+l.status);let u=await l.json().catch(()=>({})),s=hr(u),d={platform:"wapstore",idProduto:c[0]&&c[0].idProduto,size:i&&i.label||null};return s&&(d.cartValue=s.value,d.itemCount=s.itemCount,d.currency=s.currency),d}async function Co(){try{let t=await fetch(se+"/checkout/cart",{headers:ue}).then(e=>e.json());return hr(t)}catch(t){}return null}function So(){try{let t=document.querySelector(".common-sheet.side-cart, .side-cart");if(t&&t.getBoundingClientRect().width>0)return!0;let e=document.querySelector('.button-cart, [class*="button-cart"]');if(e)return e.click(),!0}catch(t){}return!1}var fe={};C(fe,{addToCart:()=>Po,detect:()=>Io,getCartSummary:()=>jo,id:()=>To,openCartDrawer:()=>Oo,resolveSku:()=>Lo,skipRedirect:()=>Ao});var yr=t=>String(t==null?"":t).trim().toLowerCase(),To="linx",Ao=!0;function Eo(t){if(t==null)return null;let e=String(t).match(/([\d.]+,\d{2}|\d+(?:\.\d{2})?)/),r=(e?e[1]:String(t)).replace(/[^\d.,]/g,"");if(!r)return null;let n=r.indexOf(",")>r.indexOf(".")?parseFloat(r.replace(/\./g,"").replace(",",".")):parseFloat(r.replace(/,/g,""));return Number.isFinite(n)&&n>0?n:null}function Io(){return typeof window.carrinhoLateral=="function"&&typeof window.addToCart=="function"}function Lo(){try{let t=(location.pathname.match(/-p(\d+)\/?(?:[?#]|$)/)||[])[1];if(t)return{value:t,source:"linx/url-pid"};let e=(String(document.body.className||"").match(/context-product-(\d+)/)||[])[1];if(e)return{value:e,source:"linx/context"}}catch(t){}return null}function Ro(){let t=[...document.querySelectorAll('.add-to-cart, [data-action="add-to-cart"]')];return t.find(e=>{let r=e.getBoundingClientRect();return r.width>0&&r.height>0})||t[0]||null}function Mo(t){if(t==null||t==="")return!1;let e=yr(t),r=e.replace(/\D/g,""),n=[...document.querySelectorAll('input[type="radio"]')].filter(i=>/aro|tamanho|grade|numera|size|variant/i.test(i.name||i.id||"")),o=n.find(i=>yr(i.value)===e)||(r?n.find(i=>String(i.value).replace(/\D/g,"")===r):null);if(!o)return!1;try{o.checked||(o.checked=!0),(o.labels&&o.labels[0]||null||o).click(),o.dispatchEvent(new Event("change",{bubbles:!0}))}catch(i){}return!0}async function Po(t){t=t||{};let e=Ro();if(!e)throw new Error("linx: bot\xE3o .add-to-cart n\xE3o encontrado");return t.size!=null&&t.size!==""&&(Mo(t.size),await new Promise(r=>setTimeout(r,1100))),e.click(),await new Promise(r=>setTimeout(r,1400)),{platform:"linx"}}function jo(){try{let t=document.querySelector("#mini-cart");if(!t)return null;let e=null;for(let n of t.querySelectorAll("div,span,p,li,strong,b,td")){if(n.children.length>2)continue;let o=(n.textContent||"").replace(/\s+/g," ").trim();if(/^(sub)?total\b/i.test(o)&&/R\$/.test(o)&&(e=Eo(o),e))break}if(e==null)return null;let r=(t.textContent||"").match(/cont[ée]m\s+(\d+)\s+ite/i);return{value:e,itemCount:r?parseInt(r[1],10):null,currency:"BRL"}}catch(t){}return null}function Oo(){try{let e=typeof window.carrinhoLateral=="function"?window.carrinhoLateral():null;if(e&&typeof e.openCart=="function"){try{typeof e.fetchHTML=="function"&&e.fetchHTML()}catch(r){}return setTimeout(()=>{try{e.openCart()}catch(r){}},400),!0}}catch(e){}let t=document.querySelector("#mini-cart");if(t){try{t.classList.add("open")}catch(e){}return!0}return!1}var me={};C(me,{addToCart:()=>q,detect:()=>No,id:()=>Bo,resolveSku:()=>pe});var Bo="generic";function No(){return!0}function pe(){let t=I(["Product"]);if(t[0]){let e=t[0],r=e.sku||e.mpn||e.gtin13||e.productID;if(r)return{value:String(r),source:"jsonld"}}try{let e=document.querySelector('[itemprop="sku"]');if(e){let r=e.getAttribute("content")||(e.textContent||"").trim();if(r)return{value:String(r),source:"microdata"}}}catch(e){}try{let e=window.konfidencyData;if(e&&e.product&&e.product.variants&&e.product.variants[0])return{value:String(e.product.variants[0]),source:"konfidency"}}catch(e){}return null}var qo=/(adicionar\s*(à|a|ao)?\s*(sacola|carrinho|cesta|bolsa))|adicionar ao carrinho|add to (cart|bag)|comprar agora/i,Do=/continuar|como comprar|lista|desejos|favorito/i;async function q(){let t=document.querySelectorAll("button,[role=button],input[type=submit]");for(let e of t){let r=(e.textContent||e.value||"").replace(/\s+/g," ").trim();if(r&&r.length<40&&qo.test(r)&&!Do.test(r))try{return e.click(),{platform:"native-click",clicked:r}}catch(n){}}return{platform:"none",error:"bot\xE3o de carrinho nativo n\xE3o encontrado"}}var gr=[re,kt,oe,ae,ce,le,de,fe],zo=[["woocommerce",()=>!!(window.wc_add_to_cart_params||window.woocommerce_params)],["lojaintegrada",()=>!!window.LojaIntegrada]],he;function D(){if(he)return he;let t=gr.find(e=>{try{return e.detect()}catch(r){return!1}});return t&&(he=t),t||me}function wr(){let t=gr.find(e=>{try{return e.detect()}catch(r){return!1}});if(t)return t.id;for(let[e,r]of zo)try{if(r())return e}catch(n){}return null}function z(){let t=D();if(t.id!=="generic"&&t.resolveSku){try{let e=t.resolveSku();if(e)return e}catch(e){}if(t.id==="vtex"&&window.__RUNTIME__)return{value:null,source:"vtex/pending"}}return pe()}function xr(t){return t=t||{},{size:t.size||t.selectedSize||t.tamanho||t.aro||t.ringSize||null,color:t.color||t.selectedColor||t.colour||t.cor||null,sku:t.sku||t.identifier||t.selectedIdentifier||null,quantity:t.quantity||1,productId:t.productId||null}}async function br(t){if(t=t||{},Array.isArray(t.items)&&t.items.length)return Uo(t.items);let e=xr(t),r=D();try{let n=r.addToCart?await r.addToCart(e):await q(e);return y("cart: adicionado",n),At(),ye(r,n,e.sku),n}catch(n){y('cart: adapter "'+r.id+'" falhou \u2014 fallback clique nativo',n&&n.message);let o=await q(e);return At(),ye(r,o,e.sku),o}}async function Uo(t){let e=t.map(xr),r=D(),n=null;try{if(r.addToCartBatch)n=await r.addToCartBatch(e);else for(let o of e)try{n=r.addToCart?await r.addToCart(o):await q(o)}catch(i){}}catch(o){y('cart: batch do adapter "'+r.id+'" falhou \u2014 fallback',o&&o.message);for(let i of e)try{n=await q(i)}catch(a){}}return y("cart: "+e.length+" itens adicionados",n),At(),ye(r,n,null),n}async function ye(t,e,r){try{let n=null;e&&e.cartValue!=null?n={value:e.cartValue,itemCount:e.itemCount!=null?e.itemCount:null,currency:e.currency||null}:t&&t.getCartSummary&&(n=await t.getCartSummary()),n&&n.value!=null&&(n.value>0||(n.itemCount||0)>0)&&m("cart_value",{via:"tryon",value:n.value,itemCount:n.itemCount!=null?n.itemCount:null,currency:n.currency||null,sku:r||null})}catch(n){}}async function ge(){let t=D();if(t&&t.getCartSummary)try{return await t.getCartSummary()}catch(e){}return null}async function _r(t){t=t||{};let e=D(),r={platform:e.id};try{let n=z();r.sku=n&&n.value||null;let o={size:t.size||null,color:t.color||null,sku:r.sku,quantity:t.quantity||1};r.added=e.addToCart?await e.addToCart(o):await q(o),At();try{await we()}catch(i){}r.cart=await ge(),r.ok=!0}catch(n){r.ok=!1,r.error=n&&n.message||String(n)}return r}function At(){["cart:refresh","cart:updated","cart:build","ajaxProduct:added","product:added-to-cart"].forEach(t=>{try{document.dispatchEvent(new CustomEvent(t))}catch(e){}})}async function we(t){if(t&&t.drawerHandled)return!1;let e=D(),r=g(),n=null;try{n=await X()}catch(a){}let o=n&&n.template&&n.template.cart||n&&n.cart||{},i=o.afterAdd||o.behavior||r.cartBehavior;if(i||(i=r.cartRedirect===!1?"none":"auto"),i==="none")return!1;if(i==="auto"||i==="drawer"){let a=o.openSelector||r.cartOpenSelector;if(a){let c=document.querySelector(a);if(c)return setTimeout(()=>{try{c.click()}catch(l){}},300),!1}else if(e&&e.openCartDrawer){let c=!1;try{c=e.openCartDrawer()}catch(l){}if(c)return!1}}return!0}function vr(){let t=D();if(t&&t.skipRedirect)return;let e=t&&t.cartUrl||"/cart";setTimeout(()=>{try{window.location.href=e}catch(r){}},250)}var Fo=/\/(thank[_-]?you|orders?\/|pedido[_-]?(confirmado|realizado|finalizado|sucesso)|sucesso|order[_-]?confirmation|compra[_-]?(finalizada|concluida)|orderplaced|checkout\/[^?#]*success)/i,Ko=/\/(my[_-]?account|minha[_-]?conta|account|conta|customer|cliente|profile|perfil|wishlist|favoritos)(\/|$)/i,$o=/\/checkout/i,Ho=/\/(cart|carrinho|sacola|bag|comprar)(\/|$|\?|#)/i,kr=/\/(products?|produtos?|p)(\/|$|\?|#)/i,Vo=/\/(collections?|categoria|categorias|c|departamento)\//i,Wo=/\/(search|busca|s)(\/|\?)/i;function Cr(){try{if(window.__mkPageType)return window.__mkPageType}catch(r){}let t=(location.pathname||"").toLowerCase(),e=Ko.test(t);try{let r=I(),n=0,o=!1,i=!1;for(let a of r){let c=Array.isArray(a["@type"])?a["@type"]:[a["@type"]];if((c.includes("Order")||c.includes("Invoice"))&&!e)return"purchase";c.includes("SearchResultsPage")&&(o=!0),(c.includes("CollectionPage")||c.includes("ItemList"))&&(i=!0),c.includes("Product")&&n++}if(o)return"search";if(i)return"category";if(n===1)return"pdp";if(n>1)return kr.test(t)?"pdp":"category"}catch(r){}return t==="/"||t===""||t==="/home"||t==="/index.html"?"home":Fo.test(t)&&!e?"purchase":$o.test(t)?"checkout":Ho.test(t)?"cart":kr.test(t)?"pdp":Vo.test(t)?"category":Wo.test(t)?"search":"other"}function Sr(t){let e=null;try{let r=new URLSearchParams(location.search),n=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],o={};for(let i of n){let a=r.get(i);a&&(o[i.replace("utm_","")]=a)}Object.keys(o).length&&(e=o)}catch(r){}return{url:location.href,pathname:location.pathname,referrer:document.referrer||null,title:document.title||null,pageType:t,utm:e,userAgent:navigator.userAgent,language:navigator.language,viewport:window.innerWidth+"x"+window.innerHeight,platform:Jo()}}function Jo(){return wr()}var xe={},Go=null,ct=0,Tr=!1;function Ar(t){Tr||(Tr=!0,Er(t),Xo(),Yo(),Zo(),Qo(),ti(t))}function Er(t){xe={};let e=Cr(),r=Sr(e);if(Ze(r),m("view",{url:location.href,pathname:location.pathname,referrer:document.referrer||null,title:document.title||null,pageType:e}),typeof t=="function")try{t(e,r)}catch(n){}}function Xo(){if(!document.body)return;let t={A:1,BUTTON:1,INPUT:1,SELECT:1,TEXTAREA:1},e=0;document.body.addEventListener("click",r=>{try{let n=Date.now();if(n-e<100)return;e=n;let o=r.target;for(let c=0;c<5&&o&&o!==document.body&&!(t[o.tagName]||o.getAttribute&&o.getAttribute("role")==="button");c++)o=o.parentElement;if(!o||!t[o.tagName]&&!(o.getAttribute&&o.getAttribute("role")==="button"))return;let i={tag:o.tagName},a=o.tagName==="INPUT"||o.tagName==="TEXTAREA"?o.value:o.textContent;i.text=(a||"").replace(/\s+/g," ").trim().substring(0,100),o.href&&(i.href=String(o.href).substring(0,500)),o.id&&(i.id=o.id),o.className&&typeof o.className=="string"&&(i.classes=o.className.trim().substring(0,200)),m("click",i)}catch(n){}},{capture:!0,passive:!0})}function Yo(){let t=[25,50,75,100],e=null,r=()=>{try{let n=window.scrollY||document.documentElement.scrollTop||0,o=Math.max(document.body&&document.body.scrollHeight||0,document.documentElement&&document.documentElement.scrollHeight||0);if(o<=0)return;let i=Math.min(100,Math.floor((n+window.innerHeight)/o*100));for(let a of t)i>=a&&!xe[a]&&(xe[a]=!0,m("scroll_depth",{depth:a}))}catch(n){}};r(),window.addEventListener("scroll",()=>{e||(e=setTimeout(()=>{e=null,r()},250))},{passive:!0})}function Zo(){document.body&&document.body.addEventListener("submit",t=>{try{let e=t.target;if(!e||e.tagName!=="FORM"||e.querySelector('input[type="password"], input[name*="card"], input[name*="cpf"]'))return;let r="other",n=(e.className||"").toLowerCase(),o=(e.action||"").toLowerCase();e.querySelector('input[type="search"], input[name="q"], input[name="s"]')?r="search":/newsletter|subscribe|mailchimp/.test(n+o)?r="newsletter":/contact|contato/.test(n+o)&&(r="contact"),m("form_submit",{form_id:e.id||"",form_type:r})}catch(e){}},{capture:!0})}function Qo(){let t=g();ct=Date.now(),Go=setInterval(()=>{if(document.hidden)return;let e=Date.now(),r=Math.round((e-ct)/1e3);ct=e,r>0&&r<60&&m("engagement",{url:location.pathname,dwellSec:r})},t.engagementIntervalMs),document.addEventListener("visibilitychange",()=>{if(document.hidden){let e=Math.round((Date.now()-ct)/1e3);e>0&&e<600&&m("engagement",{url:location.pathname,dwellSec:e})}ct=Date.now()})}function ti(t){let e=location.href,r=()=>{location.href!==e&&(e=location.href,Er(t))};try{let n=history.pushState,o=history.replaceState;history.pushState=function(){n.apply(this,arguments),setTimeout(r,0)},history.replaceState=function(){o.apply(this,arguments),setTimeout(r,0)},window.addEventListener("popstate",r),window.addEventListener("hashchange",r)}catch(n){}}function _e(){let t=z(),e=I(["Product"]);if(e.length>0){let o=e[0],i=Array.isArray(o.offers)?o.offers[0]:o.offers;return{sku:t?t.value:o.sku||o.mpn||o.gtin13||o.productID||null,skuSource:t?t.source:null,name:typeof o.name=="string"?o.name:null,price:i&&parseFloat(i.price||i.lowPrice)||null||Ir(),currency:i?i.priceCurrency:null,brand:o.brand?typeof o.brand=="string"?o.brand:o.brand.name:null,category:o.category||null}}let r=o=>{let i=document.querySelector('meta[property="og:'+o+'"], meta[property="product:'+o+'"]');return i?i.getAttribute("content"):null},n=o=>{let i=document.querySelector('[itemprop="'+o+'"]');return i?i.getAttribute("content")||(i.textContent||"").trim():null};if(t||r("type")==="product"||r("price:amount")||n("name")){let o=n("price")||r("price:amount"),i=o&&parseFloat(String(o).replace(",","."))||null;return{sku:t?t.value:null,skuSource:t?t.source:null,name:n("name")||r("title")||document.title||null,price:(i&&i>0?i:null)||Ir(),currency:n("priceCurrency")||r("price:currency")||null,brand:n("brand")||null,category:null}}return null}function Ir(){try{let t=window.dataLayer;if(!Array.isArray(t))return null;for(let e=t.length-1;e>=0;e--){let r=t[e];if(!r||typeof r!="object")continue;let n=r.ecommerce||r,o=n&&n.items||null,i=n&&n.detail&&n.detail.products||n&&n.products||r.products||null,a=Array.isArray(o)&&o[0]&&o[0].price||Array.isArray(i)&&i[0]&&i[0].price||null,c=be(a!=null?String(a):"");if(c)return c}}catch(t){}return null}function L(){try{let t=location.pathname+location.search,e=t.match(/order[_-]?confirmation\/([\w-]+)/i)||t.match(/[?&]order[_-]?id=([\w-]+)/i)||t.match(/\/orders?\/([\w-]{4,})/i)||t.match(/pedido[_-]?(?:confirmado|realizado|finalizado)?\/([\w-]+)/i);return e?e[1]:null}catch(t){return null}}function Et(){let t=I(["Order","Invoice"]);if(t.length>0){let o=t[0],i=o.totalPaymentDue?parseFloat(o.totalPaymentDue.price):parseFloat(o.price||o.total);return{orderId:o.orderNumber||o.confirmationNumber||o.identifier||L(),revenue:Number.isFinite(i)?i:null,currency:o.totalPaymentDue&&o.totalPaymentDue.priceCurrency||o.priceCurrency||null,source:"jsonld"}}try{let o=window.Shopify&&window.Shopify.checkout;if(o&&o.total_price!=null){let i=parseFloat(o.total_price);return{orderId:(o.order_id!=null?String(o.order_id):null)||o.token||L(),revenue:Number.isFinite(i)?i:null,currency:o.currency||null,itemCount:Array.isArray(o.line_items)?o.line_items.length:null,source:"shopify"}}}catch(o){}try{let o=window.LS&&window.LS.order;if(o&&o.total!=null){let i=Number(o.total),a=window.LS.currency&&window.LS.currency.code||"BRL";return{orderId:String(o.number||o.id||L()||""),revenue:Number.isFinite(i)?i/100:null,currency:a,source:"nuvemshop"}}}catch(o){}try{if(Array.isArray(window.dataLayer))for(let o=window.dataLayer.length-1;o>=0;o--){let i=window.dataLayer[o],a=i&&i.ecommerce||i&&i.ecommerce_data&&i.ecommerce_data.ecommerce;if(a&&(i.event==="purchase"||a.purchase||a.transaction_id)){let c=a.purchase&&a.purchase.actionField,l=parseFloat(c&&(c.revenue||c.value)||a.value||a.revenue);return{orderId:c&&(c.id||c.transaction_id)||a.transaction_id||a.transactionId||L(),revenue:Number.isFinite(l)?l:null,currency:a.currency||a.currencyCode||c&&c.currency||null,itemCount:(a.purchase&&a.purchase.products||a.items||a.products||[]).length||null,source:"datalayer"}}}}catch(o){}let e=document.querySelector('meta[property="order:total"], meta[name="order-total"]');if(e&&e.content)return{orderId:L(),revenue:parseFloat(e.content)||null,source:"meta"};let r=ei();if(r)return r;let n=L();return n?{orderId:n,revenue:null,source:"url"}:null}function ei(){try{let t=document.querySelector(".orderTotalPrice");if(t){let r=String(t.value||t.getAttribute("value")||t.textContent||"").trim(),n=r.split(/\s+/),o=be(n.length>1?n[n.length-1]:r);if(o)return{orderId:Lr(),revenue:o,currency:(n.length>1?n[0]:null)||null,source:"dom"}}let e=[".order-total","#order-total",".total-price",".order__total","[data-order-total]",".summary-total",".grand-total"];for(let r of e){let n=document.querySelector(r);if(n){let o=be(n.value||n.textContent);if(o)return{orderId:Lr(),revenue:o,source:"dom"}}}return null}catch(t){return null}}function Lr(){try{let t=document.querySelector(".orderID");if(t&&(t.value||t.getAttribute("value")))return t.value||t.getAttribute("value");let r=(document.body.innerText||"").match(/(?:pedido|order|n[º°o]\.?)\s*#?\s*([A-Z0-9-]{4,})/i);return r?r[1]:null}catch(t){return null}}function be(t){if(!t)return null;let e=String(t).replace(/[^\d.,]/g,"");if(!e)return null;let r;e.indexOf(",")>e.indexOf(".")?r=e.replace(/\./g,"").replace(",","."):r=e.replace(/,/g,"");let n=parseFloat(r);return Number.isFinite(n)&&n>0?n:null}function Rr(){let t=I(["ItemList","CollectionPage"]);if(t.length===0)return null;let e=t[0],r=e.itemListElement||e.mainEntity&&e.mainEntity.itemListElement||[],n=[];for(let o of r.slice(0,50)){let i=o.item||o;i&&(i.sku||i.productID||i.name)&&n.push(i.sku||i.productID||i.name)}return n.length>0?{count:n.length,skus:n.slice(0,20)}:null}var Lt=!1,It=[/\b(adicionar|adic\.?|colocar|incluir|jogar)\b.{0,30}\b(carrinho|sacola|sacolinha|bag)\b/i,/\bcomprar\b(?!\s+(em|por|sem))/i,/\bcomprar\s*$/i,/^add\s+to\s+(cart|bag)\b/i,/^buy\s+(now|it|this)\b/i,/^(sacolinha|carrinho|sacola)$/i],ri=[/^finalizar(\s+(compra|pedido|pagamento))?\b/i,/^(fechar|confirmar)\s+(compra|pedido|pagamento)\b/i,/^pagar(\s+(agora|pedido))?\b/i,/^(complete|place)\s+(purchase|order)\b/i,/^checkout$/i];function lt(t,e){for(let r=0;r<t.length;r++)if(t[r].test(e))return!0;return!1}function Or(t){switch(t){case"pdp":{let e=_e();m("view_item",e||{sku:null});break}case"category":case"search":{let e=Rr();m("view_item_list",e||{count:0});break}case"cart":ge().then(e=>m("view_cart",e&&e.value!=null?{value:e.value,itemCount:e.itemCount,currency:e.currency}:{})).catch(()=>m("view_cart",{}));break;case"checkout":m("begin_checkout",{});break;case"purchase":ni();break}}var Mr=500,Pr=30;function ni(){let t=!1,e=0,r=(o,i)=>{t||(t=!0,Br(o,i))};try{window.addEventListener("pagehide",()=>r(Et(),!0),{once:!0})}catch(o){}let n=()=>{if(t)return;let o=Et();if(o&&o.revenue!=null)return r(o);if(e++>=Pr)return y("purchase: receita n\xE3o apareceu em "+Mr*Pr+"ms \u2014 emitindo sem valor"),r(o);setTimeout(n,Mr)};n()}function Br(t,e){if(!Lt){if(t&&!t.orderId&&(t.orderId=L()),t&&t.orderId){let r="_mk_purch_"+t.orderId;try{if(sessionStorage.getItem(r)){y("purchase j\xE1 contado",t.orderId);return}sessionStorage.setItem(r,"1")}catch(n){}}if(Lt=!0,m("purchase",t||{revenue:null,_note:"no_order_data_extracted"}),y("purchase emitido",t),e)try{B(!0)}catch(r){}}}var jr=!1;function Nr(){if(jr)return;jr=!0;let t=r=>{try{if(!r||typeof r!="object")return!1;let n=r.ecommerce||r.ecommerce_data&&r.ecommerce_data.ecommerce;return n?r.event==="purchase"||r.event==="transaction"||!!n.purchase||n.transaction_id!=null:!1}catch(n){return!1}},e=r=>{Lt||!t(r)||setTimeout(()=>{if(!Lt)try{Br(Et(),!0)}catch(n){}},0)};try{let r=window.dataLayer=window.dataLayer||[];for(let o=0;o<r.length;o++)e(r[o]);let n=r.push;r.push=function(){let o=n.apply(this,arguments);try{for(let i=0;i<arguments.length;i++)e(arguments[i])}catch(i){}return o}}catch(r){}}function qr(){if(!document.body)return;let t=0;document.body.addEventListener("click",e=>{try{let r=Date.now();if(r-t<150)return;let n=e.target;for(let c=0;c<5&&n&&n!==document.body&&!(n.tagName==="BUTTON"||n.tagName==="A"||n.getAttribute&&n.getAttribute("role")==="button");c++)n=n.parentElement;if(!n)return;let o=n.tagName!=="A",i=(n.textContent||"").replace(/\s+/g," ").trim();if(!i||i.length>80)return;let a=!1;if((lt([It[0]],i)||o&<([It[1]],i)||o&<([It[2]],i)||lt(It.slice(3),i))&&(a=!0),a){t=r;let c=_e();m("add_to_cart",{via:"click",buttonText:i,sku:c?c.sku:null,price:c?c.price:null});return}o&<(ri,i)&&(t=r,m("begin_checkout",{via:"click",buttonText:i}))}catch(r){}},{capture:!0,passive:!0})}var Rt={};C(Rt,{available:()=>ci,id:()=>oi,iframeSrc:()=>ai,modalSize:()=>ii,onMounted:()=>li});var oi="mk-fashion",ii={width:430,height:800};function ai(t,e){let r=encodeURIComponent(e).replace(/\./g,"%2E");return g().appUrl+"/"+t+"/"+r}async function ci(t,e){let r=g().apiUrl+"/availability/"+t+"?sku="+encodeURIComponent(e),n=await fetch(r);if(!n.ok)throw new Error("availability HTTP "+n.status);return n.json()}function li(){}var ve={};C(ve,{available:()=>hi,closeButton:()=>fi,id:()=>si,iframeSrc:()=>mi,modalSize:()=>ui,modalSizeMobile:()=>di,onMounted:()=>wi});var si="mk-makeup",ui={width:"80vw",height:"80vh"},di={width:"100vw",height:"100dvh"},fi=!0;function pi(){return window.__MK&&window.__MK.pulpoarUrl||"https://plugin.pulpoar.com/vto"}function mi(t,e){let r=window.__MK&&window.__MK.pulpoarIframeUrl;if(r){let o=String(r);return e!=null&&/\{sku\}|\{identifier\}/.test(o)&&(o=o.replace(/\{sku\}|\{identifier\}/g,encodeURIComponent(e))),o}let n=window.__MK&&window.__MK.pulpoarProjectKey||t;return pi()+"/"+encodeURIComponent(n)}async function hi(t,e){let r=window.__MK&&window.__MK.pulpoarProjectKey||t;if(!r)return{available:!0};let n=await zr(e)||e;if(!n)return{available:!0};try{let i=String(g().collectorUrl||"").replace(/\/+$/,"")+"/v1/makeup/availability/"+encodeURIComponent(r)+"?slug="+encodeURIComponent(n);t&&(i+="&projectId="+encodeURIComponent(t));let a=await fetch(i).then(c=>c.json());return y("pulpoar availability",a),{available:!(a&&(a.available===!1||a.projectActive===!1))}}catch(o){return y("pulpoar availability erro",o&&o.message),{available:!0}}}var yi="https://cdn.jsdelivr.net/npm/@pulpoar/plugin-sdk@latest/dist/index.iife.js",Mt=null;function gi(){return window.pulpoar?Promise.resolve(window.pulpoar):Mt||(Mt=new Promise(t=>{try{let e=document.createElement("script");e.src=yi,e.async=!0,e.onload=()=>t(window.pulpoar||null),e.onerror=()=>t(null),(document.head||document.documentElement).appendChild(e)}catch(e){t(null)}}),Mt)}async function zr(t){try{if(window.Shopify||window.ShopifyAnalytics){let e=(location.pathname.split("/products/")[1]||"").split(/[?#]/)[0];if(e){let r=window.ShopifyAnalytics&&window.ShopifyAnalytics.meta,n=new URLSearchParams(location.search).get("variant")||r&&r.selectedVariantId,i=(await fetch("/products/"+e+".js").then(l=>l.json())).variants||[],a=n?i.find(l=>String(l.id)===String(n)):null;if(a&&a.sku)return a.sku;let c=i.find(l=>l.available)||i[0];if(c&&c.sku)return c.sku}}}catch(e){}return t||null}function Dr(t){return!t||typeof t!="object"?{quantity:1}:{sku:t.sku||t.slug||t.key||t.variant_key||t.barcode||null,color:t.color||t.shade||t.colorName||null,size:t.size||null,quantity:1}}function wi(t,e){gi().then(async r=>{if(!r){y("pulpoar: SDK n\xE3o carregou");return}let n=await zr(e.identifier);if(y("pulpoar variante p/ cat\xE1logo",n),n)try{r.applyVariantsWithCatalog([String(n)],o=>{e.track("product_loaded",{via:"makeup",applied:Array.isArray(o)?o.length:0})})}catch(o){y("pulpoar applyVariantsWithCatalog falhou",o&&o.message)}try{r.onReady(()=>e.fire("onReady",{}))}catch(o){}try{r.onAddToCart(o=>{let i=(Array.isArray(o)?o:[o]).filter(a=>a&&typeof a=="object");if(y("pulpoar onAddToCart",i.length+" item(s)",i),i.length<=1){e.handleAddToCart(i.length?Dr(i[0]):{quantity:1},"makeup");return}e.handleAddToCart({items:i.map(Dr)},"makeup")})}catch(o){}try{r.onGoToProduct(o=>e.fire("onGoToProduct",o))}catch(o){}})}var xi={"mk-fashion":Rt,"mk-makeup":ve};function Pt(t){return xi[t]||Rt}var E=null,A=null,Ot=!1,Bt=!1,M=null,Ur={},ke=null,jt=0,S={onReady:null,onClose:null,onAddToCart:null,onProductLoaded:null,onError:null,onInteraction:null,onGenerationComplete:null},bi={gregory:"698c7e791d3129430f15dddd"};function Kr(t){return t?bi[String(t).toLowerCase()]||t:null}async function U(t,e){let r=Kr(t),n=String(e||"").trim();return Pt(g().product).available(r,n)}async function $r(t,e){e||(e=t,t="698c7e791d3129430f15dddd");try{return(await U(t,e)).available===!0}catch(r){return!1}}async function st(t){if(t=t||{},Ot)return;let e=Kr(t.projectId||t.projectid||t.store),r=String(t.identifier||t.sku||"").trim();if(!e||!r){console.error("[mk-sdk] open: projectId e identifier obrigatorios");return}let n=e+":"+r;if(Ur[n]!==!0){try{if(!(await U(e,r)).available){alert("Produto nao disponivel para prova virtual.");return}}catch(u){alert("Produto nao encontrado ou indisponivel.");return}Ur[n]=!0}let o=Pt(g().product),a=(window.innerWidth||0)<=768&&o.modalSizeMobile||o.modalSize||{width:430,height:800},c=g(),l=ot();M={projectId:e,identifier:r,width:t.width||l.modalWidth||c.modalWidth||a.width,height:t.height||l.modalHeight||c.modalHeight||a.height},Bt=!1,Wr(),_i(M),Ot=!0,jt=Date.now(),at(),m("modal_opened",{projectId:e,identifier:r})}function Nt(){if(!Ot)return;let t=Bt;if(Bt=!1,vi(),Ot=!1,R("onClose"),m("modal_closed",{projectId:M&&M.projectId,identifier:M&&M.identifier}),t)try{vr()}catch(e){}}function Hr(t){try{rn().forEach(e=>{t?(e.dataset.mkPrevDisplay===void 0&&(e.dataset.mkPrevDisplay=e.style.display),e.style.display="none"):(e.style.display=e.dataset.mkPrevDisplay||"",delete e.dataset.mkPrevDisplay)})}catch(e){}}function _i(t){E=document.createElement("div"),E.style.cssText="position:fixed;inset:0;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:2147483647;",Hr(!0);let e=document.createElement("div"),r=typeof t.width=="number"?t.width+"px":t.width,n=typeof t.height=="number"?t.height+"px":t.height,o=String(t.width).indexOf("100v")>=0;e.style.cssText="position:relative;width:"+r+";height:"+n+";max-width:100vw;max-height:100dvh;border-radius:"+(o?"0":"12px")+";overflow:hidden;background:#fff;",A=document.createElement("iframe");let i=Pt(g().product);if(A.src=i.iframeSrc(t.projectId,t.identifier),A.style.cssText="width:100%;height:100%;border:none;",A.setAttribute("allow","camera *; microphone *"),A.setAttribute("allowfullscreen","true"),e.appendChild(A),i.closeButton){let a=document.createElement("button");a.setAttribute("aria-label","Fechar"),a.setAttribute("type","button"),a.innerHTML='<svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true"><path d="M1.6 1.6l10.8 10.8M12.4 1.6L1.6 12.4" stroke="#111" stroke-width="2" stroke-linecap="round"/></svg>',a.style.cssText="position:absolute;top:8px;right:8px;z-index:2;width:32px;height:32px;padding:0;border:none;border-radius:50%;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 5px rgba(0,0,0,.3);",a.addEventListener("click",()=>{try{Nt()}catch(c){}}),e.appendChild(a)}E.appendChild(e),document.body.appendChild(E);try{i.onMounted(A,{projectId:t.projectId,identifier:t.identifier,handleAddToCart:Jr,track:m,fire:R})}catch(a){y("launcher.onMounted falhou",a&&a.message)}y("try-on modal aberto",A.src)}function vi(){E&&E.parentNode&&E.parentNode.removeChild(E),E=null,A=null,Hr(!1)}var Fr=!1;function Vr(){Wr()}function Wr(){Fr||(Fr=!0,window.addEventListener("message",t=>{let e=t.data;if(!e||e.source!=="mkfashion-app")return;let r=e.action,n=e.data||{};switch(r){case"close_request":Nt();break;case"ready":R("onReady",n);break;case"product_loaded":R("onProductLoaded",n),m("product_loaded",Ce(n));break;case"interaction":{R("onInteraction",n),n&&n.method&&(ke=n.method),m(ki(n),Ce(n));break}case"add_to_cart":Jr(n,"tryon");break;case"generation_start":jt=Date.now();break;case"generation_complete":R("onGenerationComplete",n),m("generation_complete",{method:n.method||ke||"unknown",durationMs:jt?Date.now()-jt:null,success:n.success!==!1,imageUrlPresent:!!n.imageUrl});break;case"generation_error":R("onError",n),m("generation_error",{method:ke||"unknown",error:n&&n.error});break}}))}function Jr(t,e){if(m("add_to_cart",Object.assign({via:e||"tryon"},Ce(t))),typeof S.onAddToCart=="function"){R("onAddToCart",t);return}let r=Object.assign({productId:M&&M.identifier},t);br(r).then(n=>we(n)).then(n=>{Bt=!!n}).catch(()=>{})}function ki(t){return t&&t.action,"interaction"}function Ce(t){if(!t||typeof t!="object")return t;let e={};for(let r in t){if(r==="imageUrl"||r==="image"||r==="product"){r==="product"&&t[r]?(e.productSku=t[r].sku||null,e.productName=t[r].name||null):e[r+"Present"]=!!t[r];continue}e[r]=t[r]}return e}function R(t,e){if(typeof S[t]=="function")try{S[t](e)}catch(r){console.error("[mk-sdk]",r)}}function Gr(t){S.onReady=t}function Xr(t){S.onClose=t}function Yr(t){S.onAddToCart=t}function Zr(t){S.onProductLoaded=t}function Qr(t){S.onError=t}function tn(t){S.onInteraction=t}function en(t){S.onGenerationComplete=t}var Si=767,Ti=1024,Ai=/(adicionar\s*(à|a|ao)?\s*(sacola|carrinho|cesta|bolsa))|adicionar ao carrinho|add to (cart|bag)|comprar agora|^comprar$|finalizar compra|eu quero/i,Ei=/continuar|como comprar|lista|desejos|favorito|looks|cupom/i;function Se(t){try{let e=t.getBoundingClientRect();if(e.width<=0||e.height<=0)return!1;let r=getComputedStyle(t);return r.display!=="none"&&r.visibility!=="hidden"&&r.opacity!=="0"}catch(e){return!1}}function Ii(t){if(!t)return!1;try{let e=document.querySelector(t);return!!e&&Se(e)}catch(e){return!1}}function Li(t){return(t.tagName==="INPUT"?t.value||"":t.textContent||"").replace(/\s+/g," ").trim()}function Ri(t){if(!t||typeof t!="object"||t.selector)return t;let e=!1;if(["mobile","tablet","desktop"].forEach(n=>{let o=t[n];o&&o.mkAnchor===1&&o.anchor&&typeof o.anchor=="object"&&(e=!0)}),!e)return t;let r={};return["mobile","tablet","desktop"].forEach(n=>{let o=t[n];if(o){if(o.selector){r[n]=o;return}if(o.mkAnchor===1&&o.anchor&&typeof o.anchor=="object"){let i=o.anchor[n]||o.anchor.desktop||o.anchor.mobile||o.anchor.tablet;i&&i.selector&&(r[n]=i)}}}),["bpMobile","bpTablet","breakpoint"].forEach(n=>{t[n]!=null&&(r[n]=t[n])}),r}function ut(t){if(!t||typeof t!="object")return null;if(t=Ri(t),t.selector)return t;let e=[["mobile",t.mobile],["tablet",t.tablet],["desktop",t.desktop]].filter(l=>l[1]&&l[1].selector);if(e.length===0)return null;if(e.length===1)return e[0][1];let r=e.filter(([,l])=>Ii(l.selector));if(r.length===1)return r[0][1];let n=window.innerWidth||1024,o=Number(t.bpMobile)||Number(t.breakpoint)||Si,i=Number(t.bpTablet)||Ti,a=l=>(e.find(u=>u[0]===l)||[])[1],c=n<=o?["mobile","tablet","desktop"]:n<=i?["tablet","desktop","mobile"]:["desktop","tablet","mobile"];for(let l of c){let u=a(l);if(u)return u}return e[0][1]}function qt(t){let e=ut(t);if(e&&e.selector)try{let r=document.querySelector(e.selector);if(r&&Se(r))return{el:r,position:e.position||"afterend",mode:e.mode||"flow",style:e.style||"",align:e.align||"top-left",selector:e.selector}}catch(r){}return null}function nn(){let t=g(),e=qt(t&&t.anchor);if(e)return e;let r=document.querySelectorAll('button, [role="button"], a.btn, a.button, input[type="submit"], input[type="button"]');for(let n of r){let o=Li(n);if(!(!o||o.length>40)&&!Ei.test(o)&&Ai.test(o)&&Se(n))return{el:n,position:"afterend",mode:"flow",style:"",selector:null}}return null}var _="'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",Te={none:"0",sm:"4px",md:"8px",pill:"9999px"},Ae={none:"0",sm:"4px",md:"8px",lg:"16px"},Mi='<svg viewBox="0 0 17.5263 20.6862" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block;width:100%;height:100%"><g><path d="M8.49995 12.1862C10.1568 12.1862 11.5 10.8431 11.5 9.18622C11.5 7.52936 10.1568 6.18622 8.49995 6.18622C6.8431 6.18622 5.49995 7.52936 5.49995 9.18622C5.49995 10.8431 6.8431 12.1862 8.49995 12.1862Z" stroke="currentColor" shape-rendering="crispEdges"/><path d="M0.5 9.11152C0.5 6.56953 0.5 5.29894 1.1099 4.38664C1.375 3.9902 1.71424 3.65088 2.10821 3.38809C2.6945 2.9958 3.42899 2.85564 4.55351 2.80588C5.09013 2.80588 5.55183 2.39949 5.65687 1.87284C5.73715 1.48708 5.94572 1.14138 6.24735 0.894155C6.54898 0.646934 6.92516 0.51336 7.31231 0.516006H9.9734C10.7779 0.516006 11.4709 1.08412 11.6288 1.87284C11.7339 2.39949 12.1956 2.80588 12.7322 2.80588C13.8559 2.85564 12.9129 4.67413 13.5 5.06559C13.8949 5.32932 15.1484 3.80355 15.5 4.02647C16.1099 4.93876 16.7857 6.56953 16.7857 9.11152C16.7857 11.6535 16.7857 12.9233 16.1758 13.8364C15.9107 14.2328 15.5715 14.5722 15.1775 14.835C14.2647 15.4445 12.9936 15.4445 10.4522 15.4445H6.83351C4.29213 15.4445 3.02103 15.4445 2.10821 14.835C1.71446 14.5718 1.3755 14.2322 1.11071 13.8356C0.933802 13.5672 0.803519 13.2698 0.725557 12.9564" stroke="currentColor" stroke-linecap="round"/><path d="M12.676 0.607931C12.9446 -0.178095 14.0307 -0.2019 14.3491 0.536515L14.3761 0.60838L14.7385 1.66839C14.8216 1.91149 14.9559 2.13395 15.1322 2.32076C15.3086 2.50757 15.5229 2.65439 15.7608 2.75131L15.8583 2.78769L16.9183 3.14971C17.7044 3.41831 17.7282 4.50437 16.9902 4.82283L16.9183 4.84978L15.8583 5.21225C15.6151 5.29526 15.3926 5.42947 15.2057 5.60582C15.0188 5.78218 14.8719 5.99657 14.7749 6.23453L14.7385 6.33155L14.3765 7.39201C14.1079 8.17803 13.0219 8.20184 12.7039 7.46387L12.676 7.39201L12.314 6.332C12.231 6.08881 12.0968 5.86627 11.9204 5.67938C11.744 5.49249 11.5297 5.3456 11.2917 5.24863L11.1947 5.21225L10.1347 4.85022C9.34817 4.58163 9.32437 3.49557 10.0628 3.17756L10.1347 3.14971L11.1947 2.78769C11.4378 2.70462 11.6602 2.57039 11.847 2.39404C12.0339 2.21769 12.1807 2.00333 12.2776 1.76541L12.314 1.66839L12.676 0.607931Z" fill="currentColor"/></g></svg>',an='<svg viewBox="0 0 11.6122 12.7248" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block;width:12px;height:12px"><path d="M4.09055 2.01133C4.43939 0.9905 5.84989 0.959583 6.26347 1.91858L6.29847 2.01192L6.76922 3.38858C6.8771 3.7043 7.05144 3.99321 7.28047 4.23583C7.5095 4.47845 7.7879 4.66912 8.09689 4.795L8.22347 4.84225L9.60014 5.31242C10.621 5.66125 10.6519 7.07175 9.69347 7.48533L9.60014 7.52033L8.22347 7.99108C7.90764 8.09889 7.61862 8.2732 7.3759 8.50223C7.13318 8.73127 6.94241 9.0097 6.81647 9.31875L6.76922 9.44475L6.29905 10.822C5.95022 11.8428 4.53972 11.8737 4.12672 10.9153L4.09055 10.822L3.62039 9.44533C3.51258 9.12951 3.33827 8.84048 3.10924 8.59776C2.8802 8.35504 2.60177 8.16427 2.29272 8.03833L2.16672 7.99108L0.790054 7.52092C-0.231363 7.17208 -0.26228 5.76158 0.69672 5.34858L0.790054 5.31242L2.16672 4.84225C2.48244 4.73437 2.77135 4.56003 3.01397 4.331C3.25658 4.10197 3.44726 3.82357 3.57314 3.51458L3.62039 3.38858L4.09055 2.01133ZM9.86147 0C9.9706 0 10.0775 0.0306123 10.1701 0.0883584C10.2627 0.146104 10.3373 0.228668 10.3853 0.326667L10.4133 0.394917L10.6175 0.993417L11.2166 1.19758C11.3259 1.23474 11.4218 1.30353 11.492 1.39523C11.5623 1.48693 11.6037 1.59741 11.611 1.71268C11.6184 1.82795 11.5914 1.94281 11.5334 2.04271C11.4755 2.14261 11.3891 2.22305 11.2854 2.27383L11.2166 2.30183L10.6181 2.506L10.4139 3.10508C10.3767 3.21442 10.3078 3.31024 10.2161 3.38041C10.1244 3.45058 10.0139 3.49194 9.89859 3.49925C9.78333 3.50656 9.66849 3.47949 9.56863 3.42147C9.46876 3.36345 9.38837 3.27709 9.33764 3.17333L9.30964 3.10508L9.10547 2.50658L8.50639 2.30242C8.39702 2.26526 8.30115 2.19647 8.23092 2.10477C8.16069 2.01307 8.11926 1.90259 8.11189 1.78732C8.10452 1.67205 8.13153 1.55719 8.18951 1.45729C8.24749 1.35739 8.33381 1.27695 8.43755 1.22617L8.50639 1.19817L9.10489 0.994L9.30905 0.394917C9.34839 0.279665 9.42281 0.179613 9.52187 0.108791C9.62094 0.0379686 9.73969 -0.0000730808 9.86147 0Z" fill="currentColor"/></svg>';function x(t,e={}){let r=document.createElement(t);if(e.style&&(r.style.cssText=e.style),e.text!=null&&(r.textContent=e.text),e.html!=null&&(r.innerHTML=e.html),e.attrs)for(let n in e.attrs)r.setAttribute(n,e.attrs[n]);if(e.on)for(let n in e.on)r.addEventListener(n,e.on[n]);if(e.children)for(let n of e.children)n&&r.appendChild(n);return r}function cn(t){return x("span",{style:`width:12px;height:12px;display:inline-flex;align-items:center;justify-content:center;color:${t};flex-shrink:0;`,html:an})}var Dt=t=>'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" style="display:block;width:100%;height:100%">'+t+"</svg>",on={camera:Mi,sparkle:an.replace("width:12px;height:12px","width:100%;height:100%"),shirt:Dt('<path d="M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z"/>'),face:Dt('<path d="M3 7V5a2 2 0 0 1 2-2h2"/><path d="M17 3h2a2 2 0 0 1 2 2v2"/><path d="M21 17v2a2 2 0 0 1-2 2h-2"/><path d="M7 21H5a2 2 0 0 1-2-2v-2"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><path d="M9 9h.01"/><path d="M15 9h.01"/>'),glasses:Dt('<circle cx="6" cy="15" r="4"/><circle cx="18" cy="15" r="4"/><path d="M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2"/><path d="M2.5 13 5 7c.7-1.3 1.4-2 3-2"/><path d="M21.5 13 19 7c-.7-1.3-1.5-2-3-2"/>'),wand:Dt('<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"/><path d="m14 7 3 3"/><path d="M5 6v4"/><path d="M19 14v4"/><path d="M10 2v2"/><path d="M7 8H3"/><path d="M21 16h-4"/><path d="M11 3H9"/>')};function P(t,e,r){let n=Number(r)>0?Number(r):24;return x("span",{style:`width:${n}px;height:${n}px;padding:2px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;color:${e};flex-shrink:0;`,html:on[t]||on.camera})}function Y(t){return t.borderWidth>0&&t.borderColor?`${t.borderWidth}px solid ${t.borderColor}`:"none"}function Z(){if(!document.getElementById("mk-jakarta-font"))try{document.head.appendChild(x("link",{attrs:{id:"mk-jakarta-font",rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700&display=swap"}}))}catch(t){}}function Pi(t){return t.subtext?x("span",{style:`display:flex;align-items:center;justify-content:center;padding:4px;background:${t.badgeBgColor};font-family:${_};font-weight:700;font-size:16px;text-transform:uppercase;color:${t.badgeTextColor};line-height:1;white-space:nowrap;`,text:t.subtext}):null}function ln(t,e){Z();let r=x("span",{style:"display:inline-flex;align-items:center;gap:4px;",children:[P(t.icon,t.textColor,t.iconSize),x("span",{text:t.text,style:`font-family:${_};font-weight:700;font-size:inherit;text-transform:uppercase;letter-spacing:2px;color:${t.textColor};white-space:nowrap;text-align:center;line-height:1;`})]});return x("button",{attrs:{type:"button"},style:`display:flex;align-items:center;justify-content:center;gap:8px;padding:8px;width:100%;max-width:238px;box-sizing:border-box;background:${t.bgColor};border:${Y(t)};border-radius:${t.borderRadiusPx};font-family:${_};font-size:${t.fontSize}px;cursor:pointer;transition:opacity 0.2s ease;line-height:1;-webkit-appearance:none;appearance:none;`,children:[r,Pi(t)],on:{mouseenter:n=>{n.currentTarget.style.opacity="0.85"},mouseleave:n=>{n.currentTarget.style.opacity="1"},click:n=>{try{n.preventDefault(),n.stopPropagation()}catch(o){}try{e&&e()}catch(o){}}}})}function Oi(t){return t.subtext?x("span",{style:`display:flex;align-items:center;gap:4px;padding:4px;background:${t.badgeBgColor};font-family:${_};font-weight:600;font-size:10px;text-transform:uppercase;color:${t.badgeTextColor};line-height:1;white-space:nowrap;`,children:[cn(t.badgeTextColor),x("span",{text:t.subtext})]}):null}function Bi(t,e){return x("button",{attrs:{type:"button"},style:`display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px 8px 8px;width:100%;margin-top:auto;box-sizing:border-box;background:${t.bgColor};border:${Y(t)};border-radius:${t.borderRadiusPx};filter:drop-shadow(0 0 6px rgba(0,0,0,0.08));font-family:${_};cursor:pointer;transition:opacity 0.2s ease;line-height:1;-webkit-appearance:none;appearance:none;`,children:[P(t.icon,t.textColor,t.iconSize),x("span",{text:t.text,style:`font-family:${_};font-weight:700;font-size:inherit;color:${t.textColor};white-space:nowrap;line-height:1;`})],on:{mouseenter:r=>{r.currentTarget.style.opacity="0.85"},mouseleave:r=>{r.currentTarget.style.opacity="1"},click:r=>{try{r.preventDefault(),r.stopPropagation()}catch(n){}try{e&&e()}catch(n){}}}})}function sn(t,e){Z();let r=x("div",{style:"display:flex;flex-direction:column;gap:4px;",children:[t.cardTitle&&x("p",{text:t.cardTitle,style:`margin:0;font-family:${_};font-weight:700;font-size:16px;letter-spacing:1px;text-transform:uppercase;color:${t.cardTitleColor};line-height:1.2;`}),t.cardDescription&&x("p",{html:t.cardDescription,style:`margin:0;font-family:${_};font-weight:400;font-size:12px;max-width:177px;line-height:1.2;color:${t.cardTextColor};`})]}),n=x("div",{style:"display:flex;flex-direction:column;justify-content:space-between;gap:16px;flex:1 1 0;min-width:0;",children:[r,t.cardFooter&&x("p",{text:t.cardFooter,style:`margin:0;font-family:${_};font-weight:400;font-size:10px;color:${t.cardTextColor};line-height:1.2;`})]}),o=x("div",{style:"display:flex;flex-direction:column;align-items:flex-end;flex:1 1 0;min-width:0;",children:[Oi(t),Bi(t,e)]}),i=x("div",{style:"display:flex;gap:16px;align-items:stretch;width:100%;flex:1;box-sizing:border-box;",children:[n,o]});return x("div",{style:`display:flex;flex-direction:column;align-items:flex-start;padding:12px;width:100%;max-width:402px;min-height:140px;box-sizing:border-box;background:${t.cardBgColor};border-radius:${t.cardBorderRadiusPx};font-family:${_};font-size:${t.fontSize}px;`,children:[i]})}function un(t,e){let r=Number(t.iconSize)>0?Number(t.iconSize):24;return x("button",{attrs:{type:"button","aria-label":t.text||"Provar virtualmente"},style:`display:inline-flex;align-items:center;justify-content:center;padding:8px;box-sizing:border-box;background:${t.bgColor};border:${Y(t)};border-radius:${t.borderRadiusPx};cursor:pointer;transition:opacity 0.2s ease;line-height:1;-webkit-appearance:none;appearance:none;`,children:[P(t.icon,t.textColor,r)],on:{mouseenter:n=>{n.currentTarget.style.opacity="0.85"},mouseleave:n=>{n.currentTarget.style.opacity="1"},click:n=>{try{n.preventDefault(),n.stopPropagation()}catch(o){}try{e&&e()}catch(o){}}}})}function dn(t,e){Z();let r=x("div",{style:"display:flex;flex-direction:column;gap:8px;width:fit-content;max-width:100%;",children:[x("div",{style:"display:flex;align-items:center;gap:8px;",children:[P(t.icon,t.cardTitleColor,t.iconSize),t.cardTitle&&x("p",{text:t.cardTitle,style:`margin:0;font-family:${_};font-weight:700;font-size:16px;text-transform:uppercase;letter-spacing:1px;color:${t.cardTitleColor};white-space:nowrap;line-height:1.2;`})]}),x("div",{style:`height:3px;width:100%;border-radius:9999px;background:linear-gradient(90deg, ${t.cardAccentFrom}, ${t.cardAccentTo});`})]}),n=t.cardDescription&&x("p",{html:t.cardDescription,style:`margin:0;font-family:${_};font-weight:400;font-size:13px;line-height:1.4;color:${t.cardTextColor};`}),o=x("button",{attrs:{type:"button"},text:t.text,style:`font-family:${_};font-weight:700;font-size:${t.fontSize}px;text-transform:uppercase;letter-spacing:1px;text-decoration:underline;text-underline-offset:4px;color:${t.cardCtaColor};background:transparent;border:none;padding:0;cursor:pointer;text-align:left;line-height:1.2;transition:opacity 0.2s ease;`,on:{mouseenter:i=>{i.currentTarget.style.opacity="0.7"},mouseleave:i=>{i.currentTarget.style.opacity="1"},click:i=>{try{i.preventDefault(),i.stopPropagation()}catch(a){}try{e&&e()}catch(a){}}}});return x("div",{style:`display:flex;flex-direction:column;align-items:flex-start;gap:24px;padding:20px;width:360px;max-width:100%;box-sizing:border-box;background:${t.cardBgColor};border:1px solid ${t.cardBorderColor};border-radius:${t.cardBorderRadiusPx};font-family:${_};`,children:[r,n,o]})}var zi={style:"gregory-black",icon:"camera",text:"Provar Virtualmente",fontSize:14,iconSize:24,subtext:"",bgColor:"#1E1E1E",textColor:"#FFFFFF",badgeBgColor:"#C51A1B",badgeTextColor:"#FFFFFF",borderRadius:"md",borderColor:"#1E1E1E",borderWidth:0,cardTitle:"",cardDescription:"",cardFooter:"",cardBgColor:"#F6F6F6",cardTitleColor:"#1E1E1E",cardTextColor:"#717171",cardBorderRadius:"md",cardCtaColor:"#1E1E1E",cardBorderColor:"#E5E0DA",cardAccentFrom:"#8A5A3C",cardAccentTo:"#E9DACB"};function zt(t){if(!t)return null;let e=Array.isArray(t.anchors)?t.anchors:[];if(t.version===2||t.main)return{version:2,main:t.main||{},anchors:e,cards:t.cards||null};let r=t.desktop||t.tablet||t.mobile||{},n=t.anchor||{};return{version:2,main:Object.assign({},r,{desktop:n.desktop,tablet:n.tablet,mobile:n.mobile,bpMobile:n.bpMobile,bpTablet:n.bpTablet}),anchors:e,cards:t.cards||null}}function dt(t,e){let r={...zi,...t||{}};return r.style==="gregory-card"&&e&&(r.style="gregory-black"),r.borderRadiusPx=Te[r.borderRadius]!=null?Te[r.borderRadius]:"0",r.cardBorderRadiusPx=Ae[r.cardBorderRadius]!=null?Ae[r.cardBorderRadius]:"0",r.fontSize=Number(r.fontSize)||14,r.iconSize=Number(r.iconSize)||24,r.borderWidth=Number(r.borderWidth)||0,r}var Ee={"gregory-black":ln,"gregory-card":sn,"gregory-icon":un,"card-link":dn},rc=Object.keys(Ee).concat("none");function fn(t,e){return t&&t.style==="none"?null:(Ee[t.style]||Ee["gregory-black"])(t,e)}function Ui(){return"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]+Math.random().toString(36).slice(2,11)}var F=null,j=[];function rn(){return[F].concat(j).filter(Boolean)}function Fi(t,e){let r;try{r=document.createElement("iframe"),r.setAttribute("aria-hidden","true"),r.style.cssText="display:none!important;width:0;height:0;border:0;position:absolute;left:-9999px;",(document.body||document.documentElement).appendChild(r);let n=r.contentWindow&&r.contentWindow.Element&&r.contentWindow.Element.prototype&&r.contentWindow.Element.prototype.attachShadow;if(typeof n=="function"){let o=n.call(t,e);return r.remove(),o}}catch(n){}try{r&&r.remove()}catch(n){}return t.attachShadow(e)}var Ki=/^(transform|transform-origin|margin|margin-(top|right|bottom|left)|align-self|justify-self|place-self|position|inset|top|right|bottom|left|z-index|width|min-width|max-width|height|min-height|max-height|font-size)$/i;function $i(t){return!t||typeof t!="string"?"":t.split(";").map(e=>e.trim()).filter(Boolean).filter(e=>Ki.test(e.split(":")[0].trim().toLowerCase())).join(";")}var Ut=null,Ie=!1,Le=0,Re=0,Me=0,Q={},pn=!1,ft=null;function O(){return ft||(ft=X().then(t=>{if(!t)return ft=null,null;try{xt(t,g().projectId,g().product)}catch(e){}return zt(t.template&&t.template.tryOnButton||null)||{__loaded:!0}}).catch(()=>(ft=null,null))),ft}var mt=null,je=null;function Hi(){mt||(mt=setInterval(()=>{try{let t=z(),e=t&&t.value;e&&e!==je&&(je=e,v("pdp"))}catch(t){}},1500))}function Vi(){mt&&(clearInterval(mt),mt=null),je=null}function Wi(){if(pn)return;pn=!0;let t=null;try{window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Ut&&v("pdp")},200)})}catch(e){}}function Oe(t){if(t){if(typeof t.__mkCleanup=="function")try{t.__mkCleanup()}catch(e){}t.parentNode&&t.parentNode.removeChild(t)}}function pt(){Oe(F),j.forEach(Oe),F=null,j=[],Ut=null}var Ji={IMG:1,INPUT:1,VIDEO:1,CANVAS:1,EMBED:1,OBJECT:1,IFRAME:1,BR:1,HR:1,SELECT:1,TEXTAREA:1,SVG:1};function Gi(t){switch(t){case"top-center":return"top:0;left:50%;transform:translateX(-50%);";case"top-right":return"top:0;right:0;";case"middle-left":return"top:50%;left:0;transform:translateY(-50%);";case"center":return"top:50%;left:50%;transform:translate(-50%,-50%);";case"middle-right":return"top:50%;right:0;transform:translateY(-50%);";case"bottom-left":return"bottom:0;left:0;";case"bottom-center":return"bottom:0;left:50%;transform:translateX(-50%);";case"bottom-right":return"bottom:0;right:0;";case"top-left":default:return"top:0;left:0;"}}function Xi(t,e,r){let o=!Ji[t.tagName]?t:t.parentElement||document.body;try{getComputedStyle(o).position==="static"&&(o.style.position="relative")}catch(s){}if(o===t){e.style.cssText="position:absolute;z-index:2147483000;"+Gi(r),t.appendChild(e);return}e.style.cssText="position:absolute;z-index:2147483000;",o.appendChild(e);let i=()=>{try{let s=t.getBoundingClientRect(),d=o.getBoundingClientRect(),f=e.offsetWidth,h=e.offsetHeight,w=s.top-d.top+o.scrollTop,b=s.left-d.left+o.scrollLeft,p=r||"top-left",k=w,$=b;p.indexOf("bottom")===0?k=w+s.height-h:(p.indexOf("middle")===0||p==="center")&&(k=w+(s.height-h)/2),p.indexOf("right")>=0?$=b+s.width-f:p.indexOf("center")>=0&&($=b+(s.width-f)/2),e.style.top=k+"px",e.style.left=$+"px"}catch(s){}};i();let a=()=>i();window.addEventListener("resize",a);let c=setTimeout(i,600),l=setTimeout(i,1500),u=null;try{if(t.tagName==="IMG"&&!t.complete&&t.addEventListener("load",i,{once:!0}),typeof ResizeObserver=="function"){u=new ResizeObserver(()=>i());try{u.observe(t)}catch(s){}try{u.observe(o)}catch(s){}}}catch(s){}e.__mkCleanup=()=>{window.removeEventListener("resize",a),clearTimeout(c),clearTimeout(l);try{t.removeEventListener("load",i)}catch(s){}try{u&&u.disconnect()}catch(s){}}}function Yi(t,e,r){e.style.cssText="position:absolute;z-index:100;",document.body.appendChild(e);let n=()=>{try{let l=t.getBoundingClientRect(),u=e.offsetWidth,s=e.offsetHeight,d=r||"top-left",f=l.top+window.scrollY,h=l.left+window.scrollX;d.indexOf("bottom")===0?f=l.bottom+window.scrollY-s:(d.indexOf("middle")===0||d==="center")&&(f=l.top+window.scrollY+(l.height-s)/2),d.indexOf("right")>=0?h=l.right+window.scrollX-u:d.indexOf("center")>=0&&(h=l.left+window.scrollX+(l.width-u)/2),e.style.top=Math.round(f)+"px",e.style.left=Math.round(h)+"px"}catch(l){}};n();let o=()=>n();window.addEventListener("resize",o);let i=setTimeout(n,600),a=setTimeout(n,1500),c=null;try{t.tagName==="IMG"&&!t.complete&&t.addEventListener("load",n,{once:!0});let l=t.querySelector&&t.querySelector("img");if(l&&!l.complete&&l.addEventListener("load",n,{once:!0}),typeof ResizeObserver=="function"){c=new ResizeObserver(()=>n());try{c.observe(t)}catch(u){}}}catch(l){}e.__mkCleanup=()=>{window.removeEventListener("resize",o),clearTimeout(i),clearTimeout(a);try{c&&c.disconnect()}catch(l){}}}function Zi(t,e,r){try{return t.insertAdjacentElement(r||"afterend",e),!0}catch(n){try{return t.parentNode.insertBefore(e,t.nextSibling),!0}catch(o){return!1}}}async function v(t){let e=g(),r=null;if(t!=="pdp"){pt(),Vi();return}if(!e.projectId)return;if(Hi(),!e._anchorFromPicker){let s=await O(),d=ot(),f=s&&s.main,h=s&&s.anchors,w=s&&s.cards;if(d&&d.tryOnButton){let p=zt(d.tryOnButton)||{};p.main&&(f=Object.assign({},f||e.anchor||{},p.main),r=f),p.anchors&&(h=p.anchors),p.cards&&(w=p.cards)}f&&(e.anchor=f),h&&(e.anchors=h),w&&(e.cards=w);let b=!!(e.anchor&&(e.anchor.desktop||e.anchor.mobile||e.anchor.tablet||e.anchor.selector));if(!e.forceButton&&!(s&&s.main)&&!b){pt(),s===null&&Le<3&&(Le++,setTimeout(()=>v(t),1500));return}Le=0}if(Ie)return;let n=z(),o=n&&n.value,i=!!e.forceButton,a=s=>s?[s.selector,s.position,s.mode,s.align,s.style].join("~"):"heuristic",c=Array.isArray(e.anchors)?e.anchors:[],l=[o||"demo",a(ut(e.anchor))].concat(c.map(s=>a(ut(s)))).join("|"),u=F;if(!(u&&Ut===l)){if(u&&pt(),!o&&!i){y("auto-mount: SKU n\xE3o resolvido na PDP"),Re<10&&(Re++,setTimeout(()=>v(t),800));return}if(Re=0,!i&&e.anchor&&ut(e.anchor)&&!qt(e.anchor)&&Me<12){Me++,setTimeout(()=>v(t),600);return}Me=0,Ie=!0;try{let s=i;i||(Q[o]||(Q[o]=U(e.projectId,o).then(p=>!!(p&&p.available)).catch(()=>!1)),s=await Q[o]);try{Ye(s?"available":"unavailable")}catch(p){}if(!s){y("auto-mount: produto sem try-on",o);return}if(ot().holdout){pt(),y("auto-mount: holdout \u2014 bot\xE3o suprimido");return}let d=await O(),f=window.matchMedia("(max-width: 767px)").matches,h=dt(r||d&&d.main||e.anchor||{},f),w=()=>{let p=z(),k=p&&p.value||o||"";at(),m("button_clicked",{sku:k,style:h.style}),st({projectId:e.projectId,identifier:k})},b=nn();F=Be(b,h,w),j=[];for(let p=0;p<c.length;p++){let k=c[p],$=qt(k);if(!$)continue;let hn=d&&d.anchors&&d.anchors[p]||k,qe=Be($,dt(hn,f),w);qe&&j.push(qe)}Ut=l,Wi(),y("auto-mount: bot\xE3o",{style:h.style,sku:o,mounted:!!F,extras:j.length,forced:i}),(F||j.length)&&m("button_rendered",{style:h.style,sku:o||null,skuSource:n&&n.source,anchorFound:!!b,position:b?b.position:null,mode:b?b.mode:null,extras:j.length,forced:i})}finally{Ie=!1}}}function Be(t,e,r){let n=t&&t.mode||"flow",o=fn(e,r);if(!o)return null;let i=document.createElement("div");i.id=Ui(),Fi(i,{mode:"closed"}).appendChild(o),["click","mousedown","mouseup","pointerdown","pointerup","touchstart"].forEach(l=>{try{i.addEventListener(l,u=>{u.stopPropagation()},!1)}catch(u){}});let c=!1;if(t&&t.el&&t.el.parentNode&&(n==="overlay"?(t.detached?Yi(t.el,i,t.align):Xi(t.el,i,t.align),c=!0):(i.style.cssText="display:contents;",c=Zi(t.el,i,t.position))),c||(i.style.cssText="position:fixed;left:16px;bottom:16px;z-index:2147483000;",document.body.appendChild(i)),t&&t.style){let l=$i(t.style);if(l){if(n==="overlay"){let u=l.match(/(?:^|;)\s*z-index\s*:\s*([^;]+)/i);if(u)try{i.style.zIndex=u[1].trim()}catch(s){}}try{o.style.cssText+=";"+l}catch(u){}}}return i}function mn(){try{let t=g(),e={anchor:t.anchor,anchors:t.anchors,cards:t.cards,forceButton:t.forceButton},r={},n=i=>({desktop:i,tablet:i,mobile:i}),o=(i,a,c)=>{i=i||{};let l=f=>a===f?c:r[f];t.anchor=l("primary")?n(l("primary")):i.main||null;let u=Array.isArray(i.anchors)?i.anchors:[],s=u.length;Object.keys(r).concat(a?[a]:[]).forEach(f=>{f&&f.indexOf("extra-")===0&&(s=Math.max(s,(parseInt(f.slice(6),10)||0)+1))});let d=[];for(let f=0;f<s;f++){let h=l("extra-"+f);d[f]=h?n(h):u[f]||null}t.anchors=d,t._anchorFromPicker=!0,t.forceButton=!0};window.addEventListener("message",i=>{if(i.source!==window)return;let a=i.data;if(!(!a||!a.__mkCmd)){if(a.__mkCmd==="getButtons"){O().then(c=>{let l=c&&Array.isArray(c.anchors)?c.anchors.length:0;try{window.postMessage({__mkButtons:{extras:l,hasMain:!!(c&&c.main)}},"*")}catch(u){}});return}if(a.__mkCmd==="previewSlot"){O().then(c=>{o(c,a.slot||"primary",a.live),v("pdp")});return}if(a.__mkCmd==="saveSlot"){a.slot&&a.live&&(r[a.slot]=a.live),O().then(c=>{o(c),v("pdp")});return}if(a.__mkCmd==="galleryPreview"){t.cards=a.cards||null,t._anchorFromPicker=!0,t.forceButton=!0,tt(),Ft("category");return}if(a.__mkCmd==="applyRecipe"){O().then(c=>{o(c),a.cards!==void 0&&(t.cards=a.cards||null),v("pdp"),t.cards&&(tt(),Ft("category"))});return}if(a.__mkCmd==="cancelPreview"){Object.keys(r).length?O().then(c=>{o(c),v("pdp")}):(t.anchor=e.anchor,t.anchors=e.anchors,t.cards=e.cards,t._anchorFromPicker=!1,t.forceButton=e.forceButton,pt(),tt(),v("pdp"));return}}})}catch(t){}}var K=null,ht=null,Ne=null,yt=new Map;function Qi(t,e){try{if(e.skuAttr){let o=e.skuSelector?t.querySelector(e.skuSelector):t,i=o&&o.getAttribute(e.skuAttr);if(i)return String(i).trim()}if(e.skuSelector&&!e.skuAttr){let o=t.querySelector(e.skuSelector),i=o&&(o.getAttribute("content")||o.textContent||"").trim();if(i)return i}let r=t.querySelector(e.linkSelector||"a[href]"),n=r&&r.getAttribute("href");if(n){let o=n.match(/-p(\d+)|[?&]variant=(\d+)|\/produtos?\/([\w-]+)|\/products?\/([\w-]+)|-(\d+)(?:[/?#]|$)/);if(o)return o[1]||o[2]||o[3]||o[4]||o[5]}}catch(r){}return null}async function ta(t,e,r){if(yt.has(t))return;let n=!!g().forceButton,o=Qi(t,e);if(!o&&!n)return;let i=n;if(i||(Q[o]||(Q[o]=U(g().projectId,o).then(s=>!!(s&&s.available)).catch(()=>!1)),i=await Q[o]),!i||yt.has(t)||!t.isConnected)return;let c={el:e.anchorWithin&&t.querySelector(e.anchorWithin)||t,mode:e.mode||"overlay",align:e.align||"top-left",position:e.position||"afterbegin",style:e.injectStyle||e.style||"",detached:!0},u=Be(c,r,()=>{at(),m("button_clicked",{sku:o,gallery:!0,style:r.style}),st({projectId:g().projectId,identifier:o})});u&&(yt.set(t,u),m("button_rendered",{gallery:!0,sku:o,style:r.style}))}function Pe(t){try{document.querySelectorAll(t.cardSelector).forEach(e=>{e.__mkCard||(e.__mkCard=!0,K.observe(e))})}catch(e){}}function tt(){if(K){try{K.disconnect()}catch(t){}K=null}if(ht){try{ht.disconnect()}catch(t){}ht=null}clearTimeout(Ne),yt.forEach(t=>Oe(t)),yt.clear()}async function Ft(t){let e=g();if(t==="pdp"||t==="cart"||t==="checkout"||t==="purchase"){tt();return}if(!e.projectId)return;let r=await O(),n=e.cards||r&&r.cards||null;if(!n||!n.cardSelector){tt();return}if(K){Pe(n);return}if(typeof IntersectionObserver!="function")return;let o=dt(n,window.matchMedia("(max-width: 767px)").matches);if(o.style==="none"){tt();return}K=new IntersectionObserver(i=>{for(let a of i)a.isIntersecting&&(K.unobserve(a.target),ta(a.target,n,o))},{rootMargin:"300px"}),Pe(n);try{ht=new MutationObserver(()=>{clearTimeout(Ne),Ne=setTimeout(()=>Pe(n),250)}),ht.observe(document.body,{childList:!0,subtree:!0})}catch(i){}y("auto-mount galeria ativa",{cardSelector:n.cardSelector})}(function(){"use strict";try{let r=function(){try{er(),mn(),Vr(),e.autoTrack!==!1&&(Ar((o,i)=>{Or(o,i),v(o),Ft(o)}),qr(),Nr()),y("mk-sdk iniciado",{projectId:e.projectId,collectorUrl:e.collectorUrl})}catch(o){e.debug&&console.error("[mk-sdk] init erro",o)}},e=$t();if(e.projectId){let o=ir(e.projectId);o&&Qt(o),X().then(i=>{let a=nr(i);Qt(a),ar(e.projectId,a),y("escopo de coleta",a);try{xt(i,e.projectId,e.product)}catch(c){}})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r();let n={open:st,close:Nt,isAvailable:$r,getAvailability:U,onReady:Gr,onClose:Xr,onAddToCart:Yr,onProductLoaded:Zr,onError:Qr,onInteraction:tn,onGenerationComplete:en,testCart:_r,experiments:Vt,resetExperiments:$e,_version:Yt,_isMkSdk:!0};typeof window!="undefined"&&(window.mk=n)}catch(e){typeof console!="undefined"&&console.error("[mk-sdk] boot fatal",e)}})();})();
|
package/dist/mk-sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{(function(){try{let a=function(){try{var t=JSON.parse(localStorage.getItem(s));return t&&u.test(t.v)&&t.exp>Date.now()?t.v:null}catch(e){return null}},n=function(t){if(!d){d=!0;var e=document.createElement("script");if(e.src="https://cdn.jsdelivr.net/npm/mk-sdk-git@"+t+"/dist/mk-core.js",e.async=!0,r&&r.attributes)for(var c=0;c<r.attributes.length;c++){var i=r.attributes[c];i.name.indexOf("data-")===0&&e.setAttribute(i.name,i.value)}(document.head||document.documentElement).appendChild(e)}};var l=a,f=n;if(window.__mkBooted)return;window.__mkBooted=!0;var s="mk_sdk_v",v=10*60*1e3,_=700,u=/^\d+\.\d+\.\d+$/,r=document.currentScript||document.querySelector("script[data-mk-project]")||document.querySelector('script[src*="mk-sdk"]'),d=!1,o=a()||"1.1.
|
|
1
|
+
(()=>{(function(){try{let a=function(){try{var t=JSON.parse(localStorage.getItem(s));return t&&u.test(t.v)&&t.exp>Date.now()?t.v:null}catch(e){return null}},n=function(t){if(!d){d=!0;var e=document.createElement("script");if(e.src="https://cdn.jsdelivr.net/npm/mk-sdk-git@"+t+"/dist/mk-core.js",e.async=!0,r&&r.attributes)for(var c=0;c<r.attributes.length;c++){var i=r.attributes[c];i.name.indexOf("data-")===0&&e.setAttribute(i.name,i.value)}(document.head||document.documentElement).appendChild(e)}};var l=a,f=n;if(window.__mkBooted)return;window.__mkBooted=!0;var s="mk_sdk_v",v=10*60*1e3,_=700,u=/^\d+\.\d+\.\d+$/,r=document.currentScript||document.querySelector("script[data-mk-project]")||document.querySelector('script[src*="mk-sdk"]'),d=!1,o=a()||"1.1.100",m=setTimeout(function(){n(o)},_);fetch("https://api-collector.mk3dlabs.com/v1/sdk/version").then(function(t){return t.ok?t.json():null}).then(function(t){var e=t&&t.version;if(u.test(e))try{localStorage.setItem(s,JSON.stringify({v:e,exp:Date.now()+v}))}catch(c){}clearTimeout(m),n(u.test(e)?e:o)}).catch(function(){clearTimeout(m),n(o)})}catch(a){}})();})();
|
package/package.json
CHANGED
package/src/tryon/automount.js
CHANGED
|
@@ -91,6 +91,27 @@ function getTemplateCached() {
|
|
|
91
91
|
return _tplPromise;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
// ── PDP: re-checa o botão quando a VARIANTE/COR muda SEM trocar de URL ──────────
|
|
95
|
+
// Plataformas como a Uappi trocam a cor in-page (sem pushState) → o pageview não
|
|
96
|
+
// re-dispara e o botão não re-avaliava a disponibilidade do novo SKU. Polling leve
|
|
97
|
+
// do SKU resolvido: mudou → re-roda o maybeMountButton (que checa disponibilidade e
|
|
98
|
+
// monta/desmonta). Só ativo enquanto na PDP.
|
|
99
|
+
let pdpPoll = null, lastSku = null;
|
|
100
|
+
function ensurePdpVariantWatch() {
|
|
101
|
+
if (pdpPoll) return;
|
|
102
|
+
pdpPoll = setInterval(() => {
|
|
103
|
+
try {
|
|
104
|
+
const r = resolveSku();
|
|
105
|
+
const sku = r && r.value;
|
|
106
|
+
if (sku && sku !== lastSku) { lastSku = sku; maybeMountButton('pdp'); }
|
|
107
|
+
} catch (_) {}
|
|
108
|
+
}, 1500);
|
|
109
|
+
}
|
|
110
|
+
function stopPdpVariantWatch() {
|
|
111
|
+
if (pdpPoll) { clearInterval(pdpPoll); pdpPoll = null; }
|
|
112
|
+
lastSku = null;
|
|
113
|
+
}
|
|
114
|
+
|
|
94
115
|
// re-avalia a variante visível quando o layout muda (resize, debounced).
|
|
95
116
|
// maybeMountButton re-monta só se a variante escolhida (o key) realmente mudou.
|
|
96
117
|
function ensureResizeWatch() {
|
|
@@ -259,8 +280,9 @@ export async function maybeMountButton(pageType) {
|
|
|
259
280
|
const cfg = getConfig();
|
|
260
281
|
let _abMain = null; // teste A/B: main efetivo (recipe + override da variante), usado no render
|
|
261
282
|
|
|
262
|
-
if (pageType !== 'pdp') { removeButton(); return; }
|
|
283
|
+
if (pageType !== 'pdp') { removeButton(); stopPdpVariantWatch(); return; }
|
|
263
284
|
if (!cfg.projectId) return;
|
|
285
|
+
ensurePdpVariantWatch(); // re-checa o botão quando a cor/variante muda in-page (ex.: Uappi, sem trocar URL)
|
|
264
286
|
|
|
265
287
|
// Posição: a DASHBOARD (template.tryOnButton.anchor) é a fonte da verdade e tem
|
|
266
288
|
// precedência sobre o window.__MK.anchor inline da loja. O picker (runtime,
|
package/src/tryon/bridge.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// e emite eventos de tracking. API pública exposta em window.mk.
|
|
3
3
|
|
|
4
4
|
import { getConfig, log } from '../core/config.js';
|
|
5
|
-
import { track } from '../core/transport.js';
|
|
5
|
+
import { track, markEngaged } from '../core/transport.js';
|
|
6
6
|
import { addToCart as cartAdd, openCartAfterAdd, redirectToCart } from '../platforms/index.js';
|
|
7
7
|
import { getButtonHosts } from './automount.js';
|
|
8
8
|
import { resolveLauncher } from './launchers/index.js';
|
|
@@ -87,6 +87,7 @@ export async function open(options) {
|
|
|
87
87
|
isOpen = true;
|
|
88
88
|
generationStartedAt = Date.now();
|
|
89
89
|
|
|
90
|
+
markEngaged(); // abrir o provador = engajamento — vale p/ botão PRÓPRIO da loja (mk.open) no escopo tryon_engaged
|
|
90
91
|
track('modal_opened', { projectId, identifier });
|
|
91
92
|
}
|
|
92
93
|
|