   (()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};((e,t,n)=>{n.r(t),n.d(t,{addSubscription:()=>I,getItemRecommendation:()=>h,getNewsFromSources:()=>P,getSubscription:()=>_,getUserBlocksHome:()=>x,getUserBlogPostsRecommendation:()=>g,getUserInscriptions:()=>C,getUserLoyalty:()=>b,getUserTagsInfo:()=>S,getUserViewsByCentral:()=>k,isFirstUserAccess:()=>U}),/test|development/.test("production");var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=function(e){return e.replace(/^([^.]+\.){2}/,"")},i=function(){if("www.uol.com.br"===location.hostname&&"/"===location.pathname)return"home";try{if(window.universal_variable.aud.central)return window.universal_variable.aud.central;throw new Error("central não definida em universal_variable")}catch(e){return"undefined"}};var a,s=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})},l=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=1==(!0===/duckslake-sdk=debug/.test(location.search))?console.log.bind(console,"[ducks-lake:middleware]"):function(){},c=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&"www.uol.com.br"!==location.hostname?"https://"+location.hostname+((null===(a=window.Config)||void 0===a?void 0:a.servicename)||"/service/")+"index.htm?loadComponent=assets&contentType=html&tpl=assets/modules/duckslake-sdk/index.html&version=3.3.1":"https://www.uol.com.br/service/index.htm?loadComponent=assets&contentType=html&tpl=assets/modules/duckslake-sdk/index.html&version=3.3.1",d=function(e){var t=r(c.split("/").filter(function(e){return""!==e}),2);return t[0]+"//"+t[1]}(),f=!1,v=document.createElement("iframe"),m=new Map,w=new Set,p=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s(void 0,void 0,void 0,function(){var n;return l(this,function(r){switch(r.label){case 0:return"init"===e?[3,2]:[4,s(void 0,void 0,void 0,function(){return l(this,function(e){return!0===f?[2,Promise.resolve()]:[2,new Promise(function(e){w.add(e)})]})})];case 1:r.sent(),r.label=2;case 2:return n=m.size+1,[2,new Promise(function(r){m.set(n,r),v.contentWindow.postMessage({id:n,action:e,params:t},c)})]}})})}},y=function(){window.addEventListener("message",function(e){var t=e.origin,n=e.data,r=n.id,o=n.result;if(u("middleware recebeu mensagem do sdk",r,e.origin,e.data),t===d){var i=m.get(r);"function"==typeof i&&(m.set(r,null),i(o))}else u("descartando mensagem de origin que não é do SDK (recebido: "+t+" / esperado: "+d+")")},!1),v.onload=function(){return s(void 0,void 0,void 0,function(){var e,t,n,a;return l(this,function(s){switch(s.label){case 0:return[4,p("init")({actualUser:(l=r(document.cookie.split(";").map(function(e){return e.split("=")}).find(function(e){var t=r(e,1)[0];return"_ga"===(void 0===t?"":t).trim()})||[],2)[1],void 0!==l?{identified:!0,gaID:o(l)}:{identified:!1,gaID:null}),centralKey:i(),platform:(null===(t=window.Config)||void 0===t?void 0:t.platform)||"",mediaId:null===(a=null===(n=window.universal_variable)||void 0===n?void 0:n.aud)||void 0===a?void 0:a.mediaId,referrer:location.href})];case 1:return(e=s.sent()).metrics&&e.metrics.fidelity&&["sc","aud"].forEach(function(t){window.universal_variable=window.universal_variable||{},window.universal_variable[t]=window.universal_variable[t]||{},window.universal_variable[t].userFidelity=e.metrics.fidelity}),f=!0,function(){var e,t;try{for(var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(w),r=n.next();!r.done;r=n.next())(0,r.value)()}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}(),[2]}var l})})},v.name="duckslake-sdk",v.src=c,v.style.display="none",v.style.width="0",v.style.height="0",v.style.opacity="0",v.style.border="0",v.style.position="absolute",v.style.left="-9999px",v.setAttribute("width","0"),v.setAttribute("height","0"),v.setAttribute("sandbox","allow-scripts allow-same-origin"),v.setAttribute("referrerpolicy","no-referrer"),document.body.appendChild(v)},b=p("getUserLoyalty"),h=p("getItemRecommendation"),g=p("getUserBlogPostsRecommendation"),k=p("getUserViewsByCentral"),S=p("getUserTagsInfo"),x=p("getUserBlocksHome"),U=p("isFirstUserAccess"),_=p("getSubscription"),I=p("addSubscription"),P=p("getNewsFromSources"),C=p("getUserInscriptions");!function(){if("interactive"!=document.readyState){var e=function(){window.removeEventListener("DOMContentLoaded",e),y()};window.addEventListener("DOMContentLoaded",e)}else y()}()})(0,t,e),window.DucksLake=t})();   