mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fixed #17
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/htmlParser/state.ts"],"names":[],"mappings":"","file":"state.js","sourcesContent":["/**\n * The subset of the parser states defined in https://www.w3.org/TR/html51/syntax.html\n * which are useful for Autolinker.\n */\nexport const enum State {\n\tData = 0,\n\tTagOpen,\n\tEndTagOpen,\n\tTagName,\n\tBeforeAttributeName,\n\tAttributeName,\n\tAfterAttributeName,\n\tBeforeAttributeValue,\n\tAttributeValueDoubleQuoted,\n\tAttributeValueSingleQuoted,\n\tAttributeValueUnquoted,\n\tAfterAttributeValueQuoted,\n\tSelfClosingStartTag,\n\tMarkupDeclarationOpenState, // When the sequence '<!' is read for an HTML comment or doctype\n\tCommentStart,\n\tCommentStartDash,\n\tComment,\n\tCommentEndDash,\n\tCommentEnd,\n\tCommentEndBang,\n\tDoctype\n}"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,gFAAgF;AAChF,sCAAsC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC","file":"index.js","sourcesContent":["// WARNING: This file is modified a bit when it is compiled into index.js in \n// order to support nodejs interoperability with require('autolinker') directly. \n// This is done by the buildSrcFixCommonJsIndexTask() function in the gulpfile. \n// See that function for more details.\n\nexport { default } from './autolinker';\nexport { default as Autolinker } from './autolinker';\n\nexport * from './autolinker';\nexport * from './anchor-tag-builder';\nexport * from './html-tag';\nexport * from './match/index';\nexport * from './matcher/index';\n"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/match/email-match.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAE7C;;;;;;;GAOG;AACH;IAAgC,sCAAK;IAUpC;;;;OAIG;IACH,oBAAa,GAAqB;QAAlC,YACC,kBAAO,GAAG,CAAE,SAGZ;QAjBD;;;;WAIG;QACc,WAAK,GAAW,EAAE,CAAC,CAAE,gGAAgG;QAWrI,KAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;;IACxB,CAAC;IAGD;;;;;OAKG;IACH,4BAAO,GAAP;QACC,OAAO,OAAO,CAAC;IAChB,CAAC;IAGD;;;;OAIG;IACH,6BAAQ,GAAR;QACC,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAGD;;;;OAIG;IACH,kCAAa,GAAb;QACC,OAAO,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;IAGD;;;;OAIG;IACH,kCAAa,GAAb;QACC,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAEF,iBAAC;AAAD,CA9DA,AA8DC,CA9D+B,KAAK,GA8DpC","file":"email-match.js","sourcesContent":["import { Match, MatchConfig } from \"./match\";\n\n/**\n * @class Autolinker.match.Email\n * @extends Autolinker.match.Match\n *\n * Represents a Email match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nexport class EmailMatch extends Match {\n\n\t/**\n\t * @cfg {String} email (required)\n\t *\n\t * The email address that was matched.\n\t */\n\tprivate readonly email: string = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\n\t/**\n\t * @method constructor\n\t * @param {Object} cfg The configuration properties for the Match\n\t * instance, specified in an Object (map).\n\t */\n\tconstructor( cfg: EmailMatchConfig ) {\n\t\tsuper( cfg );\n\n\t\tthis.email = cfg.email;\n\t}\n\n\n\t/**\n\t * Returns a string name for the type of match that this class represents.\n\t * For the case of EmailMatch, returns 'email'.\n\t *\n\t * @return {String}\n\t */\n\tgetType() {\n\t\treturn 'email';\n\t}\n\n\n\t/**\n\t * Returns the email address that was matched.\n\t *\n\t * @return {String}\n\t */\n\tgetEmail() {\n\t\treturn this.email;\n\t}\n\n\n\t/**\n\t * Returns the anchor href that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorHref() {\n\t\treturn 'mailto:' + this.email;\n\t}\n\n\n\t/**\n\t * Returns the anchor text that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorText() {\n\t\treturn this.email;\n\t}\n\n}\n\n\nexport interface EmailMatchConfig extends MatchConfig {\n\temail: string;\n}"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/match/hashtag-match.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;GASG;AACH;IAAkC,wCAAK;IAkBtC;;;;OAIG;IACH,sBAAa,GAAuB;QAApC,YACC,kBAAO,GAAG,CAAE,SAIZ;QA1BD;;;;;WAKG;QACc,iBAAW,GAAW,EAAE,CAAC,CAAE,gGAAgG;QAE5I;;;;WAIG;QACc,aAAO,GAAW,EAAE,CAAC,CAAE,gGAAgG;QAWvI,KAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;QACnC,KAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;;IAC5B,CAAC;IAGD;;;;;OAKG;IACH,8BAAO,GAAP;QACC,OAAO,SAAS,CAAC;IAClB,CAAC;IAGD;;;;;OAKG;IACH,qCAAc,GAAd;QACC,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAGD;;;;OAIG;IACH,iCAAU,GAAV;QACC,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAGD;;;;OAIG;IACH,oCAAa,GAAb;QACC,IAAI,WAAW,GAAG,IAAI,CAAC,WAAW,EAC9B,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE3B,QAAQ,WAAW,EAAG;YACrB,KAAK,SAAS;gBACb,OAAO,8BAA8B,GAAG,OAAO,CAAC;YACjD,KAAK,UAAU;gBACd,OAAO,mCAAmC,GAAG,OAAO,CAAC;YACtD,KAAK,WAAW;gBACf,OAAO,qCAAqC,GAAG,OAAO,CAAC;YAExD,SAAW,uGAAuG;gBACjH,MAAM,IAAI,KAAK,CAAE,4CAA4C,GAAG,WAAW,CAAE,CAAC;SAC/E;IACF,CAAC;IAGD;;;;OAIG;IACH,oCAAa,GAAb;QACC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;IAC3B,CAAC;IAEF,mBAAC;AAAD,CA/FA,AA+FC,CA/FiC,KAAK,GA+FtC","file":"hashtag-match.js","sourcesContent":["import { Match, MatchConfig } from \"./match\";\n\n/**\n * @class Autolinker.match.Hashtag\n * @extends Autolinker.match.Match\n *\n * Represents a Hashtag match found in an input string which should be\n * Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more\n * details.\n */\nexport class HashtagMatch extends Match {\n\n\t/**\n\t * @cfg {String} serviceName\n\t *\n\t * The service to point hashtag matches to. See {@link Autolinker#hashtag}\n\t * for available values.\n\t */\n\tprivate readonly serviceName: string = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\t/**\n\t * @cfg {String} hashtag (required)\n\t *\n\t * The HashtagMatch that was matched, without the '#'.\n\t */\n\tprivate readonly hashtag: string = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\n\t/**\n\t * @method constructor\n\t * @param {Object} cfg The configuration properties for the Match\n\t * instance, specified in an Object (map).\n\t */\n\tconstructor( cfg: HashtagMatchConfig ) {\n\t\tsuper( cfg );\n\n\t\tthis.serviceName = cfg.serviceName;\n\t\tthis.hashtag = cfg.hashtag;\n\t}\n\n\n\t/**\n\t * Returns a string name for the type of match that this class represents.\n\t * For the case of HashtagMatch, returns 'hashtag'.\n\t *\n\t * @return {String}\n\t */\n\tgetType() {\n\t\treturn 'hashtag';\n\t}\n\n\n\t/**\n\t * Returns the configured {@link #serviceName} to point the HashtagMatch to.\n\t * Ex: 'facebook', 'twitter'.\n\t *\n\t * @return {String}\n\t */\n\tgetServiceName() {\n\t\treturn this.serviceName;\n\t}\n\n\n\t/**\n\t * Returns the matched hashtag, without the '#' character.\n\t *\n\t * @return {String}\n\t */\n\tgetHashtag() {\n\t\treturn this.hashtag;\n\t}\n\n\n\t/**\n\t * Returns the anchor href that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorHref() {\n\t\tlet serviceName = this.serviceName,\n\t\t hashtag = this.hashtag;\n\n\t\tswitch( serviceName ) {\n\t\t\tcase 'twitter' :\n\t\t\t\treturn 'https://twitter.com/hashtag/' + hashtag;\n\t\t\tcase 'facebook' :\n\t\t\t\treturn 'https://www.facebook.com/hashtag/' + hashtag;\n\t\t\tcase 'instagram' :\n\t\t\t\treturn 'https://instagram.com/explore/tags/' + hashtag;\n\n\t\t\tdefault : // Shouldn't happen because Autolinker's constructor should block any invalid values, but just in case.\n\t\t\t\tthrow new Error( 'Unknown service name to point hashtag to: ' + serviceName );\n\t\t}\n\t}\n\n\n\t/**\n\t * Returns the anchor text that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorText() {\n\t\treturn '#' + this.hashtag;\n\t}\n\n}\n\nexport interface HashtagMatchConfig extends MatchConfig {\n\tserviceName: string;\n\thashtag: string;\n}"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/match/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["export * from './email-match';\nexport * from './hashtag-match';\nexport * from './match';\nexport * from './mention-match';\nexport * from './phone-match';\nexport * from './url-match';\n"]}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/match/mention-match.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,SAAS,CAAA;AAG5C;;;;;;;GAOG;AACH;IAAkC,wCAAK;IAgBtC;;;;OAIG;IACH,sBAAa,GAAuB;QAApC,YACC,kBAAM,GAAG,CAAC,SAIV;QAzBD;;;;;WAKG;QACc,iBAAW,GAAoB,SAAS,CAAA,CAAC,gGAAgG;QAE1J;;;;WAIG;QACc,aAAO,GAAW,EAAE,CAAA,CAAC,gGAAgG;QAUrI,KAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;QAC1B,KAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;;IACnC,CAAC;IAED;;;;;OAKG;IACH,8BAAO,GAAP;QACC,OAAO,SAAS,CAAA;IACjB,CAAC;IAED;;;;OAIG;IACH,iCAAU,GAAV;QACC,OAAO,IAAI,CAAC,OAAO,CAAA;IACpB,CAAC;IAED;;;;;OAKG;IACH,qCAAc,GAAd;QACC,OAAO,IAAI,CAAC,WAAW,CAAA;IACxB,CAAC;IAED;;;;OAIG;IACH,oCAAa,GAAb;QACC,QAAQ,IAAI,CAAC,WAAW,EAAE;YACzB,KAAK,UAAU;gBACd,OAAO,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAA;YAC7C,KAAK,SAAS;gBACb,OAAO,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAA;YAC7C,KAAK,WAAW;gBACf,OAAO,wBAAwB,GAAG,IAAI,CAAC,OAAO,CAAA;YAC/C,KAAK,YAAY;gBAChB,OAAO,yBAAyB,GAAG,IAAI,CAAC,OAAO,CAAA;YAEhD;gBACC,uGAAuG;gBACvG,MAAM,IAAI,KAAK,CACd,4CAA4C,GAAG,IAAI,CAAC,WAAW,CAC/D,CAAA;SACF;IACF,CAAC;IAED;;;;OAIG;IACH,oCAAa,GAAb;QACC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,CAAA;IAC1B,CAAC;IAED;;;;;;OAMG;IACH,0CAAmB,GAAnB;QACC,IAAI,gBAAgB,GAAG,iBAAM,mBAAmB,WAAE,EACjD,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAA;QAEpC,IAAI,WAAW,EAAE;YAChB,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;SAClC;QACD,OAAO,gBAAgB,CAAA;IACxB,CAAC;IACF,mBAAC;AAAD,CA1GA,AA0GC,CA1GiC,KAAK,GA0GtC","file":"mention-match.js","sourcesContent":["import { Match, MatchConfig } from './match'\nimport { MentionServices } from '../autolinker'\n\n/**\n * @class Autolinker.match.Mention\n * @extends Autolinker.match.Match\n *\n * Represents a Mention match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nexport class MentionMatch extends Match {\n\t/**\n\t * @cfg {String} serviceName\n\t *\n\t * The service to point mention matches to. See {@link Autolinker#mention}\n\t * for available values.\n\t */\n\tprivate readonly serviceName: MentionServices = 'twitter' // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\t/**\n\t * @cfg {String} mention (required)\n\t *\n\t * The Mention that was matched, without the '@' character.\n\t */\n\tprivate readonly mention: string = '' // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\t/**\n\t * @method constructor\n\t * @param {Object} cfg The configuration properties for the Match\n\t * instance, specified in an Object (map).\n\t */\n\tconstructor (cfg: MentionMatchConfig) {\n\t\tsuper(cfg)\n\n\t\tthis.mention = cfg.mention\n\t\tthis.serviceName = cfg.serviceName\n\t}\n\n\t/**\n\t * Returns a string name for the type of match that this class represents.\n\t * For the case of MentionMatch, returns 'mention'.\n\t *\n\t * @return {String}\n\t */\n\tgetType () {\n\t\treturn 'mention'\n\t}\n\n\t/**\n\t * Returns the mention, without the '@' character.\n\t *\n\t * @return {String}\n\t */\n\tgetMention () {\n\t\treturn this.mention\n\t}\n\n\t/**\n\t * Returns the configured {@link #serviceName} to point the mention to.\n\t * Ex: 'instagram', 'twitter', 'soundcloud'.\n\t *\n\t * @return {String}\n\t */\n\tgetServiceName () {\n\t\treturn this.serviceName\n\t}\n\n\t/**\n\t * Returns the anchor href that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorHref () {\n\t\tswitch (this.serviceName) {\n\t\t\tcase 'mastodon':\n\t\t\t\treturn 'https://example.com/' + this.mention\n\t\t\tcase 'twitter':\n\t\t\t\treturn 'https://twitter.com/' + this.mention\n\t\t\tcase 'instagram':\n\t\t\t\treturn 'https://instagram.com/' + this.mention\n\t\t\tcase 'soundcloud':\n\t\t\t\treturn 'https://soundcloud.com/' + this.mention\n\n\t\t\tdefault:\n\t\t\t\t// Shouldn't happen because Autolinker's constructor should block any invalid values, but just in case.\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Unknown service name to point mention to: ' + this.serviceName\n\t\t\t\t)\n\t\t}\n\t}\n\n\t/**\n\t * Returns the anchor text that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorText () {\n\t\treturn '@' + this.mention\n\t}\n\n\t/**\n\t * Returns the CSS class suffixes that should be used on a tag built with\n\t * the match. See {@link Autolinker.match.Match#getCssClassSuffixes} for\n\t * details.\n\t *\n\t * @return {String[]}\n\t */\n\tgetCssClassSuffixes () {\n\t\tlet cssClassSuffixes = super.getCssClassSuffixes(),\n\t\t\tserviceName = this.getServiceName()\n\n\t\tif (serviceName) {\n\t\t\tcssClassSuffixes.push(serviceName)\n\t\t}\n\t\treturn cssClassSuffixes\n\t}\n}\n\nexport interface MentionMatchConfig extends MatchConfig {\n\tserviceName: MentionServices\n\tmention: string\n}\n"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/match/phone-match.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;GASG;AACH;IAAgC,sCAAK;IAwBpC;;;;OAIG;IACH,oBAAa,GAAqB;QAAlC,YACC,kBAAO,GAAG,CAAE,SAIZ;QAhCD;;;;;;;WAOG;QACc,YAAM,GAAW,EAAE,CAAC,CAAE,gGAAgG;QAEvI;;;;;;;;WAQG;QACc,cAAQ,GAAY,KAAK,CAAC,CAAE,gGAAgG;QAW5I,KAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QACzB,KAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;;IAC9B,CAAC;IAGD;;;;;OAKG;IACH,4BAAO,GAAP;QACC,OAAO,OAAO,CAAC;IAChB,CAAC;IAGD;;;;;;;OAOG;IACH,mCAAc,GAAd;QACC,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAGD;;;;;;;OAOG;IACH,8BAAS,GAAT;QACC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAGD;;;;OAIG;IACH,kCAAa,GAAb;QACC,OAAO,MAAM,GAAG,CAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAE,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5D,CAAC;IAGD;;;;OAIG;IACH,kCAAa,GAAb;QACC,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAEF,iBAAC;AAAD,CA7FA,AA6FC,CA7F+B,KAAK,GA6FpC","file":"phone-match.js","sourcesContent":["import { Match, MatchConfig } from \"./match\";\n\n/**\n * @class Autolinker.match.Phone\n * @extends Autolinker.match.Match\n *\n * Represents a Phone number match found in an input string which should be\n * Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more\n * details.\n */\nexport class PhoneMatch extends Match {\n\n\t/**\n\t * @protected\n\t * @property {String} number (required)\n\t *\n\t * The phone number that was matched, without any delimiter characters.\n\t *\n\t * Note: This is a string to allow for prefixed 0's.\n\t */\n\tprivate readonly number: string = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\t/**\n\t * @protected\n\t * @property {Boolean} plusSign (required)\n\t *\n\t * `true` if the matched phone number started with a '+' sign. We'll include\n\t * it in the `tel:` URL if so, as this is needed for international numbers.\n\t *\n\t * Ex: '+1 (123) 456 7879'\n\t */\n\tprivate readonly plusSign: boolean = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n\n\n\t/**\n\t * @method constructor\n\t * @param {Object} cfg The configuration properties for the Match\n\t * instance, specified in an Object (map).\n\t */\n\tconstructor( cfg: PhoneMatchConfig ) {\n\t\tsuper( cfg );\n\n\t\tthis.number = cfg.number;\n\t\tthis.plusSign = cfg.plusSign;\n\t}\n\n\n\t/**\n\t * Returns a string name for the type of match that this class represents.\n\t * For the case of PhoneMatch, returns 'phone'.\n\t *\n\t * @return {String}\n\t */\n\tgetType() {\n\t\treturn 'phone';\n\t}\n\n\n\t/**\n\t * Returns the phone number that was matched as a string, without any \n\t * delimiter characters. \n\t *\n\t * Note: This is a string to allow for prefixed 0's.\n\t *\n\t * @return {String}\n\t */\n\tgetPhoneNumber() {\n\t\treturn this.number;\n\t}\n\n\n\t/**\n\t * Alias of {@link #getPhoneNumber}, returns the phone number that was \n\t * matched as a string, without any delimiter characters.\n\t *\n\t * Note: This is a string to allow for prefixed 0's.\n\t *\n\t * @return {String}\n\t */\n\tgetNumber() {\n\t\treturn this.getPhoneNumber();\n\t}\n\n\n\t/**\n\t * Returns the anchor href that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorHref() {\n\t\treturn 'tel:' + ( this.plusSign ? '+' : '' ) + this.number;\n\t}\n\n\n\t/**\n\t * Returns the anchor text that should be generated for the match.\n\t *\n\t * @return {String}\n\t */\n\tgetAnchorText() {\n\t\treturn this.matchedText;\n\t}\n\n}\n\n\nexport interface PhoneMatchConfig extends MatchConfig {\n\tnumber: string;\n\tplusSign: boolean;\n}"]}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/matcher/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './email-matcher';\nexport * from './hashtag-matcher';\nexport * from './matcher';\nexport * from './mention-matcher';\nexport * from './phone-matcher';\nexport * from './url-matcher';\n"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/matcher/matcher.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH;IAcC;;;;OAIG;IACH,iBAAa,GAAkB;QAjB/B;;;;;WAKG;QACK,yBAAoB,GAAG,IAAI,CAAC,CAAE,kGAAkG;QAYvI,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IAClC,CAAC;IAaF,cAAC;AAAD,CAlCA,AAkCC,IAAA","file":"matcher.js","sourcesContent":["import { AnchorTagBuilder } from \"../anchor-tag-builder\";\nimport { Match } from \"../match/match\";\n\n/**\n * @abstract\n * @class Autolinker.matcher.Matcher\n *\n * An abstract class and interface for individual matchers to find matches in\n * an input string with linkified versions of them.\n *\n * Note that Matchers do not take HTML into account - they must be fed the text\n * nodes of any HTML string, which is handled by {@link Autolinker#parse}.\n */\nexport abstract class Matcher {\n\n\t/**\n\t * @cfg {Autolinker.AnchorTagBuilder} tagBuilder (required)\n\t *\n\t * Reference to the AnchorTagBuilder instance to use to generate HTML tags\n\t * for {@link Autolinker.match.Match Matches}.\n\t */\n\tprivate __jsduckDummyDocProp = null; // property used just to get the above doc comment into the ES5 output and documentation generator\n\n\t// Actual property for the above jsdoc comment\n\tprotected tagBuilder: AnchorTagBuilder;\n\n\n\t/**\n\t * @method constructor\n\t * @param {Object} cfg The configuration properties for the Matcher\n\t * instance, specified in an Object (map).\n\t */\n\tconstructor( cfg: MatcherConfig ) {\n\t\tthis.tagBuilder = cfg.tagBuilder;\n\t}\n\n\n\t/**\n\t * Parses the input `text` and returns the array of {@link Autolinker.match.Match Matches}\n\t * for the matcher.\n\t *\n\t * @abstract\n\t * @param {String} text The text to scan and replace matches in.\n\t * @return {Autolinker.match.Match[]}\n\t */\n\tabstract parseMatches( text: string ): Match[];\n\n}\n\nexport interface MatcherConfig {\n\ttagBuilder: AnchorTagBuilder;\n}"]}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/matcher/phone-matcher.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,8EAA8E;AAC9E,8EAA8E;AAC9E,yEAAyE;AACzE,6GAA6G;AAC7G,gFAAgF;AAChF,IAAM,iBAAiB,GAAG,uRAAuR,CAAC;AAElT;;;;;;;;GAQG;AACH;IAAkC,wCAAO;IAAzC;QAAA,qEA2DC;QAzDA;;;;;;;;;;;;;;;;;WAiBG;QACO,kBAAY,GAAG,iBAAiB,CAAC;;IAuC5C,CAAC;IArCA;;OAEG;IACH,mCAAY,GAAZ,UAAc,IAAY;QACzB,IAAI,YAAY,GAAG,IAAI,CAAC,YAAY,EACnC,UAAU,GAAG,IAAI,CAAC,UAAU,EAC5B,OAAO,GAAY,EAAE,EACrB,KAA6B,CAAC;QAE/B,OAAO,CAAE,KAAK,GAAG,YAAY,CAAC,IAAI,CAAE,IAAI,CAAE,CAAE,KAAK,IAAI,EAAG;YACvD,qDAAqD;YACrD,IAAI,WAAW,GAAG,KAAK,CAAE,CAAC,CAAE,EAC3B,WAAW,GAAG,WAAW,CAAC,OAAO,CAAE,YAAY,EAAE,EAAE,CAAE,EAAE,+DAA+D;YACtH,QAAQ,GAAG,CAAC,CAAC,CAAE,KAAK,CAAE,CAAC,CAAE,IAAI,KAAK,CAAE,CAAC,CAAE,CAAE,EAAE,sEAAsE;YACjH,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAE,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAE,EAClE,KAAK,GAAG,IAAI,CAAC,MAAM,CAAE,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAE,EAC1D,YAAY,GAAG,CAAC,MAAM,CAAC,KAAK,CAAE,IAAI,CAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAE,IAAI,CAAE,CAAC;YAE9D,IAAI,IAAI,CAAC,SAAS,CAAE,KAAK,CAAE,CAAC,CAAE,CAAE,IAAI,IAAI,CAAC,SAAS,CAAE,WAAW,CAAE,IAAI,YAAY,EAAG;gBACnF,OAAO,CAAC,IAAI,CAAE,IAAI,UAAU,CAAE;oBAC7B,UAAU,EAAE,UAAU;oBACtB,WAAW,EAAE,WAAW;oBACxB,MAAM,EAAE,KAAK,CAAC,KAAK;oBACnB,MAAM,EAAE,WAAW;oBACnB,QAAQ,EAAE,QAAQ;iBAClB,CAAE,CAAE,CAAC;aACN;SACD;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;IAGS,gCAAS,GAAnB,UAAqB,IAAY;QAChC,OAAO,UAAU,CAAC,IAAI,CAAE,IAAI,CAAE,CAAC;IAChC,CAAC;IAEF,mBAAC;AAAD,CA3DA,AA2DC,CA3DiC,OAAO,GA2DxC","file":"phone-matcher.js","sourcesContent":["import { Matcher } from \"./matcher\";\nimport { PhoneMatch } from \"../match/phone-match\";\nimport { Match } from \"../match/match\";\nimport { nonDigitRe } from '../regex-lib';\n\n// RegExp objects which are shared by all instances of PhoneMatcher. These are\n// here to avoid re-instantiating the RegExp objects if `Autolinker.link()` is\n// called multiple times, thus instantiating PhoneMatcher and its RegExp \n// objects each time (which is very expensive - see https://github.com/gregjacobs/Autolinker.js/issues/314). \n// See descriptions of the properties where they are used for details about them\nconst phoneMatcherRegex = /(?:(?:(?:(\\+)?\\d{1,3}[-\\040.]?)?\\(?\\d{3}\\)?[-\\040.]?\\d{3}[-\\040.]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\\040.]?(?:\\d[-\\040.]?){6,12}\\d+))([,;]+[0-9]+#?)*/g;\n\n/**\n * @class Autolinker.matcher.Phone\n * @extends Autolinker.matcher.Matcher\n *\n * Matcher to find Phone number matches in an input string.\n *\n * See this class's superclass ({@link Autolinker.matcher.Matcher}) for more\n * details.\n */\nexport class PhoneMatcher extends Matcher {\n\n\t/**\n\t * The regular expression to match Phone numbers. Example matches:\n\t *\n\t * (123) 456-7890\n\t * 123 456 7890\n\t * 123-456-7890\n\t * +18004441234,,;,10226420346#\n\t * +1 (800) 444 1234\n\t * 10226420346#\n\t * 1-800-444-1234,1022,64,20346#\n\t *\n\t * This regular expression has the following capturing groups:\n\t *\n\t * 1 or 2. The prefixed '+' sign, if there is one.\n\t *\n\t * @protected\n\t * @property {RegExp} matcherRegex\n\t */\n\tprotected matcherRegex = phoneMatcherRegex;\n\n\t/**\n\t * @inheritdoc\n\t */\n\tparseMatches( text: string ) {\n\t\tlet matcherRegex = this.matcherRegex,\n\t\t\ttagBuilder = this.tagBuilder,\n\t\t\tmatches: Match[] = [],\n\t\t\tmatch: RegExpExecArray | null;\n\n\t\twhile( ( match = matcherRegex.exec( text ) ) !== null ) {\n\t\t\t// Remove non-numeric values from phone number string\n\t\t\tvar matchedText = match[ 0 ],\n\t\t\t\tcleanNumber = matchedText.replace( /[^0-9,;#]/g, '' ), // strip out non-digit characters exclude comma semicolon and #\n\t\t\t\tplusSign = !!( match[ 1 ] || match[ 2 ] ), // match[ 1 ] or match[ 2 ] is the prefixed plus sign, if there is one\n\t\t\t\tbefore = match.index == 0 ? '' : text.substr( match.index - 1, 1 ),\n\t\t\t\tafter = text.substr( match.index + matchedText.length, 1 ),\n\t\t\t\tcontextClear = !before.match( /\\d/ ) && !after.match( /\\d/ );\n\n\t\t\tif( this.testMatch( match[ 3 ] ) && this.testMatch( matchedText ) && contextClear ) {\n\t\t\t\tmatches.push( new PhoneMatch( {\n\t\t\t\t\ttagBuilder: tagBuilder,\n\t\t\t\t\tmatchedText: matchedText,\n\t\t\t\t\toffset: match.index,\n\t\t\t\t\tnumber: cleanNumber,\n\t\t\t\t\tplusSign: plusSign\n\t\t\t\t} ) );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t}\n\n\n\tprotected testMatch( text: string ) {\n\t\treturn nonDigitRe.test( text );\n\t}\n\n}\n"]}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/truncate/truncate-end.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAE,UAAkB,EAAE,WAAmB,EAAE,aAAsB;IAC3F,OAAO,QAAQ,CAAE,UAAU,EAAE,WAAW,EAAE,aAAa,CAAE,CAAC;AAC3D,CAAC","file":"truncate-end.js","sourcesContent":["import { ellipsis } from \"../utils\";\n\n/**\n * A truncation feature where the ellipsis will be placed at the end of the URL.\n *\n * @param {String} anchorText\n * @param {Number} truncateLen The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars The characters to place within the url, e.g. \"..\".\n * @return {String} The truncated URL.\n */\nexport function truncateEnd( anchorText: string, truncateLen: number, ellipsisChars?: string){\n\treturn ellipsis( anchorText, truncateLen, ellipsisChars );\n}\n"]}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/truncate/truncate-middle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAE,GAAW,EAAE,WAAmB,EAAE,aAAsB;IACtF,IAAI,GAAG,CAAC,MAAM,IAAI,WAAW,EAAE;QAC7B,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,2BAAmC,CAAC;IACxC,IAAI,cAAsB,CAAC;IAE3B,IAAG,aAAa,IAAI,IAAI,EAAE;QACxB,aAAa,GAAG,UAAU,CAAC;QAC3B,2BAA2B,GAAG,CAAC,CAAC;QAChC,cAAc,GAAG,CAAC,CAAC;KACpB;SAAM;QACL,2BAA2B,GAAG,aAAa,CAAC,MAAM,CAAC;QACnD,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC;KACvC;IAED,IAAI,eAAe,GAAG,WAAW,GAAG,cAAc,CAAC;IACnD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,eAAe,GAAG,CAAC,EAAE;QACvB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAC,IAAI,CAAC,KAAK,CAAC,eAAe,GAAC,CAAC,CAAC,CAAC,CAAC;KACtD;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,GAAC,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,eAAe,GAAG,2BAA2B,CAAC,CAAC;AACtI,CAAC","file":"truncate-middle.js","sourcesContent":["/**\n * Date: 2015-10-05\n * Author: Kasper Søfren <soefritz@gmail.com> (https://github.com/kafoso)\n *\n * A truncation feature, where the ellipsis will be placed in the dead-center of the URL.\n *\n * @param {String} url A URL.\n * @param {Number} truncateLen The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars The characters to place within the url, e.g. \"..\".\n * @return {String} The truncated URL.\n */\nexport function truncateMiddle( url: string, truncateLen: number, ellipsisChars?: string ){\n if (url.length <= truncateLen) {\n return url;\n }\n\n let ellipsisLengthBeforeParsing: number;\n let ellipsisLength: number;\n\n if(ellipsisChars == null) {\n ellipsisChars = '…';\n ellipsisLengthBeforeParsing = 8;\n ellipsisLength = 3;\n } else {\n ellipsisLengthBeforeParsing = ellipsisChars.length;\n ellipsisLength = ellipsisChars.length;\n }\n\n let availableLength = truncateLen - ellipsisLength;\n let end = \"\";\n if (availableLength > 0) {\n end = url.substr((-1)*Math.floor(availableLength/2));\n }\n return (url.substr(0, Math.ceil(availableLength/2)) + ellipsisChars + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\n"]}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user