(()=>{if(window.embiInterstitialLoaded)return void console.warn("EMBI Interstitial script ya estΓ‘ cargado. Abortando ejecuciΓ³n duplicada.");window.embiInterstitialLoaded=!0;const e=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=768,t=3e4,i="100% 0px",n=!1,o={fetchMarginPercent:200,renderMarginPercent:100,mobileScaling:1},r={enabled:!0,loadDelay:100},s=(...e)=>n&&console.log(...e),a=(...e)=>console.warn(...e),d=(...e)=>console.error(...e);const l=[];function c(e){try{const t=e.split(",");for(const e of t){const t=h(e);if(t)return t}return null}catch(t){return d("Error getting first location available with selectors:",e,t),null}}function h(e){try{return document.querySelector(e)}catch(t){return d("Error getting element with selector:",e,t),null}}function p(t,i=null){let n=0,o=0;if(t&&t.length>0&&t.forEach(e=>{if(Array.isArray(e)&&2===e.length){const[t,i]=e;t>n&&(n=t),i>o&&(o=i)}}),i){const t=e?i.adunitMobile:i.adunitDesktop;if(t&&t.mediaTypes&&t.mediaTypes.video&&t.mediaTypes.video.playerSize){t.mediaTypes.video.playerSize.forEach(e=>{if(Array.isArray(e)&&2===e.length){const[t,i]=e;t>n&&(n=t),i>o&&(o=i)}})}}return{maxWidth:n>0?`${n}px`:"none",maxHeight:o>0?`${o}px`:"none"}}!function(e,t){if(!document.querySelector(`script[src='${e}']`)){const i=document.createElement("script");i.async=t,i.type="text/javascript",i.src=e,document.head.appendChild(i)}}("https://securepubads.g.doubleclick.net/tag/js/gpt.js");var u=window.googletag=window.googletag||{};u.cmd=u.cmd||[];const f={visibleAds:new Set,hiddenAdsInViewport:new Set,sentinelObserver:null,refreshInterval:null,sentinels:new Map,lastRefreshTime:new Map,displayedAds:new Set,createSentinel(e,t){try{const i=document.createElement("div");return i.id=`sentinel_${e}`,i.className="ad-sentinel",i.style.cssText="\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n ",t.parentNode.insertBefore(i,t.nextSibling),this.sentinels.set(e,i),s(`Created sentinel for: ${e}`),i}catch(t){return d(`Error creating sentinel for ${e}:`,t),null}},shouldRefreshAd(e){const i=l.find(t=>t.tagId===e),n=i&&("HIGH_IMPACT"===i.type||"FOOTER_INTOP"===i.type||"DISPLAY_VIDEO_STICKY"===i.type);if(!(this.visibleAds.has(e)||this.hiddenAdsInViewport.has(e)||n))return s(` ❌ ${e} not in viewport (visible or hidden)`),!1;if(n)s(` πŸ“ ${e} is ${i.type} overlay`);else{const t=this.hiddenAdsInViewport.has(e);s(` πŸ“ ${e} is ${t?"hidden":"visible"} in viewport`)}const o=this.lastRefreshTime.get(e);if(!o)return s(` βœ… ${e} ready for first refresh (never refreshed before)`),!0;const r=Date.now()-o,a=r>=t;return s(` ${a?"βœ…":"⏳"} ${e} time since refresh: ${Math.round(r/1e3)}s / ${t/1e3}s`),a},markDisplayed(e){if(!this.displayedAds.has(e)){this.displayedAds.add(e),s(`πŸ“Ί Ad marked as displayed: ${e}`);const t=document.getElementById(e);if(t){const i=t.getBoundingClientRect(),n=i.top0,o=0===i.width&&0===i.height;s(` - In viewport: ${n}, Hidden: ${o}, Size: ${i.width}x${i.height}`),n&&!o?(this.visibleAds.add(e),s(" - Added to visible ads immediately")):n&&o&&(this.hiddenAdsInViewport.add(e),s(" - Added to hidden ads in viewport"))}}},triggerAdRefresh(e,t="entered viewport"){try{l.find(t=>t.tagId===e);if(this.shouldRefreshAd(e)){s(`🎯 Triggering immediate refresh for ${e} (${t})`);const i=l.find(t=>t.tagId===e||t.tagId2===e);i&&(e===i.tagId&&i.adSlot?(u.pubads().refresh([i.adSlot]),this.lastRefreshTime.set(e,Date.now())):e===i.tagId2&&i.adSlotB&&(u.pubads().refresh([i.adSlotB]),this.lastRefreshTime.set(e,Date.now())))}else if(this.displayedAds.has(e)){const t=this.lastRefreshTime.get(e),i=Math.round((Date.now()-t)/1e3);s(`⏭️ Skipping refresh for ${e} (refreshed ${i}s ago)`)}else s(`⏭️ Skipping refresh for ${e} (not displayed yet)`)}catch(t){d(`Error triggering refresh for ${e}:`,t)}},initialize(){try{this.sentinelObserver=new IntersectionObserver(e=>{e.forEach(e=>{const t=e.target.id.replace("sentinel_","");if(s(`πŸ” Sentinel check: ${t}, intersecting: ${e.isIntersecting}`),e.isIntersecting){const e=document.getElementById(t);if(e){const i=e.getBoundingClientRect(),n=0===i.width&&0===i.height;if(s(` - Ad dimensions: ${i.width}x${i.height}, isHidden: ${n}`),n){const e=this.hiddenAdsInViewport.has(t);this.hiddenAdsInViewport.add(t),this.visibleAds.delete(t),s(`πŸ” Hidden ad in viewport: ${t}`),!e&&this.shouldRefreshAd(t)&&this.triggerAdRefresh(t,"hidden ad entered viewport")}else{const e=this.visibleAds.has(t);this.visibleAds.add(t),this.hiddenAdsInViewport.delete(t),s(`πŸ” Visible ad in viewport: ${t}`),!e&&this.shouldRefreshAd(t)&&this.triggerAdRefresh(t,"visible ad entered viewport")}}}else this.hiddenAdsInViewport.delete(t),this.visibleAds.delete(t),s(`πŸ” Ad left viewport: ${t}`)}),s(`βœ… Visible ads: ${this.visibleAds.size}, Hidden in viewport: ${this.hiddenAdsInViewport.size}`)},{rootMargin:i,threshold:0});const e=function(){const e=[];return l.forEach(t=>{t.tagId&&e.push(t.tagId),t.tagId2&&e.push(t.tagId2)}),e}();let n=0;e.forEach(e=>{const t=document.getElementById(e);if(t){const i=this.createSentinel(e,t);i&&(this.sentinelObserver.observe(i),n++,s(`πŸ‘οΈ Observing sentinel for: ${e}`))}else a(`⚠️ Element not found for observation: ${e}`)}),this.startRefreshTimer(),s(`βœ… Fast refresh system initialized: ${n}/${e.length} ad units observed (GPT-only, sentinel-only)`),s(` - Refresh interval: ${t/1e3}s`),s(` - Observer margin: ${i}`)}catch(e){d("Error initializing refresh manager:",e)}},startRefreshTimer(){this.refreshInterval=setInterval(()=>{this.refreshVisibleAds()},t)},refreshVisibleAds(){try{const e=new Set;if(this.visibleAds.forEach(t=>e.add(t)),this.hiddenAdsInViewport.forEach(t=>e.add(t)),l.forEach(e=>{}),0===e.size)return void s("⏭️ No ads in refresh range");s(`πŸ”„ Periodic refresh: ${e.size} ad(s) (${this.visibleAds.size} visible + ${this.hiddenAdsInViewport.size} hidden + overlays)`),e.forEach(e=>{try{const i=document.getElementById(e),n=this.shouldRefreshAd(e);if(s(`πŸ” Checking ${e}: element=${!!i}, shouldRefresh=${n}, displayed=${this.displayedAds.has(e)}`),i&&n){s(`βœ… Refreshing ad: ${e}`);const t=l.find(t=>t.tagId===e||t.tagId2===e);t?e===t.tagId&&t.adSlot?(u.pubads().refresh([t.adSlot]),this.lastRefreshTime.set(e,Date.now()),s(`βœ… Refreshed successfully: ${e} (slot 1)`)):e===t.tagId2&&t.adSlotB?(u.pubads().refresh([t.adSlotB]),this.lastRefreshTime.set(e,Date.now()),s(`βœ… Refreshed successfully: ${e} (slot 2)`)):a(`⚠️ No matching adSlot found for ${e}`):a(`⚠️ No product found for ${e}`)}else if(i)if(this.displayedAds.has(e)){const i=this.lastRefreshTime.get(e),n=Math.round((Date.now()-i)/1e3);s(`⏭️ Skipping ${e} (refreshed ${n}s ago, interval: ${t/1e3}s)`)}else s(`⏭️ Skipping ${e} (not displayed yet)`);else a(`⚠️ Element not found: ${e}`)}catch(t){d(`Error refreshing ${e}:`,t)}})}catch(e){d("Error in refreshVisibleAds:",e)}},destroy(){this.sentinelObserver&&this.sentinelObserver.disconnect(),this.refreshInterval&&clearInterval(this.refreshInterval),this.sentinels.forEach(e=>{try{e&&e.parentNode&&e.parentNode.removeChild(e)}catch(e){d("Error removing sentinel:",e)}}),this.sentinels.clear(),this.lastRefreshTime.clear(),this.displayedAds.clear(),this.visibleAds.clear(),this.hiddenAdsInViewport.clear(),s("RefreshManager cleanup complete")}};function m(t){try{if(t.manualInsertion&&"TABOOLA_INTEGRATION"!==t.type){const o=t.tagId;new MutationObserver((e,t)=>{document.getElementById(o)&&(u.cmd.push(function(){u.display(o)}),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}else{const r=t.type,s=t.position,l=t.ubication,h=t.tagId,f=t.offset;function i(e,t){const i=document.createElement("script");i.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${t}');\n });\n `,e.appendChild(i)}try{if("TABOOLA_INTEGRATION"===r)createTaboolaContainer(t);else if("HIGH_IMPACT"===r)INTERSTITIAL_CONTAINER=createInterstitialContainer(h);else if("DISPLAY_VIDEO_STICKY"===r)cornerContainer=createCornerContainer(h,s,f);else if("FOOTER_INTOP"===r)footerInTopContainer=createfooterInTopContainer(h,s);else if("DOUBLE_BOX"===r){const m=c(`${l}`);if(!m)return d(`Elemento con clase '${l}' no encontrado en el DOM para el anuncio ${h}. No se pudo insertar el DIV.`),!1;const g=t.tagId2,y=e?t.mobileSizes:t.desktopSizes,{maxWidth:v,maxHeight:b}=p(y,t),w=document.createElement("div");w.id=`container_${h}`,(n=w).style.display="flex",n.style.flexDirection=e?"column":"row",n.style.gap="24px",n.style.marginBottom="24px",n.style.background="transparent",n.style.justifyContent="center";const I=document.createElement("div");I.id=`wrapper_${h}`,I.className="ad-slot-wrapper",I.style.maxWidth=v,I.style.maxHeight=b,I.style.overflow="hidden",I.style.display="flex",I.style.justifyContent="center",I.style.alignItems="center";const $=document.createElement("div");$.id=h,$.className="ad-slot",$.style.minHeight="1px";const x=document.createElement("script");x.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${h}');\n });\n `,$.appendChild(x),I.appendChild($),w.appendChild(I);const E=document.createElement("div");E.id=`wrapper_${g}`,E.className="ad-slot-wrapper",E.style.maxWidth=v,E.style.maxHeight=b,E.style.overflow="hidden",E.style.display="flex",E.style.justifyContent="center",E.style.alignItems="center";const S=document.createElement("div");S.id=g,S.className="ad-slot",S.style.minHeight="1px";const A=document.createElement("script");switch(A.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${g}');\n });\n `,S.appendChild(A),E.appendChild(S),w.appendChild(E),s){case"INSERT_BEFORE":m.insertAdjacentElement("beforebegin",w);break;case"INSERT_AFTER":m.insertAdjacentElement("afterend",w);break;default:m.appendChild(w)}}else if("DISPLAY_VIDEO"===r){const T=c(`${l}`);if(!T)return void d(`Elemento con clase '${l}' no encontrado en el DOM para el anuncio ${h}.`);const C=e?t.mobileSizes:t.desktopSizes,{maxWidth:O,maxHeight:R}=p(C,t),_=document.createElement("div");_.id=`wrapper_${h}`,_.className="ad-slot-wrapper",_.style.maxWidth=O,_.style.maxHeight=R,_.style.overflow="hidden",_.style.margin="0 auto 24px",_.style.display="flex",_.style.justifyContent="center",_.style.alignItems="center";const k=document.createElement("div");switch(k.id=h,k.className="ad-slot",k.style.minHeight="1px",i(k,h),_.appendChild(k),s){case"INSERT_BEFORE":T.insertAdjacentElement("beforebegin",_);break;case"INSERT_AFTER":T.insertAdjacentElement("afterend",_);break;default:T.appendChild(_)}}else if(t.isSticky)cornerContainer=createCornerContainer(h,s),i(cornerContainer,h);else{const D=c(`${l}`);if(!D)return void d(`Elemento con clase '${l}' no encontrado en el DOM para el anuncio ${h}.`);const M=e?t.mobileSizes:t.desktopSizes,{maxWidth:N,maxHeight:H}=p(M,t),B=document.createElement("div");B.id=`wrapper_${h}`,B.className="ad-slot-wrapper",B.style.maxWidth=N,B.style.maxHeight=H,B.style.overflow="hidden",B.style.margin="0 auto 24px",B.style.display="flex",B.style.justifyContent="center",B.style.alignItems="center";const z=document.createElement("div");switch(z.id=h,z.className="ad-slot",z.style.minHeight="1px",i(z,h),B.appendChild(z),s){case"INSERT_BEFORE":D.insertAdjacentElement("beforebegin",B);break;case"INSERT_AFTER":D.insertAdjacentElement("afterend",B);break;default:D.appendChild(B)}}}catch(P){d(`Error procesando el anuncio ${h}:`,P)}}}catch(L){a("Error rendering adunit for product",t.tagId,L)}var n}function g(){try{l.map(e=>{m(e)}),u.cmd.push(function(){const e=l.filter(e=>"HIGH_IMPACT"===e.type||"FOOTER_INTOP"===e.type||"DISPLAY_VIDEO_STICKY"===e.type);e.length>0&&(s("🎯 Loading overlay ads immediately..."),e.forEach(e=>{try{s(` - Displaying ${e.type} ad: ${e.tagId}`),u.display(e.tagId)}catch(t){d(`Error displaying ${e.type} ad ${e.tagId}:`,t)}}))}),setTimeout(()=>{s("πŸ”„ Initializing fast refresh system (GPT-only)..."),f.initialize()},r.loadDelay)}catch(e){d("Error in mainInitialization:",e)}finally{s("βœ… EMBI ad system initialized successfully (GPT-only)")}}u.cmd.push(function(){if(l.filter(e=>"TABOOLA_INTEGRATION"!==e.type).forEach(t=>{try{const i=e?t.mobileSizes:t.desktopSizes;t.adSlot=u.defineSlot(t.slot,i,t.tagId).setForceSafeFrame(!1).addService(u.pubads()),"DOUBLE_BOX"===t.type&&(t.adSlotB=u.defineSlot(t.slot2,i,t.tagId2).setForceSafeFrame(!1).addService(u.pubads())),s(`GPT slot defined: ${t.tagId}`)}catch(e){d("Error creating GPT slot for product",t.tagId,e)}}),r.enabled){l.some(e=>e.loadImmediately)&&(u.pubads().enableSingleRequest(),s("Single Request enabled for priority ads"))}u.pubads().enableLazyLoad(o),u.pubads().collapseEmptyDivs(!0),u.pubads().setCentering(!0),u.enableServices(),s("GPT configuration complete")}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",g):g()})(),function(){"use strict";if(window.vidvertoCornerScriptLoaded)return void console.warn("Vidverto Corner script already loaded. Aborting duplicate execution.");window.vidvertoCornerScriptLoaded=!0;const e={adSlotId:"18482",vidvertoId:"0482_corner",width:"90vw",maxWidth:"340px",aspectRatio:"16 / 9",position:"BOTTOM_RIGHT",offsetX:0,offsetY:0,mobileOffsetX:0,mobileOffsetY:0,mobileBreakpoint:768,useAbsolutePosition:!1,zIndex:"9997",borderRadius:"12px",backgroundColor:"#000",boxShadow:"0 4px 12px rgba(0,0,0,0.3)",closeButtonColor:"rgba(0, 0, 0, 0.6)",closeButtonHoverColor:"rgba(0, 0, 0, 0.8)",animationDuration:"0.3s",showCloseButton:!0,autoShow:!0,retryAttempts:20,retryDelay:200,dimensionMonitorDuration:1e4,dimensionCheckInterval:100,debug:!1};function t(t,...i){if(e.debug)switch(t){case"log":default:console.log(...i);break;case"warn":console.warn(...i);break;case"error":console.error(...i);break;case"info":console.info(...i)}}const i={TOP_LEFT:{top:"20px",left:"20px",bottom:"auto",right:"auto"},TOP_RIGHT:{top:"20px",right:"20px",bottom:"auto",left:"auto"},BOTTOM_LEFT:{bottom:"20px",left:"20px",top:"auto",right:"auto"},BOTTOM_RIGHT:{bottom:"20px",right:"20px",top:"auto",left:"auto"}};let n,o,r,s,a,d=!1,l=null,c=null,h=null,p=0,u=new Set,f=!1,m=!1,g=null;function y(){if(!g||!g.parentNode)return;const e=g.parentNode;e.lastElementChild!==g&&(e.appendChild(g),t("log","πŸ” Overlay moved to top"))}function v(e){const n={...i[e.position]},o=function(e){return window.innerWidth{!function(){if(!n)return;const t=v(e);Object.assign(n.style,t)}()},150)}function w(e){const i=g&&g.isConnected?g:(g=document.getElementById("embi-overlay-root"),g?(t("log","βœ… Reusing existing embi-overlay-root"),g):(g=document.createElement("div"),g.id="embi-overlay-root",Object.assign(g.style,{position:"fixed",inset:"0",pointerEvents:"none",zIndex:"2147483647"}),document.body.appendChild(g),t("log","βœ… Created embi-overlay-root (main script not loaded)"),g));n=document.createElement("div"),n.id="floating-video-wrapper";const r=v(e),s={position:"fixed",zIndex:e.zIndex||"9997",display:"none",opacity:"0",transform:"translateY(20px)",transition:`opacity ${e.animationDuration} ease, transform ${e.animationDuration} ease`,pointerEvents:"auto",...r};Object.assign(n.style,s),o=document.createElement("div"),o.id="floating-video-container";const a={width:e.width,maxWidth:e.maxWidth,aspectRatio:e.aspectRatio,background:e.backgroundColor,borderRadius:e.borderRadius,overflow:"hidden",boxShadow:e.boxShadow,display:"flex",alignItems:"center",justifyContent:"center"};return Object.assign(o.style,a),n.appendChild(o),i.appendChild(n),y(),t("log","βœ… Floating video structure created with config:",e),{wrapper:n,container:o}}function I(e){if(!e.showCloseButton)return;const i=document.createElement("button");i.innerHTML="Γ—",i.title="Close video";const l={position:"absolute",top:"-20px",right:"0px",width:"16px",height:"16px",background:e.closeButtonColor,opacity:"0.2",padding:"0px",border:"none",borderRadius:"50%",color:"#fff",fontSize:"18px",fontWeight:"bold",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"2147483646",transition:"background 0.2s ease, transform 0.2s ease",boxShadow:"0 2px 8px rgba(0,0,0,0.3)",pointerEvents:"auto"};Object.assign(i.style,l),i.addEventListener("mouseenter",()=>{i.style.background=e.closeButtonHoverColor,i.style.transform="scale(1.1)",i.style.boxShadow="0 4px 12px rgba(0,0,0,0.4)"}),i.addEventListener("mouseleave",()=>{i.style.background=e.closeButtonColor,i.style.transform="scale(1)",i.style.boxShadow="0 2px 8px rgba(0,0,0,0.3)"}),i.addEventListener("click",()=>{n&&n.parentNode&&(r&&(r.disconnect(),r=null),s&&(s.disconnect(),s=null),x(),window.removeEventListener("resize",b),clearTimeout(a),n.parentNode.removeChild(n),n=null,o=null,d=!1,h=null,m=!1,f=!1,u.clear(),p=0,t("log","βœ… Floating video container completely removed"))}),n.appendChild(i)}function $(){if(!o)return!1;const i=o.querySelectorAll("div.aries_videoWrapper > div.aries_videoPlayer > div > div");let n=!1;return i.length>0&&i.forEach((i,o)=>{const r=i.id||i.outerHTML.slice(0,50),s=u.has(r),a=""!==i.style.width||""!==i.style.height;if(!s||a){t("log",`πŸ”§ Mutation: Video ${o+1}: ${s?"Dimensions reapplied":"Found new element"}, removing dimensions...`),i.style.setProperty("width","","important"),i.style.setProperty("height","","important"),i.style.setProperty("max-width","100%","important"),i.style.setProperty("max-height","100%","important");i.querySelectorAll("iframe").forEach(t=>{t.style.setProperty("max-width",e.maxWidth,"important"),t.style.setProperty("max-height",e.maxHeight,"important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","100%","important"),t.removeAttribute("width"),t.removeAttribute("height")}),u.add(r),h=i,t("log",`βœ… Mutation: Video ${o+1}: Removed/prevented width and height from:`,i),n=!0}}),n}function x(){l&&(clearInterval(l),l=null),c&&(clearTimeout(c),c=null),s&&(s.disconnect(),s=null,t("log","πŸ”Œ Mutation observer disconnected")),f=!1,t("log","⏹️ Dimension monitoring stopped")}function E(){if(m)return void t("log","⚠️ Styles already applied, skipping...");m=!0,t("log","🎨 Applying all styles after video load...");const i=o.querySelector(`div[id^="${e.vidvertoId}"]`);i&&Object.assign(i.style,{width:"100%",height:"100%",position:"absolute",top:"0",left:"0"}),C(),A(),T(),function(){if(s)return;t("log","πŸ” Setting up dimension observer for all video elements..."),s=new MutationObserver(e=>{e.some(e=>"attributes"===e.type&&"style"===e.attributeName&&e.target.matches("div.aries_videoWrapper > div.aries_videoPlayer > div > div"))?(t("log","⚠️ Style attribute changed on video element(s), reapplying to all..."),$()):$()}),s.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","id"]}),t("log","βœ… Dimension observer started for all video elements")}(),function(){if(f)return void t("log","⚠️ Dimension monitoring already active, skipping...");f=!0,t("log","πŸ” Starting continuous dimension monitoring...");let i=0;const n=e.dimensionMonitorDuration/e.dimensionCheckInterval;l=setInterval(()=>{if(i++,!o||!o.parentNode)return t("warn","Container removed, stopping dimension monitoring"),void x();i>=n&&x()},e.dimensionCheckInterval),c=setTimeout(()=>{x()},e.dimensionMonitorDuration),t("log",`βœ… Monitoring active for ${e.dimensionMonitorDuration/1e3} seconds`)}(),t("log","βœ… All styles applied and monitoring started")}function S(i=0){if(t("log",`Checking video loaded (attempt ${i+1}/${e.retryAttempts+1})`),function(){t("log","Checking if video/ad is loaded..."),t("log","Container:",o),t("log","CONFIG.ID:",e.vidvertoId);const i=o.querySelector(`div[id^="${e.vidvertoId}"]`),n=document.querySelector(`div[id*="_${e.adSlotId}_"]`);if(t("log","Dynamic div found:",i),!i)return!1;if(t("log","Video div found:",n),!n)return!1;const r=n.children.length>0;t("log","Has content:",r);const s=n.querySelector("video")||n.querySelector("iframe")||n.querySelector("canvas")||n.querySelector('[class*="video"]')||n.querySelector('[class*="player"]');t("log","Has video element:",s);const a=i.id!==e.vidvertoId,d=i.innerHTML.trim().length>0;return r&&(s||a&&d)}())return t("log","βœ… Video/ad detected as loaded, applying styles and showing container"),E(),n&&e.autoShow&&(n.style.display="block",n.offsetHeight,n.style.opacity="1",n.style.transform="translateY(0)",y()),!0;if(iS(i+1),n)}else t("warn","Video/ad not detected as loaded after maximum retries");return!1}function A(e=0,i=10){if(!o)return void t("warn","Container not available for aries div styling");const n=o.querySelectorAll('div[id^="aries_div_"]');if(0!==n.length)t("log",`🎯 Found ${n.length} aries div(s) inside floating wrapper to style`),n.forEach((e,i)=>{Object.assign(e.style,{width:"100%",height:"100%"}),t("log",`βœ… Styled aries div ${i+1}`)});else if(eA(e+1,i),t)}else t("warn","No aries divs found inside floating wrapper after maximum retries")}function T(i=0,n=10){if(!o)return void t("warn","Container not available for aries video player styling");const r=o.querySelectorAll('.aries_videoPlayer:not([class*=" "])');if(0!==r.length)t("log",`🎯 Found ${r.length} aries video player(s) inside floating wrapper to style`),r.forEach((i,n)=>{i.style.maxWidth=e.maxWidth,i.style.maxHeight=e.maxHeight,t("log",`βœ… Styled aries video player ${n+1}`)});else if(iT(i+1,n),e)}else t("warn","No aries video players found inside floating wrapper after maximum retries")}function C(i=0,n=15){if(!o)return void t("warn","Container not available for child styling");const r=o.querySelector(`div[id*="_${e.adSlotId}_"]`);if(r)return async function(){const i=[r];let n=r;for(let e=0;e<3;e++){const o=await s(n,e);if(!o){t("log",`Stopping at level ${e+1} - no more children found`);break}i.push(o),n=o}return t("log",`Total children found: ${i.length}`),i.forEach((t,i)=>{if(t){const n=3===i?{width:"100%",height:"100%",maxWidth:e.maxWidth,maxHeight:e.maxHeight}:{width:"100%",height:"100%"};Object.assign(t.style,n)}}),i.length}().then(e=>{if(0===e&&iC(i+1,n),e)}else e>0?t("log",`βœ… Successfully styled ${e} children`):t("warn","No children found after maximum retries")});if(iC(i+1,n),e)}else t("warn","First child not found inside floating wrapper after maximum retries");function s(e,t=0,i=3){return new Promise(t=>{!function i(n=0,o=5){const r=e.querySelector(":scope > div");if(r)return t(r);if(!(ni(n+1,o),50+25*n)}()})}}function O(){t("log","πŸš€ Initializing Configurable Floating Video..."),"loading"!==document.readyState?(t("log","πŸ“‹ Using configuration:",e),w(e),I(e),window.addEventListener("resize",b),r=new MutationObserver(i=>{t("log","MutationObserver triggered, mutations:",i.length);const n=o.querySelector(`div[id^="${e.vidvertoId}"]`);if(!n)return void t("log","Skipping - no dynamic div found");if(d)return void t("log","Skipping - already processed dynamic div");const s=n.children.length>0||""!==n.innerHTML.trim(),a=n.id!==e.vidvertoId;s||a?(d=!0,setTimeout(()=>{S()},500),setTimeout(()=>{r.disconnect(),t("log","MutationObserver disconnected after successful styling")},1e3)):t("log","Skipping - div has no content and is same as placeholder")}),r.observe(o,{childList:!0,subtree:!0}),function(e){const i=e.vidvertoId+Date.now(),n=document.createElement("div");n.id=e.vidvertoId,o.appendChild(n);const r=document.createElement("script");r.textContent=`\n !function(v,t,o){\n var a=t.createElement("script");\n a.src="https://ad.vidverto.io/vidverto/js/aries/v1/invocation.js";\n a.setAttribute("fetchpriority","high");\n var r=v.top;\n r.document.head.appendChild(a);\n r.aries=r.aries||{},r.aries.v1=r.aries.v1||{commands:[]};\n var c=r.aries.v1;\n c.commands.push(function(){\n var d=document.getElementById("${e.vidvertoId}");\n if (d) {\n d.setAttribute("id", "${i}");\n var t = v.frameElement || d;\n const w = d.offsetWidth || 340;\n const h = d.offsetHeight || (w * 9 / 16);\n c.mount("${e.adSlotId}", t, { width: w, height: h });\n }\n });\n }(window, document);\n `,document.body.appendChild(r),t("log","βœ… Vidverto script injected")}(e),setTimeout(()=>{S()},1e3),t("log","βœ… Configurable Floating Video initialized successfully")):document.addEventListener("DOMContentLoaded",O)}setTimeout(()=>{n||(t("log","πŸ”„ Auto-initializing with configuration"),O())},100)}();