//tealium universal tag - utag.loader ut4.0.202502281946, Copyright 2025 Tealium.com Inc. All Rights Reserved. var utag_condload=false;try{(function(){function ul(src,a,b){a=document;b=a.createElement('script');b.language='javascript';b.type='text/javascript';b.src=src;a.getElementsByTagName('head')[0].appendChild(b)};var match=(""+document.cookie).match("(^|;\\s)utag_env_adl_eltiempo=(\/\/tags\.tiqcdn\.com\/utag\/adl\/[a-z0-9\\.-]{1,30}\\/[^\\s;]*)");if(match){if(match[2].indexOf("/prod/")===-1){var s=match[2];while(s.indexOf("%")!=-1){s=decodeURIComponent(s);}s=s.replace(/\.\./g,"");ul(s);utag_condload=true;__tealium_default_path='//tags.tiqcdn.com/utag/adl/eltiempo/prod/';}}})();}catch(e){};try{try{window.utag_cfg_ovrd=window.utag_cfg_ovrd||{};window.utag_cfg_ovrd.noview=false;}catch(e){console.log(e)}}catch(e){console.log(e);} if(!utag_condload){try{try{document.cookie=`utm_source=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`utm_medium=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`utm_campaign=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`utm_term=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`utm_content=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`landing=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`screen_size=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;document.cookie=`viewport_size=;Secure;SameSite=None;expires=Thu,01 Jan 1971 00:00:00 UTC;`;const searchQuery=window.location.search;if(searchQuery){const utm=new URLSearchParams(searchQuery.replace(/\?/,''));if(utm.get('utm_source')){document.cookie=`utm_source=${utm.get('utm_source')};Secure;SameSite=None;`;sessionStorage.setItem("utm_source",utm.get('utm_source'));} if(utm.get('utm_medium')){document.cookie=`utm_medium=${utm.get('utm_medium')};Secure;SameSite=None;`;sessionStorage.setItem("utm_medium",utm.get('utm_medium'));} if(utm.get('utm_campaign')){document.cookie=`utm_campaign=${utm.get('utm_campaign')};Secure;SameSite=None;`;sessionStorage.setItem("utm_campaign",utm.get('utm_campaign'));} if(utm.get('utm_term')){document.cookie=`utm_term=${utm.get('utm_term')};Secure;SameSite=None;`;sessionStorage.setItem("utm_term",utm.get('utm_term'));} if(utm.get('utm_content')){document.cookie=`utm_content=${utm.get('utm_content')};Secure;SameSite=None;`;sessionStorage.setItem("utm_content",utm.get('utm_content'));} if(utm.get('landing')){document.cookie=`landing=${utm.get('landing')};Secure;SameSite=None;`;sessionStorage.setItem("landing",utm.get('landing'));}} let screenSize=`${Math.round(screen.width)}x${Math.round(screen.height)}`;document.cookie=`screen_size=${screenSize};Secure;SameSite=None;`;let viewportSize=`${Math.round(visualViewport.width)}x${Math.round(visualViewport.height)}`;document.cookie=`viewport_size=${viewportSize};Secure;SameSite=None;`;let timeOut=false;const resizeObserver=new ResizeObserver((entries)=>{clearTimeout(timeOut);timeOut=setTimeout(()=>{document.cookie=`viewport_size=${viewportSize};Secure;SameSite=None;`;},500);});resizeObserver.observe(document.querySelector('html'));}catch(e){console.log(e)}}catch(e){console.log(e);}} if(!utag_condload){try{try{window.ADLStorage=class{constructor(key,value,expiryDays=30){if(typeof key!=='string'){throw new Error('ADL Storage: Key must be a string.');} this.key=key;this.expiryDays=expiryDays;this.expires=new Date();this.expires.setTime(this.expires.getTime()+(this.expiryDays*24*60*60*1000));this.data={data:value,expiry:this.expires.getTime()};} cookie(){const that=this;return{get:function(){const keyValue=document.cookie.match('(^|;)\\s*'+that.key+'\\s*=\\s*([^;]+)');return keyValue?JSON.parse(decodeURIComponent(keyValue.pop())):null;},set:function(){const cookieString=that.key+'='+encodeURIComponent(JSON.stringify(that.data))+';path=/;expires='+that.expires.toUTCString();document.cookie=cookieString;}};} local(){const that=this;return{get:function(){const itemStr=localStorage.getItem(that.key);if(!itemStr){return null;} const item=JSON.parse(itemStr);const now=new Date();if(now.getTime()>item.expiry){localStorage.removeItem(that.key);return null;} return item;},set:function(){localStorage.setItem(that.key,JSON.stringify(that.data));}};}};}catch(e){console.log(e)}}catch(e){console.log(e);}} if(!utag_condload){try{try{window.ADLSurvey=class{options={id:String(Date.now().toString(32)+Math.random().toString(16)).replace(/\./g,''),name:'adl-survey-v3',expiryDays:360,storage:'local',questions:[{text:'Question 1',type:'ratingScale',lowScoreLabel:'Very poor',highScoreLabel:'Excellent',scale:5,required:true},{text:'Question 2',type:'text',required:false}],zIndex:9999,theme:'popup',popupPosition:'right',color:{background:"#ffffff",text:"#000",button:"#e0e2e8",buttonActive:"#626a84",buttonActiveText:"#fff"},thanks:'¡Gracias por tu tiempo!',title:'Tu opinión es muy importante',feedback:'Sugerencias'};answers=[];css={_reset:" \ ",_colors:function(s){return" \ ";},_general:" \ ",modal:function(s){return" \ ";},popup:function(s){return" \ ";},button:function(s){let reversePosition=s.popupPosition=="right"?'left':'right';let direction=s.popupPosition=="right"?'-':'';return" \ ";}};render(){let that=this;const components={ratingScale:function(question,index){let inputs=``;for(let i=1;i<=question.scale;i++){inputs+=' \ \ ';} return' \
\
\ '+question.lowScoreLabel+' \ '+inputs+' \ '+question.highScoreLabel+' \
\
\ '+question.lowScoreLabel+' \ '+question.highScoreLabel+' \
\
\ ';},text:function(question,index){return'\
\ \
120
\
\ ';},reaction:function(question,index){return' \
\
\ '+question.lowScoreLabel+' \ \ \ \ \ \ \ \ \ \ \ '+question.highScoreLabel+' \
\
\ '+question.lowScoreLabel+' \ '+question.highScoreLabel+' \
\
\ ';},radioButtons:function(question,index){let inputs=``;for(let i=0;i';inputs+=' \ ';if(question.options[i].comment){inputs+='';} inputs+='';} return' \
\ '+inputs+' \
\ ';},checkboxButtons:function(question,index){let inputs=``;for(let i=0;i';inputs+=' \ ';if(question.options[i].comment){inputs+='';} inputs+='';} return' \
\ '+inputs+' \ \
\ ';},statement:function(question,index){return'\
\

\ '+question.description+' \

\ \
\ ';},};const renderComponent=(question,index)=>{return'\ \ ';} return'\
\
\
\
\
\ \
\
\
\ \
\
'+this.options.title+'
\ \
\
\ '+this.options.questions.map(renderComponent).join('')+' \
\ \
\
\
\
\ ';} constructor(opt){if(typeof opt==='object'){Object.assign(this.options,opt);} this.storage=new ADLStorage(this.options.name)[this.options.storage]().get()||{};} next(e,that){const currentIndex=Number(e.target.value);console.log("js-adlsurvey-form-"+this.options.name);console.log(this.options.name+"-q"+currentIndex);that.answers.push(document.forms["js-adlsurvey-form-"+this.options.name][this.options.name+"-q"+currentIndex].value);new ADLStorage(that.options.name,{"id":that.options.id,"answers":that.answers},that.options.expiryDays)[that.options.storage]().set();const $adlSurvey=document.getElementById(this.options.name);let elements=$adlSurvey.getElementsByClassName("js-adlsurvey-question");for(var i=0;i0){data.close=true;that.utagEventHandler();} new ADLStorage(that.options.name,data,that.options.expiryDays)[that.options.storage]().set();} utagEventHandler(){const event={"tealium_event":"send_survey","event_name":this.options.name,"id_sus":this.options.id,"data":[]};const questionAnswer=[];for(var i=0;i{const value=item[key];if(key==="text"){questionAnswer.push(JSON.stringify({key:value,value:this.answers[i]}));questionAnswer.push(JSON.stringify({key:`question_${i+1}`,value:item[key]}));questionAnswer.push(JSON.stringify({key:`answer_${i+1}`,value:this.answers[i]}));}else{questionAnswer.push(JSON.stringify({key:`${key}_${i+1}`,value:typeof value==="string"?value:JSON.stringify(value)}));}});} event.data=questionAnswer;if(typeof utag!='undefined'&&utag){utag.link(event);}else{console.log(this.options.name+": utag is undefined");console.log(event);}} show(){if(this.storage.data&&this.storage.data.close){return false;} const $checkAdlSurvey=document.getElementById(this.options.name);if(($checkAdlSurvey&&!this.storage.data)||($checkAdlSurvey&&this.storage.data&&this.storage.data.answers&&this.storage.data.answers.length===0)){$checkAdlSurvey.style.display="flex";return false;} if($checkAdlSurvey){$checkAdlSurvey.remove();}else{if(!document.getElementById('style-adlsurvey-reset')){document.head.insertAdjacentHTML('beforeend',this.css._reset);} if(!document.getElementById('style-adlsurvey-general')){document.head.insertAdjacentHTML('beforeend',this.css._general);} if(!document.getElementById('style-adlsurvey-colors-'+this.options.name)){document.head.insertAdjacentHTML('beforeend',this.css._colors(this.options));} document.head.insertAdjacentHTML('beforeend',this.css[this.options.theme](this.options));} document.body.insertAdjacentHTML('beforeend',this.render(this.options));const $adlSurvey=document.getElementById(this.options.name);this.answers=[];if(this.storage.data&&this.storage.data.answers&&this.storage.data.answers.length>0){this.answers=this.storage.data.answers;this.options.id=this.storage.data.id;for(let i=0;i{event.preventDefault();$adlSurvey.querySelector(".js-adlsurvey-btn-next").disabled=false;});$adlSurvey.querySelector(".js-adlsurvey-btn-next").addEventListener('click',evt=>this.next(evt,this));const closeButtons=$adlSurvey.querySelectorAll(".js-adlsurvey-close");closeButtons.forEach((closeButton)=>{closeButton.addEventListener("click",evt=>this.close(evt,this));});const textareaElements=$adlSurvey.querySelectorAll(".js-adlsurvey-input-textarea");textareaElements.forEach((textareaElement)=>{const maxlength=textareaElement.getAttribute("maxlength");textareaElement.addEventListener("input",()=>{textareaElement.parentElement.querySelector(".js-adlsurvey-input-textarea-character-counter").textContent=(maxlength-textareaElement.value.length);});});$adlSurvey.querySelector(".js-adlsurvey-popup-toggle").addEventListener('click',()=>{$adlSurvey.querySelector(".js-adlsurvey-position").classList.toggle("adlsurvey-popup-minimized");});return $adlSurvey;}};}catch(e){console.log(e)}}catch(e){console.log(e);}} if(!utag_condload){try{try{window.Flickerlessly=window.Flickerlessly||{},function(t){"use strict";var i=function(t,n,a,o){var i="atNodeInserted"+t,r=[],e=["","-moz-","-webkit-","-ms-","-o-"];e.forEach(function(t,e){r.push("@"+t+"keyframes "+i+" {from {opacity:0.99} to {opacity:1}}")}),r.push(n+"{"),e.forEach(function(t,e){r.push(t+"animation-duration:0.001s;"+t+"animation-name:"+i+";")}),r.push("}");var s=document.getElementsByTagName("head")[0];if(s){var c=document.createElement("style");c.setAttribute("type","text/css"),c.styleSheet?c.styleSheet.cssText=r.join("\n"):c.appendChild(document.createTextNode(r.join("\n"))),s.insertBefore(c,s.firstChild)}var l=function(t){if(t.animationName===i&&"object"==typeof t.target){var e=!0===o||!1===o&&null===t.target.getAttribute("data-flk-success");u("('"+n+"') ready! Execute: "+e,t.target),"function"==typeof a&&e?(t.target.setAttribute("data-flk-success",i),!0!==o&&(["animationstart","MSAnimationStart","webkitAnimationStart"].forEach(function(t,e){document.removeEventListener(t,l,!1)}),c&&c.parentNode.removeChild(c)),a(t.target,u)):u("Won't Callback",e,a)}};["animationstart","MSAnimationStart","webkitAnimationStart"].forEach(function(t,e){document.addEventListener(t,l,!1)})},u=-1!==window.location.href.indexOf("Debug=1")?function(){Array.prototype.unshift.call(arguments,"FLK:"),console.info.apply(this,arguments)}:function(){},r=Math.floor(1e3*Math.random()+1);t.onReady=function(){for(var t=0;t0){g.push(b);d++;}else{this.f[b.id]=1;}} for(a=0;a0?'&':'?')+'utv='+(a.v?utag.cfg.template+a.v:utag.cfg.v);utag.rpt['l_'+a.id]=a.src;b=document;this.f[a.id]=0;if(a.load==2){utag.DB("Attach sync: "+a.src);a.uid=a.id;b.write('