|
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};define("linkify",["exports"],function(e){function t(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Object.create(e.prototype);for(var a in n)o[a]=n[a];return o.constructor=t,t.prototype=o,t}function n(e){e=e||{},this.defaultProtocol=e.defaultProtocol||p.defaultProtocol,this.events=e.events||p.events,this.format=e.format||p.format,this.formatHref=e.formatHref||p.formatHref,this.nl2br=e.nl2br||p.nl2br,this.tagName=e.tagName||p.tagName,this.target=e.target||p.target,this.validate=e.validate||p.validate,this.ignoreTags=[],this.attributes=e.attributes||e.linkAttributes||p.attributes,this.className=e.className||e.linkClass||p.className;for(var t=e.ignoreTags||p.ignoreTags,n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function o(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1}function a(e){return e}function r(e,t){return"url"===t?"_blank":null}function i(){return function(e){this.j=[],this.T=e||null}}function s(e,t,n,o){for(var a=0,r=e.length,i=t,s=[],c=void 0;a<r&&(c=i.next(e[a]));)i=c,a++;if(a>=r)return[];for(;a<r-1;)c=new f(o),s.push(c),i.on(e[a],c),i=c,a++;return c=new f(n),s.push(c),i.on(e[r-1],c),s}function c(){return function(e){e&&(this.v=e)}}function l(e){var n=e?{v:e}:{};return t(d,c(),n)}function u(e){return e instanceof b||e instanceof P}var p={defaultProtocol:"http",events:null,format:a,formatHref:a,nl2br:!1,tagName:"a",target:r,validate:!0,ignoreTags:[],attributes:null,className:"linkified"};n.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var o=this[e];if(!o)return o;switch("undefined"==typeof o?"undefined":_typeof(o)){case"function":return o(t,n.type);case"object":var a=o[n.type]||p[e];return"function"==typeof a?a(t,n.type):a}return o},getObject:function(e,t,n){var o=this[e];return"function"==typeof o?o(t,n.type):o}};var h=Object.freeze({defaults:p,Options:n,contains:o}),g=i();g.prototype={defaultTransition:!1,on:function(e,t){if(e instanceof Array){for(var n=0;n<e.length;n++)this.j.push([e[n],t]);return this}return this.j.push([e,t]),this},next:function(e){for(var t=0;t<this.j.length;t++){var n=this.j[t],o=n[0],a=n[1];if(this.test(e,o))return a}return this.defaultTransition},accepts:function(){return!!this.T},test:function(e,t){return e===t},emit:function(){return this.T}};var f=t(g,i(),{test:function(e,t){return e===t||t instanceof RegExp&&t.test(e)}}),m=t(g,i(),{jump:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.next(new e(""));return n===this.defaultTransition?(n=new this.constructor(t),this.on(e,n)):t&&(n.T=t),n},test:function(e,t){return e instanceof t}}),d=c();d.prototype={toString:function(){return this.v+""}};var b=l(),y=l("@"),v=l(":"),k=l("."),w=l(),j=l(),x=l("\n"),z=l(),O=l("+"),S=l("#"),N=l(),T=l("mailto:"),A=l("?"),L=l("/"),E=l("_"),C=l(),P=l(),R=l(),q=l("{"),H=l("["),M=l("<"),B=l("("),U=l("}"),_=l("]"),D=l(">"),I=l(")"),K=l("&"),G=Object.freeze({Base:d,DOMAIN:b,AT:y,COLON:v,DOT:k,PUNCTUATION:w,LOCALHOST:j,NL:x,NUM:z,PLUS:O,POUND:S,QUERY:A,PROTOCOL:N,MAILTO:T,SLASH:L,UNDERSCORE:E,SYM:C,TLD:P,WS:R,OPENBRACE:q,OPENBRACKET:H,OPENANGLEBRACKET:M,OPENPAREN:B,CLOSEBRACE:U,CLOSEBRACKET:_,CLOSEANGLEBRACKET:D,CLOSEPAREN:I,AMPERSAND:K}),Y="aaa|aarp|abb|abbott|abogado|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|af|afl|ag|agency|ai|aig|airforce|airtel|al|alibaba|alipay|allfinanz|alsace|am|amica|amsterdam|an|analytics|android|ao|apartments|app|apple|aq|aquarelle|ar|aramco|archi|army|arpa|arte|as|asia|associates|at|attorney|au|auction|audi|audio|author|auto|autos|avianca|aw|ax|axa|az|azure|ba|baidu|band|bank|bar|barcelona|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bbva|bcg|bcn|bd|be|beats|beer|bentley|berlin|best|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bom|bond|boo|book|boots|bosch|bostik|bot|boutique|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|camera|camp|cancerresearch|canon|capetown|capital|car|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cba|cbn|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chloe|christmas|chrome|church|ci|cipriani|circle|cisco|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|date|dating|datsun|day|dclk|de|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dj|dk|dm|dnp|do|docs|dog|doha|domains|download|drive|dubai|durban|dvag|dz|earth|eat|ec|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|er|erni|es|esq|estate|et|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|fage|fail|fairwinds|faith|family|fan|fans|farm|fashion|fast|feedback|ferrero|fi|film|final|finance|financial|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|florist|flowers|flsmidth|fly|fm|fo|foo|football|ford|forex|forsale|forum|foundation|fox|fr|fresenius|frl|frogans|frontier|fund|furniture|futbol|fyi|ga|gal|gallery|gallup|game|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|gold|goldpoint|golf|goo|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|group|gs|gt|gu|gucci|guge|guide|guitars|guru|gw|gy|hamburg|hangout|haus|hdfcbank|health|healthcare|help|helsinki|here|hermes|hiphop|hitachi|hiv|hk|hm|hn|hockey|holdings|holiday|homedepot|homes|honda|horse|host|hosting|hoteles|hotmail|house|how|hr|hsbc|ht|hu|hyundai|ibm|icbc|ice|icu|id|ie|ifm|iinet|il|im|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|international|investments|io|ipiranga|iq|ir|irish|is|iselect|ist|istanbul|it|itau|iwc|jaguar|java|jcb|je|jetzt|jewelry|jlc|jll|jm|jmp|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kitchen|kiwi|km|kn|koeln|komatsu|kp|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|lamborghini|lamer|lancaster|land|landrover|lanxess|lasalle|lat|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|legal|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|limited|limo|lincoln|linde|link|live|living|lixil|lk|loan|loans|local|locus|lol|london|lotte|lotto|love|lr|ls|lt|ltd|ltda|lu|lupin|luxe|luxury|lv|ly|ma|madrid|maif|maison|makeup|man|management|mango|market|marketing|markets|marriott|mba|mc|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|mg|mh|miami|microsoft|mil|mini|mk|ml|mm|mma|mn|mo|mobi|mobily|moda|moe|moi|mom|monash|money|montblanc|mormon|mortgage|moscow|motorcycles|mov|movie|movistar|mp|mq|mr|ms|mt|mtn|mtpc|mtr|mu|museum|mutuelle|mv|mw|mx|my|mz|na|nadex|nagoya|name|natura|navy|nc|ne|nec|net|netbank|network|neustar|new|news|nexus|nf|ng|ngo|nhk|ni|nico|nikon|ninja|nissan|nl|no|nokia|norton|nowruz|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|office|okinawa|om|omega|one|ong|onl|online|ooo|oracle|orange|org|organic|origins|osaka|otsuka|ovh|pa|page|pamperedchef|panerai|paris|pars|partners|parts|party|passagens|pe|pet|pf|pg|ph|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pohl|poker|porn|post|pr|praxi|press|pro|prod|productions|prof|promo|properties|property|protection|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|racing|re|read|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|ricoh|rio|rip|ro|rocher|rocks|rodeo|room|rs|rsvp|ru|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|saxo|sb|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scor|scot|sd|se|seat|security|seek|select|sener|services|seven|sew|sex|sexy|sfr|sg|sh|sharp|shell|shia|shiksha|shoes|show|shriram|si|singles|site|sj|sk|ski|skin|sky|skype|sl|sm|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|st|stada|star|starhub|statefarm|statoil|stc|stcgroup|stockholm|storage|store|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|taobao|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|team|tech|technology|tel|telecity|telefonica|temasek|tennis|tf|tg|th|thd|theater|theatre|tickets|tienda|tiffany|tips|tires|tirol|tj|tk|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tp|tr|trade|trading|training|travel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubs|ug|uk|unicom|university|uno|uol|us|uy|uz|va|vacations|vana|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|viking|villas|vin|vip|virgin|vision|vista|vistaprint|viva|vlaanderen|vn|vodka|volkswagen|vote|voting|voto|voyage|vu|vuelos|wales|walter|wang|wanggou|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|wme|wolterskluwer|work|works|world|ws|wtc|wtf|xbox|xerox|xin|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|youtube|yt|za|zara|zero|zip|zm|zone|zuerich|zw".split("|"),Q="0123456789".split(""),W="0123456789abcdefghijklmnopqrstuvwxyz".split(""),X=[" ","\f","\r","\t","\x0B"," "," ",""],Z=[],F=function(e){return new f(e)},J=F(),V=F(z),$=F(b),ee=F(),te=F(R);J.on("@",F(y)).on(".",F(k)).on("+",F(O)).on("#",F(S)).on("?",F(A)).on("/",F(L)).on("_",F(E)).on(":",F(v)).on("{",F(q)).on("[",F(H)).on("<",F(M)).on("(",F(B)).on("}",F(U)).on("]",F(_)).on(">",F(D)).on(")",F(I)).on("&",F(K)).on([",",";","!",'"',"'"],F(w)),J.on("\n",F(x)).on(X,te),te.on(X,te);for(var ne=0;ne<Y.length;ne++){var oe=s(Y[ne],J,P,b);Z.push.apply(Z,oe)}var ae=s("file",J,b,b),re=s("ftp",J,b,b),ie=s("http",J,b,b),se=s("mailto",J,b,b);Z.push.apply(Z,ae),Z.push.apply(Z,re),Z.push.apply(Z,ie);var ce=ae.pop(),le=re.pop(),ue=ie.pop(),pe=se.pop(),he=F(b),ge=F(N),fe=F(T);le.on("s",he).on(":",ge),ue.on("s",he).on(":",ge),Z.push(he),ce.on(":",ge),he.on(":",ge),pe.on(":",fe);var me=s("localhost",J,j,b);Z.push.apply(Z,me),J.on(Q,V),V.on("-",ee).on(Q,V).on(W,$),$.on("-",ee).on(W,$);for(var de=0;de<Z.length;de++)Z[de].on("-",ee).on(W,$);ee.on("-",ee).on(Q,$).on(W,$),J.defaultTransition=F(C);var be=function(e){for(var t=e.replace(/[A-Z]/g,function(e){return e.toLowerCase()}),n=e.length,o=[],a=0;a<n;){for(var r=J,i=null,s=null,c=0,l=null,u=-1;a<n&&(s=r.next(t[a]));)i=null,r=s,r.accepts()?(u=0,l=r):u>=0&&u++,c++,a++;if(!(u<0)){a-=u,c-=u;var p=l.emit();o.push(new p(e.substr(a-c,c)))}}return o},ye=J,ve=Object.freeze({State:f,TOKENS:G,run:be,start:ye}),ke=c();ke.prototype={type:"token",isLink:!1,toString:function(){for(var e=[],t=0;t<this.v.length;t++)e.push(this.v[t].toString());return e.join("")},toHref:function(){return this.toString()},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(e)}}};var we=t(ke,c(),{type:"email",isLink:!0}),je=t(ke,c(),{type:"email",isLink:!0,toHref:function(){this.v;return"mailto:"+this.toString()}}),xe=t(ke,c(),{type:"text"}),ze=t(ke,c(),{type:"nl"}),Oe=t(ke,c(),{type:"url",isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=!1,n=!1,o=this.v,a=[],r=0;o[r]instanceof N;)t=!0,a.push(o[r].toString().toLowerCase()),r++;for(;o[r]instanceof L;)n=!0,a.push(o[r].toString()),r++;for(;u(o[r]);)a.push(o[r].toString().toLowerCase()),r++;for(;r<o.length;r++)a.push(o[r].toString());return a=a.join(""),t||n||(a=e+"://"+a),a},hasProtocol:function(){return this.v[0]instanceof N}}),Se=Object.freeze({Base:ke,MAILTOEMAIL:we,EMAIL:je,NL:ze,TEXT:xe,URL:Oe}),Ne=function(e){return new m(e)},Te=Ne(),Ae=Ne(),Le=Ne(),Ee=Ne(),Ce=Ne(),Pe=Ne(),Re=Ne(),qe=Ne(Oe),He=Ne(),Me=Ne(Oe),Be=Ne(Oe),Ue=Ne(),_e=Ne(),De=Ne(),Ie=Ne(),Ke=Ne(),Ge=Ne(Oe),Ye=Ne(Oe),Qe=Ne(Oe),We=Ne(Oe),Xe=Ne(),Ze=Ne(),Fe=Ne(),Je=Ne(),Ve=Ne(),$e=Ne(),et=Ne(je),tt=Ne(),nt=Ne(je),ot=Ne(we),at=Ne(),rt=Ne(),it=Ne(),st=Ne(),ct=Ne(ze);Te.on(x,ct).on(N,Ae).on(T,Le).on(L,Ee),Ae.on(L,Ee),Ee.on(L,Ce),Te.on(P,Pe).on(b,Pe).on(j,qe).on(z,Pe),Ce.on(P,Be).on(b,Be).on(z,Be).on(j,Be),Pe.on(k,Re),Ve.on(k,$e),Re.on(P,qe).on(b,Pe).on(z,Pe).on(j,Pe),$e.on(P,et).on(b,Ve).on(z,Ve).on(j,Ve),qe.on(k,Re),et.on(k,$e),qe.on(v,He).on(L,Be),He.on(z,Me),Me.on(L,Be),et.on(v,tt),tt.on(z,nt);var lt=[b,y,j,z,O,S,N,L,P,E,C,K],ut=[v,k,A,w,U,_,D,I,q,H,M,B];Be.on(q,_e).on(H,De).on(M,Ie).on(B,Ke),Ue.on(q,_e).on(H,De).on(M,Ie).on(B,Ke),_e.on(U,Be),De.on(_,Be),Ie.on(D,Be),Ke.on(I,Be),Ge.on(U,Be),Ye.on(_,Be),Qe.on(D,Be),We.on(I,Be),Xe.on(U,Be),Ze.on(_,Be),Fe.on(D,Be),Je.on(I,Be),_e.on(lt,Ge),De.on(lt,Ye),Ie.on(lt,Qe),Ke.on(lt,We),_e.on(ut,Xe),De.on(ut,Ze),Ie.on(ut,Fe),Ke.on(ut,Je),Ge.on(lt,Ge),Ye.on(lt,Ye),Qe.on(lt,Qe),We.on(lt,We),Ge.on(ut,Ge),Ye.on(ut,Ye),Qe.on(ut,Qe),We.on(ut,We),Xe.on(lt,Ge),Ze.on(lt,Ye),Fe.on(lt,Qe),Je.on(lt,We),Xe.on(ut,Xe),Ze.on(ut,Ze),Fe.on(ut,Fe),Je.on(ut,Je),Be.on(lt,Be),Ue.on(lt,Be),Be.on(ut,Ue),Ue.on(ut,Ue),Le.on(P,ot).on(b,ot).on(z,ot).on(j,ot),ot.on(lt,ot).on(ut,at),at.on(lt,ot).on(ut,at);var pt=[b,z,O,S,A,E,C,K,P];Pe.on(pt,rt).on(y,it),qe.on(pt,rt).on(y,it),Re.on(pt,rt),rt.on(pt,rt).on(y,it).on(k,st),st.on(pt,rt),it.on(P,Ve).on(b,Ve).on(j,et);var ht=function(e){for(var t=e.length,n=0,o=[],a=[];n<t;){for(var r=Te,i=null,s=null,c=0,l=null,u=-1;n<t&&!(i=r.next(e[n]));)a.push(e[n++]);for(;n<t&&(s=i||r.next(e[n]));)i=null,r=s,r.accepts()?(u=0,l=r):u>=0&&u++,n++,c++;if(u<0)for(var p=n-c;p<n;p++)a.push(e[p]);else{a.length>0&&(o.push(new xe(a)),a=[]),n-=u,c-=u;var h=l.emit();o.push(new h(e.slice(n-c,n)))}}return a.length>0&&o.push(new xe(a)),o},gt=Object.freeze({State:m,TOKENS:Se,run:ht,start:Te});Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var ft=function(e){return ht(be(e))},mt=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=ft(e),o=[],a=0;a<n.length;a++){var r=n[a];!r.isLink||t&&r.type!==t||o.push(r.toObject())}return o},dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=ft(e);return 1===n.length&&n[0].isLink&&(!t||n[0].type===t)};e.find=mt,e.inherits=t,e.options=h,e.parser=gt,e.scanner=ve,e.test=dt,e.tokenize=ft;try{Object.defineProperty(e,"__esModule",{value:!0})}catch(bt){e.__esModule=!0}}); |