{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///related.js","webpack:///webpack/bootstrap e2b5f059d02e30b5afcc","webpack:///./src/index.js","webpack:///./package.json","webpack:///./src/view.js","webpack:///./src/constants.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_init","context$","Voonto","getInstance","when","then","gigyaux","$","each","_view2","uid","vocUserGetData","Object","defineProperty","value","VERSION","undefined","_package","_package2","_view","_Voonto","ready","app","on","event","version","name","description","main","scripts","test","start","build","author","license","devDependencies","babel-core","babel-eslint","babel-loader","babel-polyfill","babel-preset-es2015","chai","chalk","eslint","eslint-config-airbnb-base","eslint-plugin-import","html-webpack-plugin","json-loader","mocha","mocha-loader","mocha-phantomjs","webpack","webpack-shell-plugin","_classCallCheck","instance","Constructor","TypeError","_loadOwnpageScript","e","a","n","document","createElement","getElementsByTagName","type","defer","async","src","_constants","SCRIPT_SRC","onload","readyState","onreadystatechange","parentNode","insertBefore","_getTrackOwnPageID","config","trackId","_getRecommendationsOwnPageID","recommendationId","VOC_TC","lookup","window","__VOONTO__","createGlobal","View","_ref","element$","userId","recommendationsId","vocento","relatedContent","el$","_uid","Ownpage","trackPage","voc_tc","getRecommendations","displayRecommendations","recommendations","recommendation","result","elemLi","prepend","CONTAINER_TEMPLATE","i","length","ELEMENT_TEMPLATE","replace","url","title","image","append","RECOMMENDATIONS_ID","SITE_NAME","toUpperCase"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,eAAAD,IAEAD,EAAA,eAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,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SAAWhB,GAASc,QAAQG,mBAAmBR,EAAmBD,EAAQ,uDAAwD,KJqKpJ3G,GAAQkB,QI/JMsF,EAiCfH,OAAOQ,QAAQC,eAAeO,uBAAyB,SAAgCC,GACrF,GAAIC,GAAiBD,EAAgBE,OAAOD,eACxCE,EAAS,EAEbpB,QAAOQ,QAAQC,eAAeC,IAAIW,QAAlCnC,EAAAoC,mBAEA,KAAK,GAAIC,GAAI,EAAGA,EAAIL,EAAeM,OAAQD,IACzCH,KAAYA,EAASlC,EAAAuC,iBAClBC,QAAQ,uBAAwBR,EAAeK,GAAGI,KAClDD,QAAQ,yBAA0BR,EAAeK,GAAGK,OACpDF,QAAQ,sBAAuBR,EAAeK,GAAGM,MAItDxG,6BAA4ByG,OAAOV,KJgK/B,SAAUxH,EAAQD,GAEvB,YAEA+B,QAAOC,eAAehC,EAAS,cAC7BiC,OAAO,GKvPH,IACMmG,IADA5C,aAAa,0CACb4C,qBAAqB,sBACrBC,cAAYhH,OAAOC,cAAc8E,OAAO,gBAAgBvD,MAAQ,EAEhE8E,mCACHU,EAAUC,cADP,oCAECF,EAFD,YAKAN","file":"related.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"RelatedContent\"] = factory();\n\telse\n\t\troot[\"RelatedContent\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"RelatedContent\"] = factory();\n\telse\n\t\troot[\"RelatedContent\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.VERSION = undefined;\n\t\n\tvar _package = __webpack_require__(2);\n\t\n\tvar _package2 = _interopRequireDefault(_package);\n\t\n\tvar _view = __webpack_require__(3);\n\t\n\tvar _view2 = _interopRequireDefault(_view);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar _Voonto = Voonto,\n\t $ = _Voonto.$;\n\t\n\t\n\tVoonto.ready.then(function (app) {\n\t _init();\n\t app.on('voonto:reload', function (event, context$) {\n\t return _init(context$);\n\t });\n\t});\n\t\n\tvar VERSION = exports.VERSION = _package2.default.version;\n\t\n\t/* Private */\n\t\n\tfunction _init(context$) {\n\t Voonto.getInstance().when('vocuser:ready').then(function (gigyaux) {\n\t $('[data-voc-related-content]', context$).each(function () {\n\t new _view2.default({\n\t uid: gigyaux.vocUserGetData().uid\n\t }, $(this));\n\t });\n\t });\n\t}\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = {\n\t\t\"name\": \"related\",\n\t\t\"version\": \"1.0.3\",\n\t\t\"description\": \"\",\n\t\t\"main\": \"src/index.js\",\n\t\t\"scripts\": {\n\t\t\t\"test\": \"./node_modules/.bin/webpack && ./node_modules/.bin/mocha-phantomjs dist/spec/index.html --reporter xunit --file test-results.xml\",\n\t\t\t\"start\": \"webpack-dev-server\",\n\t\t\t\"build\": \"./node_modules/webpack/bin/webpack.js\"\n\t\t},\n\t\t\"author\": \"Iván Pérez \",\n\t\t\"license\": \"SEE LICENSE IN LICENSE.md\",\n\t\t\"devDependencies\": {\n\t\t\t\"babel-core\": \"^6.17.0\",\n\t\t\t\"babel-eslint\": \"^8.0.1\",\n\t\t\t\"babel-loader\": \"^6.2.5\",\n\t\t\t\"babel-polyfill\": \"^6.16.0\",\n\t\t\t\"babel-preset-es2015\": \"^6.16.0\",\n\t\t\t\"chai\": \"^3.5.0\",\n\t\t\t\"chalk\": \"^1.1.3\",\n\t\t\t\"eslint\": \"^4.7.2\",\n\t\t\t\"eslint-config-airbnb-base\": \"^12.0.1\",\n\t\t\t\"eslint-plugin-import\": \"^2.7.0\",\n\t\t\t\"html-webpack-plugin\": \"^2.24.1\",\n\t\t\t\"json-loader\": \"^0.5.4\",\n\t\t\t\"mocha\": \"^3.1.0\",\n\t\t\t\"mocha-loader\": \"^1.0.0\",\n\t\t\t\"mocha-phantomjs\": \"^4.1.0\",\n\t\t\t\"webpack\": \"^1.13.3\",\n\t\t\t\"webpack-shell-plugin\": \"^0.4.3\"\n\t\t}\n\t};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _constants = __webpack_require__(4);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar VOC_TC = 'noticia';\n\tvar config = Voonto.getInstance().lookup('vocento.config.relatedContent');\n\twindow.__VOONTO__.createGlobal('vocento.relatedContent');\n\t\n\tvar View = function View(_ref, element$) {\n\t var uid = _ref.uid;\n\t\n\t _classCallCheck(this, View);\n\t\n\t var userId = void 0,\n\t trackId = void 0,\n\t recommendationsId = void 0;\n\t\n\t window.vocento.relatedContent.el$ = element$;\n\t\n\t this._uid = uid;\n\t\n\t userId = null;\n\t trackId = _getTrackOwnPageID();\n\t recommendationsId = _getRecommendationsOwnPageID();\n\t\n\t if (this._uid) {\n\t userId = this._uid;\n\t }\n\t\n\t _loadOwnpageScript(function () {\n\t if (trackId) {\n\t Ownpage.trackPage(trackId, userId);\n\t }\n\t\n\t if (window.voc_tc !== 'undefined' && recommendationsId) {\n\t if (window.voc_tc === VOC_TC) {\n\t Ownpage.getRecommendations(recommendationsId, userId, 'window.vocento.relatedContent.displayRecommendations', 3);\n\t }\n\t }\n\t });\n\t};\n\t\n\texports.default = View;\n\t\n\t/* Private */\n\t\n\tfunction _loadOwnpageScript(e) {\n\t var a, n;\n\t\n\t a = document.createElement('script');\n\t n = document.getElementsByTagName('script')[0];\n\t\n\t a.type = 'text/javascript', a.defer = 1, a.async = 1, a.src = _constants.SCRIPT_SRC, a.onload = e;\n\t\n\t if (a.readyState) {\n\t a.onreadystatechange = function () {\n\t (a.readyState === 'loaded' || a.readyState === 'complete') && (a.onreadystatechange = null, e && typeof e === 'function' && e());\n\t };\n\t } else {\n\t a.onload = function () {\n\t e && typeof e === 'function' && e();\n\t };\n\t }\n\t\n\t n.parentNode.insertBefore(a, n);\n\t}\n\t\n\tfunction _getTrackOwnPageID() {\n\t return config.trackId;\n\t}\n\t\n\tfunction _getRecommendationsOwnPageID() {\n\t return config.recommendationId;\n\t}\n\t\n\twindow.vocento.relatedContent.displayRecommendations = function displayRecommendations(recommendations) {\n\t var recommendation = recommendations.result.recommendation;\n\t var elemLi = '';\n\t\n\t window.vocento.relatedContent.el$.prepend(_constants.CONTAINER_TEMPLATE);\n\t\n\t for (var i = 0; i < recommendation.length; i++) {\n\t elemLi = '' + elemLi + _constants.ELEMENT_TEMPLATE.replace(/{recommendationUrl}/g, recommendation[i].url).replace(/{recommendationTitle}/g, recommendation[i].title).replace(/{recommendationImg}/, recommendation[i].image);\n\t }\n\t\n\t $('#' + _constants.RECOMMENDATIONS_ID).append(elemLi);\n\t};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar SCRIPT_SRC = exports.SCRIPT_SRC = 'https://script.ownpage.fr/v1/ownpage.js';\n\tvar RECOMMENDATIONS_ID = exports.RECOMMENDATIONS_ID = 'recommendations-id';\n\tvar SITE_NAME = exports.SITE_NAME = Voonto.getInstance().lookup('vocento.site').name || '';\n\t\n\tvar CONTAINER_TEMPLATE = exports.CONTAINER_TEMPLATE = '\\n

' + SITE_NAME.toUpperCase() + ' te recomienda

\\n \\n';\n\t\n\tvar ELEMENT_TEMPLATE = exports.ELEMENT_TEMPLATE = '\\n
  • \\n \\n
  • \\n';\n\t\n\t// FUTURE: Add after ''\n\t// \n\t// \n\t// \n\t\n\t// NOTE: Author (Add after '')\n\t// \n\t// \n\t// \n\t// {author}\n\t// \n\t// \n\t// \n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// related.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e2b5f059d02e30b5afcc","import pkg from '../package.json';\nimport View from './view';\n\nconst {$} = Voonto;\n\nVoonto.ready.then((app) => {\n _init();\n app.on('voonto:reload', (event, context$) => _init(context$));\n});\n\nexport const VERSION = pkg.version;\n\n/* Private */\n\nfunction _init(context$) {\n Voonto.getInstance().when('vocuser:ready').then((gigyaux) => {\n $('[data-voc-related-content]', context$).each(function () {\n new View({\n uid: gigyaux.vocUserGetData().uid\n }, $(this));\n });\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","module.exports = {\n\t\"name\": \"related\",\n\t\"version\": \"1.0.3\",\n\t\"description\": \"\",\n\t\"main\": \"src/index.js\",\n\t\"scripts\": {\n\t\t\"test\": \"./node_modules/.bin/webpack && ./node_modules/.bin/mocha-phantomjs dist/spec/index.html --reporter xunit --file test-results.xml\",\n\t\t\"start\": \"webpack-dev-server\",\n\t\t\"build\": \"./node_modules/webpack/bin/webpack.js\"\n\t},\n\t\"author\": \"Iván Pérez \",\n\t\"license\": \"SEE LICENSE IN LICENSE.md\",\n\t\"devDependencies\": {\n\t\t\"babel-core\": \"^6.17.0\",\n\t\t\"babel-eslint\": \"^8.0.1\",\n\t\t\"babel-loader\": \"^6.2.5\",\n\t\t\"babel-polyfill\": \"^6.16.0\",\n\t\t\"babel-preset-es2015\": \"^6.16.0\",\n\t\t\"chai\": \"^3.5.0\",\n\t\t\"chalk\": \"^1.1.3\",\n\t\t\"eslint\": \"^4.7.2\",\n\t\t\"eslint-config-airbnb-base\": \"^12.0.1\",\n\t\t\"eslint-plugin-import\": \"^2.7.0\",\n\t\t\"html-webpack-plugin\": \"^2.24.1\",\n\t\t\"json-loader\": \"^0.5.4\",\n\t\t\"mocha\": \"^3.1.0\",\n\t\t\"mocha-loader\": \"^1.0.0\",\n\t\t\"mocha-phantomjs\": \"^4.1.0\",\n\t\t\"webpack\": \"^1.13.3\",\n\t\t\"webpack-shell-plugin\": \"^0.4.3\"\n\t}\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./package.json\n// module id = 2\n// module chunks = 0 1","import {\n SCRIPT_SRC,\n RECOMMENDATIONS_ID,\n CONTAINER_TEMPLATE,\n ELEMENT_TEMPLATE\n} from './constants';\n\nconst VOC_TC = 'noticia';\nconst config = Voonto.getInstance().lookup('vocento.config.relatedContent');\nwindow.__VOONTO__.createGlobal('vocento.relatedContent');\n\nclass View {\n constructor({uid}, element$) {\n let userId, trackId, recommendationsId;\n\n window.vocento.relatedContent.el$ = element$;\n\n this._uid = uid;\n\n userId = null;\n trackId = _getTrackOwnPageID();\n recommendationsId = _getRecommendationsOwnPageID();\n\n if (this._uid) {userId = this._uid;}\n\n _loadOwnpageScript(function () {\n if (trackId) {Ownpage.trackPage(trackId, userId);}\n\n if (window.voc_tc !== 'undefined' && recommendationsId) {\n if (window.voc_tc === VOC_TC) {Ownpage.getRecommendations(recommendationsId, userId, 'window.vocento.relatedContent.displayRecommendations', 3);}\n }\n });\n }\n}\n\nexport default View;\n\n/* Private */\n\nfunction _loadOwnpageScript(e) {\n var a, n;\n\n a = document.createElement('script');\n n = document.getElementsByTagName('script')[0];\n\n a.type = 'text/javascript', a.defer = 1, a.async = 1, a.src = SCRIPT_SRC, a.onload = e;\n\n if (a.readyState) {\n a.onreadystatechange = function() {\n (a.readyState === 'loaded' || a.readyState === 'complete') && (a.onreadystatechange = null, e && typeof e === 'function' && e());\n };\n } else {\n a.onload = function() {\n (e && typeof e === 'function' && e());\n };\n }\n\n n.parentNode.insertBefore(a, n);\n}\n\nfunction _getTrackOwnPageID () {\n return config.trackId;\n}\n\nfunction _getRecommendationsOwnPageID () {\n return config.recommendationId;\n}\n\nwindow.vocento.relatedContent.displayRecommendations = function displayRecommendations(recommendations) {\n var recommendation = recommendations.result.recommendation;\n var elemLi = '';\n\n window.vocento.relatedContent.el$.prepend(CONTAINER_TEMPLATE);\n\n for (let i = 0; i < recommendation.length; i++) {\n elemLi = `${elemLi}${ELEMENT_TEMPLATE\n .replace(/{recommendationUrl}/g, recommendation[i].url)\n .replace(/{recommendationTitle}/g, recommendation[i].title)\n .replace(/{recommendationImg}/, recommendation[i].image)\n }`;\n }\n\n $(`#${RECOMMENDATIONS_ID}`).append(elemLi);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/view.js","export const SCRIPT_SRC = 'https://script.ownpage.fr/v1/ownpage.js';\nexport const RECOMMENDATIONS_ID = 'recommendations-id';\nexport const SITE_NAME = Voonto.getInstance().lookup('vocento.site').name || '';\n\nexport const CONTAINER_TEMPLATE = `\n

    ${SITE_NAME.toUpperCase()} te recomienda

    \n \n`;\n\nexport const ELEMENT_TEMPLATE = `\n
  • \n \n
  • \n`;\n\n// FUTURE: Add after ''\n// \n// \n// \n\n// NOTE: Author (Add after '')\n// \n// \n// \n// {author}\n// \n// \n// \n\n\n\n// WEBPACK FOOTER //\n// ./src/constants.js"],"sourceRoot":""}