/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { (function () { var ExtraAbstract = __webpack_require__(1); var SMUtils = __webpack_require__(2); /** * LaRazonExtra class * @param pluginType * @constructor */ function LaRazonExtra (pluginType) { // [Inheritance] ExtraAbstract.call(this, pluginType); } // [Inheritance] LaRazonExtra.prototype = Object.create(ExtraAbstract.prototype); LaRazonExtra.prototype.constructor = LaRazonExtra; LaRazonExtra.prototype.rewrite = function (plg) { plg.loadPlayer = function () { var _self = plg; /* EXTRA */ // Elementos "p" dentro del div con clase "parrafo" var validPs = 0; // Si existe más de un elemento con clase "párrafo", // escoger el que mejor se adapte a la posición que se pasa como parámetro if (document.getElementsByClassName('paragraph').length > 1) { // En este caso, elegir el último _self.params.container = document.getElementsByClassName('paragraph')[document.getElementsByClassName( 'paragraph').length - 1]; validPs -= 1; } // Si solo existe un elemento con clase "parrafo" else { _self.params.container = document.getElementsByClassName('paragraph')[0]; } var elementsP = _self.params.container.getElementsByClassName('news-detail__paragraph'); for (var index = 0; index < elementsP.length; index++) { // Solo si tiene una clase asignada, que es el caso de los // párrafos con contenido, no de la letra con mayor tamaño if (elementsP[index].className === 'news-detail__paragraph') { // Sumar validPs++; } } // Si se ha cargado anteriormente el espacio c4231f25 en este párrafo... if (_self.params.container.querySelectorAll('div[id^=\'SM\']').length > 0) {validPs += _self.params.container.querySelectorAll('div[id^=\'SM\']').length;} _self.params.options.adPosition = validPs; /* FIN EXTRA */ _self.samsungb = navigator.userAgent.toLowerCase().indexOf('samsungbrowser'); var f = _self.params.w.document.getElementById('SMIntext_reference_' + _self.params.api); var md; // restarting = false; if (!f) { md = document.createElement('div'); md.setAttribute('id', 'SMIntext_reference_' + _self.params.api); md.setAttribute('class', 'SMreference_' + _self.api); } else { // restarting = true; f.innerHTML = ''; md = f; } var childNodesAllowed = []; for (var j = 0; j < _self.params.container.childNodes.length; j++) { var childNode = _self.params.container.childNodes[j]; if (childNode.nodeType === 1 && SMUtils.isChildNodeAllowed(childNode)) { childNodesAllowed.push(childNode); } } _self.params.container.insertBefore(md, childNodesAllowed[_self.params.options.adPosition]); var efc = document.createElement('div'); efc.setAttribute('id', 'SMIntext_efec_' + _self.params.api); efc.setAttribute('style', 'position:relative;width:100%;height:1px;'); _self.params.container.insertBefore(efc, childNodesAllowed[_self.params.options.adPosition]); _self.effective = efc; // var ww = md.offsetWidth; var i = document.createElement('div'); i.id = 'SMIntext_frame_' + _self.api; (!_self.params.ava.enabled) ? i.setAttribute('class', 'SMContainer_' + _self.api) : i.setAttribute('class', 'SMstarting_' + _self.api); _self.params.w.document.body.appendChild(i); _self.frameContainer = i; _self.reference = md; _self.buildCSS('ref'); _self.buildCSS('noava'); _self.buildCSS('starting'); var p = _self.newSMPlayer(); p.addListener('all', _self); if (_self.params.clientTag) { p.loadTag(_self.params.clientTag, 'c'); } if (_self.params.tag) { p.loadTag(_self.params.tag, 'sm'); } if (_self.params.priority) { p.setTagPriority(_self.params.priority); } _self.players.push(p); _self.state = _self.states.LOADING; _self.frameContainer.style.display = 'block'; if (!_self.isScrolledIntoView(_self.frameContainer) && _self.device.mobileDesktop === 'mobile') { _self.players[0].adPlayer.autoplay = false; _self.players[0].adPlayer.removeAttribute('autoplay'); } _self.effectivePosition = setInterval(_self.setScrollEffective.bind(_self), 50); for (var yy = 0; yy < window.SMIntextPlaylist.length; yy++) { if (window.SMIntextPlaylist[yy].api === _self.params.api) { window.SMIntextPlaylist[yy].state = 'loaded'; } } _self.makingStyles = setInterval( _self.rebuildCSSDirect.bind(_self), 500 ); if (_self.samsungb > -1) { _self.players[0].adPlayer.addEventListener('canplaythrough', _self.videoMsn.bind(_self)); _self.players[0].adPlayer.addEventListener('error', _self.videoMsn.bind(_self)); _self.players[0].adPlayer.addEventListener('suspend', _self.videoMsn.bind(_self)); _self.players[0].adPlayer.addEventListener('waiting', _self.videoMsn.bind(_self)); _self.players[0].adPlayer.addEventListener('stalled', _self.videoMsn.bind(_self)); } _self.players[0].start(); _self.createIntervalByName('outOfPageInterval', _self.setOutOfPage, 50); if (_self.params.ava.enabled && _self.params.options.up) { _self.minimizeVideo('up'); } }; }; // This line creates an instance of the class defined above and // calls the method named run to start it's executions LaRazonExtra.prototype.exec('SMIntext'); })(); /***/ }), /* 1 */ /***/ (function(module, exports) { /** * ExtraAbstract class * @constructor */ function ExtraAbstract (pluginType) { this.extraFLAG = 'SMExtraPlgs'; this.pluginType = pluginType; // Sets window[this.extraFLAG] default value if (!window[this.extraFLAG]) { window[this.extraFLAG] = {}; } } /** * Checks if the plugin has been rewritten * @param api * @return {boolean} */ ExtraAbstract.prototype.hasBeenRewritten = function (api) { return window[this.extraFLAG] && window[this.extraFLAG][api] === true; }; /** * To rewrite plugin instance methods * @param plugin */ ExtraAbstract.prototype.rewrite = function (plugin) { throw new Error('Missing implementation of abstract method!'); }; /** * * @param api * @param [plugin] */ ExtraAbstract.prototype.rewritePlugin = function (api, plugin) { plugin = plugin || window[this.pluginType + '_' + api]; if (!this.hasBeenRewritten(api)) { // Calling rewrite plugin instance if (plugin) { this.rewrite(plugin); } // Sets the current plugin Flag to avoid calling it more than one time window[this.extraFLAG][api] = true; } }; /** * Start the extra script */ ExtraAbstract.prototype.run = function () { var scriptArr = document.getElementsByTagName('script'); for (var index = 0; index < scriptArr.length; index++) { var currentScript = scriptArr[index]; if (currentScript.src.indexOf('extra.js') > -1) { var apiIndex = currentScript.src.indexOf('?'); if (apiIndex > -1) { // SMIntext var api = currentScript.src.substr(apiIndex + 1); this.rewritePlugin(api); } else if (window.hasOwnProperty(this.pluginType)) { // PluginAbstract var collection = window[this.pluginType]; for (var plgId in collection) { if (collection.hasOwnProperty(plgId)) { var plg = collection[plgId]; this.rewritePlugin(plg.api, plg); } } } } } }; /** * This line creates an instance of the class defined above and * calls the method named run to start it's executions */ ExtraAbstract.prototype.exec = function (pluginType) { var instance = new this.constructor(pluginType); instance.run(); }; module.exports = ExtraAbstract; /***/ }), /* 2 */ /***/ (function(module, exports) { /** * @module SMCommon/SMUtils */ var makeWindowDimHelper = function (dim) { return function (w) { if (w['inner' + dim]) { return w['inner' + dim]; } else if (w.documentElement['client' + dim]) { return w.documentElement['client' + dim]; } }; }; var isObject = function (value) { var type = typeof value; return value !== null && (type === 'object' || type === 'function'); }; var deepExtend = function (orig, obj) { if (!orig) {return obj;} for (var i in obj) { if (obj.hasOwnProperty(i)) { if (typeof obj[i] === 'object') {orig[i] = deepExtend(orig[i], obj[i]);} else {orig[i] = obj[i];} } } return orig; }; var deepClone = function (value) { var clonedValue = null; if (false === isObject(value)) {return value;} if (true === Array.isArray(value)) { clonedValue = deepCloneArray(value); } else if (typeof value === 'function') { clonedValue = deepCloneFunction(value); } else if (true === isObject(value)) { clonedValue = deepCloneObject(value); } else { clonedValue = JSON.parse(JSON.stringify(value)); } return clonedValue; }; var deepCloneArray = function (array) { return array.map(function (value) { return deepClone(value); }); }; var deepCloneFunction = function (functionToClone) { if (true === functionToClone.__isClone) { functionToClone = functionToClone.__clonedFrom; } var clonedFunction = functionToClone.bind({}); for (var key in functionToClone) { clonedFunction[key] = functionToClone[key]; } clonedFunction.__isClone = true; clonedFunction.__clonedFrom = functionToClone; return clonedFunction; }; var deepCloneObject = function (objectToClone) { var clonedFunction = objectToClone.constructor ? objectToClone.constructor() : {}; for (var key in objectToClone) { if (objectToClone.hasOwnProperty(key)) { clonedFunction[key] = deepClone(objectToClone[key]); } } return clonedFunction; }; var childNodesNotAllowedToCount = function () { return [ 'a', 'abbr', 'acronym', 'b', 'bdo', 'big', 'br', 'button', 'cite', 'code', 'dfn', 'em', 'i', 'input', 'kbd', 'label', 'map', 'object', 'q', 'samp', 'script', 'select', 'small', 'span', 'strong', 'sub', 'sup', 'textarea', 'time', 'tt', 'var' ]; }; var getParentNodeSwipe = function (element, _array) { if (_array === undefined) { _array = []; } else { _array.push(element); } return (element.tagName !== 'BODY') ? getParentNodeSwipe(element.parentNode, _array) : _array; }; var appendFrameCode = function (container, ishtml, code, script, api) { var iframe = document.createElement('iframe'); iframe.setAttribute('style', 'border:0px;width:100%;height:100%;position:absolute;display:block;top:0px;left:0px;'); iframe.setAttribute('id', 'vpaid_creative_' + api); iframe.scrolling = 'no'; try { if ((/Edge/.test(navigator.userAgent) === false)) {iframe.src = 'javascript:false';} container.appendChild(iframe); var doc = iframe.contentWindow.document; doc.open().write(code); doc.close(); } catch (e) { iframe.src = 'javascript:void((function(){ ' + code + '})())'; container.appendChild(iframe); } return iframe; }; var debug = function (msg, level) { level = level || smUtils.debugLevel.INFO; var fn = 'log'; if (typeof SMDBGLevel !== 'undefined' && level <= SMDBGLevel) { if (debugInfo[level]['fn']) {fn = debugInfo[level]['fn'];} if (debugInfo[level]['css'] && typeof msg !== 'object') { msg = '%c' + msg; console[fn](msg, debugInfo[level]['css']); } else {console[fn](msg);} } }; /** @namespace */ var smUtils = module.exports = { removeWhitespace: function (xml) { var notWhitespace = /\S/; for (var i = 0; i < xml.childNodes.length; i++) { if ((xml.childNodes[i].nodeType === 3) && (!notWhitespace.test(xml.childNodes[i].nodeValue))) { xml.removeChild(xml.childNodes[i]); i--; } } return xml; }, /* * extiende el objeto original con obj y sobrescribe las propiedades del primero */ extend: function (orig, obj) { for (var i in obj) { if (obj.hasOwnProperty(i) /*&& !orig[i]*/) { orig[i] = obj[i]; } } return orig; }, /* * extiende el objeto original recursivamente con obj y sobrescribe las propiedades del primero */ deepExtend: deepExtend, deepClone: deepClone, isObject: isObject, deepCloneArray: deepCloneArray, deepCloneFunction: deepCloneFunction, deepCloneObject: deepCloneObject, getBasePathMainJS: function () { return 'https://static.addevweb.com/SMSdk/'; }, getElement: function (el, tp) { var ele; if (tp !== 'swf') {return document.getElementById(el);} try { if (window.document[el]) { ele = window.document[el]; } else if (document.getElementById(el)) { ele = document.getElementById(el); } else if (window[el]) { ele = window[el]; } else { return false; } var ag = navigator.userAgent.toLowerCase(); if (ag.indexOf('firefox') > -1) {return ele[1];} return ele; } catch (e) { //console.log("error", e.message); } }, getElementPosition: function (element) { var bodyRect = document.body.getBoundingClientRect(); var elemRect = element.getBoundingClientRect(); var offsetTop = elemRect.top - bodyRect.top; var offsetLeft = elemRect.left - bodyRect.left; return {x: offsetLeft, y: offsetTop}; }, getWindow: function (x) { if (window.parent.document.getElementById(x)) { this.w = window.parent; } else if (document.getElementById(x)) { this.w = window; } return this.w; }, getPos: function (el) { // eslint-disable-next-line no-empty for (var lx = 0, ly = 0; el != null; lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent) {} return {x: lx, y: ly}; }, windowHeight: makeWindowDimHelper('Height'), windowWidth: makeWindowDimHelper('Width'), scrollTop: function (w) { if (w.pageXOffset != null) { return { x: w.pageXOffset, y: w.pageYOffset }; } var doc = w.document; if (document.compatMode === 'CSS1Compat') { return { x: doc.documentElement.scrollLeft, y: doc.documentElement.scrollTop }; } return { x: doc.body.scrollLeft, y: doc.body.scrollTop }; }, tryGet: function (fn) { try {return fn();} catch (e) {return undefined;} }, strUpperFirst: function (string) { return string.charAt(0).toUpperCase() + string.slice(1); }, strLowerFirst: function (string) { return string.charAt(0).toLowerCase() + string.slice(1); }, arrayToCamelCase: function (array) { var output = module.exports.strLowerFirst(array.shift()); for (var i in array) { if (array.hasOwnProperty(i)) {output += module.exports.strUpperFirst(array[i]);} } return output; }, objInvert: function (obj) { var invert = {}; for (var i in obj) { if (i.match(/^\d+$/)) {i = parseInt(i, 10);} invert[obj[i]] = i; } return invert; }, childNodesNotAllowedToCount: childNodesNotAllowedToCount, isChildNodeAllowed: function (childNode) { if (!childNode || !childNode.nodeName) {return false;} var childNodesNotAllowed = childNodesNotAllowedToCount(); var childNodeName = childNode.nodeName.toLowerCase(); return (childNodesNotAllowed.indexOf(childNodeName) === -1); }, debug: debug, printError: function (e) { console.error(e.name + ': ' + e.message); }, loadPartnerTrackers: function () { // eslint-disable-next-line max-len var url = 'https://sb.scorecardresearch.com/p?c1=2&c2=21892462&ns_ap_sv=2.1511.10&ns_type=hidden&ns_st_it=a&ns_st_sv=4.0.0&ns_st_ad=1&ns_st_sq=1&ns_st_id=[REPLACE1]&ns_st_ec=1&ns_st_cn=1&ns_st_ev=play&ns_st_ct=va00&ns_st_cl=0&ns_st_pt=0&c3=*null&c4=*null&c6=*null&ns_ts=[REPLACE2]'; var i = new Image(), rnda = Math.floor(100000000 + Math.random() * 900000000), rndb = Math.floor(1000000 + Math.random() * 9000000); url = url.replace('[REPLACE1]', rnda); url = url.replace('[REPLACE2]', rndb); i.src = url; document.body.appendChild(i).setAttribute('style', 'width: 1px !important; height: 1px !important;'); var pixel2 = new Image(); pixel2.src = 'https://sb.scorecardresearch.com/p?C1=1&C2=21892462&C3=&C4=&C5=09'; document.body.appendChild(pixel2).setAttribute('style', 'width: 1px !important; height: 1px !important;'); /* var weborama = document.createElement("script"); weborama.src="https://media.adrcdn.com/ads/Weborama/3136323833/79306/external_all.js"; document.getElementsByTagName("head")[0].appendChild(weborama); */ /** * Callback to be called by agkn script * audience segmentation for P&G * @param {*} tag */ window.setUpAgknTag = function (tag) { tag.setBpId('sunmedia'); // tag.setCat('[page_category]'); }; // Adding agkn script var agkn = document.createElement('script'); agkn.src = 'https://js.agkn.com/prod/v0/tag.js'; agkn.type = 'text/javascript'; agkn.async = true; document.getElementsByTagName('head')[0].appendChild(agkn); var spotxDataLayer = [{source: '202100', sync_limit: 10}]; (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l !== 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'spotxDataLayer', 'GTM-NH3RQL3'); }, linearQuantile: function (array, percent) { array.sort(function (a, b) { return a - b;}); var index = percent / 100. * (array.length - 1); var i = Math.floor(index); if (i === index) { return array[index]; } fract = index - i; return array[i] + (array[i + 1] - array[i]) * fract; }, memoize: function (f) { return function () { var args = Array.prototype.slice.call(arguments); f.memoize = f.memoize || {}; if (args in f.memoize) {return f.memoize[args];} else {return f.memoize[args] = f.apply(this, args);} }; }, getParentNodeSwipe: getParentNodeSwipe, appendFrameCode: appendFrameCode, appendFrameScript: function (container, script, callback, api) { var js; if (script) { js = ''; } else { js = 'setTimeout(function(){window.myCallback()},10);'; } var iframe = appendFrameCode(container, false, js, script, api); if (callback) {iframe.contentWindow.myCallback = callback;} else {iframe.contentWindow.myCallback = function () {};} return iframe; } }; var lvl = module.exports.debugLevel = Object.freeze( module.exports.objInvert(['DISABLED', 'CRITICAL', 'ERROR', 'WARNING', 'NOTICE', 'INFO', 'DEBUG'])); var debugInfo = {}; debugInfo[lvl.CRITICAL] = {fn: 'error'}; debugInfo[lvl.ERROR] = {fn: 'error'}; debugInfo[lvl.WARNING] = {fn: 'warn'}; debugInfo[lvl.NOTICE] = {css: 'color:#664ce6'}; debugInfo[lvl.INFO] = {fn: 'info'}; debugInfo[lvl.DEBUG] = {css: 'color:#4773ca;'}; /***/ }) /******/ ]);