  def('bootstrap/alert', function(){ def("alert",function(){$("body").on("click",".alert-open",function(e){e.preventDefault(),$(this).next(".alert").toggleClass("show")}),$("body").on("click",".alert-close",function(e){e.preventDefault(),$(this).parent(".alert").toggleClass("show")})}); });    def('bootstrap/forms', function(){ function unaccent(e){for(var t,n="",o=0,r=e.length;o<r;n+=(t="ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž".indexOf(e.charAt(o)))>-1?"AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz".charAt(t):e.charAt(o),o++);return n}function escapeRegExp(e){return e=e.replace(/([-[\]{}()*+?.,\\^$|#])/g,"\\$1"),["[ÀÁÂÃÄÅA]","[àáâãäåa]","[ÒÓÔÕÕÖØO]","[òóôõöøo]","[ÈÉÊËE]","[èéêëðe]","[Ççc]","[ÐD]","[ÌÍÎÏI]","[ìíîïi]","[ÙÚÛÜU]","[ùúûüu]","[ÑN]","[ñn]","[ŠS]","[šs]","[ŸY]","[ÿýy]","[ŽZ]","[žz]"].map(function(t){e=e.replace(new RegExp(t,"g"),t)}),e}function nodeTextReplacer(e,t,n){if(e instanceof Node&&e.nodeType===Node.ELEMENT_NODE)for(var o,r=e.childNodes,i=0;r[i];++i)switch((o=r[i]).nodeType){case Node.ELEMENT_NODE:nodeTextReplacer(o,t,n);break;case Node.TEXT_NODE:var s=document.createElement("replacer");s.innerHTML=o.nodeValue.replace(t,n),o.parentNode.insertBefore(s,o),o.parentNode.removeChild(o)}}function preventScroll(e,t){if(!t&&-1==!t.indexOf(lib.breakpoints.breakpoint.name)){var n,o=$("body"),r=$("html");if(e){o.css("width");n=window.pageYOffset,r.css({overflow:"hidden"}),o.css({position:"fixed",top:-n})}else n=-parseInt(o.css("top")),r.css({overflow:""}),o.css({position:"",top:""}),window.scrollTo(0,n)}}function toggleListResult(){var e=$(this).closest(".form-filter"),t=$(".form-filter").not(e).addClass("closed");t.find(".svg-icon > use")?t.find(".svg-icon > use").attr("xlink:href","#svg-single-arrow-down"):t.find("i").removeClass("icon-single-arrow-up").addClass("icon-single-arrow-down");var n=e.toggleClass("closed");n.find(".svg-icon > use")?n.find(".svg-icon > use").toggleAttr("xlink:href","#svg-single-arrow-up","#svg-single-arrow-down"):n.find("i").toggleClass("icon-single-arrow-down icon-single-arrow-up"),$(".form-filter").not(e).each(function(){var e=$(this);e.hasClass("closed")||(e.addClass("closed").find("i").removeClass("icon-single-arrow-up").addClass("icon-single-arrow-down"),e.triggerHandler("form-filter-close"),preventScroll(!1,["xs"]))}),e.length&&e.hasClass("closed")?(e.triggerHandler("form-filter-open"),preventScroll(!0,["xs"])):e.length&&(e.triggerHandler("form-filter-close"),preventScroll(!1,["xs"])),e.find(".select-option").show(),e.find(".input-term").focus().val(""),e.find(".select-option").removeClass('searched-option"'),e.find(".select-option").length>6&&e.find("ul").css("overflow-y","scroll").css("overflow-x","hidden")}function getText(e){var t=$(e.currentTarget),n=t.closest(".form-filter");n.find(".final-term").html(t.html()),toggleListResult(),n.triggerHandler("form-filter-select",t.data())}function inputKey(e){var t,n=$(this),o=n.closest(".form-filter"),r=n.closest(".form-filter").find(".select-option");if(27==e.keyCode)toggleListResult();else if(38==e.keyCode||40==e.keyCode){t=n.parent().next().find(".selected-term");var i=(n.parent().next().find(".searched-option").index(t)+1)*t.height()-60;40==e.keyCode&&t.next().hasClass("searched-option")?(t.next().position().top,t.toggleClass("selected-term").next().toggleClass("selected-term"),i-=4*(t.height()+14)):38==e.keyCode&&t.prev().hasClass("searched-option")&&(t.prev().position().top,t.toggleClass("selected-term").prev().toggleClass("selected-term"),i-=2*(t.height()+14)),t.parent().scrollTop(i)}else if(13==e.keyCode)o.find(".selected-term").trigger("click"),toggleListResult();else if(37!=e.keyCode&&39!=e.keyCode){r.removeClass("searched-option selected-term").attr("data-found",0).hide();for(var s=escapeRegExp(n.val().trim()),l=new RegExp("(:?^|\\W)("+s.split(" ").join("|")+")","gim"),a=0;a<r.length;a++){var c=(t=$(r[a])).text().matchAll(l).filter(function(e){return e.length>0}).map(function(e){return e[2]});c.length>0&&(/[&?]debug=true&?/.test(location.search)&&console.debug("[FormFilter]",l,s,c),t.attr("data-found",c.filter(function(e){return e.length}).length),t.html(t.html().replace(/<span class="result-highlight">(.*?)<\/span>/g,"$1")),s.length>0&&(nodeTextReplacer(t[0],new RegExp("("+c.map(escapeRegExp).join("|")+")","g"),'<span class="result-highlight">$&</span>'),t.html(t.html().replace(/<\/?replacer>/g,""))),t.addClass("searched-option").show())}o.find(".select-option").sort(function(e,t){return function(e,t,n){for(var o=0;o<n.length;o++){var r=e,i=t,s=n[o].order||"asc";if("function"==typeof n[o].prepare&&(r=n[o].prepare(r),i=n[o].prepare(i)),"asc"==s){if(r<i)return-1;if(r>i)return 1}else if("desc"==s){if(r>i)return-1;if(r<i)return 1}}return 0}($(e),$(t),[{order:"desc",prepare:function(e){return parseInt(e.attr("data-found"))}},{prepare:function(e){return parseInt(e.attr("data-original"))}},{prepare:function(e){return unaccent(e.text()).toLowerCase()}}])}).appendTo(o.find(".target")),o.find(".searched-option").first().addClass("selected-term")}}function FormFilter(e){var t,n=this,o={onOpen:!1,onClose:!1,onSelect:!1};function r(){var e=[].slice.call(arguments),t=e.shift();return e.unshift(this.element),"function"==typeof o[t]?o[t].apply(this,e):null}this.element=e,this.config=function(e){$.extend(o,e)},(t=$(n.element)).off().on("click",".final-term, .svg-icon, .btn-close",function(e){e.preventDefault(),toggleListResult.call(this)}).on("keyup",".input-term",inputKey).on("click",".select-option",getText.bind(n)),$(".final-term",n.element).each(function(){$(this).attr("data-title",$(this).text())}),t.on("form-filter-open",function(){r.call(n,"onOpen")}).on("form-filter-close",function(){r.call(n,"onClose")}).on("form-filter-select",function(e,t){r.call(n,"onSelect",e,t)}),$(".select-option",n.element).each(function(e,t){$(t).attr("data-original",e)})}String.prototype.matchAll=function(e){var t=[];return this.replace(e,function(){var e=[].slice.call(arguments,0),n=e.splice(-2);e.index=n[0],e.input=n[1],t.push(e)}),t.length?t:[]},$(document).mouseup(function(e){0==$(e.target).closest(".form-filter").length&&toggleListResult()}),expose.init=function(){$(this.dom).each(function(){$(this).data("formFilter",new FormFilter(this))})},expose.selector=".form-filter",$(".drop-select").off().on("click",".drop-item",function(){var e=$(this),t=e.parents(".drop-select"),n=t.find(".selector").children("span"),o=null,r=parseInt(t.attr("data-open")),i=(parseInt(t.attr("data-selected")),e.prop("tagName").toLowerCase());if(r?t.attr("data-open",0):t.attr("data-open",1),t.find("p.selector").find("use").toggleAttr("xlink:href","#svg-single-arrow-up","#svg-single-arrow-down"),"label"==i){e.attr("data-default")?(o="0",t.find("input:checkbox").removeAttr("checked")):o="1",t.attr("data-selected",o);var s=e.children("span").html();n.html(s),t.find(".drop-item").removeClass("selected"),e.addClass("selected")}return!1}),$(document).mouseup(function(e){var t=$(".drop-select[data-open=1]");t.is(e.target)||0!==t.has(e.target).length||(1==t.attr("data-open")&&t.attr("data-close-metric")&&hitAudience.countClick(t.attr("data-close-metric")),t.attr("data-open",0),t.find("p.selector").find("use").attr("xlink:href","#svg-single-arrow-down"))}); });    def('bootstrap/photo', function(){ def("photo",function(){expose.pinit=function(){var t=$(this.dom),i=navigator.userAgent||"";t.each(function(){var t=$(this),e="uol_"+Date.now(),n=$('<a class="pinit-btn" href="javascript:void()"><img height="24" src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a>');const o=t[0].classList.contains("img-placeholder")?" placeholder":"";t.wrap('<div class="pinit-wraper'+o+'"></div>'),n.insertAfter(t),n.on("click",function(){var i="http://br.pinterest.com/pin/create/button/?url="+location.protocol+"//"+location.host+location.pathname+"&media="+t.attr("data-src")+"&description="+document.title;hitAudience.countClick({component:"pinterest-on-images",reference:"compartilhe_pinterest",action:"clique"}),window.open(i,e,"height=550, width=750")}),i.match(/Windows Phone/i)?t.parent().on("click",function(){n.toggle()}):(t.parent().on("mouseover",function(){n.show()}),t.parent().on("mouseout",function(){n.hide()}))})},expose.init=function(){this.pinit()},expose.selector=".pinit-img"}); });    def('bootstrap/svg-icons', function(){ function loadSvg(o,n,e){if(!o.getElementById(n)){(e=e||{}).path=System.version,e=Object.keys(e).map(function(o){return o+"="+e[o]}).join("&");var t=""==location.port||"443"==location.port?"":":"+location.port,a=location.protocol+"//"+location.hostname+t+Config.servicename+"?loadComponent=svg-icons&loadSvg=true&"+e+"&cache="+(Config.cache||0),i=$.ajax({url:a,contentType:"image/svg+xml"});i.done(function(e){var t=e.getElementsByTagName("svg")[0];t.setAttribute("id",n),o.body.appendChild(t)}),i.fail(function(o,n){console.error("Request failed: SVG "+n)})}}loadSvg(document,"uol-svg-icons"),window.loadSvg=function(o,n){loadSvg(document,o,n)}; });    def('bootstrap/scroll', function(){ function ScrollController(o){var n=0,e=0,r=0,a=this;function t(){o.container.triggerHandler("scroll",{scrollY:r,containerSize:n,contentSize:e,maxScroll:a.maxScroll()}),o.content.css("top",r),a.updateScrollbar()}this.maxScroll=function(){return-1*(e-n)},this.increment=function(o){return o>0&&r>this.maxScroll()?(r=Math.max(r-o,this.maxScroll()),t(),!0):o<0&&r<0&&(r=Math.min(r+-1*o,0),t(),!0)},this.scrollBarTo=function(n){var a=o.scrollBarTrack.outerHeight(),l=Math.min(n,o.scrollBarTrack.outerHeight()-o.scrollBar.outerHeight());r=-1*(l=l<0?0:l)/a*e,o.scrollBar.css("top",l),t()},this.scrollTo=function(o){var a=Math.max(o,-1*(e-n));r=a>0?0:a,t()},this.paged=function(o){return o&&r<0?(r=Math.min(0,r+n),t(),!0):!o&&r>this.maxScroll()&&(r=Math.max(r-n,this.maxScroll()),t(),!0)},this.updateScrollbar=function(){n=o.container.outerHeight(),e=o.content.outerHeight();var a=n/e*100,t=-1*r/e*100;o.scrollBar.css({height:a+"%",top:t+"%"}),100==a?o.scrollBarWrap.addClass("disabled"):o.scrollBarWrap.removeClass("disabled")},this.scrollAll=function(o){return o&&r<0?(r=0,t(),!0):r>this.maxScroll()&&(r=this.maxScroll(),t(),!0)}}function Scrollbar(o){var n,e,r,a=3e3,t=!1,l=this;function c(){t||(l.container.height(l.container.parent().height()),n.updateScrollbar(),t=!0)}function i(){clearTimeout(e),l.container.addClass("is-over"),e=setTimeout(function(){l.container.removeClass("is-over")},a)}l.container=$(o),l.container.attr("tabindex","0").wrapInner('<div class="scroll-content scroll-animate" />').append('<div class="scrollbar-container"><div class="scrollbar-wrap"><div class="scrollbar-track" /><div class="scrollbar scroll-animate" /></div></div>'),l.content=l.container.find(".scroll-content"),l.scrollBar=l.container.find(".scrollbar"),l.scrollBarContainer=l.container.find(".scrollbar-container"),l.scrollBarTrack=l.container.find(".scrollbar-track"),l.scrollBarWrap=l.container.find(".scrollbar-wrap"),(n=new ScrollController(l)).updateScrollbar(),l.container.on("keydown",function(o){var e;switch(o.keyCode){case 9:o.preventDefault();break;case 38:e=n.increment(-50);break;case 40:e=n.increment(50);break;case 33:e=n.paged(!0);break;case 32:case 34:e=n.paged();break;case 36:e=n.scrollAll(!0);break;case 35:e=n.scrollAll()}i(),e&&o.preventDefault()}).on("mouseenter",function(){l.container.focus(),c()}).on("mouseleave",function(){l.container.blur()}),l.container.on("wheel mousewheel",function(o){var e=n.increment(o.originalEvent.deltaY>0?50:-50);e&&o.preventDefault(),i()}).on("mouseenter mousemove mouseleave",function(){i()}),l.container.on("touchstart",function(o){n.maxScroll()<0&&o.preventDefault(),c(),clearTimeout(r),l.container.addClass("is-active"),l.content.removeClass("scroll-animate");var e=o.originalEvent.touches[0].clientY,a=l.content.position().top;l.container.on("touchmove",function(o){n.maxScroll()<0&&o.preventDefault(),n.scrollTo(a+(o.originalEvent.touches[0].clientY-e))})}).on("touchend",function(){l.content.addClass("scroll-animate"),r=setTimeout(function(){l.container.removeClass("is-active")},a)}),l.scrollBarContainer.on("mouseenter",function(){l.scrollBarContainer.addClass("is-over")}).on("mouseleave",function(){l.scrollBarContainer.removeClass("is-over")}),l.scrollBar.on("mousedown",function(o){o.preventDefault();var e=o.clientY,t=l.scrollBar.position().top;l.scrollBar.removeClass("scroll-animate"),l.content.removeClass("scroll-animate"),l.scrollBarContainer.addClass("is-active"),clearTimeout(r),l.container.addClass("is-active"),$(window).on("mousemove",function(o){o.preventDefault(),n.scrollBarTo(t+(o.clientY-e))}).on("mouseup",function(){$(window).off("mousemove"),l.scrollBar.addClass("scroll-animate"),l.content.addClass("scroll-animate"),l.scrollBarContainer.removeClass("is-active"),r=setTimeout(function(){l.container.removeClass("is-active")},a)})}),$(window).on("resize",function(){n.updateScrollbar()}),console.log("[scroll] Component scroll initiated")}include("breakpoints"),expose.init=function(){var o=this.dom.dataset||$(this.dom).data(),n=this.parse(o.scroll,!1);(!n||n.breakpoints&&-1!=n.breakpoints.indexOf(this.breakpoints.breakpoint.name))&&new Scrollbar(this.dom)}; });    def('bootstrap/read-more', function(){ def("read-more",function(){"use strict";include("breakpoints"),expose.flag=!1,expose.update=function(t){var s=this.parse(this.dom.getAttribute("data-height"),{}),e=this.breakpoints.sortOptions(Object.keys(s),!0,!1),i=$(this.dom).find(".calc-height").length>0?$(this.dom).find(".calc-height"):$(this.dom);$(this.dom).removeClass("btn-hide").addClass("btn-show"),e&&0!=s[e].close&&s[e]["min-height"]<i.outerHeight()?this.flag||this.change(s[e].close+"px"):($(this.dom).addClass("btn-hide").removeClass("btn-show"),this.show(!1))},expose.scrollTop=function(t){var s=$(t).parents(".read-more").offset().top;s-=50,$("html,body").animate({scrollTop:s+"px"})},expose.hide=function(){this.flag=!1,this.update()},expose.show=function(t){!1!==t&&(this.flag=!0),this.change("auto")},expose.change=function(t){var s=$(this.dom);s.removeClass("auto"==t?"closed":"opened").addClass("auto"==t?"opened":"closed"),"auto"==t?s.removeAttr("style"):s.height(t)},expose.isOpen=function(){return this.flag},expose.toggle=function(){this.isOpen()?this.hide():this.show()},expose.init=function(){var t=this;if(this.update(),this.breakpoints.change(this,function(){setTimeout(function(){t.update()},500)}),!this.dom.querySelector(".read-more-btn")){$(this.dom).append('<div class="read-more-btn"><button class="btn btn-primary btn-large btn-first">Ver mais <svg class="svg-icon-view-box-small right-icon"><use xlink:href="#svg-single-arrow-down" /></svg></button><button class="btn btn-primary btn-large btn-last hide">Ver menos <svg class="svg-icon-view-box-small right-icon"><use xlink:href="#svg-single-arrow-up" /></svg></button></div>')}$(this.dom).on("click",".read-more-btn:last > .btn, .read-more-btn:last .btn-divisor",function(s){$(this).hasClass("btn-last")&&t.scrollTop(this,$(this).parent(".read-more")),t.toggle.call(t),$(this).parent().find(".btn").toggleClass("hide")})}}); });    def('modal', function(){ instances.modal=[];var bodyTopPosition=0;expose.create=function(){return new this.Modal},expose.open=function(e,o,t,s,n){var c=this.create();return o&&c.setMode.apply(c,o.split(":").reverse()),t&&c.setStyle(t),s&&c.setEvents(s),c.setContent(e,!0),-1==document.body.className.indexOf("modal-open")&&(n?(bodyTopPosition=document.body.scrollTop||document.documentElement.scrollTop,$("body").addClass("googleCaptcha")):document.body.style.top="-"+(document.body.scrollTop||document.documentElement.scrollTop)+"px"),document.body.className+=" modal-open",c},expose.Modal=function(){this.buildStructure(),this.enableUIControl(),this.enableEscClose(),this.enableClickClose(),"function"==typeof crazyloadinit&&this.addScrollEvent(crazyloadinit),instances.modal.push(this),$(this.dom).parent().prepend('<svg width="70px" height="70px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="loading uil-ring"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><defs><filter id="uil-ring-shadow" x="-100%" y="-100%" width="300%" height="300%"><feOffset result="offOut" in="SourceGraphic" dx="0" dy="0"></feOffset><feGaussianBlur result="blurOut" in="offOut" stdDeviation="0"></feGaussianBlur><feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend></filter></defs><path d="M10,50c0,0,0,0.5,0.1,1.4c0,0.5,0.1,1,0.2,1.7c0,0.3,0.1,0.7,0.1,1.1c0.1,0.4,0.1,0.8,0.2,1.2c0.2,0.8,0.3,1.8,0.5,2.8 c0.3,1,0.6,2.1,0.9,3.2c0.3,1.1,0.9,2.3,1.4,3.5c0.5,1.2,1.2,2.4,1.8,3.7c0.3,0.6,0.8,1.2,1.2,1.9c0.4,0.6,0.8,1.3,1.3,1.9 c1,1.2,1.9,2.6,3.1,3.7c2.2,2.5,5,4.7,7.9,6.7c3,2,6.5,3.4,10.1,4.6c3.6,1.1,7.5,1.5,11.2,1.6c4-0.1,7.7-0.6,11.3-1.6 c3.6-1.2,7-2.6,10-4.6c3-2,5.8-4.2,7.9-6.7c1.2-1.2,2.1-2.5,3.1-3.7c0.5-0.6,0.9-1.3,1.3-1.9c0.4-0.6,0.8-1.3,1.2-1.9 c0.6-1.3,1.3-2.5,1.8-3.7c0.5-1.2,1-2.4,1.4-3.5c0.3-1.1,0.6-2.2,0.9-3.2c0.2-1,0.4-1.9,0.5-2.8c0.1-0.4,0.1-0.8,0.2-1.2 c0-0.4,0.1-0.7,0.1-1.1c0.1-0.7,0.1-1.2,0.2-1.7C90,50.5,90,50,90,50s0,0.5,0,1.4c0,0.5,0,1,0,1.7c0,0.3,0,0.7,0,1.1 c0,0.4-0.1,0.8-0.1,1.2c-0.1,0.9-0.2,1.8-0.4,2.8c-0.2,1-0.5,2.1-0.7,3.3c-0.3,1.2-0.8,2.4-1.2,3.7c-0.2,0.7-0.5,1.3-0.8,1.9 c-0.3,0.7-0.6,1.3-0.9,2c-0.3,0.7-0.7,1.3-1.1,2c-0.4,0.7-0.7,1.4-1.2,2c-1,1.3-1.9,2.7-3.1,4c-2.2,2.7-5,5-8.1,7.1 c-0.8,0.5-1.6,1-2.4,1.5c-0.8,0.5-1.7,0.9-2.6,1.3L66,87.7l-1.4,0.5c-0.9,0.3-1.8,0.7-2.8,1c-3.8,1.1-7.9,1.7-11.8,1.8L47,90.8 c-1,0-2-0.2-3-0.3l-1.5-0.2l-0.7-0.1L41.1,90c-1-0.3-1.9-0.5-2.9-0.7c-0.9-0.3-1.9-0.7-2.8-1L34,87.7l-1.3-0.6 c-0.9-0.4-1.8-0.8-2.6-1.3c-0.8-0.5-1.6-1-2.4-1.5c-3.1-2.1-5.9-4.5-8.1-7.1c-1.2-1.2-2.1-2.7-3.1-4c-0.5-0.6-0.8-1.4-1.2-2 c-0.4-0.7-0.8-1.3-1.1-2c-0.3-0.7-0.6-1.3-0.9-2c-0.3-0.7-0.6-1.3-0.8-1.9c-0.4-1.3-0.9-2.5-1.2-3.7c-0.3-1.2-0.5-2.3-0.7-3.3 c-0.2-1-0.3-2-0.4-2.8c-0.1-0.4-0.1-0.8-0.1-1.2c0-0.4,0-0.7,0-1.1c0-0.7,0-1.2,0-1.7C10,50.5,10,50,10,50z" filter="url(#uil-ring-shadow)"></path></svg>')},expose.Modal.prototype={mode:"normal",upmode:"",fx:{name:"fade",speed:200},visible:!1,onshow:function(){},onbeforeshow:function(){},onhide:function(){},onclose:function(e){if(e&&e.category){var o=e&&this.audienceObject(e);o&&hitAudience.countClick(o)}},audienceObject:function(e,o){return o=o||"","click"==e.type&&-1!=e.target.className.indexOf("icon-close")?o="fechar-modal-login":"click"==e.type&&-1!=e.target.className.indexOf("no-load")?o="fechar-clique-fora":"keyup"==e.type&&-1!=e.target.className.indexOf("modal-open")&&(o="fechar-esc-keyup"),e={reference:o,category:"login-"+e.category,action:"clique"}},onbeforeclose:function(){$("body").hasClass("googleCaptcha")&&(document.body.style.top=-1*bodyTopPosition+"px",$("body").removeClass("googleCaptcha"),$("body").removeClass("modal-open"))},visible_:!1,esc_:!1,click_:!1,queue_:[],setMode:function(e,o,t){t?this.fx.name=t:e&&(this.fx.name=e),e&&(this.closure.className+=" modal-mode-"+(this.mode=e)),void 0!==o&&(this.upmode&&(document.body.className=document.body.className.replace(" modal-"+this.upmode,"")),this.upmode=o,document.body.className+=" modal-"+this.upmode)},setEvents:function(e){for(var o in e)this[o]=e[o]},setStyle:function(e){$(this.dom).css(e)},setContent:function(e,o){if(!0===o&&(o=this.show),e instanceof jQuery&&(e=e.get(0)),e instanceof Node&&(e=e.outerHTML),"object"==typeof e){var t=null!=(Config||{}).servicename?Config.servicename:"/service/",s=(e.path||t)+"?json&loadComponent="+e.type+"&data="+encodeURIComponent(JSON.stringify(e.args))+"&configPath="+e.configPath;this.setMode(null,e.type),def.prototype.getjson.call(this,s,function(e){this.dom.innerHTML=e.body,o&&o.call(this),render()})}else-1==e.indexOf("\n")&&/^(https?:)?\/+[a-z0-9]|\..{2,4}$/.test(e)?def.prototype.getjson.call(this,e,function(e){this.dom.innerHTML=e.body,o&&o.call(this),render()}):(this.dom.innerHTML=e,o&&o.call(this),render())},show:function(e){if(this.visible=!0,this.closure.className=this.closure.className.replace(/\s+hide/,""),0==this.onbeforeshow())return!1;var o=this;"left"==this.fx.name?$(this.dom).animate({left:"0"},"normal",function(){e&&e.call(o),o.onshow(),render(),$(o.closure).addClass("no-load")}):"fade"==this.fx.name?$(this.dom).hide().fadeIn(this.fx.speed,function(){e&&e.call(o),o.onshow(),render(),$(o.closure).addClass("no-load")}):(e&&e.call(o),this.onshow(),$(o.closure).addClass("no-load"))},hide:function(e){this.visible=!1;var o=this;"left"==this.fx.name?($(this.closure).fadeOut(),$(this.dom).animate({left:"-100%"},"normal",function(){o.closure.className+=" hide",e&&e.call(o),o.onhide()})):"fade"==this.fx.name?$(this.dom).show().fadeOut(this.fx.speed,function(){o.closure.className+=" hide",e&&e.call(o),o.onhide()}):(this.closure.className+=" hide",e&&e.call(this),this.onhide()),this.upmode&&(document.body.className=document.body.className.replace(" modal-"+this.upmode,""));e:{for(var t=instances.modal.length;t--;)if(instances.modal[t].visible)break e;var s=Math.abs(parseInt(document.body.style.top));document.body.className=document.body.className.replace(/\smodal-open/g,""),document.body.removeAttribute("style"),window.scrollTo(0,s)}},enableUIControl:function(){var e=this;$(this.closure).on("click",".modal-close",function(o){o.preventDefault(),e.close(o);var t=$("head meta[name=viewport]"),s=t.attr("content");t.remove(),$("head").prepend('<meta name="viewport" content="'+s+'" />')})},enableEscClose:function(){this.esc_=!0},disableEscClose:function(){this.esc_=!1},enableClickClose:function(){this.click_=!0},disableClickClose:function(){this.click_=!1},addButtonClose:function(e){$(this.dom).prepend('<button class="btn modal-close" data-audience-click=\'{"reference":"fechar-modal-login","component":"'+e+'"}\'><i class="icon-close-2"></i></button>')},addHeader:function(e,o){var t="",s=this.dom;"object"==typeof e?(t=e.html,s=e.closure?this.closure:s):(e&&(t+="<h4>"+e+"</h4>"),o&&(t+='<p class="node"><small>'+o+"</small></p>")),t='<div class="modal-header">'+t+"</div>",$(".modal-header",this.dom).remove(),"BUTTON"==(this.dom.firstElementChild||{}).nodeName?$(this.dom.firstElementChild).after(t):$(s).prepend(t)},addScrollEvent:function(e){var o=this;$(this.dom).on("scroll",function(){e.apply(o,arguments)})},standalone:function(){for(var e=instances.modal.length;e--;){var o=instances.modal[e];o!==this&&(o.visible_=o.visible,o.visible&&o.hide(),this.queue_.push(instances.modal.splice(e,1)[0]))}},close:function(e){if(!1!==this.onbeforeclose()){e&&document.getElementsByClassName("modal-mode-babel-login").length&&(e.category=document.getElementsByClassName("modal-mode-babel-login")[0].dataset.category);for(var o=instances.modal.length;o--&&instances.modal[o]!==this;);if(-1!=o){for(var t=instances.modal.length;--t>o;)instances.modal.splice(t,1)[0].close();instances.modal.splice(o,1)}this.hide(function(){if(this.closure.parentNode.removeChild(this.closure),this.close=function(){},this.onclose(e),this.queue_.length){for(var o=this.queue_.length;o--;)this.queue_[o].visible_&&this.queue_[o].show();instances.modal=this.queue_}})}},buildStructure:function(){this.closure=document.createElement("div"),this.closure.className="modal",this.dom=document.createElement("div"),this.dom.className="modal-wrapper",this.closure.appendChild(this.dom),document.body.appendChild(this.closure)},unique:function(){for(var e=instances.modal.length;e--;)instances.modal[e]!==this&&instances.modal[e].close()}},window.addEventListener("keyup",function(e){switch(e.which||e.keyCode){case 27:var o=instances.modal&&instances.modal.slice(-1)[0];o&&o.esc_&&o.close(e)}}),window.addEventListener("click",function(e){var o=instances.modal&&instances.modal.slice(-1)[0];if(o&&o.click_){for(var t=window.SVGElementInstance&&e.target instanceof SVGElementInstance?e.target.correspondingUseElement:e.target;t&&("object"==typeof t.className||!t.className||-1==t.className.indexOf("modal-wrapper")&&-1==t.className.indexOf("loginbox"));)t=t.parentNode;t||o.close(e)}document.querySelector(".wrapper-header")&&document.querySelector(".wrapper-header").classList.remove("positioning")},!0); });    def('babel', function(){ "use strict";function like(e){action.call(this,"like",e)}function dislike(e){action.call(this,"dislike",e)}function action(e,i){return e?i?void lib["babel-login"].login().then(function(o){o.token&&lib["babel-service"].get({type:"message",service:e,id:i,params:{token:o.token}}).then(function(e){if(e.error)return alert(e.error),!1})}):(console.log("Informe o ID do comentário."),!1):(console.error("Informe o tipo da ação (like/dislike)."),!1)}expose.like=like,expose.dislike=dislike; });    def('babel-login', function(){ def("babel-login",["widget-profile","babel-service","babel","modal"],function(){"use strict";var e="babel.user.",o={opener:".babel-login, .pill.not-logged",modal:".modal",user:"#loginUser",password:"#loginPassword",login:"#login",logout:".logout, .pill.logged",message:"label.error",social:".login .loginWith a",changeView:".login .backToLogin a"};function t(){return!!widgetProfile&&widgetProfile.Login.isUserLoggedIn()}function n(){var o=this,t="object"==typeof widgetProfile&&widgetProfile.Settings.getAuth();events.emit(e+"login.success",null,["Usuário checado",t]),o.checkStatus().then(function(o){200==+o.code&&o.result&&o.result.user?5!=o.result.user.userStatus&&7!=o.result.user.userStatus||events.emit(e+"needNickname",null,["Usuário necessita um apelido"]):events.emit(e+"login.checked",null,["Usuário checado",o])},function(){setTimeout(function(){n.call(o)},1e3)})}function i(){var e,o=this,t=$.Deferred();return(e={product:"noticias",source:"UOL",auto_import:!0},console.debug("checkLogin ",e),lib["babel-service"].get({type:"user",service:"login",params:e||{}})).then(function(e){e&&"code"in e&&(200==+e.code||401==+e.code||428==+e.code)&&"result"in e&&"isLogged"in e.result?(o.session=e.result,o.session.code=+e.code,200===o.session.code&&o.session.isLogged&&o.persist(),t.resolve(o.session)):t.reject({type:"error",msg:"Houve um problema na autenticação do usuário. Tente novamente."})}),t.promise()}function s(o){o="function"==typeof o?o:function(){};var t=this;widgetProfile&&widgetProfile.Login.doLogout(!1,function(){t.session=!1;try{instances.header[0].showItens(0)}catch(e){console.error("[widget-profile] A função instances.header[0].showItens() não existe!")}events.emit(e+"logout.success",null,"Deslogado com sucesso!"),document.querySelector(".header, .bbolp-2014").querySelector("#uol-mail-link").querySelector(".mail-notification").innerHTML="";var n=document.querySelector(".news-notice .girouol #subscriber-cmp1"),i=!1;void 0!==typeof n&&null!==n&&(i=!0),i&&(n.value=""),o()})}function r(){clearTimeout(window.persistence)}function a(e){var o="",t=e.separator||"&";return e.separator&&delete e.separator,jQuery.each(e,function(e,n){o+=(o.length?t:"")+encodeURIComponent(e)+"="+encodeURIComponent(n)}),o}function l(e){if("boolean"==typeof e.isLogged&&localStorage.getItem("porteira-login")){var o=e.isLogged?"login-success":"login-failure",t=JSON.parse(localStorage.getItem("porteira-login"));localStorage.removeItem("porteira-login"),e={category:t.component,reference:t.network,action:o},"undefined"!=t.component&&hitAudience.countEvent(e)}else if("string"==typeof e){let o=document.getElementsByClassName("modal-wrapper")[0].dataset.category;localStorage.setItem("porteira-login",JSON.stringify({network:e,component:o}))}}expose.session=!1;var c={fields:o.user+","+o.password+","+o.login,inputs:o.user+","+o.password,enabled:function(e){$(c.fields).attr("disabled",!e)},hasFocus:function(){$(this).closest("label")["focusin"==event.type||"focus"==event.type?"addClass":"removeClass"]("focus")},changeView:function(e){e.preventDefault(),$(".login .modal-body").toggleClass("alternative")}},u={login:function(e){var o={network:{facebook:{sn:1,source:"FACEBOOK"},twitter:{sn:5,source:"TWITTER"}}[(e=$.extend(!0,{type:"login",network:"facebook"},e)).network].sn,type:e.type,url:location.protocol+"//"+location.host+'/service/?loadComponent=babel-login&data={"closeWindow":true}'};l(e.network),c.enabled(!1);var t=window.open("","socialLogin",a({separator:",",width:600,height:600,scrolling:"no",statusbar:"no",resizeable:"no"}));lib["babel-service"].get({type:"user",service:"socialStart",params:{sn:o.network,social_auth_type:o.type,url_callback:o.url}}).then(function(e){var n={separator:"&",sn:o.network,"x-uol-social-tk":e.result.socialtoken};t.location.href="https://social.api.uol.com.br/oauth?"+a(n)})},select:function(e){e.preventDefault(),u.login({network:$(this).text().trim().toLowerCase()})},attempts:0,callback:function(e){var o=lib["babel-login"];if(e.success){var t=function(){i.call(o).then(function(e){!e.isLogged&&u.attempts<=1?(u.attempts++,setTimeout(t,1e3)):(u.attempts=0,g.instance&&g.newWindow&&g.close&&g.close(),events.emit("babel.user.login.success",null,["Logado com sucesso!",g]),o.loginRegister({isLogged:e.isLogged}))},function(){setTimeout(function(){u.callback.call(null,e)},1e3)})};setTimeout(t,100)}else d.error("Ocorreu um erro na autenticação por Rede Social. Tente novamente mais tarde!"),o.loginRegister({isLogged:!1})}},g={template:null,instance:null,newWindow:!0,getTemplate:function(e,o){if(g.template)g.template=g.template.replace(/(:"login)(-\w+)*/gi,"$1-"+o),e();else{var t={type:"babel-login",args:{page:window.location.href.replace(/#.*/,""),category:o}},n=new XMLHttpRequest;n.open("GET","/service/?loadComponent="+t.type+"&data="+encodeURIComponent(JSON.stringify(t.args))),n.onload=function(){g.template=n.responseText,e()},n.send()}},open:function(o){o.preventDefault();var n=o.currentTarget.dataset.category||"undefined",i=$.Deferred(),s={action:"open"};if("undefined"!=n&&(s.metrics={category:n}),console.debug("BABEL OPEN",n),widgetCustom[n]){let e=window.widgetCustom[n]||{};s.loginStyle={hideOutdoor:!1,title:e.titulo,subtitle:e.texto}}var r=function(){widgetProfile.View.widgetModal(s,function(){console.debug("OPEN to login! - modal.open",n)})};401===lib["babel-login"].session.code&&lib["babel-login"].isLogged()||428===lib["babel-login"].session.code?lib["babel-login"].logout(r):r();var a=o.data&&o.data.instance||{};if(!!t.apply(a)){var l=$(this).data("config")||{};events.emit(e+"logged",null,["Usuário logado!",l])}return i.promise()},close:function(){g.instance.close&&g.instance.close()}},d={login:function(o){var t=o.data.instance;t.loginRegister("uol"),t.session=!1,t.login().then(function(o){o.type&&"error"==o.type?(d.error(o.msg),t.loginRegister({isLogged:"error"!=o.type})):(console.debug("self.login else",o),t.loginRegister({isLogged:!0}),events.emit(e+"login.success",null,["Logado com sucesso!",g]))})},logout:function(o){var t=o.data.instance;s.call(t),t.unpersist(),events.emit(e+"logout.success",null,"Deslogado com sucesso!"),"object"==typeof widgetProfile&&widgetProfile.reloadWidget()},error:function(o){$(".login .form").addClass("hasError").find(".error").text(o).removeClass("hidden").end().find("input").filter(function(){return""==this.value}).first().focus(),c.enabled(!0),l({islogged:!1}),events.emit(e+"login.fail",null,o)}};$("body").on("close",o.modal,g.close).on("click",o.opener,{instance:expose},g.open).on("click",o.login,{instance:expose},d.login).on("click",o.logout,{instance:expose},d.logout).on("click",o.social,u.select).on("click",o.changeView,c.changeView).on("focusin focusout",c.inputs,c.hasFocus),expose.login=function(){var e=$.Deferred();return this.isLogged()?(events.emit("babel.user.login.success",null,["Logado com sucesso!",g]),e.resolve(this.session)):function e(){var t=this,n=$.Deferred(),i=$(o.user).val(),s=$(o.password).val();if($(o.message).html(""),console.debug("doLogin"),!i||!s){var r=i?"Informe a senha.":"Informe o usuário.";return n.resolve({type:"error",msg:r})}return $.ajaxFrame({url:lib["babel-service"].routes.url.auth,data:{user:i,pass:s},callback:function(){t.checkStatus().then(function(e){n.resolve(e.isLogged?e:{type:"error",msg:"Email ou senha informados estão incorretos."})},function(){setTimeout(function(){e.call(t)},1e3)})}}),n.promise()}.call(this)},expose.logout=s,expose.modalLogin=g.open,expose.isLogged=t,expose.socialLogin=u.login,expose.whereAmI=function(){return lib["babel-service"].get({type:"user",service:"socialSimpleWhereAmI"})},expose.setSession=n,expose.checkStatus=i,expose.persist=function e(){var o;r(),(o={type:"user",service:"ping",params:{token:lib["babel-login"].session.token}},lib["babel-service"].get(o)).then(function(o){o.error||"pong"!==o.result.ping||(window.persistence=setTimeout(function(){e()},9e5))})},expose.unpersist=r,expose.loginRegister=l,window.callbackSocialLogin=u.callback,window.onfocus=function(e){var o=lib["babel-login"];if(e.currentTarget===window&&o){var t=o.isLogged(),i=function(){for(var e=document.cookie.split(";"),o=0;o<e.length;o++){for(var t=e[o];" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf("CAUBR01="))return t.substring("CAUBR01=".length,t.length)}return"eos"}();(!t&&"eos"!=i||t&&"eos"==i)&&n.call(o)}};var p=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;"xs"==lib.breakpoints.breakpoint.name&&p&&document.addEventListener("widgetNotifyModalLogin",function(e){var o=e.detail;"modal-open"===o.action?$(".header").addClass("modal-login-ios"):"modal-close"===o.action&&$(".header").removeClass("modal-login-ios")},!0),jQuery.ajaxFrame=function(e){var o,t,n;e=jQuery.extend({data:{},dataType:"post",callback:jQuery.noop},e);var i="ajax-frame-"+(new Date).getTime(),s=jQuery('<iframe scrolling="no" frameborder="0" name="'+i+'"></iframe>');for(n in o='<form action="'+e.url+'" method="'+e.dataType+'" target="'+i+'">',e.data)e.data.hasOwnProperty(n)&&(o+='<input type="hidden" name="'+n+'" value="'+e.data[n]+'"/>');o+="</form>",t=jQuery(o),s.hide().appendTo("body"),t.appendTo("body").hide(),window.setTimeout(function(){s.load(function(){window.setTimeout(function(){s.remove()},500),t.remove(),e.callback.apply(this,arguments)}),t.submit()},500)}}); });    def('babel-service', function(){ def("babel-service",["/exposejs/jsonp-promise"],function(){"use strict";var e="https://n.comentarios.uol.com.br/",o={url:{auth:"https://acesso.uol.com.br/login.html?skin=comentarios&dest=REDIR|"+location.protocol+"//www3.uol.com.br/interacao/comentarios/blank.htm"},messages:{subject:"v1/messages/subject/{id}",editor:"v1/messages/editor-recommended/{id}",likesBySubject:"v1/users/likes-by-subject/{id}",parent:"parent/{id}"},subject:{retrieve:"ws/v1/subject/retrieve/{id}",simpleRetrieve:"ws/v1/subject/simple-retrieve/"},user:{login:"ws/v2/user/login",logout:"ws/v1/user/logout",create:"ws/v2/user/create",update:"ws/v2/user/update",ping:"ws/v1/user/ping",updateNotification:"ws/v1/user/update/reply-notification",updateNotificationType:"ws/v1/user/update/reply-notification-type",socialStart:"ws/v1/user/social/start-session",socialSimpleWhereAmI:"ws/v1/user/social/simple-where-am-i",socialWhereAmI:"ws/v1/user/social/where-am-i"},message:{create:"ws/v2/message/create",preview:"ws/v1/message/preview",del:"ws/v1/message/delete/{id}",edit:"ws/v2/message/edit/{id}",createSubject:"ws/v2/message/create/subject",pin:"ws/v1/message/pin/{id}/{id}",unpin:"ws/v1/messager/unpin/{id}",like:"ws/v1/message/like/{id}",dislike:"ws/v1/message/dislike/{id}"}};expose.get=function(s){var a;if(a={user:e,message:e,messages:"https://view.comentarios.uol.com.br/",subject:"https://view.comentarios.uol.com.br/"}[s.type]+function(e){return o[e.type][e.service].replace(/{id}/,e.id)}(s),s.params){var i;for(i in s.params)s.params.hasOwnProperty(i)&&"sort"!==i&&(s.params[i]=encodeURIComponent(s.params[i]));a+="?"+$.param(s.params)}return lib["jsonp-promise"]&&lib["jsonp-promise"].jsonp(a,s.service).error(function(e){var o="Ocorreu uma falha na requisição de dados.",a=s.root&&s.root.dom||!1;a?events.emit("babel.service.feedback",a,o):events.emit("babel.service.feedback",null,o)})},expose.routes=o,expose.messageHandler=function(e){if(!e)return console.log("Sem param"),!1;var o={api:{423:"Assunto inativo",425:"Usuário não encontrado",426:"Assunto não encontrado",427:"Mensagem não encontrada",428:"Você já avaliou esta mensagem",431:"Token de autenticação inválido",432:"Proteção antiflood",433:"Json inválido",434:"Critério de avaliação inválido",435:"Critério de avaliação não encontrado",436:"Usuário não tem permissão",440:"Falha na autenticação",444:"Tema não encontrado",446:"Falha na autorização",451:"Turing inválido",458:"Avaliação e comentários obrigatórios",500:"Operação não realizada, verifique os dados*"},friendlyMessage:{200:{message:{create:"Seu comentário foi enviado com sucesso.",del:"Seu comentário foi removido com sucesso.",preview:"",edit:"",createSubject:"",pin:"",unpin:"",like:"",dislike:""}},423:"Esta discussão foi encerrada",425:"Usuário não encontrado",426:"Assunto não encontrado",427:"Mensagem não encontrada",428:"Você já avaliou esta mensagem",431:"Token de autenticação inválido",432:"Ops!\n Aguarde alguns instantes antes de publicar seu novo comentário",433:"Json inválido",434:"Critério de avaliação inválido",435:"Critério de avaliação não encontrado",436:"Usuário não tem permissão",440:"Tempo para responder foi excedido.\n Por favor, faça novamente o login.",444:"Tema não encontrado",446:"Falha na autorização",451:"Turing inválido",458:"Avaliação e comentários obrigatórios",500:"Operação não realizada, verifique os dados*"},events:{200:"babel:success",400:"babel:invalid-parameter",422:"babel:subject:invalid-size",431:"babel:user:nickname",423:"babel:subject:close",432:"babel:user:anti-flood",436:"babel:user:not-allowed",440:"babel:session-expired"}},s={},a="Seu comentário foi enviado com sucesso.",i=+e.data.code,r=e.data.callback||jQuery.noop;if(!i)throw"Erro na API";200===i?(s=e.data.result,o.friendlyMessage[i][e.type]&&(a=o.friendlyMessage[i][e.type][e.service]),+s.pending_messages&&+s.user_pending_messages&&(a={badword_disapproved:"Seu comentário contém URL ou palavras de abuso. \nEscreva novamente seu comentário em <var>15</var> segundos",pending:"Seu comentário foi enviado com sucesso para moderação. \nHá "+s.pending_messages+" "+(1==s.pending_messages?"comentário":"comentários")+" na fila de moderação. "+s.user_pending_messages+" "+(1==s.user_pending_messages?"foi enviado":"foram enviados")+" por você."}[s.moderation_status.toLowerCase()],"badword_disapproved"==s.moderation_status.toLowerCase()&&(i=432))):a=o.friendlyMessage[i][e.type]?o.friendlyMessage[i][e.type][e.service]:o.friendlyMessage[i];var n={msg:a,code:i,callback:r};return e.root.dom?(n.button=e.button,events.emit("babel.service.feedback",e.root.dom,n)):events.emit("babel.service.feedback",null,n),a}}); });    def('comments', function(){ def("comments",function(){"use strict";include("angular","babel","teaser","modal","/exposejs/jsonp-promise");var e=e||{};$("body").on("click",".open-comments",function(){var e=$(this);if("string"==typeof(t=e.data("config")||!1))var t=JSON.parse(t.replace(/\'/g,'"'));if(!t||!t.id)return console.log("Não há dados de configuração setados neste botão"),!1;e.removeAttr("data-config");var i={type:"comments",args:$.extend({},t)};i.args.hasOwnProperty("modalOpen")&&(i.args.modalOpen=":"+i.args.modalOpen);var n=lib.modal.open(i,i.type+(i.args.modalOpen||""));n.onshow=function(){$(".babel-login",this.closure).data("modalOpen",t.modalOpen)},n.onbeforeshow=function(){var e=$(".comments:first",this.closure),i=e.data("config"),o=$.extend(!0,{},i,t);e.data("config",o),n.addButtonClose("login-comments"),render.call(this)},n.onclose=function(){}}),expose.init=function(){var t=angular.module("comentario",[]).filter("html",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]),i=this;this.$dom=$(this.dom),window.socialSimpleWhereAmI=window.socialSimpleWhereAmI||"";i.$dom.hasClass("display-inline");var n,o=this.$dom.data("initial-size");this.babel=lib.babel,this.babelLogin=lib["babel-login"],this.babelService=lib["babel-service"],t.constant("config",(n=i.$dom.data("config")||{},i.$dom.removeAttr("data-config"),n)),t.value("docs",[]),t.value("tabFilter",{type:"all",size:o||5,sort:"created:desc"}),t.run(function(){events.push("babel.service.feedback",i.$dom,function(e){var t=e.split?e:e.msg,n=e.code||0,o=e.callback||null,r=(t=t.split("\n")).length,s=t[0],a="";if(r>1){for(var c=1;c<r;c++)a+=(1==c?"<p>":"<br/>")+t[c];a+="</p>"}var l,u='<div class="row alert alert-'+(200===n?"success":"danger")+'"><h3>'+s+"</h3>"+a+'<a class="alert-close"><i class="icon-close-2"></i></a></div>',d=null==e.button?i.$dom.find(".feedback-service").first():i.$dom.find(e.button).parents(".comment-reply").find(".feedback-service"),f=d.offset().top,m=d.parent();function p(e){d.css("height",0).parent().css("height","auto"),window.setTimeout(function(){d.removeClass("show").html("")},300),e&&e.call&&e.call(this),closingAlert&&window.clearTimeout(closingAlert)}m.css("height",m.outerHeight()),window.scrollY>f&&window.scrollTo(0,d.offset().top),d.html(u).addClass("show"),l=d.find(".alert").outerHeight(),d.add(m).css("height",l).find(".alert").addClass("show"),d.find(".alert-close").bind("click",function(){p(o)}),window.closingAlert=window.setTimeout(function(){d.find(".alert").length&&p(o)},3e4)}),$(".feedback-service").ajaxError(function(e,t,n){events.emit("babel.service.feedback",i.$dom,"Error requesting page "+n.url)})}),t.filter("brDate",[function(){return function(e){return e.trim().replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,"$3/$2/$1 $4:$5:$6")}}]),t.filter("prettyDate",[function(){return function(e){var t=new Date((e||"").replace(/-/g,"/").replace(/[TZ]/g," ")),i=((new Date).getTime()-($(window).data("server-date-diff")||0)-t.getTime())/1e3,n=Math.floor(i/86400);if(!(isNaN(n)||n<0)){var o=Math.ceil(n/7);return 0===n&&((i<60?"agora":i<120&&"1 minuto")||i<3600&&Math.floor(i/60)+" minutos atrás"||i<7200&&"1 hora atrás"||i<86400&&Math.floor(i/3600)+" horas atrás")||1==n&&"ontem"||n<7&&n+" dias atrás"||7==n&&"1 semana atrás"||o<=5&&Math.ceil(n/7)+" semanas atrás"||o>5&&e.replace(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}).*/g,"$3/$2/$1 $4h$5")}}}]),t.filter("formatDate",[function(){return function(e){return e.trim().replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,"$1-$2-$3T$4:$5:$6Z")}}]),t.filter("inversedDate",[function(){return function(e){if(!(e instanceof Date))return!1;function t(e){return(e<10?"0":"")+e}return e.getFullYear()+t(e.getMonth())+t(e.getDate())+t(e.getHours())+t(e.getMinutes())+t(e.getSeconds())}}]),t.filter("htmlentities",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]),t.directive("ngImgonerror",function(){return{restrict:"A",link:function(e,t,i){t.bind("error",function(){$(this).attr("src","https://imguol.com/c/_layout/v2/components/comments/avatar.png").attr("title","O avatar não foi encontrado!").parent().addClass("img-error")})}}}),t.directive("ngHasTeaser",function(){return{restrict:"A",link:function(e,t,n){var o=t.find("textarea"),r=t.find(".teaser"),s=n.ngHasTeaser||960;i.teaser.create({dom:t,input:o,output:r,invert:!0,limit:s})}}}),t.directive("ngHasFocus",function(){return{restrict:"A",link:function(e,t,i){$(t).closest("label")["focusin"==event.type||"focus"==event.type?"addClass":"removeClass"]("focus")}}}),t.directive("ngAutoHeight",function(){return{restrict:"A",link:function(e,t,i){t.on("keyup",function(){var e=$(this),t=e.val(),i=e.css("max-height"),n=i.replace(/(\d+).*/,"$1");e.next().is(".resize")||e.after('<div class="resize"/>');var o=e.next(".resize");t=t.replace(/\n/g,"<br/>"),o.html(t+'<br class="lbr" />'),i.length&&e.css("overflow",o.height()>=n?"auto":"hidden"),e.css("height",o.height())}).on("keydown",function(){if($(this).hasClass("babel-login"))return!1}).on("focus",function(e){$(this).hasClass("babel-login")&&(e.preventDefault(),$(this).blur())}).on("focus",function(e){$("head meta[name=viewport]").remove(),$("head").prepend('<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" />')}).focusout(function(){$("head meta[name=viewport]").remove(),$("head").prepend('<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=10.0, user-scalable=yes" />')})}}}),t.service("Rating",function(){this.get=function(e){var t=e?$(e).first():i.$dom.find(".comment-post").first(),n=t.find(".rating").find(".rating-star").length,o=t.find(".rating").attr("data-rating");return!(!n||!o)&&o/n*100},this.reset=function(e){var t=e?$(e).first():i.$dom.find(".comment-post").first();t.find(".rating").find(".rating-star").removeClass("on"),t.find(".rating").attr("data-rating","0")},this.set=function(e){for(var t=[],i=1;i<=5;i++)t.push(parseInt(+e/20)>=i);return t}}),t.factory("User",[function(){var e,t={},n="https://imguol.com/c/_layout/v2/components/comments/avatar.png",o="Usuário não logado";return{get:function(e){return e?e in t&&t[e]:t},set:function(r,s,a){e=i.babelLogin.session,r&&r in e&&(e[r]=s),t.isLogged=e.user&&!0,t.uniqueId=e.user&&e.user.uniqueId,t.loggedWithFacebook=e.user&&"facebook"===e.user.socialNetwork.toLowerCase(),t.loggedWithTwitter=e.user&&"twitter"===e.user.socialNetwork.toLowerCase(),t.loggedWithUol=e.user&&"uol"===e.user.socialNetwork.toLowerCase(),"facebook"===window.socialSimpleWhereAmI?(t.loggedWithTwitter=!1,t.loggedWithFacebook=!0):"twitter"===window.socialSimpleWhereAmI&&(t.loggedWithTwitter=!0,t.loggedWithFacebook=!1),t.replyNotification=e.user&&e.user.replyNotification,t.avatarUrl=(e.user&&e.user.avatarUrl||n).replace("http:","https:"),t.alternativeText=e.user&&e.user.username||o},getSession:function(){return e},setSession:function(){return i.babelLogin.setSession()}}}]),t.factory("Likes",["$filter","User","config",function(e,t,n){var o={};return{getFromUser:function(e){var r=$.Deferred(),s=t.get("isLogged",Object.keys(o));return!s||Object.keys(o).length?(s||(o={}),r.resolve(!0)):(i.babelService.get({type:"messages",root:{dom:i.$dom},service:"likesBySubject",id:n.id}).then(function(e){return o=e.docs||{},r.resolve(!0)}),r.promise())},apply:function(e){return e in o},it:function n(r,s,a,c){function l(){c||(r.like++,r.likedByMe=!0,o[r.id]=e("inversedDate")(new Date))}t.get("isLogged")?(i.babel[s](r.id),l()):(l(),window.setTimeout(function(){t.set(),n(r,s,a,!0)},1e3))}}}]),t.service("Action",["Subject","User","Likes","Rating","config",function(e,t,n,o,r){var s=[];function a(){var e=$.Deferred();return s.length?e.resolve(s):i.babelLogin.whereAmI().then(function(t){if(200==+t.code)for(var i in t.result){var n=t.result[i];s.push(n.snname)}e.resolve(s)}),e.promise()}this.create=function(){var e=this,n=t.getSession(),s=(e.newText||"").trim(),c=o.get();if(!c&&!s.length)return events.emit("babel.service.feedback",i.$dom,"Avaliação ou comentário obrigatórios."),!1;a().then(function(t){var a=t.join(",").toUpperCase()||"",l={type:"message",root:{dom:i.$dom},service:"create",params:{subject:r.id,token:n.token,product:"noticias",source:"UOL"}};if(""!==s&&(l.params.message=s),c&&(l.params.rating='{"344": "'+c+'"}'),a.length){("FACEBOOK"===a?i.$dom.find('input[id^="share-fb"]').is(":checked"):i.$dom.find('input[id^="share-tt"]').is(":checked"))&&(l.params.social_networks=a)}i.babelService.get(l).then(function(t){if(l.data=t,i.babelService.messageHandler(l),200==+t.code){o.reset(),e.newText="",e.refresh();hitAudience.countEvent({reference:"escrever-comentario",action:"logged-user-success",component:"login-comments"})}})})},this.shareComment=function(e){("facebook"==e||"twitter"==e)&&a().then(function(t){-1==t.indexOf(e)&&i.babelLogin.socialLogin({type:"auth",root:{dom:i.$dom},network:e,callback:"socialAuthentication"})})},this.replyNotification=function(){var e=this,n=t.getSession(),o=this.replyByEmail||!1,r={type:"user",service:"updateNotification",root:{dom:i.$dom},params:{reply_notification:o,token:n.token,product:"noticias",source:"UOL"}};i.babelService.get(r).then(function(n){r.data=n,200!=+n.code?i.babelService.messageHandler(r):(t.set("user",n.result),e.refresh())})},this.del=function(e,n){var o=this,r=n||e,s=t.getSession(),a={type:"message",root:{dom:i.$dom},service:"del",id:r.id,params:{token:s.token}};i.babelService.get(a).then(function(t){if(a.data=t,i.babelService.messageHandler(a),200==+t.code){if(r.del=!0,n)e.reply_count>0&&e.reply_count--;o.refresh()}})},this.reply=function(e,n){var o=this,s=n.currentTarget,a=t.getSession(),c=e.replyText[e.id],l={type:"message",service:"create",button:s,root:{dom:i.$dom},params:{subject:r.id,parent:e.id,message:c,token:a.token}};i.babelService.get(l).then(function(t){l.data=t,i.babelService.messageHandler(l),200==+t.code&&(e.replyText[e.id]="",e.replyit=!0,setTimeout(function(){e.replyit=!1,o.refresh()},5e3))})},this.like=function(e,t){return n.it(e,"like",t)},this.logout=function(){$(".comment-fadOut").fadeOut(function(){i.babelLogin.logout()})},this.dislike=function(e){return n.it(e,"dislike")}}]),t.factory("Subject",["config","tabFilter",function(e,t){if(e.id){var n={comments:{},subject:{}},o=function(t){return i.babelService.get({type:"messages",root:{dom:i.$dom},service:t.service,id:e.id,params:t.params})};return{get:function(e){return n.subject[e]||n.subject},load:function(r){var s=$.Deferred();function a(){o(r).then(function(e){return n.comments="docs"in e?e:void 0,s.resolve({data:n})})}return(r=angular.extend({params:{}},r)).service="subject",r.next&&(r.params.next=r.next),r.prev&&(r.params.prev=r.prev),t.type=r.type||"all",r.params.size=t.size,r.size&&(r.params.size=r.size),"like"===r.type&&(t.sort=r.params.sort),"all"!=r.type&&(r.params.sort="like:desc,created:desc"),"editor"===r.type&&(r.service="editor"),Object.keys(n.subject).length?a():function(t){return i.babelService.get({type:"subject",service:"retrieve",root:{dom:i.$dom},id:e.id,params:t.params})}(r).then(function(i){if(200!=+i.code)return s.resolve({hasError:!0,result:i});if(!r.type&&i.result){var o=e.likes&&+e.likes||1,c={like:function(){+i.result.highestMessageLikes>=o&&(t.type="like",r.params.sort="like:desc,created:desc")},editor:function(){i.result.hasEditorRecommendation&&(t.type="editor",r.service="editor")}};(e.sequence&&e.sequence.split(",")||[]).reverse().forEach(function(e){c[e]&&c[e]()})}n.subject=i,a()}),s.promise()}}}}]),t.controller("CommentsController",["$scope","Subject","User","Action","Rating","Likes","config","docs","tabFilter",function(t,n,o,r,s,a,c,l,u){var d=this;o.setSession(),t.btnSizeReplies=function(){return"xs"==lib.breakpoints.breakpoint.name?"btn-small":"btn-medium"},d.changeTab=function(e){u.type!=e&&(l=[],u.type=e,d.load({type:e}))},d.getMore=function(e){hitAudience.countClick({component:"comments",reference:"ver-mais-comentarios"});var n=i.$dom.find(".comment").last();if(c["display-inline"])n.offset().top,n.outerHeight();else n.position().top,n.outerHeight();i.$dom.children().first().append('<div class="overlay" />'),d.load({type:u.type,id:c.subjectId,size:t.nextsize,next:d.next}),setTimeout(function(){i.$dom.find(".overlay").remove()},100),d.refresh()},d.filter=function(){var e=o.get("isLogged"),t=o.get("uniqueId");function i(i){return i.hasReplies=+i.reply_count,i.commentedWithFB="facebook"===i.social_network.toLowerCase(),i.commentedWithTT="twitter"===i.social_network.toLowerCase(),i.has_rating&&(i.rating=s.set(i.rating_average)),e&&(i.isMyMessage=i.unique_user_id===t),i.likedByMe=a.apply(i.id),i}return l.filter(function(e){i(e),e.replies.filter(function(e){i(e)})}),l},d.firstComment=function(){null==o.get("isLogged")&&!c["display-inline"]&&c["first-comment"]&&window.setTimeout(function(){$(".modal .comments .babel-login:visible").trigger("click")},300)},d.openReplies=function(e){if(e.hasReplies&&!e.replies){var t=o.getSession(),r=n.get("result"),s={type:"messages",service:"parent",root:{dom:i.$dom},id:e.id,params:{size:20,repository:r.repository,token:t.token}};i.babelService.get(s).then(function(e){angular.forEach(d.docs,function(t,i){if(t.id==coment.id)return t.replies.push(e.docs),!1}),d.docs=d.filter()})}e.repliesOpened=!e.repliesOpened},d.getReplies=function(e){if(e.hasReplies>3){if(e.replies.length>3)var r=t.nextsizereplies;else r=t.nextsizereplies+3;e.nextReplies||(e.nextReplies="");var s=o.getSession(),a=n.get("result"),c={type:"messages",service:"parent",root:{dom:i.$dom},id:e.id,params:{size:r,repository:a.repository,next:e.nextReplies,token:s.token}};i.babelService.get(c).then(function(t){angular.forEach(d.docs,function(i,n){if(i.id==e.id)return e.nextReplies||t.docs.splice(0,3),e.nextReplies=t.next,angular.forEach(t.docs,function(e,t){i.replies.push(e)}),!1}),d.refresh()}),hitAudience.countClick({component:"comments",reference:"ver-mais-respostas"})}},d.del=r.del,d.reply=r.reply,d.logout=r.logout,d.create=r.create,d.replyNotification=r.replyNotification,d.shareComment=function(e){return window.socialSimpleWhereAmI=e,d.refresh(),r.shareComment(e)},d.like=function(e,t){return d.refresh(),a.it(e,"like",t)},d.dislike=function(e){return a.it(e,"dislike")},d.load=function(e){i.$dom.attr("data-loaded","true"),n.load(e).then(function(e){var i=e.data;if(e.hasError)d.hasError=!0;else{if(i.subject&&i.subject.result){d.subject=i.subject;var n=d.subject.result,o=+n.total;n.hasRating&&(o+=+n.totalRatings+ +n.totalCommentsWithRatings),n.replies&&(o+=+n.replies),d.isClosed=n.isClosed,d.info=n,d.total=o,d.title=d.title||d.info.description}if(i.comments){for(var r=i.comments.docs.length,s=0;s<r;s++)i.comments.docs[s].avatar=i.comments.docs[s].avatar.replace("http://","//");l=l.concat(i.comments.docs),d.docs=d.filter(),d.tabActive=u.type,d.next=i.comments.next,d.prev=i.comments.prev}}d.isVisible=!0,t.$apply(),render()})},d.whereAmI=function(){i.babelLogin.whereAmI().then(function(e){if(200==+e.code){for(var t in e.result){var i=e.result[t];window.socialSimpleWhereAmI=i.snname}d.refresh()}})},d.refresh=function(){o.set(),t.user=o.get(),t.user.isLogged||(d.newText=""),d.docs=d.filter(),t.$$phase||t.$apply()},d.isDebug=c.debug||!1,d.title=c.title||e.mediaTitle||"",d.subtitle=c.subtitle||"",events.push("babel.user.logged",null,function(e,t){d.refresh(),console.log("logged",e,t)}),events.push("babel.user.login.checked",null,function(e,t){""===window.socialSimpleWhereAmI&&(window.socialSimpleWhereAmI="Request Realizado!",d.whereAmI()),d.refresh(),console.log("login.checked",e)}),events.push("babel.user.login.success",null,function(e,t){c["display-inline"];d.refresh(),t.def&&t.def(),console.log("login.success",e)}),events.push("babel.user.login.fail",null,function(e){d.refresh(),console.log("login.fail",e)}),events.push("babel.user.needNickname",null,function(e){d.refresh(),console.log("needNickname",e)}),events.push("babel.user.logout.success",null,function(e){d.refresh(),console.log("logout.success",e)}),d.load()}]),angular.bootstrap(this.dom,["comentario"])}}); });    def('ads', function(){ !function(){"use strict";include("breakpoints"),expose.update=function(){var e=this.parse(this.dom.getAttribute("data-ads"),{}),i=this.parse(this.dom.getAttribute("data-position")),t=this.dom.getAttribute("data-tag"),a=!0;if(void 0!==e.push){a=e.push;delete e.push}var s=[],n=Object.keys(e);for(var d in n)if(n.hasOwnProperty(d)){var r=n[d];r&&r.match(/(xs|sm|md|lg)/)&&s.push(r)}for(var o=this.breakpoints.sortOptions(s),h=0;h<o.length;h++)if(this.breakpoints.checkin(o[h],!!e[o[h]])){if(e[o[h]])var l=o[h];break}if($(this.dom).children().hide().removeClass("visible"),l){if($(this.dom).show().children().each(function(){this.id.match(e[l])&&$(this).show().addClass("visible")}),!$(this.dom).children(".visible").length){var p=document.createElement("div"),u=document.querySelectorAll("[id*=banner-"+e[l]+"]").length+1;if("120x35-area"!=e[l]&&"120x35-area-2"!=e[l]&&"120x35-2-area"!=e[l]?p.id="banner-"+e[l]+"-"+u:p.id="banner-"+e[l],"banner-responsive-vertical-1"==p.id&&0==document.querySelectorAll("[id*=banner-responsive-top-vertical-1]").length&&(p.id="banner-responsive-top-vertical-1"),""!=i&&-1!=p.id.indexOf("banner-300x250-area-")&&(p.id="banner-300x250-area-"+i),this.dom.appendChild(p),-1!=p.id.indexOf("banner-responsive-middle-2-horizontal-area-")&&-1!=p.id.indexOf("banner-responsive-middle-2-horizontal-area-2"))a=!1;a&&!$("body").hasClass("modal-open")&&(t?window.uolads.push({id:p.id,customTargetings:{tag:t}}):window.uolads&&window.uolads.push({id:p.id}))}}else this.dom.style.display="none"},expose.init=function(){this.update(),this.breakpoints.change(this,function(){this.update()})}}(); });    def('share', function(){ include("breakpoints","modal"),expose.view={},expose.socialpage=[],expose.omniturereferences={},expose.update=!0,expose.tpl={link:'<div class="link"><span>compartilhar</span><svg class="svg-icon svg-icon-share-right"><use xlink:href="#svg-share-right" /></svg></div>',more:'<div class="share-item more-item clearfix"><div class="share-item social-item more" data-ref="more"><div class="table"><div><svg class="icon-more"><use xlink:href="#svg-more" /></svg></div></div></div><div class="share-item group"><div class="overflow">{{group}}</div></div></div>',after:'<div class="share-item after">{{group}}</div>',component:'<div class="share-item social-item comp-{{name}}" data-ref="{{name}}" data-target-click><div class="table">{{component}}</div></div>',def:'<div class="share-item social-item {{name}}" data-ref="{{name}}" data-target-click><div class="table"><div><svg class="icon-{{name}}"><use xlink:href="#svg-{{svg}}"/></svg><span class="count hidden"></span></div></div></div>'},expose.defaultapis={general:{"follow-title":!1,kicker:!1,title:!1,description:!1,image:{src:!1},date:!1,site:!1,url:!1,redirect:!1,app_id:!1},facebook:{count:["{{protocol}}//graph.facebook.com/?id={{link}}",function(){try{return this.share.share_count}catch(e){return!1}}],sharing:{defaults:{newtab:!0,host:"https://tm.uol.com.br/bt/facebook_auth/facebook-check-login.html?group=B&url_share=//www.facebook.com/dialog/feed",params:{app_id:!1,display:"popup",link:!1,redirect_uri:!1,quote:""}}},newwindow:"width=626,height=316,left=350,top=350"},twitter:{sharing:{defaults:{newtab:!0,host:"{{protocol}}//twitter.com/intent/tweet",params:{url:!1,text:!1,via:!1,hashtags:!1}}},newwindow:"width=450,height=270,scrollbars=yes,left=350,top=350"},pinterest:{count:["{{protocol}}//api.pinterest.com/v1/urls/count.json?url={{link}}",function(){try{return this.count}catch(e){return!1}}],sharing:{defaults:{newtab:!0,host:"{{protocol}}//br.pinterest.com/pin/create/button/",params:{url:!1,media:!1,description:!1}}},newwindow:"width=700,height=300"},linkedin:{sharing:{defaults:{newtab:!0,host:"{{protocol}}//www.linkedin.com/shareArticle",params:{url:!1,mini:!0,title:!1,summary:!1,source:!1}}},newwindow:"width=700,height=300"},mail:{sharing:{xs:{host:"mailto:",params:{cc:!1,bcc:!1,subject:!1,body:!1}},defaults:{host:"{{protocol}}//www3.uol.com.br/envie/index.jhtm",params:{origem:!1,texto:!1,xurl:!1,data:!1}}},newwindow:"width=780,height=490,left=350,top=350"},whatsapp:{sharing:{defaults:{host:"whatsapp://send",params:{url:!1,concat:"text"}}},newwindow:"width=900,height=600,left=350,top=350"},viber:{sharing:{defaults:{host:"viber://forward",params:{url:!1,concat:"text"}}}},messenger:{sharing:{defaults:{host:"fb-messenger://share",params:{link:!1}}}}},expose.apiupdate=function(){var e=this,i="general";this.config.defaults.general.url=this.config.defaults.general.url.replace(/[&?]json/g,"");var t=[this.config.defaults,this.current in this.config?this.config[this.current]:{}],s=[],a={},r=function(e,i,t){var s,a=Object.keys(t);return"url"!=e&&"link"!=e||t[e]?"title"!=e||t[e]?"description"!=e||t[e]?"image"!=e||t[e]?"site"!=e||t[e]?"kicker"!=e||t[e]?"date"!=e||t[e]?"redirect"!=e||t[e]?"domain"!=e||t[e]||-1!=a.indexOf("source")&&(s="source"):-1!=a.indexOf("redirect_uri")&&(s="redirect_uri"):-1!=a.indexOf("data")&&(s="data"):-1!=a.indexOf("origem")&&(s="origem"):-1!=a.indexOf("via")&&(s="via"):-1!=a.indexOf("media")&&"pinterest"==i?s="media":-1!=a.indexOf("picture")&&"facebook"==i&&(s="picture"):-1!=a.indexOf("summary")&&(s="summary"):-1!=a.indexOf("name")?s="name":-1!=a.indexOf("text")&&"twitter"==i?s="text":-1!=a.indexOf("description")&&"pinterest"==i?s="description":-1!=a.indexOf("texto")&&"mail"==i&&(s="texto"):-1!=a.indexOf("link")?s="link":-1!=a.indexOf("xurl")?s="xurl":-1!=a.indexOf("url")&&(s="url"),s||e};this.config.defaultapis&&Object.keys(this.config.defaultapis).length>0&&function(i,t,s){i=i||e.config.defaultapis,t=t||e.apis;for(var a in i){var r="object"==typeof i[a];r&&"sharing"!=s?a in t&&r&&!Array.isArray(i[a])&&arguments.callee(i[a],t[a],a):t[a]=i[a]}}();for(var o=0;o<t.length;o++){var n=Object.keys(t[o]);-1!=n.indexOf(i)&&(n=n.filter(function(e){return e!=i})).unshift(i),s.push(n)}for(c in this.apis)if(this.apis[c].sharing){var h=this.current in this.apis[c].sharing?this.current:"defaults";this.apis[c].sharing=this.apis[c].sharing[h]}for(o=0;o<t.length;o++){if(-1!=s[o].indexOf(i))for(g in this.apis)if(this.apis[g].sharing&&this.apis[g].sharing.params&&g!=i)for(y in t[o].general){var l=r(y,g,this.apis[g].sharing.params);l in this.apis[g].sharing.params&&(!a[g]||-1==a[g].indexOf(l))&&(this.apis[g].sharing.params[l]="image"==y?t[o].general[y].src:t[o].general[y],a[g]||(a[g]=[]),a[g].push(l))}for(var d=0;d<s[o].length;d++)if(s[o][d]in this.apis){var p=s[o][d];$.extend(!0,this.apis[p].sharing&&this.apis[p].sharing.params||this.apis[p],t[o][p])}}for(z in this.apis)if(this.apis[z].sharing&&this.apis[z].sharing.params&&this.apis[z].sharing.params.concat){var m=this.apis[z].sharing.params.concat,f="";for(v in this.apis[z].sharing.params)"url"==v||"concat"==v||v==m||Array.isArray(this.apis[z].sharing.params[v])||!1===this.apis[z].sharing.params[v]||(!this.apis[z].sharing.params.not||-1!=this.apis[z].sharing.params.not.indexOf(v))&&this.apis[z].sharing.params.not||(f+=this.apis[z].sharing.params[v]+" ");f+=this.apis[z].sharing.params.url,this.apis[z].sharing.params={},""!=f&&(this.apis[z].sharing.params[m]=f.substr(0,f.length))}for(var p in this.config["characters-limit"])if(this.apis[p]&&this.apis[p].sharing&&this.apis[p].sharing.params)for(var g in this.config["characters-limit"][p])g in this.apis[p].sharing.params&&this.apis[p].sharing.params[g].length>this.config["characters-limit"][p][g]&&(this.apis[p].sharing.params[g]=$("<textarea>").html(this.apis[p].sharing.params[g]).val().substr(0,this.config["characters-limit"][p][g])+"...");this.update=!1},expose.sharingFacebookApi=function(e){FB.ui({method:"share_open_graph",action_type:"og.shares",display:"popup",action_properties:JSON.stringify({object:{"og:url":e.url||"","og:title":e.title||"","og:description":e.body||"","og:image":e.image.src||"","og:image:width":e.image.width||80,"og:image:height":e.image.height||80}})})},expose.loadFacebookApi=function(){var e,i=document,t="script",s="facebook-jssdk",a=i.getElementsByTagName(t)[0];i.getElementById(s)||((e=i.createElement(t)).id=s,e.src="//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.6",a.parentNode.insertBefore(e,a))},expose.urlbuilder=function(e){var i="",t="facebook"==e||!1;for(key in this.params)if(!1!==this.params[key]||""!=this.params[key]){var s=[t?encodeURIComponent("?"):"?",t?encodeURIComponent("&"):"&",window[t?"escape":"encodeURIComponent"]($("<textarea>").html(this.params[key]).val())];i+=(""==i?this.host.replace("{{protocol}}",location.protocol)+s[0]:s[1])+key+"="+s[2]}return i};var template=function(e){var i=this,t=e.name,s=-1!=this.config.components.indexOf(t)?this.tpl.component:this.tpl[e.tpl]||this.tpl[t]||this.tpl.def,a=function(){var s=$(i.originaldom).find("."+(e.tpl||t));if(!(s=s.get(0)&&s.get(0).outerHTML)||-1==i.config.components.indexOf(t))return"";var a=-1!=i.view.mode.indexOf("large")?t+"-large":-1!=i.view.mode.indexOf("medium")?t+"-medium":t+"-small",r=new RegExp(t+"-large|"+t+"-medium|"+t+"-small","g");return s.match(r)?s.replace(r,a):s.replace(/(class=\"[^"]+)/,"$1 "+a+'"')}();return s=(s=(s=(s=s.replace(/{{name}}/g,t)).replace(/{{svg}}/g,"mail"==t?t:"social-"+t)).replace(/{{component}}/,a)).replace(/{{group}}/,e.pattern),-1==this.config.components.indexOf(t)||a?s:""},mount=function(){var e="";for(order in this.view.mode&&-1!=this.view.mode.indexOf("link")&&(e+=template.call(this,{name:"link"})),this.view.order)if("before"!=order){var t="";for(i in this.view.order[order])t+=template.call(this,{name:this.view.order[order][i]}),this.socialpage.push(this.view.order[order][i]);e+=template.call(this,{tpl:order,pattern:t})}else for(i in this.view.order[order])e+=template.call(this,{name:this.view.order[order][i]}),this.socialpage.push(this.view.order[order][i]);return e};expose.count=function(){if(-1==this.view.mode.indexOf("no-count"))for(var e=this.socialpage,i=0;i<e.length-1;i++)if(this.apis[e[i]]&&this.apis[e[i]].count){var t=this.apis[e[i]].count[0].replace("{{link}}",encodeURIComponent(this.dom.getAttribute("data-url")||window.location.href)).replace("{{protocol}}",location.protocol);try{this.requestJsonp(t,{component:"share",callback:s,data:{social:e[i],scope:this}})}catch(e){}}function s(e){var i=e.data.scope,t=i.apis[e.data.social].count[1].call(e.response);if(t){var s=i.dom.querySelector('.share-item[data-ref="'+e.data.social+'"] .count');if(t>999)for(var a,r=["k","M","G","T","P","E","Z","Y"],o=r.length-1;o>=0;o--){if(t<=-(a=Math.pow(1e3,o+1))||t>=a)t=(t/a).toFixed(1)+r[o]}i.dom.querySelector('.share-item[data-ref="'+e.data.social+'"]').className+=" hascount",s.innerHTML=t,s.className=s.className.replace(/ hidden/g,"")}}},expose.sharing=function(e){e.update&&e.apiupdate.call(e);var i=this.getAttribute("data-ref"),t=!(!e.apis[i]||!e.apis[i].sharing||0==Object.keys(e.apis[i].sharing.params).length)&&e.urlbuilder.call(e.apis[i].sharing,i);if(i){if(i in e.omniturereferences){var s=$.extend(!0,{},e.config.audience.click);s.reference=e.omniturereferences[i],hitAudience.countClick.call(this,s)}if(!t)return;if(e.breakpoints.checkin("xs")||e.breakpoints.checkin("sm")||"whatsapp"!=i||(t=t.replace("whatsapp://","https://web.whatsapp.com/")),!e.breakpoints.checkin("xs")||e.apis[i].sharing.newtab){var a=[!e.breakpoints.checkin("xs")&&e.apis[i].newwindow?e.apis[i].newwindow:"","fullscreen=yes","scrollbars=yes","type=fullWindow"].join(",");"facebook"==i&&e.config.facebookApi?e.sharingFacebookApi(e.config.defaults.general):open(t,"shareUOL",a)}else location.href=t}},expose.mode=function(){for(mode in this.view.mode||(this.view.mode=[]),this.view.mode)this.dom.className+=" share-"+this.view.mode[mode]},expose.events=function(){var e=this,i=$(this.dom).find(':not(".modal-mode-share") .overflow'),t=[-1!=e.view.mode.indexOf("column"),-1!=e.view.mode.indexOf("right")&&-1!=e.view.mode.indexOf("vertical")&&-1==e.view.mode.indexOf("column")],s=i.children()[t[0]?"height":"width"]()*i.children().length;i[t[0]?"height":"width"](s),$(this.dom).on("click",".link, .more",function(i){var a=$.extend(!0,{},e.config.audience.click),r=this.getAttribute("data-ref")||"more";if(-1!=e.view.mode.indexOf("modal")||e.breakpoints.checkin("xs")&&-1==e.view.mode.indexOf("no-modal"))-1==e.view.mode.indexOf("modal")?e.view.mode.push("modal"):e.view.mode=e.dom.getAttribute("data-originalmode").split(","),e._modal=e.modal.open(e.dom,"share"),e._modal.disableClickClose(),e._modal.addHeader({html:'<div class="modal-close"><h1>Fechar</h1> <div class="icon-close"></div></div>',closure:!0}),e._modal.onbeforeclose=function(){a.reference=e.omniturereferences[r+"-close"],hitAudience.countClick.call(this,a)},e._modal.dom.querySelector(".share").className="share share-center share-modal",$(e._modal.dom).find(".share .overflow").children().appendTo(e._modal.dom.querySelector(".share")),$(e._modal.dom).find(".share-item:visible").on("click",function(){e.sharing.call(this,e)}),a.reference=e.omniturereferences[r+"-open"];else if(this.className.match("more")&&e.dom.className.match("share-link"))$(e.dom).children().removeClass("visible").end().children(".link").show(),a.reference=e.omniturereferences[r+"-close"];else if(this.className.match("more")&&-1==e.view.mode.indexOf("modal")){var o={},n=0==$(this).siblings(".group")[t[0]?"height":"width"]()?s:0;t[0]?o.height=n:t[1]?(o.width=n,o.marginLeft=n):o.width=n,a.reference=e.omniturereferences[r+"-"+(/open/.test(this.parentNode.className)?"close":"open")],this.parentNode.className=this.parentNode.className.replace(" open","")+(-1==this.parentNode.className.indexOf("open")?" open":"");var h=this;$(this).siblings(".group").stop(!0,!1).animate(o,200,function(){$(h).toggleClass("on")})}else this.className.match("link")&&-1==e.view.mode.indexOf("modal")&&($(this).hide().nextAll().addClass("visible"),a.reference=e.omniturereferences[r+"-open"]);i.originalEvent&&hitAudience.countClick.call(this,a)}),$(this.dom).on("click","[data-target-click]",function(i){-1==e.config.components.indexOf(this.getAttribute("data-ref"))&&i.stopPropagation(),e.sharing.call(this,e)}),$(this.dom).on("mouseleave",function(){var i=this;e.view.mode&&-1!=e.view.mode.indexOf("link")||(e.timeOpened=setTimeout(function(){$(i).find(".more-item .more.on").trigger("click")},4e3))}),$(this.dom).on("mouseenter",function(){clearTimeout(e.timeOpened)})},expose.destroy=function(){this.dom.className=this.selector.substr(1),this.view={},this.socialpage=[],this.update=!0,this._modal&&this._modal.close(),$(this.dom).off("click"),this._modal&&$(this._modal.dom).find(".share-item").off("click")},expose.modelOrder=function(e){for(var i in e)if("string"==typeof e[i]&&"mode"==i)e[i]=e[i].split(";");else if("order"==i)for(var t in e[i])"string"==typeof e[i][t]&&(e[i][t]=e[i][t].split(";"));return e},expose.init=function(){/no-mount/.test(this.dom.className)||(this.config=this.config||this.parse(this.dom.getAttribute("data-config").replace(/\n/g,"{{new-line}}"),this.config),this.breakpoint=this.breakpoints.sortOptions(Object.keys(this.config),!0,!0),this.omniturereferences=this.config.omniturereferences||{},this.current=this.breakpoints.breakpoint.name,this.view=this.modelOrder(this.config[this.breakpoint]),this.config.facebookApi&&this.loadFacebookApi(),this.dom.setAttribute("data-originalmode",this.view.mode),this.tpl=$.extend(!0,{},this.tpl),this.apis=$.extend(!0,{},this.defaultapis),this.dom.removeAttribute("style"),-1!=this.view.mode.indexOf("fixed")?this.dom.removeAttribute("data-static"):this.dom.setAttribute("data-static",!0),this.updateBreakpoint||this.breakpoints.change(this,function(){this.updateBreakpoint=!0,this.destroy.call(this),this.init.call(this)}),this.originaldom||(this.originaldom=this.dom.outerHTML),this.dom.innerHTML=mount.call(this),this.count.call(this),$(this.dom).find("[initiated]").length&&($(this.dom).find("[initiated]").removeAttr("initiated"),render()),this.mode.call(this),!this.view&&this.view.disabled||(this.dom.className=this.dom.className.replace(/hidden/,""),this.events.call(this)))},expose.selector=".share"; });    def('tooltip', function(){ !function(){"use strict";include("breakpoints"),expose.selector=".tooltip-container";var t={init:function(){t.binds.call(this)},binds:function(){var o=this;"ontouchstart"in window?($(this.dom).on("click",".open-tooltip, .icon-close",function(i){t.toggle.call(o,i.type,!0)}),$(this.dom).find(".tooltip").on("scroll",t.scroll)):$(this.dom).hasClass("show-opened")?($(this.dom).find(".arrow").show(),$(this.dom).find(".tooltip").show(),$(this.dom).find(".icon-close").on("click",function(t){t.preventDefault(),$(this).parents(".over-tooltip").find(".arrow, .tooltip").hide()})):$(this.dom).on("mouseenter mouseleave",".w-tooltip",function(i){t.toggle.call(o,i.type,!1)})},toggle:function(o,i){var e,n="open"==(e=i?"none"==$(this.dom).find(".tooltip").css("display")?"open":"close":"mouseenter"==o?"open":"close")?["fadeIn","addClass"]:["fadeOut","removeClass"];(lib.breakpoints.checkin(["sm"])||lib.breakpoints.checkin(["md"]))&&("open"==e?$(this.dom).parents(".article, .readme").bind("touchstart",function(){0==$(event.touches[0].target).parents(".tooltip").length&&t.toggle.call(self,"touchend",!0)}):$(this.dom).parents(".article, .readme").unbind("touchstart"));var s=this.dom?this.dom:".tooltip-container";$(s).find(".tooltip").stop()[n[0]](300),$(s).find(".arrow").stop()[n[0]](300),$(s).find(".over-tooltip")[n[1]]("active")},scroll:function(){this.scrollTop>10?$(this).find("header").addClass("border"):$(this).find("header").removeClass("border")}};expose.init=function(){(function(){var t=$(this.dom).find(".w-tooltip"),o=t.find(".tabs a"),i=t.find(".tab-item");o.on("click",function(t){t.preventDefault();var e=this;o.each(function(t){$(this)[e==this?"addClass":"removeClass"]("active"),i.eq(t)[e==this?"show":"hide"]()})})}).call(this),t.init.call(this),function(){var t=$(this.dom).closest(".read-more");if(t.length&&lib.breakpoints.checkin(["lg"])){var o=-154,i=160;t.find(".author").offset().left>500&&(o=-310,i=312),$(this.dom).find(".w-tooltip .tooltip").css("left",o+"px"),$(this.dom).find(".w-tooltip .tooltip .arrow").css("left",i+"px")}}.call(this)}}(); });    def('author', function(){ function metodoPrivado(){}include("modal"),expose.init=function(){}; });    def('results-index', function(){ expose.events=function(){var t=this,e=".btn-search:not(.searching)";$(this.dom).on("click",e,function(e){var i=this,n=JSON.parse(this.getAttribute("data-request")),a=this.getAttribute("data-loadComponent")||"results-index",s=this.getAttribute("data-history"),r=this.getAttribute("data-next"),o=this.getAttribute("data-link"),d=t.parse(this.getAttribute("data-audience-click"),!1);if("true"===s){var c=""==location.search?"?next="+r:-1!=location.search.indexOf("next")?location.href.replace(/(next=)(.*N)/g,"next="+r):location.href+"&next="+r;history.replaceState(null,null,c)}this.className+=" searching",d&&(n.audience={click:{mediaName:d.mediaName}});var l=o||Config.servicename+"?loadComponent="+a+"&data="+JSON.stringify(n);this.innerHTML="Carregando...",t.getjson(l,function(e){var a=$(e.body);$(".results-items",t.dom).append(a.find(".results-items").html()),$(t.dom).find(".element-divisor").remove(),n.hasNext&&(a.find(".element-divisor").insertAfter($(".results-items",t.dom)),i.className=i.className.replace(/\ssearching/,""))})}),this.dom.querySelector(".btn-search")&&this.dom.querySelector(".btn-search").getAttribute("data-scroll-load")&&window.addEventListener("scroll",function(){var i=[-1*document.body.getBoundingClientRect().top+window.innerHeight,$(t.dom).find(".btn-search").offset().top];i[0]>=i[1]&&$(t.dom).find(e)&&$(t.dom).find(e).trigger("click")})},expose.init=function(){this.events.call(this)}; });    def('widget-profile', function(){ !function(e,t,o){expose.init=function(){var n,r,i=this.dom,a=JSON.parse(i.getAttribute("data-config")),l=e.getElementsByTagName(t)[0];if(!e.getElementById(o)){(r=e.createElement(t)).id=o,r.crossOrigin="anonymous",r.src=a.sourceJs;var s=function(e){try{instances.header[0].showItens(e)}catch(e){console.error("[widget-profile] A função instances.header[0].showItens() não existe!")}};r.onload=r.onreadystatechange=function(){r.onload=null,r.onreadystatechange=null,n=setInterval(function(){if("undefined"==typeof UOL)return!1;if(clearInterval(n),UOL.hasOwnProperty("perfil")&&UOL.perfil.hasOwnProperty("widgets")&&UOL.perfil.widgets.hasOwnProperty("Notify")&&"function"==typeof UOL.perfil.widgets.Notify){var e=lib["babel-login"],t=document.querySelector(".news-notice .girouol #subscriber-cmp1"),o=!1;void 0!==typeof t&&null!==t&&(o=!0),window.widgetProfile=UOL.perfil.widgets.Notify({avatarSize:a.avatarSize,avatarIconColor:a.avatarIconColor,widgetStyle:{username:a.widgetStyle.username,counter:a.widgetStyle.counter,zIndex:a.widgetStyle.zIndex},responsive:!0,linkCheckout:{sg:"2668383698",sa:a["ga-id"]},target:"profile-avatar",portal:Config.portal.slug,callbacks:{onInit:function(e){var t=e.auth.isLogged?1:0;s(t),u(e)},onLogin:function(n){s(1),u(n),e&&e.setSession(n),o&&(t.value=n.auth.email.toLowerCase())},onLogout:function(n){s(0),u(n),e&&e.logout(n),o&&(t.value="")}}})}else s(2)},200)};var u=function(e){var t=document.querySelector(".header, .bbolp-2014").querySelector("#uol-mail-link"),o=t.querySelector(".mail-notification");e.auth.isLogged?NotificacaoUOL.init(function(e){e.url&&""!=e.url&&null!=typeof e.href&&(t.href=e.url),e.count>=1&&(o.innerHTML='<em class="'+e.moreThan+'">'+e.countStr+"</em>")}):o.innerHTML=""};r.onerror=function(){s(3)},l.parentNode.insertBefore(r,l)}}}(document,"script","widget-profile-jssdk"); });    def('album-embed', function(){ !function(){"use strict";include("modal","breakpoints"),inherit("open-album");var i=function(i,e){(this.openModalAlbum(i,e),i.hasOwnProperty("originalEvent"))&&t(e)},t=function(i){return-1!==i.parentNode.className.indexOf("small-item")};expose.init=function(){this.on("click","a",i),function(){var i=$(this.dom).find("img:first").data("crop"),t=i[this.breakpoints.sortOptions(Object.keys(i),!0)].split("x");t[0]/t[1]>1||(this.dom.className+=" img-vertical")}.call(this),0===$(".album-embed.gallery").parents(".collection-item").length&&$(".album-embed.gallery a:first:not(.first-trigger)").trigger("click").addClass("first-trigger")}}(); });    def('collection-index', function(){ !function(){"use strict";function o(o){var i=$(".row",o.dom);i.length&&($(".scrollFixed, [class*=fixed]",o.dom).scrollfix({limit:i,marginTop:50}),$(".ads",o.dom).css("position","inherit"),$(".ads",o.dom).scrollfix({limit:i,marginTop:10}))}expose.init=function(){var i=this;$(".ads",i.dom).css("margin-top","0"),document.onreadystatechange=function(){"complete"===document.readyState&&o(i)},setTimeout(function(){o(i)},1500),$(window).on("resize",function(){o(i)})},expose.selector=".collection-index"}(); });    def('readspeaker', function(){ function updateProgress(e){if("progress"==e.type)var t=Math.ceil(e.position/100*100);else{var o=Math.round(e.position/e.duration*100);t=Math.ceil(1*o)}e.dom.querySelector(e.progressSelector).style.width=t+"%"}include("breakpoints"),expose.selector=".readspeaker",expose.loaded=!1,expose.timeToSeconds=function(e){var t=e.split(":");return t.length>2?3600*parseInt(t[0])+60*parseInt(t[1])+parseInt(t[2]):t.length>1?60*parseInt(t[0])+parseInt(t[1]):parseInt(t[0])},expose.formatTime=function(e){var t=parseInt(e/3600,10)%24,o=parseInt(e/60,10)%60,s=parseInt(e%60,10),r=(o<10?"0"+o:o)+":"+(s<10?"0"+s:s);return t>0?(t<10?"0"+t:t)+":"+r:r},expose.playPause=function(){var e=this,t=this.dom.getAttribute("data-url"),o=this.dom.getAttribute("data-full-url"),s=$(this.dom).parents("[data-url]:last").attr("data-url");-1!=t.indexOf("service.htm")&&""!=s&&(t=s);var r=window.location.search;if(""==r||this.dom.getAttribute("data-url-force"))a="http://app-na.readspeaker.com/cgi-bin/rsent?customerid=7406&lang=pt_br&readid=texto&url="+(-1!=encodeURIComponent(t).indexOf("%3F")?encodeURIComponent(t)+"%26cpVersion=readspeaker%26cpExtend=true":encodeURIComponent(t)+"%3FcpVersion=readspeaker%26cpExtend=true");else{-1!=(r=r.replace("?","")).indexOf("doc")&&(r=r.replace("&component",""));var i=window.location.origin+window.location.pathname;window.location.port&&(i=i.replace(/:\d{4}/,""));var a="http://app-na.readspeaker.com/cgi-bin/rsent?customerid=7406&lang=pt_br&readid=texto&url="+(-1!=encodeURIComponent(i).indexOf("%3F")?encodeURIComponent(i)+"%26cpVersion=readspeaker%26cpExtend=true%26"+r:encodeURIComponent(i)+"%3FcpVersion=readspeaker%26cpExtend=true%26"+r)}if(o&&""!=o)a=o;if(a){a=a.replace("http://","https://");var n="";System.isBlockedAccess?(t=t.replace("http://","https://"),$.ajax({url:t+(-1!=t.indexOf("?")?"&":"?")+"gettoken",async:!1,dataType:"json",success:function(t){n="%26"+t.parameter+"="+t.token,p.call(e,a+n)}})):p.call(this,a)}function p(e){this.loaded||this.player.load(e),this.loaded=!0,this.dom.querySelector(".text")&&this.dom.querySelector(".text").remove(),this.player.playing?this.pause():this.play()}},expose.play=function(){this.dom.setAttribute("data-status","playing"),this.dom.querySelector(".duration").style.display="block",this.dom.querySelector(".bar").style.display="block",this.dom.querySelector(".i-sound")?this.dom.querySelector(".i-sound").setAttribute("class","i-pause control"):this.dom.querySelector(".i-play").setAttribute("class","i-pause control"),this.player.play()},expose.pause=function(){this.dom.setAttribute("data-status","paused"),this.dom.querySelector(".i-pause").setAttribute("class","i-play control"),this.player.pause()},expose.stop=function(){this.dom.querySelector(".duration").style.display="none",this.dom.querySelector(".bar").style.display="none",this.dom.removeAttribute("data-status"),this.dom.querySelector(".i-pause").setAttribute("class","i-sound control"),this.player.audio.seek(0),this.player.audio.pause()},expose.timeUpdate=function(e,t,o){o.querySelector(".duration").innerText=e;updateProgress({position:this.timeToSeconds(e),duration:t,type:"timeupdate",progressSelector:".timeupdate",dom:o})},expose.progress=function(e,t){updateProgress({position:e,duration:this.player.duration,type:"progress",progressSelector:".progress",dom:t})},expose.seek=function(e){var t=e.offsetX,o=parseInt(e.target.parentNode.clientWidth),s=Math.ceil(t/o*100),r=parseFloat(this.formatTime(this.player.duration).replace(":",".")),i=parseInt(r),a=(60*i+100*(r-i))*s/100;this.player.seek(a)},expose.elements=[],expose.clone=function(){var e=document.createElement("div");this.elements.push(e),document.body.appendChild(e)},expose.init=function(){var e=this;this.dom;function t(){this.seekable=!0,this.on("ended",function(){e.stop()}),this.on("timeupdate",function(t,o){e.timeUpdate(t,o,e.dom)}),this.on("progress",function(t){e.progress(t,e.dom)})}e=this;setTimeout(function(){e.player=new Audio5js({ready:t})},2e3),$(this.dom).on("click",function(){e.playPause()}),$(this.dom).find(".bar").on("click",function(t){e.seek(t)})}; });    def('header', function(){ include("/src/hammer/2.0.4/hammer.min","breakpoints","/src/notification-email/script");var header,headerHeight,hammer,win=$(window),showMenu=!1,fixed=!1;expose.markTouchMenu=function(){this.isTouchDevice()&&$(".header").addClass("touchDevice")},expose.isTouchDevice=function(){return"ontouchstart"in window},expose.openSubmenu=function(e){var s=".choosen-item.arrow",i=s.replace(/\./g," "),t=$(s),o=$(e);t.removeClass(i).siblings(".nav-stations-submenu").hide(),t[0]!=o[0]&&o.addClass(i).siblings(".nav-stations-submenu").show()},expose.userInterface=function(){var e=$(this.dom),s=this,i=!1,t=!1,o="",n=".menu-wrapper-mobile",a=".menu-click",c=".nav-menus",r=".close-mask",l=[".stations-list",".channels-list",n,r],h=function(){$(c).find(".stations-list, #"+o).toggleClass("hide-list")},d=function(){$(n,e).toggleClass("show-submenu"),$(a,e).toggleClass("hidden"),showMenu=!showMenu,l.forEach(function(e,s){f(l[s])}),m()},f=function(e){var s=fixed?window.innerHeight-50:window.innerHeight-(headerHeight-win.scrollTop());$(e).css("height",s)};e.find(r).css("width",$(window).width()-260);var u=0,m=function(){i&&-1*$("body").offset().top<=u?u=$("body").scrollTop():!i&&-1*$("body").offset().top<=u&&(u=-1*$("body").offset().top);$("body").scrollTop();var s=-Math.abs($("body").scrollTop()),t=-s;if(i){if(0==$("body").scrollTop()&&0==$("body").offset().top&&0==u){var o=0;$(".bannersticky-top-container").length>0&&(o=$(".bannersticky-top-container").height()),$(".bannersmart").attr("style")||(o+=$(".bannersmart").height()),e.css("top",o)}else e.css("top",t);var n=document.body;divMask=document.createElement("div"),divMask.classList.add("mobile-mask"),n.insertBefore(divMask,n.firstChild),$("body").css("top",s)}else $("div.mobile-mask").remove(),e.css("top",0),$(".widgetNotify").css("padding-top","auto");header.hasClass("is-fixed")&&header.removeClass("is-fixed"),$("body").toggleClass("lock-screen"),e.toggleClass("opened-header"),window.scrollTo(0,u),l.forEach(function(s,i){f(l[i]),e.find(r).css("width",$(window).width()-260)})};window.onresize=function(){l.forEach(function(s,i){f(l[i]),e.find(r).css("width",$(window).width()-260)})};var v=function(e){var s={container:e.closest(".container"),submenuBox:e.find(".nav-stations-submenu"),submenuSize:e.offset().left+e.width()};if(s.submenuBoxSize=e.offset().left+s.submenuBox.width(),s.containerSize=s.container.offset().left+s.container.width(),s.submenuBoxSize>s.containerSize){var i=s.submenuSize-s.containerSize-10;s.submenuBox.css("right",i)}};s.isTouchDevice()||$(".nav-stations-item").hover(function(e){!function(e){e.offset().left,e.width();var s=e.find(".nav-stations-submenu"),i=(e.offset().left,s.width(),e.closest(".container")),t=(i.offset().left,i.offset().left,i.width(),e.find(".menu-station")),o="choosen-item";s.length>0&&(o="choosen-item arrow"),t.toggleClass(o)}($(this)),v($(this))}),hammer.on("tap",function(e){var i=$(e.target);i.siblings(".nav-stations-submenu").length&&(e.preventDefault(),s.openSubmenu(i),v($(e.target).parent()))}),$(this.dom).on("click keyup",function(e){var n=$(e.target);if(s.isTouchDevice()&&n.siblings(".nav-stations-submenu").length&&e.preventDefault(),n.hasClass("menu-click"))i=!i,d(),t&&(h(),t=!1);else if(n.hasClass("back-to-stations")||n.closest(".back-to-stations").length>0)o=n.closest(".channels-list").attr("id"),n.closest(c).find(".stations-list, #"+o).toggleClass("hide-list"),t=!0;else if(n.attr("data-id"))o=n.attr("data-id"),n.closest(c).find(".stations-list, #"+o).toggleClass("hide-list");else if(i&&(n.hasClass("close-mask")||n.hasClass("close-button")||1===n.closest(".close-button").length))i=!1,d(),t&&(h(),t=!1);else if(1==n.closest(".search-anchor").length){e.preventDefault(),n.closest(".search-anchor").siblings(".search-box").addClass("show-search-box").find(".search-query").focus().val(""),$("#widgetNotify").addClass("is-active-search")}}),$(".search-query",this.dom).on("focusout",function(){var e=this;setTimeout(function(){$(e).parents(".search-box").removeClass("show-search-box"),$("#widgetNotify").removeClass("is-active-search")},100)}),$(".search-submit",this.dom).on("click",function(e){""!=$(".search-query").val()&&null!=$(".search-query").val()||(e.preventDefault(),setTimeout(function(){$(".search-box").addClass("show-search-box").find(".search-query").focus()},100))}),"black"===e.attr("data-widget")&&setTimeout(function(){$("#widgetNotify").addClass("black")},1e3)},expose.showItens=function(e){var s=this.dom.querySelector(".uol-sac");!s||0!==e&&3!==e?-1===s.className.indexOf("hidden")&&(s.className+=" hidden"):s.className=s.className.replace(" hidden","")},expose.scrollBack=function(){var e,s,i,t=0,o=0,n=header.css("transition-duration")||"0.2s",a=($(".bannersticky-top "),this);n=n.indexOf("ms")>-1?parseFloat(n):1e3*parseFloat(n),header.height(header.height()).css("overflow","visible"),win.on("scroll touch",function(c){if(-1==document.body.className.indexOf("modal-open")){var r=win.scrollTop();s=o-t>(a.breakpoints.checkin("xs"),50),fixed=r>headerHeight,i=i&&i.length?i:$(".widgetNotify"),fixed?(header.addClass("is-fixed"),i.addClass("is-fixed")):(header.removeClass("is-fixed"),i.removeClass("is-fixed"),headerHeight=header.height()+(header.offset().top<0?0:header.offset().top));var l=$(a.dom).is(".header-thin")||a.breakpoints.checkin("xs")||a.breakpoints.checkin("sm")?50:100;$("body").css("padding-top",header.hasClass("is-fixed")&&fixed?l:0),$(".share-vertical").css("padding-top",$(".sponsor").hasClass("fixed")?50:0);var h=1==i.find(".closed").size();showMenu||(fixed&&!s&&h?(i.addClass("is-closed"),clearTimeout(e),header.css("overflow","hidden"),header.css("height",0)):(i.removeClass("is-closed"),clearTimeout(e),e=setTimeout(function(){header.css("overflow","visible")},n),header.css("height",l)),t<r&&(o=r),t=r)}})},expose.selectMenu=function(){var e=$(this.dom);if("undefined"!=typeof Collection){var s=e.find(".principal-item").siblings(".nav-stations-submenu").find(".nav-items:first-child").find("li"),t=e.find(".principal-item").find("li"),o=Collection.titulo,n=["cinema","musica","urban taste"],a=!1;for(i=0;i<n.length;i++)n[i]===Collection.channel&&(a=!0);/ultimas/.test(Collection.slug)&&!a&&(o="Últimas notícias"),s.each(function(e){0===e?$(this).children().removeClass("choosen"):$(this).children().text().toLowerCase()===o.toLowerCase()&&$(this).children().addClass("choosen")}),t.each(function(e){0===e?$(this).removeClass("choosen"):$(this).text().toLowerCase()===o.toLowerCase()&&$(this).addClass("choosen")})}},expose.clickLogger=function(){for(var e=/chn:\d+;creative:(linkfixo_menu|barrauol)(_mobile)?;/,s="chn:"+$(this.dom).attr("data-chn-id")+";creative:$1$2;",i=this.dom.querySelectorAll("a"),t=i.length;t--;){var o=i[t],n=o.href;!0===e.test(n)&&(o.href=n.replace(e,s))}},expose.init=function(){window.UHeader=window.UHeader||{init:function(){}},hammer=new Hammer(this.dom),header=$(this.dom),headerHeight=header.height()+header.offset().top,this.userInterface(),this.scrollBack(),this.selectMenu(),this.clickLogger(),this.markTouchMenu()}; });    def('collection', function(){ include("session-blacklist","storage"),expose.items=[],expose.loadItemLocked=!1,expose.initialItem={url:location.href,title:document.title,actualUrl:location.href},expose.index=-1,expose.viewRatio=1.5,expose.permanenceTime=2e3,expose.permanenceIndex=0,expose.permanenceTimer,expose.onscroll=function(){this.checkItemsToLoad(),this.checkViewport()},expose.current=function(){return-1!=this.index&&this.allItems[this.index]},expose.updateHistory=function(){},expose.enablePushState=function(){this.updateHistory=function(){var e=this.current(),t=this.initialItem,o=(e.getAttribute("data-url")||"").replace(/https?:/,location.protocol).replace(".br",".br:"+location.port)||"";if(-1==o.search(/external-content/)){if(!o)return document.title=t.title,void history.replaceState(null,document.title,t.url);document.title=((e.uol||{}).metatags||{}).title||Audience.mediaTitle,document.title=$("<textarea>").html(document.title).val(),history.replaceState(null,document.title,o),window.pSUPERFLY&&pSUPERFLY.virtualPage(e.getAttribute("data-url").replace(/https?:\/\/.*?(\/.*)/,"$1"),document.title),t.actualUrl=o}}},expose.startPermanenceControl=function(){var e=this;this.permanenceTimer&&clearTimeout(this.permanenceTimer),this.permanenceTimer=setTimeout(function(){e.permanenceIndex!=e.index&&(e.permanenceIndex=e.index,e.permanenceCallback())},this.permanenceTime)},expose.permanenceCallback=function(){hitAudience.countMetrics(this.current().uol&&this.current().uol.audience||Audience),delete Audience.firstView},expose.contentUpdated=function(){this.items=this.dom.querySelectorAll(".collection-item:not([data-loaded])")},expose.checkViewport=function(){for(var e=window.innerHeight/2,t=0;t<this.allItems.length;t++){var o=this.allItems[t].getBoundingClientRect();o.top<e&&o.bottom>e&&this.index!=t&&this.updateIndex(t)}},expose.autoClick=function(){var e=!(!this.current()||-1==this.current().className.indexOf("collection-first-item"))&&this.current().querySelector(".btn[data-open]");e&&$(window).on("scroll",function(){var t=[$(e).offset().top,$(this).scrollTop()+$(this).height(),50];t[1]>t[0]-t[2]&&$(e).is(":visible")&&e.click()})},expose.updateIndex=function(e){this.index=e,this.updateHistory(),this.startPermanenceControl()},expose.checkItemsToLoad=function(){for(var e=0;e<this.items.length;e++){var t=this.items[e],o=t.getBoundingClientRect();window.innerHeight*this.viewRatio>Math.abs(o.top)&&!this.loadItemLocked&&(this.loadItemLocked=!0,this.loadItem(t,this.checkItemsToLoad))}},expose.loadItem=function(e,t){var o,i,n=this,l=this.parse(e.getAttribute("data-service"),{});if(!l.hasOwnProperty("url")||-1==l.url.indexOf(".uol.com.br/blog/")&&-1==l.url.indexOf("blogosfera.uol")&&-1==l.url.indexOf("blog.bol")&&-1==l.url.indexOf("blogmiltonneves.bol")){if(o=Config.servicename+"?loadComponent=collection-item&data=",l.hasOwnProperty("url")&&(l.url=escape(l.url)),e.getAttribute("data-component"))if(l.path=Collection.path,"headline-content"==e.getAttribute("data-component"))l.blacklist=this.sessionStorage.getList("collection");else if(-1!=e.getAttribute("data-component").indexOf("chapter-synopsis")){var a=location.search.slice(1),c=a.split("&"),s={};""!=a&&c.length>0&&c.forEach(function(e){var t=e.split("="),o=t[0],i=t[1];s[o]=i}),s.titulo=Collection.titulo,s["tags-id-collection"]=Collection.search.tags,l.compData=s}i=o+JSON.stringify(l)}else i=l.url;function r(o){e.setAttribute("data-loaded",o),this.loadItemLocked=!1,this.contentUpdated(),$(".collection-loading").hide(),t&&t.call(this)}$(".collection-loading").show(),this.getjson(i.replace(/https?:/g,location.protocol),function(t){if(t.hasOwnProperty("body"))if($(e).html(t.body),(t.audience||{}).string&&delete t.audience.string,$(e).hasClass("collection-module")){if(e.uol={type:"modulo-cruzado",metatags:t.metatags,audience:{collection:Collection.titulo,channel:Collection.channel,central:Collection.central,mediaType:t.type,mediaName:"Módulo Cruzado",mediaTitle:"Módulo Cruzado"}},(Component[t.type]||{}).audience)for(var o in Component[t.type].audience)e.uol.audience[o]=Component[t.type].audience[o];t.blacklist.map(function(t){"headline-content"==e.getAttribute("data-component")&&n.sessionStorage.addItem("collection",t)})}else t.audience.collection=Collection.titulo,t.audience.channel=Collection.channel,t.audience.central=Collection.central,e.uol={type:t.type,metatags:t.metatags,audience:t.audience};r.call(this,"loaded")},function(){r.call(this,"error")})},expose.init=function(){var e=this;this.sessionStorage=new this["session-blacklist"],this.allItems=this.dom.querySelectorAll(".collection-item"),this.contentUpdated(),this.checkItemsToLoad(),this.updateIndex(0),$(window).on("scroll.collection",function(){e.onscroll.call(e)}),Collection.collectionIndex||(-1==location.search.search(/nopush/)&&this.enablePushState(),window.addEventListener("beforeunload",function(){document.title=e.initialItem.title,history.replaceState(null,document.title,e.initialItem.url)})),"scrollRestoration"in history&&(history.scrollRestoration="manual")},expose.selector="body"; });    def('article-wrapper', function(){ function makeScrollable(i){var o=$(".row",i.dom);if(o.length&&(o.find(".instagram-media").length&&window.instgrm&&window.instgrm.Embeds&&window.instgrm.Embeds.process(),$(".scrollFixed, [class$=fixed]",i.dom).scrollfix({limit:o,marginTop:50}),$(".ads:not(.native-related):not(.slot-b .ads)",i.dom).css("position","inherit"),i.breakpoints.checkin(["md"])||i.breakpoints.checkin(["lg"]))){var n=$(".ads:not(.native-related):not(.slot-b .ads)",i.dom);if("true"==n.attr("data-disableScroll"))return;n.scrollfix({limit:o,marginTop:10})}}include("breakpoints"),expose.init=function(){var i=this;(this.breakpoints.checkin("xs")||this.breakpoints.checkin("sm"))&&$(".read-more-btn .btn",i.dom).on("click",function(){window.uolads&&window.uolads.push({id:$(".ads",i.dom).children().attr("id")})}),$(".ads",i.dom).css("margin-top","0"),document.onreadystatechange=function(){"complete"===document.readyState&&makeScrollable(i)},ucopy.init([".text",".p-author-local","header h1"]),setTimeout(function(){makeScrollable(i)},1500),$(window).on("resize",function(){makeScrollable(i)})}; });    def('report-error', function(){ include("modal","storage"),expose.getPushWebalertToken=function(){var e=this.storage.get("uolPushNotification");return e&&e.subscriptionID},expose.init=function(){var e=this;this.on("click",null,function(a,t){this.modal.open({type:"report-error",args:{},configPath:Config.configPath},"report-error").onshow=function(){var a={link:$(t).parents("[data-url]").attr("data-url")||document.documentURI||Config.channel.link,station:Config.portal.title,single:e.dom.getAttribute("data-title")||""};$(this.dom).find(".ep-source").html(a.single),$(".c-e").text(a.station);var n=function(e){var a,t=null,n=null;switch(e.type){case"email":n=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;break;case"text":t=4;break;case"textarea":t=10;break;default:t=0}return n&&(a=n.test(e.value)),t&&(a=e.value.length>=t),a};$("form",this.dom).on("submit",function(t){var o=$(this).parents(".modal"),s=o.find('input[type!="hidden"], textarea'),r=[],i=!0===navigator.cookieEnabled?"1":"0";if(o.find('[name="cookies"]')[0].value=i,s&&s.length>0&&s.each(function(){var e=[];e.label=$(this).closest(".form-group").find("label.error"),e.type=$(this).attr("type")||$(this).prop("tagName").toLowerCase(),e.value=$(this).val(),$(this)[n(e)?"removeClass":"addClass"]("error"),e.label[n(e)?"addClass":"removeClass"]("hidden"),n(e)||r.push(!1)}),o.find(".modal-wrapper").attr("data-success",[0==r.length?"1":"0"]),o.find(".modal-success")[0==r.length?"removeClass":"addClass"]("hidden"),o.find(".alert-danger")[0==r.length?"addClass":"removeClass"]("ghost"),o.find(".modal-form")[0==r.length?"addClass":"removeClass"]("hidden"),0==r.length){var l={estacao:o.find('[name="estacao"]').val(),flash:"-",cookies:o.find('[name="cookies"]').val(),extra_dna:o.find('[name="extra_dna"]').val(),link:a.link,titulo:a.single||a.station,nome:o.find('[name="nome"]').val(),email:o.find('[name="email"]').val(),mensagem:o.find('[name="mensagem"]').val()};e.getPushWebalertToken()&&(l.extra_webalert_token=e.getPushWebalertToken()),$.ajax({url:"https://services.uol.com/see/",data:l,dataType:"json",type:"POST",success:function(e){console.log(e)},error:function(){console.log("Erro")}}),t.preventDefault()}}),$("input[type=text], input[type=email], textarea",this.dom).on("focus",function(){$(this).parents().find(".alert-danger").addClass("ghost");return $(this).removeClass("error"),$(this).parents(".form-group").find("label.error").addClass("hidden"),!1}),UOLPD.TagManager.Commons.RemoteStorage().get("DNA",function(e,a){$('[name="extra_dna"]',this.dom).val(a)})}})}; });    def('back-to-top', function(){ !function(){"use strict";expose.bind=function(){var o=$(this.dom).parent(),t={min:1200,show:!1,view:$(document).height()};$(window).scroll(function(){var i=$(document).scrollTop().valueOf()+$(window).height();t.show?i<t.min&&(t.show=!1):i>=t.min&&(t.show=!0),o.attr("data-show",t.show)}),o.find("[data-backtop]").click(function(){$("html, body").animate({scrollTop:0},1e3)})},expose.init=function(){this.bind()},expose.selector=".back-to-top .box"}(); });    def('bannersticky', function(){ !function(){"use strict";expose.init=function(){var e=this;setTimeout(function(){var i=$(".article.scroll-base .divider.separator"),t=$(".title-content");if(null==t.height())var n=$(".blog-header");else n=t;if(null!=$(".title-kicker").height()&&null==t.height())n=$(".title-kicker");if(null!=$(".title-image").height()&&null==t.height())n=$(".title-image");if("mobile"==Config.platform&&null==t&&null!=$(".h-headline").height())n=$(".h-headline");var o=$(".bannersticky-top-container"),s=$(".bannersticky-top");function l(){-1==window.location.search.substring(1).indexOf("testeTopoFixo")?o.css("min-height",s.css("height")):$("#banner-responsive-top-horizontal-1").find("iframe").css({height:"230px","background-color":"#000",border:"1px solid #000"})}if(l(),s.show(),i.size()>0&&i.offset().top<n.offset().top)var r=i.first();else{if(!(n.size()>0&&n.is(":visible")))return void s.css("position","relative");r=n}$(".bannersticky-top",e.dom).scrollfix({limit:r}),$(window).on("resize",function(){s.css("width",document.querySelector("body").getBoundingClientRect().width+"px"),l()});var c=0,a=setInterval(function(){c++,l(),c>=5&&clearInterval(a)},1e3)},1e3)},expose.selector=".bannersticky-top-container"}(); });    def('chartbeat-related-content', function(){ include("cookie","date"),expose.init=function(){var e,t=this,a=this.parse(this.dom.getAttribute("data-request"),{}),i=this.dom.innerHTML;function c(e,a){t.getjson(Config.servicename+"?loadComponent="+e+"&data="+a,function(e){t.dom.innerHTML=e.body||i,t.dom.removeAttribute("data-request")})}function n(e,a,i){var c=t.parse(e.attr(a),{});return["abTest2","abTest4","abTest6","tags"].forEach(function(e){c[e]=i[e]}),c}function r(e,t){e.length&&(e.attr("data-audience-print",JSON.stringify(n(e,"data-audience-print",t))),e.attr("data-audience-click",JSON.stringify(n(e,"data-audience-click",t))))}if(this.cookie.unset("chartbeat-related-content","/",".uol.com.br"),this.cookie.unset("chartbeat-related-content-1","/",".uol.com.br"),this.cookie.unset("chartbeat-related-content-2","/",".uol.com.br"),this.cookie.unset("chartbeat-related-content-3","/",".uol.com.br"),!this.cookie.get("chartbeat-related-content-4")){var o={name:"chartbeat-related-content-4",value:(e=["recommend_item","chartbeat"],e[Math.floor(2*Math.random())]||"default"),expires:15,path:"/",domain:".uol.com.br"};this.cookie.set(o.name,o.value,o.expires,o.path,o.domain)}var d=this.cookie.get("chartbeat-related-content-4");if("recommend_item"==d||"recommend_user"==d||"chartbeat"==d){if((Object.keys(a)||[]).length){var s=a.busca,l=$(this.dom).parents("[data-url]:last").attr("data-url")||location.href,u=a["related-content"];s.api=d,u.audience.click.refs[d].abTest2=a.countText,u.audience.click.refs[d].override=u.audience.click.override,u.audience.click.refs[d].print=u.audience.click.print,u.audience.click.refs[d].tags=u.audience.click.tags,u.audience.click=u.audience.click.refs[d],u.audience.click.source=encodeURIComponent(l);var m={contentId:a.contentId,type:"chartbeat","related-content":u};"recommend_user"==d&&(s.params.id=this.cookie.get("_ga").replace(/^([^.]+\.){2}/,""));var h=Object.keys(s.params).map(function(e){return e+"="+s.params[e]}).join("&"),b=$(this.dom).parents("article").find(".read-more-btn [data-audience-print]");r(b,u.audience.click),"recommend_item"==d||"recommend_user"==d?this.getjson(s.service+s.api+"?"+h,function(e){if((e.items||[]).length>2){u.topo.titulo="UOL recomenda",u.audience.click.abTest5=[],u.items=[];for(var t=0;t<e.items.length&&!(u.items.length>2);t++){var i=e.items[t],n=i.id.replace("publisher-","");a.contentId!=n&&(u.audience.click.abTest5.push(n),i.title=i.title.replace(/"/g,"&quot;"),u.items.push({id:n,titulo:encodeURIComponent(i.title),imagem:i.image,link:i.link}))}u.audience.click.abTest5=u.audience.click.abTest5.join(","),c("related-content",JSON.stringify(u))}else m["related-content"].audience.click.abTest6="padrao",r(b,m["related-content"].audience.click),c("chartbeat-related-content",JSON.stringify(m))}):c("chartbeat-related-content",JSON.stringify(m))}}else this.dom.removeAttribute("data-request")}; });    def('report-error-button', function(){ include("breakpoints"),expose.animationButton=function(){var n=this;setTimeout(function(){var t=$(n.dom).find(".animate");t.length>0&&(t.addClass("show"),setTimeout(function(){t.removeClass("show")},1e3))},1e3)},expose.init=function(){this.animationButton()}; });  