{"version":3,"sources":["webpack:///node_modules/nespresso-components/icon/Icon.vue","webpack:///./node_modules/nespresso-components/icon/Icon.vue?4002","webpack:///./node_modules/nespresso-components/icon/Icon.vue","webpack:///./node_modules/svg-injector/svg-injector.js"],"names":["Icon","props","data","ready","this","init","mounted","methods","svg_injector_default","$el","each","el","typeof_default","Object","src","icon_Icon","render","_h","$createElement","_self","_c","attrs","data-src","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__","__WEBPACK_AMD_DEFINE_RESULT__","window","document","isLocal","location","protocol","hasSvgSupport","implementation","hasFeature","forEach","Array","prototype","fn","scope","TypeError","i","len","length","call","svgCache","injectCount","injectedElements","requestQueue","ranScripts","cloneSvg","sourceSvg","cloneNode","queueRequest","url","callback","push","loadSvg","undefined","SVGSVGElement","XMLHttpRequest","httpRequest","onreadystatechange","readyState","status","responseXML","statusText","Document","documentElement","DOMParser","Function","xmlDoc","parseFromString","responseText","e","getElementsByTagName","index","setTimeout","processRequestQueue","open","overrideMimeType","send","injectElement","evalScripts","pngFallback","imgUrl","getAttribute","test","indexOf","setAttribute","svg","imgId","imgTitle","classMerge","concat","join","list","hash","split","out","hasOwnProperty","unshift","uniqueClasses","imgStyle","imgData","filter","attributes","at","name","dataAttr","value","element","elementDefs","properties","currentId","newId","iriElementsAndProperties","clipPath","color-profile","cursor","linearGradient","marker","mask","pattern","radialGradient","keys","key","elementsLen","querySelectorAll","referencingElements","id","property","j","referencingElementLen","removeAttribute","script","scriptType","scripts","scriptsToEval","k","scriptsLen","innerText","textContent","removeChild","l","scriptsToEvalLen","styleTags","styleTag","parentNode","replaceChild","perElementFallback","pop","replace","SVGInjector","elements","options","done","eachCallback","elementsLoaded","module","exports"],"mappings":";iKAWAA,GACAC,OAAA,eACAC,KAFA,WAGA,UAEAC,MALA,WAMAC,KAAAC,QAEAC,QARA,WASAF,KAAAC,QAEAE,SACAF,KADA,WAEYG,IAAZJ,KAAAK,KACAC,KADA,SACAC,GACA,qBAAAA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AnE,GACAkE,GAAAF,EAAA/G,WAAAmH,GAAAF,EAAAE,YAKAJ,EACAxE,EAAAwE,EAAAvE,EAAAC,EAAA,SAAAM,GACAmE,GAAA,mBAAAA,KAAAnE,GACAkE,KAAA,GACAF,EAAA,OAIAE,KAAA,IAOA,iBAAAG,GAAA,iBAAAA,EAAAC,QACAD,EAAAC,UAAAP,OAMK/F,KAFDhC,EAAA,WACJ,OAAA+H,GACK7G,KAAAoH,EAAA1I,EAAA0I,EAAAD,QAAAC,QAAAtI,GA/bL,CAucCC,OAAAC","file":"js/1.7028e7cf55e38fb4bbab.js","sourcesContent":["<style lang=\"sass\">\n</style>\n\n<template>\n <div :data-src=\"src\"></div>\n</template>\n\n<script>\nimport { attr } from 'gaspard'\nimport SVGInjector from 'svg-injector'\n\nexport default {\n props: ['src', 'color'],\n data () {\n return {}\n },\n ready () {\n this.init()\n },\n mounted () {\n this.init()\n },\n methods: {\n init () {\n SVGInjector(this.$el, {\n each (el) {\n if (typeof el !== 'object') {\n return\n }\n attr(el, 'aria-hidden', true)\n }\n })\n }\n }\n}\n</script>\n\n\n\n// WEBPACK FOOTER //\n// node_modules/nespresso-components/icon/Icon.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"data-src\":_vm.src}})}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-98660810\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./node_modules/nespresso-components/icon/Icon.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-98660810\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!sass-loader?{\\\"indentedSyntax\\\":true,\\\"sourceMap\\\":true}!sass-resources-loader?{\\\"resources\\\":\\\"/Users/nnkandelad1/Applications/nespresso/projects/recycling-2019/src/assets/sass/_variables.sass\\\"}!../../vue-loader/lib/selector?type=styles&index=0!./Icon.vue\")\n}\nvar normalizeComponent = require(\"!../../vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../vue-loader/lib/selector?type=script&index=0!./Icon.vue\"\nimport __vue_script__ from \"!!babel-loader!../../vue-loader/lib/selector?type=script&index=0!./Icon.vue\"\n/* template */\nimport __vue_template__ from \"!!../../vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-98660810\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../vue-loader/lib/selector?type=template&index=0!./Icon.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/nespresso-components/icon/Icon.vue\n// module id = null\n// module chunks = ","/**\n * SVGInjector v1.1.3 - Fast, caching, dynamic inline SVG DOM injection library\n * https://github.com/iconic/SVGInjector\n *\n * Copyright (c) 2014-2015 Waybury <hello@waybury.com>\n * @license MIT\n */\n\n(function (window, document) {\n\n 'use strict';\n\n // Environment\n var isLocal = window.location.protocol === 'file:';\n var hasSvgSupport = document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');\n\n function uniqueClasses(list) {\n list = list.split(' ');\n\n var hash = {};\n var i = list.length;\n var out = [];\n\n while (i--) {\n if (!hash.hasOwnProperty(list[i])) {\n hash[list[i]] = 1;\n out.unshift(list[i]);\n }\n }\n\n return out.join(' ');\n }\n\n /**\n * cache (or polyfill for <= IE8) Array.forEach()\n * source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n */\n var forEach = Array.prototype.forEach || function (fn, scope) {\n if (this === void 0 || this === null || typeof fn !== 'function') {\n throw new TypeError();\n }\n\n /* jshint bitwise: false */\n var i, len = this.length >>> 0;\n /* jshint bitwise: true */\n\n for (i = 0; i < len; ++i) {\n if (i in this) {\n fn.call(scope, this[i], i, this);\n }\n }\n };\n\n // SVG Cache\n var svgCache = {};\n\n var injectCount = 0;\n var injectedElements = [];\n\n // Request Queue\n var requestQueue = [];\n\n // Script running status\n var ranScripts = {};\n\n var cloneSvg = function (sourceSvg) {\n return sourceSvg.cloneNode(true);\n };\n\n var queueRequest = function (url, callback) {\n requestQueue[url] = requestQueue[url] || [];\n requestQueue[url].push(callback);\n };\n\n var processRequestQueue = function (url) {\n for (var i = 0, len = requestQueue[url].length; i < len; i++) {\n // Make these calls async so we avoid blocking the page/renderer\n /* jshint loopfunc: true */\n (function (index) {\n setTimeout(function () {\n requestQueue[url][index](cloneSvg(svgCache[url]));\n }, 0);\n })(i);\n /* jshint loopfunc: false */\n }\n };\n\n var loadSvg = function (url, callback) {\n if (svgCache[url] !== undefined) {\n if (svgCache[url] instanceof SVGSVGElement) {\n // We already have it in cache, so use it\n callback(cloneSvg(svgCache[url]));\n }\n else {\n // We don't have it in cache yet, but we are loading it, so queue this request\n queueRequest(url, callback);\n }\n }\n else {\n\n if (!window.XMLHttpRequest) {\n callback('Browser does not support XMLHttpRequest');\n return false;\n }\n\n // Seed the cache to indicate we are loading this URL already\n svgCache[url] = {};\n queueRequest(url, callback);\n\n var httpRequest = new XMLHttpRequest();\n\n httpRequest.onreadystatechange = function () {\n // readyState 4 = complete\n if (httpRequest.readyState === 4) {\n\n // Handle status\n if (httpRequest.status === 404 || httpRequest.responseXML === null) {\n callback('Unable to load SVG file: ' + url);\n\n if (isLocal) callback('Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver.');\n\n callback();\n return false;\n }\n\n // 200 success from server, or 0 when using file:// protocol locally\n if (httpRequest.status === 200 || (isLocal && httpRequest.status === 0)) {\n\n /* globals Document */\n if (httpRequest.responseXML instanceof Document) {\n // Cache it\n svgCache[url] = httpRequest.responseXML.documentElement;\n }\n /* globals -Document */\n\n // IE9 doesn't create a responseXML Document object from loaded SVG,\n // and throws a \"DOM Exception: HIERARCHY_REQUEST_ERR (3)\" error when injected.\n //\n // So, we'll just create our own manually via the DOMParser using\n // the the raw XML responseText.\n //\n // :NOTE: IE8 and older doesn't have DOMParser, but they can't do SVG either, so...\n else if (DOMParser && (DOMParser instanceof Function)) {\n var xmlDoc;\n try {\n var parser = new DOMParser();\n xmlDoc = parser.parseFromString(httpRequest.responseText, 'text/xml');\n }\n catch (e) {\n xmlDoc = undefined;\n }\n\n if (!xmlDoc || xmlDoc.getElementsByTagName('parsererror').length) {\n callback('Unable to parse SVG file: ' + url);\n return false;\n }\n else {\n // Cache it\n svgCache[url] = xmlDoc.documentElement;\n }\n }\n\n // We've loaded a new asset, so process any requests waiting for it\n processRequestQueue(url);\n }\n else {\n callback('There was a problem injecting the SVG: ' + httpRequest.status + ' ' + httpRequest.statusText);\n return false;\n }\n }\n };\n\n httpRequest.open('GET', url);\n\n // Treat and parse the response as XML, even if the\n // server sends us a different mimetype\n if (httpRequest.overrideMimeType) httpRequest.overrideMimeType('text/xml');\n\n httpRequest.send();\n }\n };\n\n // Inject a single element\n var injectElement = function (el, evalScripts, pngFallback, callback) {\n\n // Grab the src or data-src attribute\n var imgUrl = el.getAttribute('data-src') || el.getAttribute('src');\n\n // We can only inject SVG\n if (!(/\\.svg/i).test(imgUrl)) {\n callback('Attempted to inject a file with a non-svg extension: ' + imgUrl);\n return;\n }\n\n // If we don't have SVG support try to fall back to a png,\n // either defined per-element via data-fallback or data-png,\n // or globally via the pngFallback directory setting\n if (!hasSvgSupport) {\n var perElementFallback = el.getAttribute('data-fallback') || el.getAttribute('data-png');\n\n // Per-element specific PNG fallback defined, so use that\n if (perElementFallback) {\n el.setAttribute('src', perElementFallback);\n callback(null);\n }\n // Global PNG fallback directoriy defined, use the same-named PNG\n else if (pngFallback) {\n el.setAttribute('src', pngFallback + '/' + imgUrl.split('/').pop().replace('.svg', '.png'));\n callback(null);\n }\n // um...\n else {\n callback('This browser does not support SVG and no PNG fallback was defined.');\n }\n\n return;\n }\n\n // Make sure we aren't already in the process of injecting this element to\n // avoid a race condition if multiple injections for the same element are run.\n // :NOTE: Using indexOf() only _after_ we check for SVG support and bail,\n // so no need for IE8 indexOf() polyfill\n if (injectedElements.indexOf(el) !== -1) {\n return;\n }\n\n // Remember the request to inject this element, in case other injection\n // calls are also trying to replace this element before we finish\n injectedElements.push(el);\n\n // Try to avoid loading the orginal image src if possible.\n el.setAttribute('src', '');\n\n // Load it up\n loadSvg(imgUrl, function (svg) {\n\n if (typeof svg === 'undefined' || typeof svg === 'string') {\n callback(svg);\n return false;\n }\n\n var imgId = el.getAttribute('id');\n if (imgId) {\n svg.setAttribute('id', imgId);\n }\n\n var imgTitle = el.getAttribute('title');\n if (imgTitle) {\n svg.setAttribute('title', imgTitle);\n }\n\n // Concat the SVG classes + 'injected-svg' + the img classes\n var classMerge = [].concat(svg.getAttribute('class') || [], 'injected-svg', el.getAttribute('class') || []).join(' ');\n svg.setAttribute('class', uniqueClasses(classMerge));\n\n var imgStyle = el.getAttribute('style');\n if (imgStyle) {\n svg.setAttribute('style', imgStyle);\n }\n\n // Copy all the data elements to the svg\n var imgData = [].filter.call(el.attributes, function (at) {\n return (/^data-\\w[\\w\\-]*$/).test(at.name);\n });\n forEach.call(imgData, function (dataAttr) {\n if (dataAttr.name && dataAttr.value) {\n svg.setAttribute(dataAttr.name, dataAttr.value);\n }\n });\n\n // Make sure any internally referenced clipPath ids and their\n // clip-path references are unique.\n //\n // This addresses the issue of having multiple instances of the\n // same SVG on a page and only the first clipPath id is referenced.\n //\n // Browsers often shortcut the SVG Spec and don't use clipPaths\n // contained in parent elements that are hidden, so if you hide the first\n // SVG instance on the page, then all other instances lose their clipping.\n // Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=376027\n\n // Handle all defs elements that have iri capable attributes as defined by w3c: http://www.w3.org/TR/SVG/linking.html#processingIRI\n // Mapping IRI addressable elements to the properties that can reference them:\n var iriElementsAndProperties = {\n 'clipPath': ['clip-path'],\n 'color-profile': ['color-profile'],\n 'cursor': ['cursor'],\n 'filter': ['filter'],\n 'linearGradient': ['fill', 'stroke'],\n 'marker': ['marker', 'marker-start', 'marker-mid', 'marker-end'],\n 'mask': ['mask'],\n 'pattern': ['fill', 'stroke'],\n 'radialGradient': ['fill', 'stroke']\n };\n\n var element, elementDefs, properties, currentId, newId;\n Object.keys(iriElementsAndProperties).forEach(function (key) {\n element = key;\n properties = iriElementsAndProperties[key];\n\n elementDefs = svg.querySelectorAll('defs ' + element + '[id]');\n for (var i = 0, elementsLen = elementDefs.length; i < elementsLen; i++) {\n currentId = elementDefs[i].id;\n newId = currentId + '-' + injectCount;\n\n // All of the properties that can reference this element type\n var referencingElements;\n forEach.call(properties, function (property) {\n // :NOTE: using a substring match attr selector here to deal with IE \"adding extra quotes in url() attrs\"\n referencingElements = svg.querySelectorAll('[' + property + '*=\"' + currentId + '\"]');\n for (var j = 0, referencingElementLen = referencingElements.length; j < referencingElementLen; j++) {\n referencingElements[j].setAttribute(property, 'url(#' + newId + ')');\n }\n });\n\n elementDefs[i].id = newId;\n }\n });\n\n // Remove any unwanted/invalid namespaces that might have been added by SVG editing tools\n svg.removeAttribute('xmlns:a');\n\n // Post page load injected SVGs don't automatically have their script\n // elements run, so we'll need to make that happen, if requested\n\n // Find then prune the scripts\n var scripts = svg.querySelectorAll('script');\n var scriptsToEval = [];\n var script, scriptType;\n\n for (var k = 0, scriptsLen = scripts.length; k < scriptsLen; k++) {\n scriptType = scripts[k].getAttribute('type');\n\n // Only process javascript types.\n // SVG defaults to 'application/ecmascript' for unset types\n if (!scriptType || scriptType === 'application/ecmascript' || scriptType === 'application/javascript') {\n\n // innerText for IE, textContent for other browsers\n script = scripts[k].innerText || scripts[k].textContent;\n\n // Stash\n scriptsToEval.push(script);\n\n // Tidy up and remove the script element since we don't need it anymore\n svg.removeChild(scripts[k]);\n }\n }\n\n // Run/Eval the scripts if needed\n if (scriptsToEval.length > 0 && (evalScripts === 'always' || (evalScripts === 'once' && !ranScripts[imgUrl]))) {\n for (var l = 0, scriptsToEvalLen = scriptsToEval.length; l < scriptsToEvalLen; l++) {\n\n // :NOTE: Yup, this is a form of eval, but it is being used to eval code\n // the caller has explictely asked to be loaded, and the code is in a caller\n // defined SVG file... not raw user input.\n //\n // Also, the code is evaluated in a closure and not in the global scope.\n // If you need to put something in global scope, use 'window'\n new Function(scriptsToEval[l])(window); // jshint ignore:line\n }\n\n // Remember we already ran scripts for this svg\n ranScripts[imgUrl] = true;\n }\n\n // :WORKAROUND:\n // IE doesn't evaluate <style> tags in SVGs that are dynamically added to the page.\n // This trick will trigger IE to read and use any existing SVG <style> tags.\n //\n // Reference: https://github.com/iconic/SVGInjector/issues/23\n var styleTags = svg.querySelectorAll('style');\n forEach.call(styleTags, function (styleTag) {\n styleTag.textContent += '';\n });\n\n // Replace the image with the svg\n el.parentNode.replaceChild(svg, el);\n\n // Now that we no longer need it, drop references\n // to the original element so it can be GC'd\n delete injectedElements[injectedElements.indexOf(el)];\n el = null;\n\n // Increment the injected count\n injectCount++;\n\n callback(svg);\n });\n };\n\n /**\n * SVGInjector\n *\n * Replace the given elements with their full inline SVG DOM elements.\n *\n * :NOTE: We are using get/setAttribute with SVG because the SVG DOM spec differs from HTML DOM and\n * can return other unexpected object types when trying to directly access svg properties.\n * ex: \"className\" returns a SVGAnimatedString with the class value found in the \"baseVal\" property,\n * instead of simple string like with HTML Elements.\n *\n * @param {mixes} Array of or single DOM element\n * @param {object} options\n * @param {function} callback\n * @return {object} Instance of SVGInjector\n */\n var SVGInjector = function (elements, options, done) {\n\n // Options & defaults\n options = options || {};\n\n // Should we run the scripts blocks found in the SVG\n // 'always' - Run them every time\n // 'once' - Only run scripts once for each SVG\n // [false|'never'] - Ignore scripts\n var evalScripts = options.evalScripts || 'always';\n\n // Location of fallback pngs, if desired\n var pngFallback = options.pngFallback || false;\n\n // Callback to run during each SVG injection, returning the SVG injected\n var eachCallback = options.each;\n\n // Do the injection...\n if (elements.length !== undefined) {\n var elementsLoaded = 0;\n forEach.call(elements, function (element) {\n injectElement(element, evalScripts, pngFallback, function (svg) {\n if (eachCallback && typeof eachCallback === 'function') eachCallback(svg);\n if (done && elements.length === ++elementsLoaded) done(elementsLoaded);\n });\n });\n }\n else {\n if (elements) {\n injectElement(elements, evalScripts, pngFallback, function (svg) {\n if (eachCallback && typeof eachCallback === 'function') eachCallback(svg);\n if (done) done(1);\n elements = null;\n });\n }\n else {\n if (done) done(0);\n }\n }\n };\n\n /* global module, exports: true, define */\n // Node.js or CommonJS\n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = exports = SVGInjector;\n }\n // AMD support\n else if (typeof define === 'function' && define.amd) {\n define(function () {\n return SVGInjector;\n });\n }\n // Otherwise, attach to window as global\n else if (typeof window === 'object') {\n window.SVGInjector = SVGInjector;\n }\n /* global -module, -exports, -define */\n\n}(window, document));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-injector/svg-injector.js\n// module id = ZeBk\n// module chunks = 1"],"sourceRoot":""}