{"version":3,"sources":["webpack:///webpack/bootstrap e1ce432564f371828215","webpack:///./js/util.js","webpack:///./js/embed.js"],"names":[],"mappings":"YACA,cAMA,IACA,iBAGA,mBACA,CACA,IACA,KAIA,2CAGA,aAGA,OACA,OAIA,IAzBA,eA4BA,MAGA,uBACA,GACA,kCACA,CACA,gBACA,cAGA,OAGA,iBACA,YACA,qBAA2B,UAA0B,UACrD,YAAiC,CAAe,QAChD,EAEA,aADA,QAIA,mBAAsD,wCAA+D,SAGrH,MAGA,8CC7DW,aAAU,EAAU,SAC3B,OAAO,GACV,iBAEW,aAAU,EAAU,SAC5B,OAAO,GAAG,MAAM,KAAK,EACxB,oBAQA,8DAdD,4FCAA,GAEA,CAAC,UACG,CAemB,aACf,IACA,UAAK,GACD,QAAI,EACA,qBAAI,KAAwB,sBAAK,IAAM,mBAE/C,aAAO,GAAI,KACd,IACJ,CAvBG,YAAG,iBAAiB,QAAQ,KACxB,CAGS,YACL,GAAM,UAAU,OAChB,gBAAW,mCAA+B,EAAW,MAAsB,IAC3E,GAAI,EAAS,SAAS,cACtB,YACA,QAAM,UAAY,EAElB,YAAM,oBACT,UACJ,IAZO,GAAU,KAAK,MAAM,EAAM,QAC/B,MAAM,iBAEN,UAWJ,EAhBJ","file":"embed.bundle.js","sourcesContent":[" \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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e1ce432564f371828215","function $(selector, context = document) {\r\n return context.querySelector(selector);\r\n}\r\n\r\nfunction $$(selector, context = document) {\r\n return [].slice.call(context.querySelectorAll(selector));\r\n}\r\n\r\nfunction $id(id, context = document) {\r\n return context.getElementById(id);\r\n}\r\n\r\nfunction on(el, event, cb) {\r\n el.addEventListener(event, cb);\r\n}\r\n\r\nexport {\r\n $,\r\n $$,\r\n $id,\r\n on\r\n};\n\n\n// WEBPACK FOOTER //\n// ./js/util.js","import {$$} from './util';\r\n\r\n(function () {\r\n $$('.embed__video').forEach(embed => {\r\n let youtube = JSON.parse(embed.dataset.yt);\r\n embed.addEventListener('click', injectIframe);\r\n\r\n function injectIframe() {\r\n embed.classList.remove('play-icon');\r\n let url = `http://www.youtube.com/embed/${youtube.id}?${serialize(youtube)}`;\r\n let iframe = document.createElement('iframe');\r\n iframe.src = url;\r\n embed.innerHTML = iframe.outerHTML;\r\n\r\n embed.removeEventListener('click', injectIframe);\r\n }\r\n });\r\n\r\n function serialize(obj) {\r\n let str = [];\r\n for (let p in obj)\r\n if (obj.hasOwnProperty(p)) {\r\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\r\n }\r\n return str.join(\"&\");\r\n }\r\n})();\n\n\n// WEBPACK FOOTER //\n// ./js/embed.js"],"sourceRoot":""}