1(()=>{let n=(e,t)=>(t||document).querySelector(e);function c(t){for(let e=0;e<t.length;e++){var i=n(t[e]);if(i&&i.getAttribute("content"))return i.getAttribute("content").trim()}return""}class t{constructor(e){this.cfg={loadingImagePath:"/BannerGadget/css/bin/loading_images.png",expositionTime:5e3,transitionTime:1e3,transitionType:"dissolve"},this.state={isAnimating:!1,currentIndex:0,loadingBuildDone:!1},this.nodes={root:"string"==typeof e?document.getElementById(e):e},this.images=[],this.imageCache=new Map,this.slideAdvanceTimer=null,this.nextImage=this.goForward.bind(this),this.previousImage=this.goBack.bind(this),this._init()}_init(){if(this.nodes.root){let e=this;this._prefetchXml();var t=new Image,i=function(){e.state.loadingBuildDone||(e.state.loadingBuildDone=!0,e._build(),e._loadXml())};t.onload=i,t.onerror=i,t.src=this.cfg.loadingImagePath,setTimeout(i,500)}}_prefetchXml(){var e=n('meta[name="bannerXML"]');e?(e=e.getAttribute("content"),this._xmlTextPromise=e?fetch(e,{credentials:"omit"}).then(function(e){if(e.ok)return e.text();throw new Error("Banner XML HTTP "+e.status)}):null):this._xmlTextPromise=null}_build(){var e=this.nodes.root;var _s=e.querySelector("img.gcb_lcp_seed");_s&&e.removeChild(_s);var t=document.createElement("div"),i=(t.className="gcb_image",document.createElement("div")),n=(i.className="gcb_image_loading",document.createElement("img")),n=(n.src=this.cfg.loadingImagePath,n.alt="",i.appendChild(n),i.appendChild(Object.assign(document.createElement("div"),{className:"gcb_image_loading_overlay"})),this.nodes.currentLayer=document.createElement("div"),this.nodes.currentLayer.className="gcb_image_current",this.nodes.nextLayer=document.createElement("div"),this.nodes.nextLayer.className="gcb_image_next",this.nodes.beforelegend=document.createElement("div"),this.nodes.beforelegend.className="gcb_image_legend",this.nodes.legend=document.createElement("div"),this.nodes.legend.className="gcb_image_legendWrapper",this.nodes.beforelegend.appendChild(this.nodes.legend),this.nodes.link=document.createElement("a"),this.nodes.link.className="gcb_image_link",t.appendChild(i),t.appendChild(this.nodes.currentLayer),t.appendChild(this.nodes.nextLayer),t.appendChild(this.nodes.beforelegend),t.appendChild(this.nodes.link),this.nodes.loadingBlock=i,document.createElement("div")),i=(n.className="gcb_navigation",document.createElement("div")),s=(i.className="gcb_navigation_arrow previous",document.createElement("div")),a=(s.className="gcb_navigation_paginator",document.createElement("ul")),r=(a.className="gcb_navigation_paginator_thumbs",s.appendChild(a),document.createElement("div"));r.className="gcb_navigation_arrow next",n.appendChild(i),n.appendChild(s),n.appendChild(r),e.appendChild(t),e.appendChild(n),this.nodes.imageWrap=t,this.nodes.navigation=n,this.nodes.paginatorThumbs=a,this.nodes.prevArrow=i,this.nodes.nextArrow=r,e.className=e.className?e.className+" gcb_container_sized":"gcb_container_sized",i.addEventListener("click",()=>this.goBack()),r.addEventListener("click",()=>this.goForward())}_hideGadget(){this.nodes.root&&(this.nodes.root.style.height="0",this.nodes.root.style.overflow="hidden")}async _loadXml(){var t=n('meta[name="bannerXML"]');if(t)try{let e;if(this._xmlTextPromise)e=await this._xmlTextPromise,this._xmlTextPromise=null;else{var i=await fetch(t.getAttribute("content"),{credentials:"omit"});if(!i.ok)throw new Error("Banner XML HTTP "+i.status);e=await i.text()}await this._parseXml(e)}catch(e){console.error("Banner XML load failed:",e),this._hideGadget()}}_attr(t,i,e){if(t)for(let e=0;e<i.length;e++){var n=t.getAttribute(i[e]);if(null!==n&&""!==n)return n}return e}async _parseXml(e){var t,e=(new DOMParser).parseFromString(e,"text/xml");!e.getElementsByTagName("parsererror")[0]&&(t=e.getElementsByTagName("details")[0])&&this._attr(t,["expositiontime","expositionTime"],null)&&(this.cfg.expositionTime=1e3*Math.max(.5,parseFloat(this._attr(t,["expositiontime","expositionTime"],"4"))),this.cfg.transitionTime=1e3*Math.max(.05,parseFloat(this._attr(t,["transitionTime","transitiontime"],"1"))),this.cfg.transitionType=this._attr(t,["transitionType","transitiontype"],"dissolve")||"dissolve",(t=this._collectImages(e)).length)?(this.images=t,this.state.currentIndex=0,this._fillThumbn
1ails(),await this._showFirstSlide()):this._hideGadget()}_collectImages(t){var e,i=(()=>{let e=c(['meta[http-equiv="content-language"]','meta[httpEquiv="content-language"]']);var t=(e=((e=!e&&document.documentElement?document.documentElement.getAttribute("lang")||"":e)||"en").toLowerCase().replace("_","-")).split("-")[0];return{full:e,short:t}})(),n=(e=c(["meta[name='channel']"]))?e.toLowerCase():window.innerWidth<=768?"mobile":"website";let s=t.getElementsByTagName(i.short)[0]||t.getElementsByTagName(i.full.replace("-","_"))[0];if(s||["en","pt","es","de","fr"].some(function(e){return s=t.getElementsByTagName(e)[0]}),!s)return[];var a=Array.from(s.getElementsByTagName("imagem"));let r=0;for(let e=0;e<a.length;e++)if(a[e].getAttribute("isdefault")){r=e;break}var o=0!==r?a.slice(r).concat(a.slice(0,r)):a.slice(),l=[];for(let e=0;e<o.length;e++){var d=o[e],h=d.getElementsByTagName(n)[0]||d.getElementsByTagName("website")[0]||d.getElementsByTagName("mobile")[0];if(h){h=h.getElementsByTagName("bimage")[0];if(h){let e=this._attr(h,["leg","legend"],"")||"";d=d.getElementsByTagName("legend")[0];d&&(d.textContent||"").trim()&&(e=d.textContent.trim());let t=h.getAttribute("picLink")||"",i=h.getAttribute("linkTarget")||"_self";e.match(/^(https?:)?\/\//i)&&!t&&(t=e,e="",i="_self");d=h.getAttribute("img");d&&l.push({path:d,legend:e,link:t,target:i})}}}return l}_fillThumbnails(){var t=this.nodes.paginatorThumbs;if(t){t.innerHTML="";for(let e=0;e<this.images.length;e++){var i=document.createElement("li");0===e&&(i.className="selected"),i.addEventListener("click",()=>this.goTo(e)),t.appendChild(i)}}}_updatePaginator(t){var i=this.nodes.paginatorThumbs?this.nodes.paginatorThumbs.querySelectorAll("li"):[];for(let e=0;e<i.length;e++)e===t?i[e].classList.add("selected"):i[e].classList.remove("selected")}_setLink(e){var t=this.nodes.link;t&&(e.link?(t.setAttribute("href",e.link),t.setAttribute("target",e.target||"_self"),t.style.display="block"):(t.removeAttribute("href"),t.removeAttribute("target"),t.style.display="none"))}_showLoading(){this.nodes.loadingBlock&&(this.nodes.loadingBlock.style.display="block")}_hideLoading(){this.nodes.loadingBlock&&(this.nodes.loadingBlock.style.display="none")}async _showFirstSlide(){if(this.images.length){this._showLoading();var e=this.images[0];try{await this._preload(e.path)}catch(e){return console.error(e),void this._hideGadget()}this.nodes.currentLayer.style.backgroundImage="url("+e.path+")",this.nodes.currentLayer.style.opacity="1",this.nodes.nextLayer.style.opacity="0",this.nodes.nextLayer.style.backgroundImage="",this._setLink(e),this._updatePaginator(0),this._hideLoading(),await this._fadeLegendIn(e),1<this.images.length&&(this._preload(this.images[1].path).catch(function(){}),this._scheduleNextAutoSlide())}}async _fadeLegendIn(e){var t=this.nodes.beforelegend,i=this.nodes.legend;t&&i&&(e=e&&e.legend?e.legend:"",i.innerHTML=e,i=this.cfg.transitionTime,e.trim()?(t.style.opacity="0",t.animate?await t.animate([{opacity:0},{opacity:1}],{duration:i,easing:"ease-out",fill:"forwards"}).finished:t.style.opacity="1"):t.style.opacity="0")}_preload(n){return this.imageCache.has(n)?Promise.resolve(this.imageCache.get(n)):new Promise(function(e,t){let i=new Image;i.onload=function(){e(i)},i.onerror=function(){t(new Error("Failed to load "+n))},i.src=n}).then(function(e){return this.imageCache.set(n,e),e}.bind(this))}_clearSlideTimer(){null!==this.slideAdvanceTimer&&(clearTimeout(this.slideAdvanceTimer),this.slideAdvanceTimer=null)}_scheduleNextAutoSlide(){let t=this;this._clearSlideTimer(),this.images.length<=1||(this.slideAdvanceTimer=setTimeout(function e(){t.slideAdvanceTimer=null,t.images.length&&(t.state.isAnimating?t.slideAdvanceTimer=setTimeout(e,40):(t.state.currentIndex=(t.state.currentIndex+1)%t.images.length,t._runTransition(t.images[t.state.currentIndex])))},this.cfg.expositionTime))}_stopSlideshow(){this._clearSlideTimer()}async _runTransition(e){if(e&&!this.state.isAnimating&&this.nodes.currentLayer&&this.nodes.nextLayer){this.state.isAnimating=!0;try{await this._preload(e.path),this.nodes.beforelegend&&(this.nodes.beforelegend.style.opacity="0"),this.nodes.legend&&(this.nodes.legend.innerHTML=e.legend||""),this._setLink(e);var t,i,n=this.nodes.currentLayer,s=this.nodes.nextLayer,a=(s.style.backgroundImage="url("+e.path+")",s.style.opacity="0",this.cfg.transitionTime),r=((!this.cfg.transitionType||"dissolve"===this.cfg.transitionType||"1"===this.cfg.transitionType)&&n.animate&&s.animate?(t=n.animate([{opacity:1},{opacity:0}
1],{duration:a,easing:"ease-out",fill:"forwards"}),i=s.animate([{opacity:0},{opacity:1}],{duration:a,easing:"ease-out",fill:"forwards"}),await Promise.all([t.finished,i.finished])):(n.style.opacity="0",s.style.opacity="1"),n.className="gcb_image_next",s.className="gcb_image_current",this.nodes.currentLayer=s,(this.nodes.nextLayer=n).style.opacity="0",s.style.opacity="1",this._updatePaginator(this.state.currentIndex),this._fadeLegendIn(e)),o=(this._scheduleNextAutoSlide(),await r,(this.state.currentIndex+1)%this.images.length);this._preload(this.images[o].path).catch(function(){})}finally{this.state.isAnimating=!1}}}goForward(){this.images.length&&!this.state.isAnimating&&(this._stopSlideshow(),this.state.currentIndex=(this.state.currentIndex+1)%this.images.length,this._runTransition(this.images[this.state.currentIndex]))}goBack(){this.images.length&&!this.state.isAnimating&&(this._stopSlideshow(),this.state.currentIndex=(this.state.currentIndex-1+this.images.length)%this.images.length,this._runTransition(this.images[this.state.currentIndex]))}goTo(e){this.images.length&&!this.state.isAnimating&&(this._stopSlideshow(),this.state.currentIndex=e%this.images.length,this._runTransition(this.images[this.state.currentIndex]))}destroy(){this._stopSlideshow(),this.imageCache.clear(),this.nodes.root&&(this.nodes.root.innerHTML="")}}function e(){Array.from(document.querySelectorAll(".gcb_container")).forEach(function(e){e.classList.contains("bannerImage")||new t(e)})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.