function _createForOfIteratorHelper(e,n){var t,r,o,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return o=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){o=!0,t=e},f:function(){try{r||null==a.return||a.return()}finally{if(o)throw t}}};if(Array.isArray(e)||(a=_unsupportedIterableToArray(e))||n&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:n=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _regenerator(){var p,e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",t=e.toStringTag||"@@toStringTag";function r(e,n,t,r){var o,i,a,c,u,s,l,f,d,n=n&&n.prototype instanceof g?n:g,n=Object.create(n.prototype);return _regeneratorDefine2(n,"_invoke",(o=e,i=t,l=r||[],f=!1,d={p:s=0,n:0,v:p,a:v,f:v.bind(p,4),d:function(e,n){return a=e,c=0,u=p,d.n=n,m}},function(e,n,t){if(1n||ie.length)&&(n=e.length);for(var t=0,r=Array(n);t{function a(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r{var e=o(R);return _slicedToArray(null!=(e=null==e?void 0:e.split(":"))?e:[],1)[0]})())?e:(()=>{var e=new RegExp(/[?&]workspace=([^&]+)(&|$)/).exec(window.location.search);return null==e?void 0:e[1]})())?e:(()=>{var e;return null==(e=null==window?void 0:window.__RUNTIME__)?void 0:e.workspace})(),ckInfo:window.document.cookie});var e}function X(){var e=null==(e=null==(e=window.document)?void 0:e.querySelector('meta[name="storefront"]'))?void 0:e.getAttribute("content"),n=null!=(n=null!=(n=null!=(n=null==(n=window.VTEX_METADATA)?void 0:n.account)?n:null==(n=window.__RUNTIME__)?void 0:n.account)?n:window.jsnomeLoja)?n:(()=>{var e=null!=(e=null==(e=window.vtexafenv)?void 0:e.account)?e:null!=(e=null==(e=null==document?void 0:document.currentScript)?void 0:e.getAttribute("an"))?e:null==(e=null==document?void 0:document.currentScript)?void 0:e.getAttribute("data-an");return J=e?e:J})();return e?{accountName:n,accountEnvironment:e}:null!=(e=window.__RUNTIME__)&&e.account?{accountName:n,accountEnvironment:"store_framework"}:window.jsnomeLoja?{accountName:n,accountEnvironment:"portal"}:{accountName:n,accountEnvironment:window.__NEXT_DATA__||window.___gatsby?"fast_store":void 0}}var J="";function i(){return window.location.href}var e="https://af-origin.vtex.com/api/activity-flow",Y="Event",$=1e4,u=0,z={pageView:"".concat(e,"/page-views"),ads:"".concat(e,"/ads"),webVitals:"".concat(e,"/web-vitals"),click:"".concat(e,"/click"),impression:"".concat(e,"/impression")};function K(e,n){var t,r;navigator.sendBeacon?navigator.sendBeacon(n,e):(t=n,r=e,new Promise(function(e){var n=new XMLHttpRequest;n.timeout=$,n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(r),n.onload=function(){if(200===n.status||202===n.status)return H(),e(r)}}))}function Q(e){var n={SessionId:(n=G()).sessionID,MacId:n.macID,IsNewUser:n.isNewUser,Url:n.url,Ref:n.ref,accountName:n.accountName,accountEnvironment:n.accountEnvironment,clientdate:(new Date).getTime(),isFirstEvent:n.isNewSessionID,workspace:n.workspace,ckInfo:n.ckInfo},t=n.IsNewUser,r=n.isFirstEvent,n=a(n,["IsNewUser","isFirstEvent"]),n=Object.assign(Object.assign(Object.assign({},e),{DataType:Y}),n);return"pageView"===e.eventType?Object.assign(Object.assign({},n),{IsNewUser:t,isFirstEvent:r}):n}function s(e,n){var t,r=1{var t=e;(t=te[t])&&clearTimeout(t);var r=setTimeout(function(){"IN_VIEW"===d(e)&&n()},ee);te[e]=r})(n,function(){f(n,"VIEWED"),r.disconnect(),t.dispatchEvent(new Event("view"))}));break;case"IN_VIEW":o.isIntersecting||f(n,"NOT_VIEWED");break;case"VIEWED":r.disconnect()}})},{threshold:.5,rootMargin:"0px"})).observe(i)}function f(e,n){ne[e]=n}function d(e){return null!=(e=ne[e])?e:"NOT_VIEWED"}function v(e){return"".concat(e.adId,"-").concat(e.adRequestId)}function oe(e){e=(e=>{for(var n={},t=Object.keys(c),r=0,o=t;ri&&(clearInterval(t),n(null))},a)}))}},e)}))}var ve=["lojasrede","drogariavenancio"];function pe(){return t(this,void 0,void 0,_regenerator().m(function e(){var r,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t=n=void 0,n=X().accountName,t=(t=window.location.pathname).includes("/search")||t.includes("/pesquisa"),null!=n&&ve.includes(n)&&t)return e.n=1,de(function(){var e;return null==(e=document.querySelector("impulse-search"))?void 0:e.shadowRoot});e.n=2;break;case 1:o=e.v,e.n=4;break;case 2:return e.n=3,de(function(){return document.body});case 3:o=e.v;case 4:return r=o,e.a(2,r)}var n,t},e)}))}var m="data-af";function me(e){for(var n={},t=0,r=Array.from(e.attributes);tt.value&&(t.value=r,t.entries=o,n())}var n,t=T("CLS",0),r=0,o=[],i=E("layout-shift",e);i&&(n=_(a,t,Re,c.reportAllChanges),x(function(){e(i.takeRecords()),n(!0)}),y(function(){t=T("CLS",r=0),n=_(a,t,Re,c.reportAllChanges),I(function(){return n()})}),setTimeout(n,0))}))}function Se(i,a){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(a=a||{},j(function(){var e;We();function n(n){Xe(function(){n.forEach(Ge);var e=He();e&&e.latency!==t.value&&(t.value=e.latency,t.entries=e.entries,o())})}var t=T("INP"),r=E("event",n,{durationThreshold:null!=(e=a.durationThreshold)?e:40}),o=_(i,t,Je,a.reportAllChanges);r&&(r.observe({type:"first-input",buffered:!0}),x(function(){n(r.takeRecords()),o(!0)}),y(function(){qe=Ue(),L.length=0,D.clear(),t=T("INP"),o=_(i,t,Je,a.reportAllChanges)}))}))}function je(a,c){c=c||{},j(function(){function e(e){(e=c.reportAllChanges?e:e.slice(-1)).forEach(function(e){e.startTimer[1]?"poor":e>r[0]?"needs-improvement":"good",n(t))}},I=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},x=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},O=function(e){var n=!1;return function(){n||(e(),n=!0)}},A=-1,Ne=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},S=function(e){"hidden"===document.visibilityState&&-1t.latency)&&(e?n.duration>e.latency?(e.entries=[n],e.latency=n.duration):n.duration===e.latency&&n.startTime===e.entries[0].startTime&&e.entries.push(n):(t={id:n.interactionId,latency:n.duration,entries:[n]},D.set(t.id,t),L.push(t)),L.sort(function(e,n){return n.latency-e.latency}),10