{"version":3,"sources":["libs/closest.js"],"names":["Element","prototype","matches","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","selector","element","this","elements","document","ownerDocument","querySelectorAll","index","Boolean","closest","nodeType","parentNode"],"mappings":"AAEyC,kBAA9BA,SAAQC,UAAUC,UAC5BF,QAAQC,UAAUC,QAAUF,QAAQC,UAAUE,mBAAqBH,QAAQC,UAAUG,oBAAsBJ,QAAQC,UAAUI,uBAAyB,SAAiBC,GAKtK,IAJA,GAAIC,GAAUC,KACVC,GAAYF,EAAQG,UAAYH,EAAQI,eAAeC,iBAAiBN,GACxEO,EAAQ,EAELJ,EAASI,IAAUJ,EAASI,KAAWN,KAC3CM,CAGH,OAAOC,SAAQL,EAASI,MAIe,kBAA9Bb,SAAQC,UAAUc,UAC5Bf,QAAQC,UAAUc,QAAU,SAAiBT,GAG5C,IAFA,GAAIC,GAAUC,KAEPD,GAAgC,IAArBA,EAAQS,UAAgB,CACzC,GAAIT,EAAQL,QAAQI,GACnB,MAAOC,EAGRA,GAAUA,EAAQU,WAGnB,MAAO","file":"libs/closest.min.js","sourcesContent":["// element-closest | CC0-1.0 | github.com/jonathantneal/closest\n\nif (typeof Element.prototype.matches !== 'function') {\n\tElement.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.webkitMatchesSelector || function matches(selector) {\n\t\tvar element = this;\n\t\tvar elements = (element.document || element.ownerDocument).querySelectorAll(selector);\n\t\tvar index = 0;\n\n\t\twhile (elements[index] && elements[index] !== element) {\n\t\t\t++index;\n\t\t}\n\n\t\treturn Boolean(elements[index]);\n\t};\n}\n\nif (typeof Element.prototype.closest !== 'function') {\n\tElement.prototype.closest = function closest(selector) {\n\t\tvar element = this;\n\n\t\twhile (element && element.nodeType === 1) {\n\t\t\tif (element.matches(selector)) {\n\t\t\t\treturn element;\n\t\t\t}\n\n\t\t\telement = element.parentNode;\n\t\t}\n\n\t\treturn null;\n\t};\n}\n"],"sourceRoot":"/source/"}