3a212e56d4b6d847a187bfab776d4ad6.json
48.1 KB
{"ast":null,"code":"// https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\n// Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/if (!Element.prototype.matches)\nElement.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nif (!Element.prototype.closest) Element.prototype.closest = function (s) {\n var el = this;\n if (!document.documentElement.contains(el)) return null;\n\n do {\n if (el.matches(s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n\n return null;\n};\n/*\r\n * classList.js: Cross-browser full element.classList implementation.\r\n * 1.1.20170427\r\n *\r\n * By Eli Grey, http://eligrey.com\r\n * License: Dedicated to the public domain.\r\n * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md\r\n */\n\n/*global self, document, DOMException */\n\n/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */\n\nif ('document' in window.self) {\n // Full polyfill for browsers with no classList support\n // Including IE < Edge missing SVGElement.classList\n if (!('classList' in document.createElement('_')) || document.createElementNS && !('classList' in document.createElementNS('http://www.w3.org/2000/svg', 'g'))) {\n (function (view) {\n 'use strict';\n\n if (!('Element' in view)) return;\n\n var classListProp = 'classList',\n protoProp = 'prototype',\n elemCtrProto = view.Element[protoProp],\n objCtr = Object,\n strTrim = String[protoProp].trim || function () {\n return this.replace(/^\\s+|\\s+$/g, '');\n },\n arrIndexOf = Array[protoProp].indexOf || function (item) {\n var i = 0,\n len = this.length;\n\n for (; i < len; i++) {\n if (i in this && this[i] === item) {\n return i;\n }\n }\n\n return -1;\n },\n // Vendors: please allow content code to instantiate DOMExceptions\n DOMEx = function (type, message) {\n this.name = type;\n this.code = DOMException[type];\n this.message = message;\n },\n checkTokenAndGetIndex = function (classList, token) {\n if (token === '') {\n throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified');\n }\n\n if (/\\s/.test(token)) {\n throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character');\n }\n\n return arrIndexOf.call(classList, token);\n },\n ClassList = function (elem) {\n var trimmedClasses = strTrim.call(elem.getAttribute('class') || ''),\n classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : [],\n i = 0,\n len = classes.length;\n\n for (; i < len; i++) {\n this.push(classes[i]);\n }\n\n this._updateClassName = function () {\n elem.setAttribute('class', this.toString());\n };\n },\n classListProto = ClassList[protoProp] = [],\n classListGetter = function () {\n return new ClassList(this);\n }; // Most DOMException implementations don't allow calling DOMException's toString()\n // on non-DOMExceptions. Error's toString() is sufficient here.\n\n\n DOMEx[protoProp] = Error[protoProp];\n\n classListProto.item = function (i) {\n return this[i] || null;\n };\n\n classListProto.contains = function (token) {\n token += '';\n return checkTokenAndGetIndex(this, token) !== -1;\n };\n\n classListProto.add = function () {\n var tokens = arguments,\n i = 0,\n l = tokens.length,\n token,\n updated = false;\n\n do {\n token = tokens[i] + '';\n\n if (checkTokenAndGetIndex(this, token) === -1) {\n this.push(token);\n updated = true;\n }\n } while (++i < l);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.remove = function () {\n var tokens = arguments,\n i = 0,\n l = tokens.length,\n token,\n updated = false,\n index;\n\n do {\n token = tokens[i] + '';\n index = checkTokenAndGetIndex(this, token);\n\n while (index !== -1) {\n this.splice(index, 1);\n updated = true;\n index = checkTokenAndGetIndex(this, token);\n }\n } while (++i < l);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.toggle = function (token, force) {\n token += '';\n var result = this.contains(token),\n method = result ? force !== true && 'remove' : force !== false && 'add';\n\n if (method) {\n this[method](token);\n }\n\n if (force === true || force === false) {\n return force;\n } else {\n return !result;\n }\n };\n\n classListProto.toString = function () {\n return this.join(' ');\n };\n\n if (objCtr.defineProperty) {\n var classListPropDesc = {\n get: classListGetter,\n enumerable: true,\n configurable: true\n };\n\n try {\n objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\n } catch (ex) {\n // IE 8 doesn't support enumerable:true\n // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36\n // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected\n if (ex.number === undefined || ex.number === -0x7ff5ec54) {\n classListPropDesc.enumerable = false;\n objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\n }\n }\n } else if (objCtr[protoProp].__defineGetter__) {\n elemCtrProto.__defineGetter__(classListProp, classListGetter);\n }\n })(window.self);\n } // There is full or partial native classList support, so just check if we need\n // to normalize the add/remove and toggle APIs.\n\n\n (function () {\n 'use strict';\n\n var testElement = document.createElement('_');\n testElement.classList.add('c1', 'c2'); // Polyfill for IE 10/11 and Firefox <26, where classList.add and\n // classList.remove exist but support only one argument at a time.\n\n if (!testElement.classList.contains('c2')) {\n var createMethod = function (method) {\n var original = DOMTokenList.prototype[method];\n\n DOMTokenList.prototype[method] = function (token) {\n var i,\n len = arguments.length;\n\n for (i = 0; i < len; i++) {\n token = arguments[i];\n original.call(this, token);\n }\n };\n };\n\n createMethod('add');\n createMethod('remove');\n }\n\n testElement.classList.toggle('c3', false); // Polyfill for IE 10 and Firefox <24, where classList.toggle does not\n // support the second argument.\n\n if (testElement.classList.contains('c3')) {\n var _toggle = DOMTokenList.prototype.toggle;\n\n DOMTokenList.prototype.toggle = function (token, force) {\n if (1 in arguments && !this.contains(token) === !force) {\n return force;\n } else {\n return _toggle.call(this, token);\n }\n };\n }\n\n testElement = null;\n })();\n}\n/*!\r\n * @copyright Copyright (c) 2017 IcoMoon.io\r\n * @license Licensed under MIT license\r\n * See https://github.com/Keyamoon/svgxuse\r\n * @version 1.2.6\r\n */\n\n/*jslint browser: true */\n\n/*global XDomainRequest, MutationObserver, window */\n\n\n(function () {\n 'use strict';\n\n if (typeof window !== 'undefined' && window.addEventListener) {\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\n\n var checkUseElems;\n var tid; // timeout id\n\n var debouncedCheck = function () {\n clearTimeout(tid);\n tid = setTimeout(checkUseElems, 100);\n };\n\n var unobserveChanges = function () {\n return;\n };\n\n var observeChanges = function () {\n var observer;\n window.addEventListener('resize', debouncedCheck, false);\n window.addEventListener('orientationchange', debouncedCheck, false);\n\n if (window.MutationObserver) {\n observer = new MutationObserver(debouncedCheck);\n observer.observe(document.documentElement, {\n childList: true,\n subtree: true,\n attributes: true\n });\n\n unobserveChanges = function () {\n try {\n observer.disconnect();\n window.removeEventListener('resize', debouncedCheck, false);\n window.removeEventListener('orientationchange', debouncedCheck, false);\n } catch (ignore) {}\n };\n } else {\n document.documentElement.addEventListener('DOMSubtreeModified', debouncedCheck, false);\n\n unobserveChanges = function () {\n document.documentElement.removeEventListener('DOMSubtreeModified', debouncedCheck, false);\n window.removeEventListener('resize', debouncedCheck, false);\n window.removeEventListener('orientationchange', debouncedCheck, false);\n };\n }\n };\n\n var createRequest = function (url) {\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\n // XDomainRequest would fail if CORS headers are not set.\n // Therefore, XDomainRequest should only be used with cross origin requests.\n function getOrigin(loc) {\n var a;\n\n if (loc.protocol !== undefined) {\n a = loc;\n } else {\n a = document.createElement('a');\n a.href = loc;\n }\n\n return a.protocol.replace(/:/g, '') + a.host;\n }\n\n var Request;\n var origin;\n var origin2;\n\n if (window.XMLHttpRequest) {\n Request = new XMLHttpRequest();\n origin = getOrigin(location);\n origin2 = getOrigin(url);\n\n if (Request.withCredentials === undefined && origin2 !== '' && origin2 !== origin) {\n Request = XDomainRequest || undefined;\n } else {\n Request = XMLHttpRequest;\n }\n }\n\n return Request;\n };\n\n var xlinkNS = 'http://www.w3.org/1999/xlink';\n\n checkUseElems = function () {\n var base;\n var bcr;\n var fallback = ''; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\n\n var hash;\n var href;\n var i;\n var inProgressCount = 0;\n var isHidden;\n var Request;\n var url;\n var uses;\n var xhr;\n\n function observeIfDone() {\n // If done with making changes, start watching for chagnes in DOM again\n inProgressCount -= 1;\n\n if (inProgressCount === 0) {\n // if all xhrs were resolved\n unobserveChanges(); // make sure to remove old handlers\n\n observeChanges(); // watch for changes to DOM\n }\n }\n\n function attrUpdateFunc(spec) {\n return function () {\n if (cache[spec.base] !== true) {\n spec.useEl.setAttributeNS(xlinkNS, 'xlink:href', '#' + spec.hash);\n\n if (spec.useEl.hasAttribute('href')) {\n spec.useEl.setAttribute('href', '#' + spec.hash);\n }\n }\n };\n }\n\n function onloadFunc(xhr) {\n return function () {\n var body = document.body;\n var x = document.createElement('x');\n var svg;\n xhr.onload = null;\n x.innerHTML = xhr.responseText;\n svg = x.getElementsByTagName('svg')[0];\n\n if (svg) {\n svg.setAttribute('aria-hidden', 'true');\n svg.style.position = 'absolute';\n svg.style.width = 0;\n svg.style.height = 0;\n svg.style.overflow = 'hidden';\n body.insertBefore(svg, body.firstChild);\n }\n\n observeIfDone();\n };\n }\n\n function onErrorTimeout(xhr) {\n return function () {\n xhr.onerror = null;\n xhr.ontimeout = null;\n observeIfDone();\n };\n }\n\n unobserveChanges(); // stop watching for changes to DOM\n // find all use elements\n\n uses = document.getElementsByTagName('use');\n\n for (i = 0; i < uses.length; i += 1) {\n try {\n bcr = uses[i].getBoundingClientRect();\n } catch (ignore) {\n // failed to get bounding rectangle of the use element\n bcr = false;\n }\n\n href = uses[i].getAttribute('href') || uses[i].getAttributeNS(xlinkNS, 'href') || uses[i].getAttribute('xlink:href');\n\n if (href && href.split) {\n url = href.split('#');\n } else {\n url = ['', ''];\n }\n\n base = url[0];\n hash = url[1];\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\n\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\n // the use element is empty\n // if there is a reference to an external SVG, try to fetch it\n // use the optional fallback URL if there is no reference to an external SVG\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\n base = fallback;\n }\n\n if (uses[i].hasAttribute('href')) {\n uses[i].setAttributeNS(xlinkNS, 'xlink:href', href);\n }\n\n if (base.length) {\n // schedule updating xlink:href\n xhr = cache[base];\n\n if (xhr !== true) {\n // true signifies that prepending the SVG was not required\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n\n if (xhr === undefined) {\n Request = createRequest(base);\n\n if (Request !== undefined) {\n xhr = new Request();\n cache[base] = xhr;\n xhr.onload = onloadFunc(xhr);\n xhr.onerror = onErrorTimeout(xhr);\n xhr.ontimeout = onErrorTimeout(xhr);\n xhr.open('GET', base);\n xhr.send();\n inProgressCount += 1;\n }\n }\n }\n } else {\n if (!isHidden) {\n if (cache[base] === undefined) {\n // remember this URL if the use element was not empty and no request was sent\n cache[base] = true;\n } else if (cache[base].onload) {\n // if it turns out that prepending the SVG is not necessary,\n // abort the in-progress xhr.\n cache[base].abort();\n delete cache[base].onload;\n cache[base] = true;\n }\n } else if (base.length && cache[base]) {\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n }\n }\n\n uses = '';\n inProgressCount += 1;\n observeIfDone();\n };\n\n var winLoad;\n\n winLoad = function () {\n window.removeEventListener('load', winLoad, false); // to prevent memory leaks\n\n tid = setTimeout(checkUseElems, 0);\n };\n\n if (document.readyState !== 'complete') {\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\n window.addEventListener('load', winLoad, false);\n } else {\n // No need to add a listener if the document is already loaded, initialize immediately.\n winLoad();\n }\n }\n})();","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/src/js/polyfill.js"],"names":["Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","closest","s","el","document","documentElement","contains","parentElement","parentNode","nodeType","window","self","createElement","createElementNS","view","classListProp","protoProp","elemCtrProto","objCtr","Object","strTrim","String","trim","replace","arrIndexOf","Array","indexOf","item","i","len","length","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","classList","token","test","call","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","toString","classListProto","classListGetter","Error","add","tokens","arguments","l","updated","remove","index","splice","toggle","force","result","method","join","defineProperty","classListPropDesc","get","enumerable","configurable","ex","number","undefined","__defineGetter__","testElement","createMethod","original","DOMTokenList","_toggle","addEventListener","cache","create","checkUseElems","tid","debouncedCheck","clearTimeout","setTimeout","unobserveChanges","observeChanges","observer","MutationObserver","observe","childList","subtree","attributes","disconnect","removeEventListener","ignore","createRequest","url","getOrigin","loc","a","protocol","href","host","Request","origin","origin2","XMLHttpRequest","location","withCredentials","XDomainRequest","xlinkNS","base","bcr","fallback","hash","inProgressCount","isHidden","uses","xhr","observeIfDone","attrUpdateFunc","spec","useEl","setAttributeNS","hasAttribute","onloadFunc","body","x","svg","onload","innerHTML","responseText","getElementsByTagName","style","position","width","height","overflow","insertBefore","firstChild","onErrorTimeout","onerror","ontimeout","getBoundingClientRect","getAttributeNS","left","right","top","bottom","getElementById","open","send","abort","winLoad","readyState"],"mappings":"AAAA;AACA;AACAA,OAAO,CAACC,SAAR,CAAkBC,OAAlB,GACEF,OAAO,CAACC,SAAR,CAAkBE,iBAAlB,IAAuCH,OAAO,CAACC,SAAR,CAAkBG,qBAD3D;AAGA,IAAI,CAACJ,OAAO,CAACC,SAAR,CAAkBI,OAAvB,EACEL,OAAO,CAACC,SAAR,CAAkBI,OAAlB,GAA4B,UAAUC,CAAV,EAAa;AACvC,MAAIC,EAAE,GAAG,IAAT;AACA,MAAI,CAACC,QAAQ,CAACC,eAAT,CAAyBC,QAAzB,CAAkCH,EAAlC,CAAL,EAA4C,OAAO,IAAP;;AAC5C,KAAG;AACD,QAAIA,EAAE,CAACL,OAAH,CAAWI,CAAX,CAAJ,EAAmB,OAAOC,EAAP;AACnBA,IAAAA,EAAE,GAAGA,EAAE,CAACI,aAAH,IAAoBJ,EAAE,CAACK,UAA5B;AACD,GAHD,QAGSL,EAAE,KAAK,IAAP,IAAeA,EAAE,CAACM,QAAH,KAAgB,CAHxC;;AAIA,SAAO,IAAP;AACD,CARD;AAUF;AACA;AACA;AACA;AACA;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EAMR,CANQ,CAAV;AAQD;AACF;AACF;;AACDG,MAAAA,IAAI,GAAG,EAAP;AACAF,MAAAA,eAAe,IAAI,CAAnB;AACAI,MAAAA,aAAa;AACd,KAjJD;;AAkJA,QAAIkC,OAAJ;;AACAA,IAAAA,OAAO,GAAG,YAAY;AACpBrJ,MAAAA,MAAM,CAACyF,mBAAP,CAA2B,MAA3B,EAAmC4D,OAAnC,EAA4C,KAA5C,EADoB,CACgC;;AACpDzE,MAAAA,GAAG,GAAGG,UAAU,CAACJ,aAAD,EAAgB,CAAhB,CAAhB;AACD,KAHD;;AAIA,QAAIjF,QAAQ,CAAC4J,UAAT,KAAwB,UAA5B,EAAwC;AACtC;AACAtJ,MAAAA,MAAM,CAACwE,gBAAP,CAAwB,MAAxB,EAAgC6E,OAAhC,EAAyC,KAAzC;AACD,KAHD,MAGO;AACL;AACAA,MAAAA,OAAO;AACR;AACF;AACF,CArOD","sourcesContent":["// https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\r\n// Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/if (!Element.prototype.matches)\r\nElement.prototype.matches =\r\n Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\r\nif (!Element.prototype.closest)\r\n Element.prototype.closest = function (s) {\r\n var el = this;\r\n if (!document.documentElement.contains(el)) return null;\r\n do {\r\n if (el.matches(s)) return el;\r\n el = el.parentElement || el.parentNode;\r\n } while (el !== null && el.nodeType === 1);\r\n return null;\r\n };\r\n\r\n/*\r\n * classList.js: Cross-browser full element.classList implementation.\r\n * 1.1.20170427\r\n *\r\n * By Eli Grey, http://eligrey.com\r\n * License: Dedicated to the public domain.\r\n * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md\r\n */\r\n\r\n/*global self, document, DOMException */\r\n\r\n/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */\r\n\r\nif ('document' in window.self) {\r\n // Full polyfill for browsers with no classList support\r\n // Including IE < Edge missing SVGElement.classList\r\n if (\r\n !('classList' in document.createElement('_')) ||\r\n (document.createElementNS &&\r\n !('classList' in document.createElementNS('http://www.w3.org/2000/svg', 'g')))\r\n ) {\r\n (function (view) {\r\n 'use strict';\r\n\r\n if (!('Element' in view)) return;\r\n\r\n var classListProp = 'classList',\r\n protoProp = 'prototype',\r\n elemCtrProto = view.Element[protoProp],\r\n objCtr = Object,\r\n strTrim =\r\n String[protoProp].trim ||\r\n function () {\r\n return this.replace(/^\\s+|\\s+$/g, '');\r\n },\r\n arrIndexOf =\r\n Array[protoProp].indexOf ||\r\n function (item) {\r\n var i = 0,\r\n len = this.length;\r\n for (; i < len; i++) {\r\n if (i in this && this[i] === item) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n },\r\n // Vendors: please allow content code to instantiate DOMExceptions\r\n DOMEx = function (type, message) {\r\n this.name = type;\r\n this.code = DOMException[type];\r\n this.message = message;\r\n },\r\n checkTokenAndGetIndex = function (classList, token) {\r\n if (token === '') {\r\n throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified');\r\n }\r\n if (/\\s/.test(token)) {\r\n throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character');\r\n }\r\n return arrIndexOf.call(classList, token);\r\n },\r\n ClassList = function (elem) {\r\n var trimmedClasses = strTrim.call(elem.getAttribute('class') || ''),\r\n classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : [],\r\n i = 0,\r\n len = classes.length;\r\n for (; i < len; i++) {\r\n this.push(classes[i]);\r\n }\r\n this._updateClassName = function () {\r\n elem.setAttribute('class', this.toString());\r\n };\r\n },\r\n classListProto = (ClassList[protoProp] = []),\r\n classListGetter = function () {\r\n return new ClassList(this);\r\n };\r\n // Most DOMException implementations don't allow calling DOMException's toString()\r\n // on non-DOMExceptions. Error's toString() is sufficient here.\r\n DOMEx[protoProp] = Error[protoProp];\r\n classListProto.item = function (i) {\r\n return this[i] || null;\r\n };\r\n classListProto.contains = function (token) {\r\n token += '';\r\n return checkTokenAndGetIndex(this, token) !== -1;\r\n };\r\n classListProto.add = function () {\r\n var tokens = arguments,\r\n i = 0,\r\n l = tokens.length,\r\n token,\r\n updated = false;\r\n do {\r\n token = tokens[i] + '';\r\n if (checkTokenAndGetIndex(this, token) === -1) {\r\n this.push(token);\r\n updated = true;\r\n }\r\n } while (++i < l);\r\n\r\n if (updated) {\r\n this._updateClassName();\r\n }\r\n };\r\n classListProto.remove = function () {\r\n var tokens = arguments,\r\n i = 0,\r\n l = tokens.length,\r\n token,\r\n updated = false,\r\n index;\r\n do {\r\n token = tokens[i] + '';\r\n index = checkTokenAndGetIndex(this, token);\r\n while (index !== -1) {\r\n this.splice(index, 1);\r\n updated = true;\r\n index = checkTokenAndGetIndex(this, token);\r\n }\r\n } while (++i < l);\r\n\r\n if (updated) {\r\n this._updateClassName();\r\n }\r\n };\r\n classListProto.toggle = function (token, force) {\r\n token += '';\r\n\r\n var result = this.contains(token),\r\n method = result ? force !== true && 'remove' : force !== false && 'add';\r\n if (method) {\r\n this[method](token);\r\n }\r\n\r\n if (force === true || force === false) {\r\n return force;\r\n } else {\r\n return !result;\r\n }\r\n };\r\n classListProto.toString = function () {\r\n return this.join(' ');\r\n };\r\n\r\n if (objCtr.defineProperty) {\r\n var classListPropDesc = {\r\n get: classListGetter,\r\n enumerable: true,\r\n configurable: true,\r\n };\r\n try {\r\n objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\r\n } catch (ex) {\r\n // IE 8 doesn't support enumerable:true\r\n // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36\r\n // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected\r\n if (ex.number === undefined || ex.number === -0x7ff5ec54) {\r\n classListPropDesc.enumerable = false;\r\n objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\r\n }\r\n }\r\n } else if (objCtr[protoProp].__defineGetter__) {\r\n elemCtrProto.__defineGetter__(classListProp, classListGetter);\r\n }\r\n })(window.self);\r\n }\r\n\r\n // There is full or partial native classList support, so just check if we need\r\n // to normalize the add/remove and toggle APIs.\r\n\r\n (function () {\r\n 'use strict';\r\n\r\n var testElement = document.createElement('_');\r\n\r\n testElement.classList.add('c1', 'c2');\r\n\r\n // Polyfill for IE 10/11 and Firefox <26, where classList.add and\r\n // classList.remove exist but support only one argument at a time.\r\n if (!testElement.classList.contains('c2')) {\r\n var createMethod = function (method) {\r\n var original = DOMTokenList.prototype[method];\r\n\r\n DOMTokenList.prototype[method] = function (token) {\r\n var i,\r\n len = arguments.length;\r\n\r\n for (i = 0; i < len; i++) {\r\n token = arguments[i];\r\n original.call(this, token);\r\n }\r\n };\r\n };\r\n createMethod('add');\r\n createMethod('remove');\r\n }\r\n\r\n testElement.classList.toggle('c3', false);\r\n\r\n // Polyfill for IE 10 and Firefox <24, where classList.toggle does not\r\n // support the second argument.\r\n if (testElement.classList.contains('c3')) {\r\n var _toggle = DOMTokenList.prototype.toggle;\r\n\r\n DOMTokenList.prototype.toggle = function (token, force) {\r\n if (1 in arguments && !this.contains(token) === !force) {\r\n return force;\r\n } else {\r\n return _toggle.call(this, token);\r\n }\r\n };\r\n }\r\n\r\n testElement = null;\r\n })();\r\n}\r\n\r\n/*!\r\n * @copyright Copyright (c) 2017 IcoMoon.io\r\n * @license Licensed under MIT license\r\n * See https://github.com/Keyamoon/svgxuse\r\n * @version 1.2.6\r\n */\r\n/*jslint browser: true */\r\n/*global XDomainRequest, MutationObserver, window */\r\n(function () {\r\n 'use strict';\r\n if (typeof window !== 'undefined' && window.addEventListener) {\r\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\r\n var checkUseElems;\r\n var tid; // timeout id\r\n var debouncedCheck = function () {\r\n clearTimeout(tid);\r\n tid = setTimeout(checkUseElems, 100);\r\n };\r\n var unobserveChanges = function () {\r\n return;\r\n };\r\n var observeChanges = function () {\r\n var observer;\r\n window.addEventListener('resize', debouncedCheck, false);\r\n window.addEventListener('orientationchange', debouncedCheck, false);\r\n if (window.MutationObserver) {\r\n observer = new MutationObserver(debouncedCheck);\r\n observer.observe(document.documentElement, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n unobserveChanges = function () {\r\n try {\r\n observer.disconnect();\r\n window.removeEventListener('resize', debouncedCheck, false);\r\n window.removeEventListener('orientationchange', debouncedCheck, false);\r\n } catch (ignore) {}\r\n };\r\n } else {\r\n document.documentElement.addEventListener('DOMSubtreeModified', debouncedCheck, false);\r\n unobserveChanges = function () {\r\n document.documentElement.removeEventListener('DOMSubtreeModified', debouncedCheck, false);\r\n window.removeEventListener('resize', debouncedCheck, false);\r\n window.removeEventListener('orientationchange', debouncedCheck, false);\r\n };\r\n }\r\n };\r\n var createRequest = function (url) {\r\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\r\n // XDomainRequest would fail if CORS headers are not set.\r\n // Therefore, XDomainRequest should only be used with cross origin requests.\r\n function getOrigin(loc) {\r\n var a;\r\n if (loc.protocol !== undefined) {\r\n a = loc;\r\n } else {\r\n a = document.createElement('a');\r\n a.href = loc;\r\n }\r\n return a.protocol.replace(/:/g, '') + a.host;\r\n }\r\n var Request;\r\n var origin;\r\n var origin2;\r\n if (window.XMLHttpRequest) {\r\n Request = new XMLHttpRequest();\r\n origin = getOrigin(location);\r\n origin2 = getOrigin(url);\r\n if (Request.withCredentials === undefined && origin2 !== '' && origin2 !== origin) {\r\n Request = XDomainRequest || undefined;\r\n } else {\r\n Request = XMLHttpRequest;\r\n }\r\n }\r\n return Request;\r\n };\r\n var xlinkNS = 'http://www.w3.org/1999/xlink';\r\n checkUseElems = function () {\r\n var base;\r\n var bcr;\r\n var fallback = ''; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\r\n var hash;\r\n var href;\r\n var i;\r\n var inProgressCount = 0;\r\n var isHidden;\r\n var Request;\r\n var url;\r\n var uses;\r\n var xhr;\r\n function observeIfDone() {\r\n // If done with making changes, start watching for chagnes in DOM again\r\n inProgressCount -= 1;\r\n if (inProgressCount === 0) {\r\n // if all xhrs were resolved\r\n unobserveChanges(); // make sure to remove old handlers\r\n observeChanges(); // watch for changes to DOM\r\n }\r\n }\r\n function attrUpdateFunc(spec) {\r\n return function () {\r\n if (cache[spec.base] !== true) {\r\n spec.useEl.setAttributeNS(xlinkNS, 'xlink:href', '#' + spec.hash);\r\n if (spec.useEl.hasAttribute('href')) {\r\n spec.useEl.setAttribute('href', '#' + spec.hash);\r\n }\r\n }\r\n };\r\n }\r\n function onloadFunc(xhr) {\r\n return function () {\r\n var body = document.body;\r\n var x = document.createElement('x');\r\n var svg;\r\n xhr.onload = null;\r\n x.innerHTML = xhr.responseText;\r\n svg = x.getElementsByTagName('svg')[0];\r\n if (svg) {\r\n svg.setAttribute('aria-hidden', 'true');\r\n svg.style.position = 'absolute';\r\n svg.style.width = 0;\r\n svg.style.height = 0;\r\n svg.style.overflow = 'hidden';\r\n body.insertBefore(svg, body.firstChild);\r\n }\r\n observeIfDone();\r\n };\r\n }\r\n function onErrorTimeout(xhr) {\r\n return function () {\r\n xhr.onerror = null;\r\n xhr.ontimeout = null;\r\n observeIfDone();\r\n };\r\n }\r\n unobserveChanges(); // stop watching for changes to DOM\r\n // find all use elements\r\n uses = document.getElementsByTagName('use');\r\n for (i = 0; i < uses.length; i += 1) {\r\n try {\r\n bcr = uses[i].getBoundingClientRect();\r\n } catch (ignore) {\r\n // failed to get bounding rectangle of the use element\r\n bcr = false;\r\n }\r\n href =\r\n uses[i].getAttribute('href') ||\r\n uses[i].getAttributeNS(xlinkNS, 'href') ||\r\n uses[i].getAttribute('xlink:href');\r\n if (href && href.split) {\r\n url = href.split('#');\r\n } else {\r\n url = ['', ''];\r\n }\r\n base = url[0];\r\n hash = url[1];\r\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\r\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\r\n // the use element is empty\r\n // if there is a reference to an external SVG, try to fetch it\r\n // use the optional fallback URL if there is no reference to an external SVG\r\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\r\n base = fallback;\r\n }\r\n if (uses[i].hasAttribute('href')) {\r\n uses[i].setAttributeNS(xlinkNS, 'xlink:href', href);\r\n }\r\n if (base.length) {\r\n // schedule updating xlink:href\r\n xhr = cache[base];\r\n if (xhr !== true) {\r\n // true signifies that prepending the SVG was not required\r\n setTimeout(\r\n attrUpdateFunc({\r\n useEl: uses[i],\r\n base: base,\r\n hash: hash,\r\n }),\r\n 0\r\n );\r\n }\r\n if (xhr === undefined) {\r\n Request = createRequest(base);\r\n if (Request !== undefined) {\r\n xhr = new Request();\r\n cache[base] = xhr;\r\n xhr.onload = onloadFunc(xhr);\r\n xhr.onerror = onErrorTimeout(xhr);\r\n xhr.ontimeout = onErrorTimeout(xhr);\r\n xhr.open('GET', base);\r\n xhr.send();\r\n inProgressCount += 1;\r\n }\r\n }\r\n }\r\n } else {\r\n if (!isHidden) {\r\n if (cache[base] === undefined) {\r\n // remember this URL if the use element was not empty and no request was sent\r\n cache[base] = true;\r\n } else if (cache[base].onload) {\r\n // if it turns out that prepending the SVG is not necessary,\r\n // abort the in-progress xhr.\r\n cache[base].abort();\r\n delete cache[base].onload;\r\n cache[base] = true;\r\n }\r\n } else if (base.length && cache[base]) {\r\n setTimeout(\r\n attrUpdateFunc({\r\n useEl: uses[i],\r\n base: base,\r\n hash: hash,\r\n }),\r\n 0\r\n );\r\n }\r\n }\r\n }\r\n uses = '';\r\n inProgressCount += 1;\r\n observeIfDone();\r\n };\r\n var winLoad;\r\n winLoad = function () {\r\n window.removeEventListener('load', winLoad, false); // to prevent memory leaks\r\n tid = setTimeout(checkUseElems, 0);\r\n };\r\n if (document.readyState !== 'complete') {\r\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\r\n window.addEventListener('load', winLoad, false);\r\n } else {\r\n // No need to add a listener if the document is already loaded, initialize immediately.\r\n winLoad();\r\n }\r\n }\r\n})();\r\n"]},"metadata":{},"sourceType":"module"}