{"version":3,"sources":["webpack:///cookie.js","webpack:///webpack/bootstrap 98ac5cec3dbece047f36","webpack:///./components/CookieModal.js","webpack:///./cookie.js","webpack:///./utils/cookie.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","./components/CookieModal.js","__webpack_exports__","_classCallCheck","instance","Constructor","TypeError","__WEBPACK_IMPORTED_MODULE_0__utils_cookie__","_createClass","defineProperties","target","props","length","descriptor","writable","key","protoProps","staticProps","CookieModal","this","container","document","querySelector","closeButton","saveButton","saveAllButton","categories","querySelectorAll","setTimeout","triggerButtons","_iteratorNormalCompletion","_didIteratorError","_iteratorError","undefined","_step","_iterator","Symbol","iterator","next","done","value","addEventListener","openModal","bind","err","return","close","save","saveAll","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","categoryClick","classList","remove","add","e","_iteratorNormalCompletion3","_didIteratorError3","_iteratorError3","_step3","_iterator3","currentTarget","_iteratorNormalCompletion4","_didIteratorError4","_iteratorError4","_step4","_iterator4","childValue","dataset","child","checked","$","acceptedCookies","each","val","slice","set","acceptButton","click","all","allCookies","./cookie.js","__WEBPACK_IMPORTED_MODULE_1__components_CookieModal__","removeElement","elementToRemove","parentElement","removeChild","Cookie","notification","notificationClone","cloneNode","show","buttonEvent","body","insertBefore","firstChild","style","setProperty","button","./utils/cookie.js","cookie","time","domain","expires","date","Date","setTime","getTime","toGMTString","parts","split","pop","shift","delete"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GA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ByE,iBACtBvE,UAAS2E,KAAKC,aAAaL,EAAmBvE,SAAS2E,KAAKE,YAC5DN,EAAkBO,MAAMC,YAAY,UAAW,SAC/Cd,EAAcK,MAhBH5E,IAAA,cAAAyB,MAAA,WAmBC,GACJoD,GAAsBzE,KAAtByE,kBACFS,EAAST,EAAkBtE,cAAc,iCAC/C,KAAK+E,EAEH,WADAf,GAAcnE,KAAKwE,aAIrBU,GAAO5D,iBAAiB,QAAS,WAC/BlC,EAAA,EAAOwE,IAAI,qBAAsB,KACjCO,EAAcM,GAEdP,EAAA,EAAYrC,gBA/BH0C,OHkUTY,oBACA,SAAU5H,EAAQwB,EAAqB5B,GAE7C,YIpVA,IAAMiI,IACJxB,IADa,SACT9F,EAAMuD,EAAOgE,EAAMC,GACrB,GAAIC,GAAU,EACd,IAAIF,EAAM,CACR,GAAMG,GAAO,GAAIC,KACjBD,GAAKE,QAAQF,EAAKG,UAAoB,GAAPN,EAAY,GAAK,GAAK,KACrDE,eAAuBC,EAAKI,cAG9B1F,SAASkF,OAAYtH,EAArB,KAA6BuD,EAAQkE,GAArC,cAAyDD,aAAoBA,EAApB,MAG3DjH,IAZa,SAYTP,GACF,GAAMuD,QAAanB,SAASkF,OACtBS,EAAQxE,EAAMyE,MAAN,KAAiBhI,EAAjB,IAEd,IAAqB,IAAjB+H,EAAMpG,OACR,MAAOoG,GAAME,MAAMD,MAAM,KAAKE,SAMlCC,OAvBa,SAuBNnI,GACLkC,KAAK4D,IAAI9F,EAAM,IAAK,IAIxBiB,GAAA","file":"cookie.js","sourcesContent":["/******/ (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/******/ \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 = \"/webdav/files/development/2017/scripts\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./cookie.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./components/CookieModal.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_cookie__ = __webpack_require__(\"./utils/cookie.js\");\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\nvar CookieModal = function () {\n function CookieModal() {\n _classCallCheck(this, CookieModal);\n\n this.container = document.querySelector('.cookieModal');\n\n var closeButton = this.container.querySelector('.cookieModal__close');\n var saveButton = this.container.querySelector('.js-cookie-save');\n var saveAllButton = this.container.querySelector('.js-cookie-save-all');\n this.categories = this.container.querySelectorAll('li.cookieModal__category');\n\n setTimeout(function () {\n var triggerButtons = document.querySelectorAll('.js-cookie-open-dialog');\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = triggerButtons[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var triggerButton = _step.value;\n\n triggerButton.addEventListener('click', this.openModal.bind(this));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }.bind(this), 300);\n\n closeButton.addEventListener('click', this.close.bind(this));\n saveButton.addEventListener('click', this.save.bind(this));\n saveAllButton.addEventListener('click', this.saveAll.bind(this));\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = this.categories[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var category = _step2.value;\n\n category.addEventListener('click', this.categoryClick.bind(this));\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n\n _createClass(CookieModal, [{\n key: 'openModal',\n value: function openModal() {\n this.container.classList.remove('hidden');\n }\n }, {\n key: 'close',\n value: function close() {\n this.container.classList.add('hidden');\n }\n }, {\n key: 'categoryClick',\n value: function categoryClick(e) {\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = this.categories[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var category = _step3.value;\n\n category.classList.remove('-active');\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n e.currentTarget.classList.add('-active');\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = this.container.querySelectorAll('.cookieModal__categoryText')[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var categoryText = _step4.value;\n\n categoryText.classList.remove('-active');\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n\n var childValue = e.currentTarget.dataset.child;\n var child = this.container.querySelector(\".cookieModal__categoryText[data-parent='\" + childValue + \"']\");\n child.classList.add('-active');\n }\n }, {\n key: 'save',\n value: function save() {\n var checked = $('.cookieModal input.cookieAcceptInput:checkbox:checked:not(:disabled)');\n var acceptedCookies = '';\n\n checked.each(function () {\n acceptedCookies += $(this).val() + '-';\n });\n\n acceptedCookies = acceptedCookies.slice(0, -1); //remove last dash\n __WEBPACK_IMPORTED_MODULE_0__utils_cookie__[\"a\" /* default */].set('accepted_cookies', acceptedCookies);\n\n this.close();\n\n var acceptButton = document.querySelector('.js-cookie-notification-button');\n if (acceptButton) {\n acceptButton.click();\n }\n }\n }, {\n key: 'saveAll',\n value: function saveAll() {\n var all = $('.cookieModal input.cookieAcceptInput:checkbox:not(:disabled)');\n var allCookies = '';\n\n all.each(function () {\n allCookies += $(this).val() + '-';\n });\n\n allCookies = allCookies.slice(0, -1); //remove last dash\n __WEBPACK_IMPORTED_MODULE_0__utils_cookie__[\"a\" /* default */].set('accepted_cookies', allCookies);\n\n this.close();\n\n var acceptButton = document.querySelector('.js-cookie-notification-button');\n if (acceptButton) {\n acceptButton.click();\n }\n }\n }]);\n\n return CookieModal;\n}();\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new CookieModal());\n\n/***/ }),\n\n/***/ \"./cookie.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_cookie__ = __webpack_require__(\"./utils/cookie.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_CookieModal__ = __webpack_require__(\"./components/CookieModal.js\");\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n\n/* IE fix */\nvar removeElement = function removeElement(elementToRemove) {\n if (!elementToRemove || !elementToRemove.parentElement || typeof elementToRemove.parentElement.removeChild !== 'function') {\n return;\n }\n elementToRemove.parentElement.removeChild(elementToRemove);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new (function () {\n function Cookie() {\n _classCallCheck(this, Cookie);\n\n if (__WEBPACK_IMPORTED_MODULE_0__utils_cookie__[\"a\" /* default */].get('cookienotification')) return;\n var notification = document.querySelector('.js-cookie-notification');\n if (!notification) return;\n var notificationClone = notification.cloneNode(true);\n this.notification = notification;\n this.notificationClone = notificationClone;\n this.show();\n this.buttonEvent();\n }\n\n _createClass(Cookie, [{\n key: 'show',\n value: function show() {\n var notification = this.notification,\n notificationClone = this.notificationClone;\n\n document.body.insertBefore(notificationClone, document.body.firstChild);\n notificationClone.style.setProperty('display', 'block');\n removeElement(notification);\n }\n }, {\n key: 'buttonEvent',\n value: function buttonEvent() {\n var notificationClone = this.notificationClone;\n\n var button = notificationClone.querySelector('.js-cookie-notification-button');\n if (!button) {\n removeElement(this.notification);\n return;\n }\n\n button.addEventListener('click', function () {\n __WEBPACK_IMPORTED_MODULE_0__utils_cookie__[\"a\" /* default */].set('cookienotification', '1');\n removeElement(notificationClone);\n\n __WEBPACK_IMPORTED_MODULE_1__components_CookieModal__[\"a\" /* default */].saveAll();\n });\n }\n }]);\n\n return Cookie;\n}())());\n\n/***/ }),\n\n/***/ \"./utils/cookie.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar cookie = {\n set: function set(name, value, time, domain) {\n var expires = '';\n if (time) {\n var date = new Date();\n date.setTime(date.getTime() + time * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toGMTString();\n }\n\n document.cookie = name + '=' + (value + expires) + '; path=/; ' + (domain && 'domain=' + domain + ';');\n },\n get: function get(name) {\n var value = '; ' + document.cookie;\n var parts = value.split('; ' + name + '=');\n\n if (parts.length === 2) {\n return parts.pop().split(';').shift();\n }\n\n return undefined;\n },\n delete: function _delete(name) {\n this.set(name, '', -1);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (cookie);\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// cookie.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 \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 = \"/webdav/files/development/2017/scripts\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./cookie.js\");\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 98ac5cec3dbece047f36","import cookie from '../utils/cookie';\n\nclass CookieModal {\n constructor() {\n this.container = document.querySelector('.cookieModal');\n\n const closeButton = this.container.querySelector('.cookieModal__close');\n const saveButton = this.container.querySelector('.js-cookie-save');\n const saveAllButton = this.container.querySelector('.js-cookie-save-all');\n this.categories = this.container.querySelectorAll('li.cookieModal__category');\n\n setTimeout(function () {\n const triggerButtons = document.querySelectorAll('.js-cookie-open-dialog');\n\n for (const triggerButton of triggerButtons) {\n triggerButton.addEventListener('click', this.openModal.bind(this));\n }\n }.bind(this), 300);\n\n closeButton.addEventListener('click', this.close.bind(this));\n saveButton.addEventListener('click', this.save.bind(this));\n saveAllButton.addEventListener('click', this.saveAll.bind(this));\n\n for (const category of this.categories) {\n category.addEventListener('click', this.categoryClick.bind(this));\n }\n }\n\n openModal() {\n this.container.classList.remove('hidden');\n }\n\n close() {\n this.container.classList.add('hidden');\n }\n\n categoryClick(e) {\n for (const category of this.categories) {\n category.classList.remove('-active');\n }\n\n e.currentTarget.classList.add('-active');\n\n for (const categoryText of this.container.querySelectorAll('.cookieModal__categoryText')) {\n categoryText.classList.remove('-active');\n }\n\n const childValue = e.currentTarget.dataset.child;\n const child = this.container.querySelector(\".cookieModal__categoryText[data-parent='\" + childValue + \"']\");\n child.classList.add('-active');\n }\n\n save() {\n const checked = $('.cookieModal input.cookieAcceptInput:checkbox:checked:not(:disabled)');\n let acceptedCookies = '';\n\n checked.each(function() {\n acceptedCookies += $(this).val() + '-';\n });\n\n acceptedCookies = acceptedCookies.slice(0, -1); //remove last dash\n cookie.set('accepted_cookies', acceptedCookies);\n\n this.close();\n\n const acceptButton = document.querySelector('.js-cookie-notification-button');\n if (acceptButton) {\n acceptButton.click();\n }\n }\n\n saveAll() {\n const all = $('.cookieModal input.cookieAcceptInput:checkbox:not(:disabled)');\n let allCookies = '';\n\n all.each(function() {\n allCookies += $(this).val() + '-';\n });\n\n allCookies = allCookies.slice(0, -1); //remove last dash\n cookie.set('accepted_cookies', allCookies);\n\n this.close();\n\n const acceptButton = document.querySelector('.js-cookie-notification-button');\n if (acceptButton) {\n acceptButton.click();\n }\n }\n\n\n}\n\nexport default new CookieModal();\n\n\n\n// WEBPACK FOOTER //\n// ./components/CookieModal.js","import cookie from './utils/cookie';\nimport CookieModal from \"./components/CookieModal\";\n\n/* IE fix */\nconst removeElement = (elementToRemove) => {\n if (\n !elementToRemove ||\n !elementToRemove.parentElement ||\n typeof elementToRemove.parentElement.removeChild !== 'function'\n ) {\n return;\n }\n elementToRemove.parentElement.removeChild(elementToRemove);\n};\n\nexport default new class Cookie {\n constructor() {\n if (cookie.get('cookienotification')) return;\n const notification = document.querySelector('.js-cookie-notification');\n if (!notification) return;\n const notificationClone = notification.cloneNode(true);\n this.notification = notification;\n this.notificationClone = notificationClone;\n this.show();\n this.buttonEvent();\n }\n\n show() {\n const { notification, notificationClone } = this;\n document.body.insertBefore(notificationClone, document.body.firstChild);\n notificationClone.style.setProperty('display', 'block');\n removeElement(notification);\n }\n\n buttonEvent() {\n const { notificationClone } = this;\n const button = notificationClone.querySelector('.js-cookie-notification-button');\n if (!button) {\n removeElement(this.notification);\n return;\n }\n\n button.addEventListener('click', () => {\n cookie.set('cookienotification', '1');\n removeElement(notificationClone);\n\n CookieModal.saveAll();\n });\n }\n}();\n\n\n\n// WEBPACK FOOTER //\n// ./cookie.js","const cookie = {\n set(name, value, time, domain) {\n let expires = '';\n if (time) {\n const date = new Date();\n date.setTime(date.getTime() + (time * 24 * 60 * 60 * 1000));\n expires = `; expires=${date.toGMTString()}`;\n }\n\n document.cookie = `${name}=${value + expires}; path=/; ${domain && `domain=${domain};`}`;\n },\n\n get(name) {\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n\n if (parts.length === 2) {\n return parts.pop().split(';').shift();\n }\n\n return undefined;\n },\n\n delete(name) {\n this.set(name, '', -1);\n },\n};\n\nexport default cookie;\n\n\n\n// WEBPACK FOOTER //\n// ./utils/cookie.js"],"sourceRoot":""}