define("linkify-element",["module","exports","./linkify"],function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function a(e,t,n){var r=n[n.length-1];e.replaceChild(r,t);for(var a=n.length-2;a>=0;a--)e.insertBefore(n[a],r),r=n[a]}function i(e,t,n){for(var r=[],a=e,i=Array.isArray(a),o=0,a=i?a:a[Symbol.iterator]();;){var l;if(i){if(o>=a.length)break;l=a[o++]}else{if(o=a.next(),o.done)break;l=o.value}var s=l;if("nl"===s.type&&t.nl2br)r.push(n.createElement("br"));else if(s.isLink&&t.check(s)){var f=t.resolve(s),d=f.formatted,u=f.formattedHref,c=f.tagName,v=f.className,h=f.target,m=f.events,p=f.attributes,g=n.createElement(c);if(g.setAttribute("href",u),v&&g.setAttribute("class",v),h&&g.setAttribute("target",h),p)for(var b in p)g.setAttribute(b,p[b]);if(m)for(var y in m)g.addEventListener?g.addEventListener(y,m[y]):g.attachEvent&&g.attachEvent("on"+y,m[y]);g.appendChild(n.createTextNode(d)),r.push(g)}else r.push(n.createTextNode(s.toString()))}return r}function o(e,t,n){if(!e||e.nodeType!==h)throw new Error("Cannot linkify "+e+" - Invalid DOM Node type");var r=t.ignoreTags;if("A"===e.tagName||u.contains(r,e.tagName))return e;for(var l=e.firstChild;l;){var s=void 0,f=void 0,c=void 0;switch(l.nodeType){case h:o(l,t,n);break;case m:if(s=l.nodeValue,f=d(s),0===f.length||1===f.length&&f[0]instanceof v)break;c=i(f,t,n),a(e,l,c),l=c[c.length-1]}l=l.nextSibling}return e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{n=n||document||window&&window.document||global&&global.document}catch(r){}if(!n)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the third argument to linkifyElement.");return t=new c(t),o(e,t,n)}try{try{Object.defineProperty(t,"__esModule",{value:!0})}catch(s){t.__esModule=!0}}catch(s){t.__esModule=!0}var f=r(n),d=f.tokenize,u=f.options,c=u.Options,v=f.parser.TOKENS.TEXT,h=1,m=3;l.helper=o,l.normalize=function(e){return new c(e)},t["default"]=l,e.exports=t["default"]});