Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
79 KiB

/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*
* Originally from:
* https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
4 years ago
import { MOUNT_CLASS_TO } from '../config/debug';
import mediaSizes from '../helpers/mediaSizes';
// !WARNING, ТУТ СЛОЖНО! по-хорошему, надо бы это переделать без fe0f, но они здесь необходимы чтобы отрендерить панель, и ниже дописаны 3 элемента которые не воспроизводятся без fe0f
export const Emoji: {[emoji: string]: number} = {"2049":62748,"2122":62776,"2139":62801,"2194":62678,"2195":62677,"2196":62676,"2197":62670,"2198":62672,"2199":62674,"2328":61155,"2600":4954,"2601":4962,"2602":4977,"2603":4982,"2604":4984,"2611":62764,"2614":4978,"2615":3750,"2618":2639,"2620":196,"2622":62667,"2623":62668,"2626":62697,"2638":62694,"2639":168,"2648":62702,"2649":62703,"2650":62710,"2651":62711,"2652":62712,"2653":62713,"2660":51057,"2663":51060,"2665":51058,"2666":51059,"2668":4832,"2692":61258,"2693":4887,"2694":61261,"2696":61272,"2697":61280,"2699":61270,"2702":61245,"2705":62763,"2708":4895,"2709":61206,"2712":61220,"2714":62765,"2716":62742,"2721":62693,"2728":5993,"2733":62771,"2734":62772,"2744":4981,"2747":62773,"2753":62749,"2754":62750,"2755":62751,"2757":62752,"2763":1127,"2764":1129,"2795":62743,"2796":62744,"2797":62745,"2934":62681,"2935":62682,"3030":62753,"3297":62825,"3299":62826,"0023-20e3":62777,"002a-20e3":62778,"0030-20e3":62779,"0031-20e3":62780,"0032-20e3":62781,"0033-20e3":62782,"0034-20e3":62783,"0035-20e3":62784,"0036-20e3":62785,"0037-20e3":62786,"0038-20e3":62787,"0039-20e3":62788,"00a9":62774,"00ae":62775,"1f004":51063,"1f0cf":51062,"1f170":62795,"1f171":62797,"1f17e":62806,"1f17f":62808,"1f18e":62796,"1f191":62798,"1f192":62799,"1f193":62800,"1f194":62802,"1f195":62804,"1f196":62805,"1f197":62807,"1f198":62809,"1f199":62810,"1f19a":62811,"1f1e6-1f1e8":71550,"1f1e6-1f1e9":71551,"1f1e6-1f1ea":71552,"1f1e6-1f1eb":71553,"1f1e6-1f1ec":71554,"1f1e6-1f1ee":71555,"1f1e6-1f1f1":71556,"1f1e6-1f1f2":71557,"1f1e6-1f1f4":71558,"1f1e6-1f1f6":71559,"1f1e6-1f1f7":71560,"1f1e6-1f1f8":71561,"1f1e6-1f1f9":71562,"1f1e6-1f1fa":71563,"1f1e6-1f1fc":71564,"1f1e6-1f1fd":71565,"1f1e6-1f1ff":71566,"1f1e7-1f1e6":71567,"1f1e7-1f1e7":71568,"1f1e7-1f1e9":71569,"1f1e7-1f1ea":71570,"1f1e7-1f1eb":71571,"1f1e7-1f1ec":71572,"1f1e7-1f1ed":71573,"1f1e7-1f1ee":71574,"1f1e7-1f1ef":71575,"1f1e7-1f1f1":71576,"1f1e7-1f1f2":71577,"1f1e7-1f1f3":71578,"1f1e7-1f1f4":71579,"1f1e7-1f1f6":71580,"1f1e7-1f1f7":71581,"1f1e7-1f1f8":71582,"1f1e7-1f1f9":71583,"1f1e7-1f1fb":71584,"1f1e7-1f1fc":71585,"1f1e7-1f1fe":71586,"1f1e7-1f1ff":71587,"1f1e8-1f1e6":71588,"1f1e8-1f1e8":71589,"1f1e8-1f1e9":71590,"1f1e8-1f1eb":71591,"1f1e8-1f1ec":71592,"1f1e8-1f1ed":71593,"1f1e8-1f1ee":71594,"1f1e8-1f1f0":71595,"1f1e8-1f1f1":71596,"1f1e8-1f1f2":71597,"1f1e8-1f1f3":71598,"1f1e8-1f1f4":71599,"1f1e8-1f1f5":71600,"1f1e8-1f1f7":71601,"1f1e8-1f1fa":71602,"1f1e8-1f1fb":71603,"1f1e8-1f1fc":71604,"1f1e8-1f1fd":71605,"1f1e8-1f1fe":71606,"1f1e8-1f1ff":71607,"1f1e9-1f1ea":71608,"1f1e9-1f1ec":71609,"1f1e9-1f1ef":71610,"1f1e9-1f1f0":71611,"1f1e9-1f1f2":71612,"1f1e9-1f1f4":71613,"1f1e9-1f1ff":71614,"1f1ea-1f1e6":71615,"1f1ea-1f1e8":71616,"1f1ea-1f1ea":71617,"1f1ea-1f1ec":71618,"1f1ea-1f1ed":71619,"1f1ea-1f1f7":71620,"1f1ea-1f1f8":71621,"1f1ea-1f1f9":71622,"1f1ea-1f1fa":71623,"1f1eb-1f1ee":71624,"1f1eb-1f1ef":71625,"1f1eb-1f1f0":71626,"1f1eb-1f1f2":71627,"1f1eb-1f1f4":71628,"1f1eb-1f1f7":71629,"1f1ec-1f1e6":71630,"1f1ec-1f1e7":71631,"1f1ec-1f1e9":71632,"1f1ec-1f1ea":71633,"1f1ec-1f1eb":71634,"1f1ec-1f1ec":71635,"1f1ec-1f1ed":71636,"1f1ec-1f1ee":71637,"1f1ec-1f1f1":71638,"1f1ec-1f1f2":71639,"1f1ec-1f1f3":71640,"1f1ec-1f1f5":71641,"1f1ec-1f1f6":71642,"1f1ec-1f1f7":71643,"1f1ec-1f1f8":71644,"1f1ec-1f1f9":71645,"1f1ec-1f1fa":71646,"1f1ec-1f1fc":71647,"1f1ec-1f1fe":71648,"1f1ed-1f1f0":71649,"1f1ed-1f1f2":71650,"1f1ed-1f1f3":71651,"1f1ed-1f1f7":71652,"1f1ed-1f1f9":71653,"1f1ed-1f1fa":71654,"1f1ee-1f1e8":71655,"1f1ee-1f1e9":71656,"1f1ee-1f1ea":71657,"1f1ee-1f1f1":71658,"1f1ee-1f1f2":71659,"1f1ee-1f1f3":71660,"1f1ee-1f1f4":71661,"1f1ee-1f1f6":71662,"1f1ee-1f1f7":71663,"1f1ee-1f1f8":71664,"1f1ee-1f1f9":71665,"1f1ef-1f1ea":71666,"1f1ef-1f1f2":71667,"1f1ef-1f1f4":71668,"1f1ef-1f1f5":71669,"1f1f0-1f1ea":71670,"1f1f0-1f1ec":71671,"1f1f0-1f1ed":71672,"1f1f0-1f1ee":71673,"1f1f0-1f1f2":71674,"1f1f0-1f1f3":71675,"1f1f0-1f1f5":71676,"1f1f0-1f1f7":71677,"1f1f0-1f1fc":71678,"1f1f0-1f1fe":71679,"1f1f0-1f1ff":71680,"1f1f1-1f1e6":71681,"1f1f1-1f1e7":71682,"1f1f1-1f1e8":71683,"1f1f1-1
/* Emoji["00a9-fe0f"] = 6362;
Emoji["00ae-fe0f"] = 6363;
Emoji["2122-fe0f"] = 6364; */
// From https://github.com/stephenmathieson/node-tlds/blob/master/index.js
export const TLD = ['abogado', 'ac', 'academy', 'accountants', 'active', 'actor', 'ad', 'adult', 'ae', 'aero', 'af', 'ag', 'agency', 'ai', 'airforce', 'al', 'allfinanz', 'alsace', 'am', 'amsterdam', 'an', 'android', 'ao', 'apartments', 'aq', 'aquarelle', 'ar', 'archi', 'army', 'arpa', 'as', 'asia', 'associates', 'at', 'attorney', 'au', 'auction', 'audio', 'autos', 'aw', 'ax', 'axa', 'az', 'ba', 'band', 'bank', 'bar', 'barclaycard', 'barclays', 'bargains', 'bayern', 'bb', 'bd', 'be', 'beer', 'berlin', 'best', 'bf', 'bg', 'bh', 'bi', 'bid', 'bike', 'bingo', 'bio', 'biz', 'bj', 'black', 'blackfriday', 'bloomberg', 'blue', 'bm', 'bmw', 'bn', 'bnpparibas', 'bo', 'boo', 'boutique', 'br', 'brussels', 'bs', 'bt', 'budapest', 'build', 'builders', 'business', 'buzz', 'bv', 'bw', 'by', 'bz', 'bzh', 'ca', 'cab', 'cal', 'camera', 'camp', 'cancerresearch', 'canon', 'capetown', 'capital', 'caravan', 'cards', 'care', 'career', 'careers', 'cartier', 'casa', 'cash', 'cat', 'catering', 'cc', 'cd', 'center', 'ceo', 'cern', 'cf', 'cg', 'ch', 'channel', 'chat', 'cheap', 'christmas', 'chrome', 'church', 'ci', 'citic', 'city', 'ck', 'cl', 'claims', 'cleaning', 'click', 'clinic', 'clothing', 'club', 'cm', 'cn', 'co', 'coach', 'codes', 'coffee', 'college', 'cologne', 'com', 'community', 'company', 'computer', 'condos', 'construction', 'consulting', 'contractors', 'cooking', 'cool', 'coop', 'country', 'cr', 'credit', 'creditcard', 'cricket', 'crs', 'cruises', 'cu', 'cuisinella', 'cv', 'cw', 'cx', 'cy', 'cymru', 'cz', 'dabur', 'dad', 'dance', 'dating', 'day', 'dclk', 'de', 'deals', 'degree', 'delivery', 'democrat', 'dental', 'dentist', 'desi', 'design', 'dev', 'diamonds', 'diet', 'digital', 'direct', 'directory', 'discount', 'dj', 'dk', 'dm', 'dnp', 'do', 'docs', 'domains', 'doosan', 'durban', 'dvag', 'dz', 'eat', 'ec', 'edu', 'education', 'ee', 'eg', 'email', 'emerck', 'energy', 'engineer', 'engineering', 'enterprises', 'equipment', 'er', 'es', 'esq', 'estate', 'et', 'eu', 'eurovision', 'eus', 'events', 'everbank', 'exchange', 'expert', 'exposed', 'fail', 'farm', 'fashion', 'feedback', 'fi', 'finance', 'financial', 'firmdale', 'fish', 'fishing', 'fit', 'fitness', 'fj', 'fk', 'flights', 'florist', 'flowers', 'flsmidth', 'fly', 'fm', 'fo', 'foo', 'forsale', 'foundation', 'fr', 'frl', 'frogans', 'fund', 'furniture', 'futbol', 'ga', 'gal', 'gallery', 'garden', 'gb', 'gbiz', 'gd', 'ge', 'gent', 'gf', 'gg', 'ggee', 'gh', 'gi', 'gift', 'gifts', 'gives', 'gl', 'glass', 'gle', 'global', 'globo', 'gm', 'gmail', 'gmo', 'gmx', 'gn', 'goog', 'google', 'gop', 'gov', 'gp', 'gq', 'gr', 'graphics', 'gratis', 'green', 'gripe', 'gs', 'gt', 'gu', 'guide', 'guitars', 'guru', 'gw', 'gy', 'hamburg', 'hangout', 'haus', 'healthcare', 'help', 'here', 'hermes', 'hiphop', 'hiv', 'hk', 'hm', 'hn', 'holdings', 'holiday', 'homes', 'horse', 'host', 'hosting', 'house', 'how', 'hr', 'ht', 'hu', 'ibm', 'id', 'ie', 'ifm', 'il', 'im', 'immo', 'immobilien', 'in', 'industries', 'info', 'ing', 'ink', 'institute', 'insure', 'int', 'international', 'investments', 'io', 'iq', 'ir', 'irish', 'is', 'it', 'iwc', 'jcb', 'je', 'jetzt', 'jm', 'jo', 'jobs', 'joburg', 'jp', 'juegos', 'kaufen', 'kddi', 'ke', 'kg', 'kh', 'ki', 'kim', 'kitchen', 'kiwi', 'km', 'kn', 'koeln', 'kp', 'kr', 'krd', 'kred', 'kw', 'ky', 'kyoto', 'kz', 'la', 'lacaixa', 'land', 'lat', 'latrobe', 'lawyer', 'lb', 'lc', 'lds', 'lease', 'legal', 'lgbt', 'li', 'lidl', 'life', 'lighting', 'limited', 'limo', 'link', 'lk', 'loans', 'london', 'lotte', 'lotto', 'lr', 'ls', 'lt', 'ltda', 'lu', 'luxe', 'luxury', 'lv', 'ly', 'ma', 'madrid', 'maison', 'management', 'mango', 'market', 'marketing', 'marriott', 'mc', 'md', 'me', 'media', 'meet', 'melbourne', 'meme', 'memorial', 'menu', 'mg', 'mh', 'miami', 'mil', 'mini', 'mk', 'ml', 'mm', 'mn', 'mo', 'mobi', 'moda', 'moe', 'monash', 'money', 'mormon', 'mortgage', 'moscow', 'motorcycles', 'mov', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'museum', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'nagoya', 'name', 'navy', 'nc', 'ne', 'net', 'network', 'neustar', 'new', 'nexus', 'nf', 'ng', 'ngo', 'nhk', 'ni', 'nic
// From https://raw.githubusercontent.com/FGRibreau/latenize/master/latinize_map.js
export const LatinizeMap: {[k: string]: string} = {'Á': 'A','Ă': 'A','Ắ': 'A','Ặ': 'A','Ằ': 'A','Ẳ': 'A','Ẵ': 'A','Ǎ': 'A','Â': 'A','Ấ': 'A','Ậ': 'A','Ầ': 'A','Ẩ': 'A','Ẫ': 'A','Ä': 'A','Ǟ': 'A','Ȧ': 'A','Ǡ': 'A','Ạ': 'A','Ȁ': 'A','À': 'A','Ả': 'A','Ȃ': 'A','Ā': 'A','Ą': 'A','Å': 'A','Ǻ': 'A','Ḁ': 'A','Ⱥ': 'A','Ã': 'A','Ꜳ': 'AA','Æ': 'AE','Ǽ': 'AE','Ǣ': 'AE','Ꜵ': 'AO','Ꜷ': 'AU','Ꜹ': 'AV','Ꜻ': 'AV','Ꜽ': 'AY','Ḃ': 'B','Ḅ': 'B','Ɓ': 'B','Ḇ': 'B','Ƀ': 'B','Ƃ': 'B','Ć': 'C','Č': 'C','Ç': 'C','Ḉ': 'C','Ĉ': 'C','Ċ': 'C','Ƈ': 'C','Ȼ': 'C','Ď': 'D','Ḑ': 'D','Ḓ': 'D','Ḋ': 'D','Ḍ': 'D','Ɗ': 'D','Ḏ': 'D','Dz': 'D','Dž': 'D','Đ': 'D','Ƌ': 'D','DZ': 'DZ','DŽ': 'DZ','É': 'E','Ĕ': 'E','Ě': 'E','Ȩ': 'E','Ḝ': 'E','Ê': 'E','Ế': 'E','Ệ': 'E','Ề': 'E','Ể': 'E','Ễ': 'E','Ḙ': 'E','Ë': 'E','Ė': 'E','Ẹ': 'E','Ȅ': 'E','È': 'E','Ẻ': 'E','Ȇ': 'E','Ē': 'E','Ḗ': 'E','Ḕ': 'E','Ę': 'E','Ɇ': 'E','Ẽ': 'E','Ḛ': 'E','Ꝫ': 'ET','Ḟ': 'F','Ƒ': 'F','Ǵ': 'G','Ğ': 'G','Ǧ': 'G','Ģ': 'G','Ĝ': 'G','Ġ': 'G','Ɠ': 'G','Ḡ': 'G','Ǥ': 'G','Ḫ': 'H','Ȟ': 'H','Ḩ': 'H','Ĥ': 'H','Ⱨ': 'H','Ḧ': 'H','Ḣ': 'H','Ḥ': 'H','Ħ': 'H','Í': 'I','Ĭ': 'I','Ǐ': 'I','Î': 'I','Ï': 'I','Ḯ': 'I','İ': 'I','Ị': 'I','Ȉ': 'I','Ì': 'I','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Z','Ⱬ': 'Z','Ż': 'Z','Ẓ': 'Z','Ȥ': 'Z','Ẕ': 'Z','Ƶ': 'Z','IJ': 'IJ','Œ': 'OE','ᴀ': 'A','ᴁ': 'AE','ʙ': 'B','ᴃ': 'B','ᴄ': 'C','ᴅ': 'D','ᴇ': 'E','ꜰ': 'F','ɢ': 'G','ʛ': 'G','ʜ': 'H','ɪ': 'I','ʁ': 'R','ᴊ': 'J','ᴋ': 'K','ʟ': 'L','ᴌ': 'L','ᴍ': 'M','ɴ': 'N','ᴏ': 'O','ɶ': 'OE','ᴐ': 'O','ᴕ': 'OU','ᴘ': 'P','ʀ': 'R','ᴎ': 'N','ᴙ': 'R','ꜱ': 'S','ᴛ': 'T','ⱻ': 'E','ᴚ': 'R','ᴜ': 'U','ᴠ': 'V','ᴡ': 'W','ʏ': 'Y','ᴢ': 'Z','á': 'a','ă': 'a','ắ': 'a','ặ': 'a','ằ': 'a','ẳ':
const Config = {
Emoji,
LatinizeMap,
TLD,
MediaSizes: mediaSizes
};
MOUNT_CLASS_TO.Config = Config;
export default Config;