(window.webpackJsonp=window.webpackJsonp||[]).push([[120],{485:function(t,n,f){"use strict";f.r(n),function(r){f.d(n,"default",function(){return e});var t=f(20),u=f.n(t),t=f(15),i=f.n(t),t=f(16),a=f.n(t),t=f(342),o=f.n(t),t=f(343),c=f.n(t),t=f(344),s=f.n(t),t=f(60),t=f.n(t);function l(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=s()(n);return e=r?(t=s()(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),c()(this,e)}}var e=function(t){o()(n,t);var e=l(n);function n(){return i()(this,n),e.apply(this,arguments)}return a()(n,[{key:"onCreate",value:function(){var e=this;this.rules=JSON.parse(this.dom.dataset.rules||"[]"),this.checkExibitionRules().then(function(t){return t&&e.mountDom()})}},{key:"mountDom",value:function(){var t=this.parseTemplate("offer-link",{});this.dom.appendChild(t)}},{key:"getLoyalty",value:function(){return window.DucksLake.getUserLoyalty().then(function(t){var e=t.data,t=t.code;return null!=e.uol&&t?e.uol.loyalty:"uol_leitores_casuais"})}},{key:"getTags",value:function(){return window.DucksLake.getUserTagsInfo().then(function(t){return t.data})}},{key:"checkExibitionRules",value:function(){var e=this;return r.all([this.getLoyalty(),this.getTags()]).then(function(t){if(0==e.rules.length)return!1;var r=u()(t,1)[0],i=t[1].tags.map(function(t){return t.key}),t=location.search;return-1<t.indexOf("debug=true")&&-1<t.indexOf("userTags=")&&-1<t.indexOf("fidelity=")&&(t=e.qaReplaceData(),r=t.fidelity,i=t.tags),null!=e.rules.find(function(t){var e=t.fidelity.includes(r),n=t.tags.some(function(t){return i.includes(JSON.stringify(t.id))});return(e||""==t.fidelity)&&(n||0==t.tags.length)})}).catch(function(t){window.ReportError&&window.ReportError({message:"offer-product-text error: ".concat(t.message),stack:t})})}},{key:"qaReplaceData",value:function(){var t=new URLSearchParams(window.location.search);return{fidelity:t.get("fidelity"),tags:t.get("userTags").split(",")}}}]),n}(f(345).a);t()(e,"lazyload",!0)}.call(this,f(33))}}]);